From 88cb94943d186b616876d080a8633177bb4648c3 Mon Sep 17 00:00:00 2001 From: Maina Wycliffe Date: Thu, 23 Nov 2023 17:20:51 +0300 Subject: [PATCH 1/3] chore: update @clerk/nextjs to the latest version --- package-lock.json | 348 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 188 insertions(+), 162 deletions(-) diff --git a/package-lock.json b/package-lock.json index b52a17755..7161d3cda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.2.1", "dependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@clerk/nextjs": "^4.23.2", + "@clerk/nextjs": "^4.27.2", "@headlessui-float/react": "^0.11.4", "@headlessui/react": "^1.7.17", "@heroicons/react": "^1.0.3", @@ -2364,11 +2364,12 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "node_modules/@clerk/backend": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-0.27.0.tgz", - "integrity": "sha512-Sj541JrpqAn1A/UwdyDBxFV3stq2A/Pe/8HdPTG3Cct6briPyavfi46O5s1+L3BSvUcKUY+UbM0+8VsoCNFi4w==", + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-0.34.2.tgz", + "integrity": "sha512-ouulkcT6kfbAPw3w0vbkl758KzQ2y9UUnuhRJ5dY3SPGNjJnpes1BNETLnA1O3llZVV5yYexluhee4XmFcwV3A==", "dependencies": { - "@clerk/types": "^3.49.0", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "@peculiar/webcrypto": "1.4.1", "@types/node": "16.18.6", "cookie": "0.5.0", @@ -2400,12 +2401,12 @@ "integrity": "sha512-VzW+TAk2wE4X9maiKMlT+GsPU4OMmR1U9CrHSmd3DFLn2IcZ9VJ6M6BBugGfYUnPCLSYxXdZy17M0BEJyhUTwg==" }, "node_modules/@clerk/clerk-react": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-4.23.2.tgz", - "integrity": "sha512-6MJa8ecr22qHhTfdkMMIJGctMBqj01fLJ4vmfZvr22tIkwkPXoeYJd5XcFKuSoO2dXc1eHD/F9i/HdCqGm68gw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-4.28.1.tgz", + "integrity": "sha512-xfdLOqnbONwt+/kUh5+Fzs0wAJcLD4Bc0mM/af0Wlu1zdnggVR8da29fw+pZL5p8VGXavxP3hJdS9vvj5hFX+g==", "dependencies": { - "@clerk/shared": "^0.21.0", - "@clerk/types": "^3.49.0", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "tslib": "2.4.1" }, "engines": { @@ -2416,12 +2417,13 @@ } }, "node_modules/@clerk/clerk-sdk-node": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@clerk/clerk-sdk-node/-/clerk-sdk-node-4.12.2.tgz", - "integrity": "sha512-7xYPsLSeGO5XoP0No/9m2dsCMezwtmiYGKOwWzt41ZzJNFlU0rfqYF3VOZEsbtQlc3ZXeU+67ItjoJYrf3kT6A==", + "version": "4.12.22", + "resolved": "https://registry.npmjs.org/@clerk/clerk-sdk-node/-/clerk-sdk-node-4.12.22.tgz", + "integrity": "sha512-O1PWDzmECO8VoGEZG8m2QYkJzDDMiUqTGsn73u3ki1V2bX24BeFokSKlsLgklgpVXUhSeKp8A8wBrDOOY2Qpew==", "dependencies": { - "@clerk/backend": "^0.27.0", - "@clerk/types": "^3.49.0", + "@clerk/backend": "0.34.2", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "@types/cookies": "0.7.7", "@types/express": "4.17.14", "@types/node-fetch": "2.6.2", @@ -2433,41 +2435,6 @@ "node": ">=14" } }, - "node_modules/@clerk/clerk-sdk-node/node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@clerk/clerk-sdk-node/node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@clerk/clerk-sdk-node/node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "engines": { - "node": ">=8" - } - }, "node_modules/@clerk/clerk-sdk-node/node_modules/snakecase-keys": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-3.2.1.tgz", @@ -2481,14 +2448,15 @@ } }, "node_modules/@clerk/nextjs": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-4.23.2.tgz", - "integrity": "sha512-99bSVu9r1E9MxybO/6mmPAufSKq4KU7SFeMVkylX7UF8sy5t/LE9cLHyc+9jitcCGgZNai9Om4sj1WIgkNOP8w==", - "dependencies": { - "@clerk/backend": "^0.27.0", - "@clerk/clerk-react": "^4.23.2", - "@clerk/clerk-sdk-node": "^4.12.2", - "@clerk/types": "^3.49.0", + "version": "4.27.2", + "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-4.27.2.tgz", + "integrity": "sha512-zIwzDa5ph9ZPBFSshtFK2LSH61NK0v9ifIPVsQSpVupUzUkJUat8s2n/8GRY93o/3zBTeaCJZQZyIejFCpO9gg==", + "dependencies": { + "@clerk/backend": "0.34.2", + "@clerk/clerk-react": "4.28.1", + "@clerk/clerk-sdk-node": "4.12.22", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "path-to-regexp": "6.2.1", "tslib": "2.4.1" }, @@ -2507,16 +2475,21 @@ "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" }, "node_modules/@clerk/shared": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-0.21.0.tgz", - "integrity": "sha512-tkV2OAddFMPBHDjcMbtNNrV3NQD+hGKf2hn3TKv1mRJNZ2oR5Bfk8r0bkaqwoqxX8ndkbHLCa9gwR8SWO7GGow==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-1.1.1.tgz", + "integrity": "sha512-pEzhalD1Yo/gGsOE2BQugVQTjlIl2aYmoeRld3BDXHRDV1jnk+yUE2CFOw6bojgFWN9sbeN/ph/47UWvvoCSOg==", "dependencies": { "glob-to-regexp": "0.4.1", "js-cookie": "3.0.1", - "swr": "1.3.0" + "swr": "2.2.0" }, "peerDependencies": { "react": ">=16" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + } } }, "node_modules/@clerk/shared/node_modules/js-cookie": { @@ -2528,9 +2501,9 @@ } }, "node_modules/@clerk/types": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/@clerk/types/-/types-3.49.0.tgz", - "integrity": "sha512-vAx5R/iYfsgIaIDMiDr6ZKQnAneAmRrUVYz6KCtPG6/hnEAnRYhwXpEUi89e5G0BFmuUfSxe/N/Anfc1PNteXQ==", + "version": "3.58.0", + "resolved": "https://registry.npmjs.org/@clerk/types/-/types-3.58.0.tgz", + "integrity": "sha512-fIsvEM3nYQwViOuYxNVcwEl0WkXW6AdYpSghNBKfOge1kriSSHP++T5rRMJBXy6asl2AEydVlUBKx9drAzqKoA==", "dependencies": { "csstype": "3.1.1" }, @@ -5665,15 +5638,20 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", - "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", + "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", "dependencies": { "asn1js": "^3.0.5", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" } }, + "node_modules/@peculiar/asn1-schema/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@peculiar/json-schema": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", @@ -10877,9 +10855,9 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "node_modules/@types/keygrip": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz", - "integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.6.tgz", + "integrity": "sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==" }, "node_modules/@types/lodash": { "version": "4.14.185", @@ -13264,6 +13242,30 @@ "node": ">= 6" } }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "engines": { + "node": ">=8" + } + }, "node_modules/caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -23925,6 +23927,17 @@ "tmpl": "1.0.5" } }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/map-or-similar": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", @@ -30670,13 +30683,18 @@ } }, "node_modules/pvtsutils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", - "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.1" } }, + "node_modules/pvtsutils/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/pvutils": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", @@ -34907,17 +34925,6 @@ "node": ">=12" } }, - "node_modules/snakecase-keys/node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/snakecase-keys/node_modules/type-fest": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", @@ -35915,9 +35922,12 @@ } }, "node_modules/swr": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz", - "integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.0.tgz", + "integrity": "sha512-AjqHOv2lAhkuUdIiBu9xbuettzAzWXmCEcLONNKJRba87WAefz8Ca9d6ds/SzrPc235n1IxWYdhJ2zF3MNUaoQ==", + "dependencies": { + "use-sync-external-store": "^1.2.0" + }, "peerDependencies": { "react": "^16.11.0 || ^17.0.0 || ^18.0.0" } @@ -40389,11 +40399,12 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "@clerk/backend": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-0.27.0.tgz", - "integrity": "sha512-Sj541JrpqAn1A/UwdyDBxFV3stq2A/Pe/8HdPTG3Cct6briPyavfi46O5s1+L3BSvUcKUY+UbM0+8VsoCNFi4w==", + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-0.34.2.tgz", + "integrity": "sha512-ouulkcT6kfbAPw3w0vbkl758KzQ2y9UUnuhRJ5dY3SPGNjJnpes1BNETLnA1O3llZVV5yYexluhee4XmFcwV3A==", "requires": { - "@clerk/types": "^3.49.0", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "@peculiar/webcrypto": "1.4.1", "@types/node": "16.18.6", "cookie": "0.5.0", @@ -40421,22 +40432,23 @@ } }, "@clerk/clerk-react": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-4.23.2.tgz", - "integrity": "sha512-6MJa8ecr22qHhTfdkMMIJGctMBqj01fLJ4vmfZvr22tIkwkPXoeYJd5XcFKuSoO2dXc1eHD/F9i/HdCqGm68gw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-4.28.1.tgz", + "integrity": "sha512-xfdLOqnbONwt+/kUh5+Fzs0wAJcLD4Bc0mM/af0Wlu1zdnggVR8da29fw+pZL5p8VGXavxP3hJdS9vvj5hFX+g==", "requires": { - "@clerk/shared": "^0.21.0", - "@clerk/types": "^3.49.0", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "tslib": "2.4.1" } }, "@clerk/clerk-sdk-node": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@clerk/clerk-sdk-node/-/clerk-sdk-node-4.12.2.tgz", - "integrity": "sha512-7xYPsLSeGO5XoP0No/9m2dsCMezwtmiYGKOwWzt41ZzJNFlU0rfqYF3VOZEsbtQlc3ZXeU+67ItjoJYrf3kT6A==", + "version": "4.12.22", + "resolved": "https://registry.npmjs.org/@clerk/clerk-sdk-node/-/clerk-sdk-node-4.12.22.tgz", + "integrity": "sha512-O1PWDzmECO8VoGEZG8m2QYkJzDDMiUqTGsn73u3ki1V2bX24BeFokSKlsLgklgpVXUhSeKp8A8wBrDOOY2Qpew==", "requires": { - "@clerk/backend": "^0.27.0", - "@clerk/types": "^3.49.0", + "@clerk/backend": "0.34.2", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "@types/cookies": "0.7.7", "@types/express": "4.17.14", "@types/node-fetch": "2.6.2", @@ -40445,26 +40457,6 @@ "tslib": "2.4.1" }, "dependencies": { - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - } - }, - "map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==" - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==" - }, "snakecase-keys": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-3.2.1.tgz", @@ -40477,14 +40469,15 @@ } }, "@clerk/nextjs": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-4.23.2.tgz", - "integrity": "sha512-99bSVu9r1E9MxybO/6mmPAufSKq4KU7SFeMVkylX7UF8sy5t/LE9cLHyc+9jitcCGgZNai9Om4sj1WIgkNOP8w==", - "requires": { - "@clerk/backend": "^0.27.0", - "@clerk/clerk-react": "^4.23.2", - "@clerk/clerk-sdk-node": "^4.12.2", - "@clerk/types": "^3.49.0", + "version": "4.27.2", + "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-4.27.2.tgz", + "integrity": "sha512-zIwzDa5ph9ZPBFSshtFK2LSH61NK0v9ifIPVsQSpVupUzUkJUat8s2n/8GRY93o/3zBTeaCJZQZyIejFCpO9gg==", + "requires": { + "@clerk/backend": "0.34.2", + "@clerk/clerk-react": "4.28.1", + "@clerk/clerk-sdk-node": "4.12.22", + "@clerk/shared": "1.1.1", + "@clerk/types": "3.58.0", "path-to-regexp": "6.2.1", "tslib": "2.4.1" }, @@ -40497,13 +40490,13 @@ } }, "@clerk/shared": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-0.21.0.tgz", - "integrity": "sha512-tkV2OAddFMPBHDjcMbtNNrV3NQD+hGKf2hn3TKv1mRJNZ2oR5Bfk8r0bkaqwoqxX8ndkbHLCa9gwR8SWO7GGow==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-1.1.1.tgz", + "integrity": "sha512-pEzhalD1Yo/gGsOE2BQugVQTjlIl2aYmoeRld3BDXHRDV1jnk+yUE2CFOw6bojgFWN9sbeN/ph/47UWvvoCSOg==", "requires": { "glob-to-regexp": "0.4.1", "js-cookie": "3.0.1", - "swr": "1.3.0" + "swr": "2.2.0" }, "dependencies": { "js-cookie": { @@ -40514,9 +40507,9 @@ } }, "@clerk/types": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/@clerk/types/-/types-3.49.0.tgz", - "integrity": "sha512-vAx5R/iYfsgIaIDMiDr6ZKQnAneAmRrUVYz6KCtPG6/hnEAnRYhwXpEUi89e5G0BFmuUfSxe/N/Anfc1PNteXQ==", + "version": "3.58.0", + "resolved": "https://registry.npmjs.org/@clerk/types/-/types-3.58.0.tgz", + "integrity": "sha512-fIsvEM3nYQwViOuYxNVcwEl0WkXW6AdYpSghNBKfOge1kriSSHP++T5rRMJBXy6asl2AEydVlUBKx9drAzqKoA==", "requires": { "csstype": "3.1.1" } @@ -42481,13 +42474,20 @@ "optional": true }, "@peculiar/asn1-schema": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", - "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", + "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", "requires": { "asn1js": "^3.0.5", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } } }, "@peculiar/json-schema": { @@ -46106,9 +46106,9 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "@types/keygrip": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz", - "integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.6.tgz", + "integrity": "sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==" }, "@types/lodash": { "version": "4.14.185", @@ -47977,6 +47977,23 @@ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==" }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "dependencies": { + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==" + } + } + }, "caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -56002,6 +56019,11 @@ "tmpl": "1.0.5" } }, + "map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==" + }, "map-or-similar": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", @@ -60706,11 +60728,18 @@ } }, "pvtsutils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", - "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", "requires": { - "tslib": "^2.4.0" + "tslib": "^2.6.1" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } } }, "pvutils": { @@ -63910,11 +63939,6 @@ "type-fest": "^2.5.2" }, "dependencies": { - "map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==" - }, "type-fest": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", @@ -64676,10 +64700,12 @@ "requires": {} }, "swr": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz", - "integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==", - "requires": {} + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.0.tgz", + "integrity": "sha512-AjqHOv2lAhkuUdIiBu9xbuettzAzWXmCEcLONNKJRba87WAefz8Ca9d6ds/SzrPc235n1IxWYdhJ2zF3MNUaoQ==", + "requires": { + "use-sync-external-store": "^1.2.0" + } }, "symbol-tree": { "version": "3.2.4", diff --git a/package.json b/package.json index 9decba9a8..57f6bd0ea 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ ], "dependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@clerk/nextjs": "^4.23.2", + "@clerk/nextjs": "^4.27.2", "@headlessui-float/react": "^0.11.4", "@headlessui/react": "^1.7.17", "@heroicons/react": "^1.0.3", From 735859ba802647ae89e4133cb94cc688dea6eb79 Mon Sep 17 00:00:00 2001 From: Maina Wycliffe Date: Thu, 23 Nov 2023 17:21:27 +0300 Subject: [PATCH 2/3] fix: add afterSignUp and afterSigninU URLS to signin and sign up components --- src/components/Authentication/Clerk/ClerkLogin.tsx | 7 ++++++- src/components/Authentication/Clerk/ClerkRegistration.tsx | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Authentication/Clerk/ClerkLogin.tsx b/src/components/Authentication/Clerk/ClerkLogin.tsx index 50efaaaf5..1e5d53858 100644 --- a/src/components/Authentication/Clerk/ClerkLogin.tsx +++ b/src/components/Authentication/Clerk/ClerkLogin.tsx @@ -1,5 +1,6 @@ import { SignIn } from "@clerk/nextjs"; import { useRouter } from "next/router"; +import { clerkUrls } from "./ClerkAuthSessionChecker"; export default function ClerkLogin() { const { query } = useRouter(); @@ -9,6 +10,10 @@ export default function ClerkLogin() { : undefined; return ( - + ); } diff --git a/src/components/Authentication/Clerk/ClerkRegistration.tsx b/src/components/Authentication/Clerk/ClerkRegistration.tsx index e620c03f8..45479a156 100644 --- a/src/components/Authentication/Clerk/ClerkRegistration.tsx +++ b/src/components/Authentication/Clerk/ClerkRegistration.tsx @@ -13,6 +13,7 @@ export default function ClerkRegistration() { ); From a2989f31aa7e45cddd0fe8740db6ea0f4be7dd2d Mon Sep 17 00:00:00 2001 From: Maina Wycliffe Date: Thu, 23 Nov 2023 17:22:02 +0300 Subject: [PATCH 3/3] fix: if user doesn't have an org created, send to create org, not switcher --- .../Clerk/ClerkAuthSessionChecker.tsx | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/Authentication/Clerk/ClerkAuthSessionChecker.tsx b/src/components/Authentication/Clerk/ClerkAuthSessionChecker.tsx index 2869c74b4..a2f2e1098 100644 --- a/src/components/Authentication/Clerk/ClerkAuthSessionChecker.tsx +++ b/src/components/Authentication/Clerk/ClerkAuthSessionChecker.tsx @@ -1,4 +1,9 @@ -import { RedirectToSignIn, useOrganization, useSession } from "@clerk/nextjs"; +import { + RedirectToSignIn, + useOrganization, + useOrganizationList, + useSession +} from "@clerk/nextjs"; import { useRouter } from "next/router"; import { useEffect } from "react"; import FullPageSkeletonLoader from "../../SkeletonLoader/FullPageSkeletonLoader"; @@ -19,13 +24,33 @@ export default function ClerkAuthSessionChecker({ children }: Props) { const { isSignedIn, isLoaded: isSessionLoaded } = useSession(); const { isLoaded: isOrganizationLoaded, organization } = useOrganization(); + // we need to check if the user has an organization and redirect them to the + // create organization page if they do not + const { isLoaded: isOrganizationListLoaded, userMemberships } = + useOrganizationList(); + const { push } = useRouter(); useEffect(() => { - if (isOrganizationLoaded && !organization) { + if (isOrganizationLoaded && isOrganizationListLoaded && !organization) { + // we should redirect to the create organization page if the user is + // signed in and does not have an organization + if (userMemberships?.count === 0) { + push(clerkUrls.createOrganization); + return; + } + // otherwise, we should redirect to the organization switcher page + // may be in the future, we should just display the organization switcher + // as a modal instead of redirecting push(clerkUrls.organizationSwitcher); } - }, [isOrganizationLoaded, organization, push]); + }, [ + isOrganizationListLoaded, + isOrganizationLoaded, + organization, + push, + userMemberships?.count + ]); if (!isOrganizationLoaded || !isSessionLoaded) { return ;