diff --git a/CHANGELOG.md b/CHANGELOG.md index 39b4d775..a3741be7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Change Log + +## [9.0.1](https://github.com/frontegg/frontegg-nextjs/compare/v8.0.26...v9.0.1) (2024-8-12) + + +### NextJS Wrapper 9.0.1: +- FR-15099 - Migrate to valtio +- FR-17012 - Support e2e sanity run +- FR-17008 - fix pipeline release version # Change Log ## [8.0.26](https://github.com/frontegg/frontegg-nextjs/compare/v8.0.25...v8.0.26) (2024-7-18) diff --git a/lerna.json b/lerna.json index cceb9c4c..adce885a 100755 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "packages/*" ], - "version": "9.0.0", + "version": "9.0.1", "npmClient": "yarn", "publishConfig": { "registry": "https://registry.npmjs.org", diff --git a/packages/example-app-directory/package.json b/packages/example-app-directory/package.json index 4065ae8e..af3c56ae 100644 --- a/packages/example-app-directory/package.json +++ b/packages/example-app-directory/package.json @@ -1,6 +1,6 @@ { "name": "@frontegg/example-app-directory", - "version": "8.0.26", + "version": "9.0.1", "private": true, "scripts": { "clean": "rm -rf ./node_modules && rm -rf ./.next", diff --git a/packages/example-pages/package.json b/packages/example-pages/package.json index 8795ec4c..0131bbf9 100644 --- a/packages/example-pages/package.json +++ b/packages/example-pages/package.json @@ -1,6 +1,6 @@ { "name": "@frontegg/example-pages", - "version": "8.0.26", + "version": "9.0.1", "private": true, "scripts": { "clean": "rm -rf ./node_modules && rm -rf ./.next", diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 8a1d3fcc..7674cbc4 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -1,7 +1,7 @@ { "name": "@frontegg/nextjs", "libName": "FronteggNextJs", - "version": "9.0.0", + "version": "9.0.1", "author": "Frontegg LTD", "license": "MIT", "repository": { @@ -27,8 +27,8 @@ "lint-json": "eslint -c .eslintrc.json -o ./lint-report.json --format json --no-color ./src/**/*.{ts,tsx}" }, "dependencies": { - "@frontegg/js": "7.1.0", - "@frontegg/react-hooks": "7.1.0", + "@frontegg/js": "7.2.0-alpha.3", + "@frontegg/react-hooks": "7.2.0-alpha.3", "http-proxy": "^1.18.1", "iron-session": "^6.3.1", "jose": "^4.12.2" diff --git a/packages/nextjs/src/sdkVersion.ts b/packages/nextjs/src/sdkVersion.ts index ef620025..b463cf10 100644 --- a/packages/nextjs/src/sdkVersion.ts +++ b/packages/nextjs/src/sdkVersion.ts @@ -1 +1 @@ -export default { version: '8.0.26' }; +export default { version: '9.0.1' }; diff --git a/packages/nextjs/src/utils/initializeFronteggApp/index.ts b/packages/nextjs/src/utils/initializeFronteggApp/index.ts index 042dd4f9..b477c2fa 100644 --- a/packages/nextjs/src/utils/initializeFronteggApp/index.ts +++ b/packages/nextjs/src/utils/initializeFronteggApp/index.ts @@ -84,17 +84,21 @@ const initializeFronteggApp = ({ tenantsState: tenantsState as AuthState['tenantsState'], }; - const sharedStore = createStore({ - context: contextOptions, - storeHolder, - previewMode: options.previewMode, - name: appName ?? 'default', - urlStrategy: options.urlStrategy, - builderMode: false, - initialState: { - auth: authOptions, - }, - }); + let sharedStore = storeHolder.store; + if (!sharedStore) { + sharedStore = createStore({ + context: contextOptions, + storeHolder, + previewMode: options.previewMode, + name: appName ?? 'default', + urlStrategy: options.urlStrategy, + builderMode: false, + initialState: { + auth: authOptions, + }, + }); + storeHolder.store = sharedStore; + } let createdApp; try { diff --git a/yarn.lock b/yarn.lock index 8e18b171..243ee0cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1290,58 +1290,39 @@ resolved "https://registry.yarnpkg.com/@frontegg/entitlements-javascript-commons/-/entitlements-javascript-commons-1.1.2.tgz#8c771cac0796fde5bbc05abe750cb6b8677ec2c6" integrity sha512-vwCFxj9KSIKHXinOH0HbBf4DhKRbUWhjCnL14+JfQnwuEl/zKtSGZoZecrXcPajWUypdi0uT+8q3GGcqnCW13Q== -"@frontegg/js@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@frontegg/js/-/js-7.1.0.tgz#57e5f30e26ad2f63ab482c80d1b66290e66705fd" - integrity sha512-LDO5Vapf3T2pPladuAKk0votJ/8DGPMaQnT5g2tSbtyKz79fDTF5IBhylxWnc8nCg4/4scbqlDKdBpKjIaIlgg== +"@frontegg/js@7.2.0-alpha.3": + version "7.2.0-alpha.3" + resolved "https://registry.yarnpkg.com/@frontegg/js/-/js-7.2.0-alpha.3.tgz#5dfd46134aab2fe4d390a340a31d40f40871f843" + integrity sha512-QmSni7+2uGfl+hLs9OMDm5KE58Vzu9XXoAJztRj98Joqn6Upw9wo1X1u57wHRsr120aUmLCgI5PR0EHqnLygqg== dependencies: "@babel/runtime" "^7.18.6" - "@frontegg/types" "7.1.0" + "@frontegg/types" "7.2.0-alpha.3" -"@frontegg/react-hooks@7.0.0-alpha.9": - version "7.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@frontegg/react-hooks/-/react-hooks-7.0.0-alpha.9.tgz#9d41e4ae55e6b33ce6db27dc71586b37dc0836de" - integrity sha512-EQ9KczRFj2DGLfSMxYxBaVQSQdBuWI9mn8zOw5m0Ev5mZn/hUTWfAAneFL9ziA2pY4XtvgUpcTlaqT0TccvS3Q== +"@frontegg/react-hooks@7.2.0-alpha.3": + version "7.2.0-alpha.3" + resolved "https://registry.yarnpkg.com/@frontegg/react-hooks/-/react-hooks-7.2.0-alpha.3.tgz#b7fd6daff20d970087357dd940bb0763ab4c4707" + integrity sha512-cNKxopipdgd/PhyJEocEBcQhtafZZA12ejNR6WmI8imGvN43BUYoUmTAQ7HFE5WS7Z0bp2hwa3vqnC2220moBQ== dependencies: "@babel/runtime" "^7.18.6" - "@frontegg/redux-store" "7.0.0-alpha.9" - "@frontegg/types" "7.0.0-alpha.9" + "@frontegg/redux-store" "7.2.0-alpha.3" + "@frontegg/types" "7.2.0-alpha.3" "@types/react" "*" + "@types/react-is" "^17.0.7" get-value "^3.0.1" + react-is "^17.0.2" -"@frontegg/redux-store@7.0.0-alpha.9": - version "7.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@frontegg/redux-store/-/redux-store-7.0.0-alpha.9.tgz#ae25592ac8c17a91b3f2225b3653f5587fa2306d" - integrity sha512-dKaF/LYJHjqJ4I/qEBLDD4st1MYbZjZmm5AQsLPQe5EUcEn4YXI4qUxeBKHIU8cO8yFjM3EgPb2vARULjL+3pg== - dependencies: - "@babel/runtime" "^7.18.6" - "@frontegg/entitlements-javascript-commons" "1.1.2" - "@frontegg/rest-api" "3.1.79-alpha.10029056154" - fast-deep-equal "3.1.3" - set-value "^4.1.0" - uuid "^8.3.2" - valtio "^1.13.0" - -"@frontegg/redux-store@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@frontegg/redux-store/-/redux-store-7.1.0.tgz#e0cc6c99ffdf273fdfda35d052f3f703834ea9b9" - integrity sha512-ttLiK2xmgq8g0WZipgQhNUyQpOwqyWPDbmjMg6I//46cn9isir5SSJ5u8YD1h65Ujfzi1CHp3DfWCHZ3x4eE0A== +"@frontegg/redux-store@7.2.0-alpha.3": + version "7.2.0-alpha.3" + resolved "https://registry.yarnpkg.com/@frontegg/redux-store/-/redux-store-7.2.0-alpha.3.tgz#5eb0511dbcd5d65f30c14c2a183fd196e2d7e76d" + integrity sha512-tErRYBuSy0m4Z0rBIc7xzKLx8/pvbywqd9RvJFtOHppALfOFzvMznW7jQSl4DJBljGg5OOTWHqk7ekXyfVALnA== dependencies: "@babel/runtime" "^7.18.6" "@frontegg/entitlements-javascript-commons" "1.1.2" "@frontegg/rest-api" "3.2.0" fast-deep-equal "3.1.3" set-value "^4.1.0" - uuid "^8.3.2" - valtio "^1.13.0" - -"@frontegg/rest-api@3.1.79-alpha.10029056154": - version "3.1.79-alpha.10029056154" - resolved "https://registry.yarnpkg.com/@frontegg/rest-api/-/rest-api-3.1.79-alpha.10029056154.tgz#18fd970c270d405caeae1283e290fa8bb524574f" - integrity sha512-BuaWboxVOj4bNjPLhtvZJ6+SrY3sX748Qa7AEvvvz56X6iBL58xngYFu7sK0CMy7K6ou1NkrHhPqI/tehMPw9A== - dependencies: - "@babel/runtime" "^7.17.2" - "@frontegg/entitlements-javascript-commons" "1.1.2" + uuid "^10.0.0" + valtio "1.13.2" "@frontegg/rest-api@3.2.0": version "3.2.0" @@ -1351,23 +1332,13 @@ "@babel/runtime" "^7.17.2" "@frontegg/entitlements-javascript-commons" "1.1.2" -"@frontegg/types@7.0.0-alpha.9": - version "7.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@frontegg/types/-/types-7.0.0-alpha.9.tgz#8e4ba1bc0f87f79e4ae5812047bf40dac787b5d9" - integrity sha512-eFqy0ycJkJCYWISeF0uvQD3LhAOOrINxoFT4Nf8mK2R3d62AlbeQpmM3vOucnFzQkbtzn2GooLFE/nCdvWRsvQ== - dependencies: - "@babel/runtime" "^7.18.6" - "@frontegg/redux-store" "7.0.0-alpha.9" - csstype "^3.0.9" - deepmerge "^4.2.2" - -"@frontegg/types@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@frontegg/types/-/types-7.1.0.tgz#0ad368b1c8618ac4e199c4e81929abd2e6da4788" - integrity sha512-ImjIf8+HvmZcJyneP01UlBfKgL5twwTKyNGrS7jgT75m6XYv28Ab1QCZpi2xA/tHkUxcyJVVieXtkxg/wtGVPA== +"@frontegg/types@7.2.0-alpha.3": + version "7.2.0-alpha.3" + resolved "https://registry.yarnpkg.com/@frontegg/types/-/types-7.2.0-alpha.3.tgz#52dbcd4369f880db50f1bd7fbbfb72b215ff7420" + integrity sha512-kFj9bcDfdCq3O2UojPpekaZm/NGsPH2/iI5H6AmQqZ8BLuXkVFutuqxCf9hFEUrx7sbLD8k8LWFkYg1iaMGx0g== dependencies: "@babel/runtime" "^7.18.6" - "@frontegg/redux-store" "7.1.0" + "@frontegg/redux-store" "7.2.0-alpha.3" csstype "^3.0.9" deepmerge "^4.2.2" @@ -3410,6 +3381,13 @@ dependencies: "@types/react" "^17" +"@types/react-is@^17.0.7": + version "17.0.7" + resolved "https://registry.yarnpkg.com/@types/react-is/-/react-is-17.0.7.tgz#1402c8f14e8533eaeeac128c0bfa11478202ae37" + integrity sha512-WrTEiT+c6rgq36QApoy0063uAOdltCrhF0QMXLIgYPaTvIdQhAB8hPb5oGGqX18xToElNILS9UprwU6GyINcJg== + dependencies: + "@types/react" "^17" + "@types/react@*", "@types/react@18.0.27", "@types/react@^18.0.27": version "18.0.27" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.27.tgz#d9425abe187a00f8a5ec182b010d4fd9da703b71" @@ -9327,6 +9305,11 @@ react-is@^16.13.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" @@ -10606,6 +10589,11 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== +uuid@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" + integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== + uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -10654,7 +10642,7 @@ validate-npm-package-name@^4.0.0: dependencies: builtins "^5.0.0" -valtio@^1.13.0: +valtio@1.13.2: version "1.13.2" resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.13.2.tgz#e31d452d5da3550935417670aafd34d832dc7241" integrity sha512-Qik0o+DSy741TmkqmRfjq+0xpZBXi/Y6+fXZLn0xNF1z/waFMbE3rkivv5Zcf9RrMUp6zswf2J7sbh2KBlba5A==