From 52ff8fe6b6ff88ceb5e1246378b54b0565bede9d Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Mon, 20 Nov 2023 12:21:29 +0200 Subject: [PATCH] chore(repo): Drop support for deprecated React versions (#2164) * chore(repo): Upgrade minimum version of react to >=18 * chore(repo): Add react-dom@>=18 peer dependency to resolve issue GH issue: https://github.com/clerk/javascript/issues/2107 * chore(repo): Add changeset * chore(localizations): Fix formatting of ru-RU --- .changeset/new-points-train.md | 14 +++ package-lock.json | 127 +++++++++++++------------ packages/chrome-extension/package.json | 3 +- packages/clerk-js/package.json | 3 +- packages/expo/package.json | 3 +- packages/localizations/package.json | 3 +- packages/localizations/src/ru-RU.ts | 21 ++-- packages/nextjs/package.json | 4 +- packages/react/package.json | 3 +- packages/remix/package.json | 4 +- packages/shared/package.json | 3 +- packages/themes/package.json | 3 +- 12 files changed, 112 insertions(+), 79 deletions(-) create mode 100644 .changeset/new-points-train.md diff --git a/.changeset/new-points-train.md b/.changeset/new-points-train.md new file mode 100644 index 00000000000..e63f4b4708c --- /dev/null +++ b/.changeset/new-points-train.md @@ -0,0 +1,14 @@ +--- +'@clerk/chrome-extension': major +'@clerk/localizations': major +'@clerk/clerk-js': major +'@clerk/nextjs': major +'@clerk/shared': major +'@clerk/themes': major +'@clerk/clerk-react': major +'@clerk/remix': major +'@clerk/clerk-expo': major +--- + +Upgrade React version to >=18 and add react-dom as peer dependency +to fix issues with vite & rollup building. diff --git a/package-lock.json b/package-lock.json index 282a6f85687..68b5b271a9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33255,16 +33255,16 @@ }, "packages/backend": { "name": "@clerk/backend", - "version": "1.0.0-alpha-v5.1", + "version": "1.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/shared": "2.0.0-alpha-v5.1", + "@clerk/shared": "2.0.0-alpha-v5.2", "cookie": "0.5.0", "snakecase-keys": "5.4.4", "tslib": "2.4.1" }, "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@cloudflare/workers-types": "^3.18.0", "@types/chai": "^4.3.3", "@types/cookie": "^0.5.1", @@ -33294,11 +33294,11 @@ }, "packages/chrome-extension": { "name": "@clerk/chrome-extension", - "version": "1.0.0-alpha-v5.1", + "version": "1.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/clerk-js": "5.0.0-alpha-v5.1", - "@clerk/clerk-react": "5.0.0-alpha-v5.1" + "@clerk/clerk-js": "5.0.0-alpha-v5.2", + "@clerk/clerk-react": "5.0.0-alpha-v5.2" }, "devDependencies": { "@types/chrome": "*", @@ -33313,17 +33313,18 @@ "node": ">=18.17.0" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" } }, "packages/clerk-js": { "name": "@clerk/clerk-js", - "version": "5.0.0-alpha-v5.1", + "version": "5.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/localizations": "2.0.0-alpha-v5.1", - "@clerk/shared": "2.0.0-alpha-v5.1", - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/localizations": "2.0.0-alpha-v5.2", + "@clerk/shared": "2.0.0-alpha-v5.2", + "@clerk/types": "4.0.0-alpha-v5.2", "@emotion/cache": "11.11.0", "@emotion/react": "11.11.1", "@floating-ui/react": "0.25.4", @@ -33371,7 +33372,8 @@ "node": ">=18.17.0" }, "peerDependencies": { - "react": ">=18" + "react": ">=18", + "react-dom": ">=18" } }, "packages/clerk-js/node_modules/ajv": { @@ -33658,17 +33660,17 @@ }, "packages/expo": { "name": "@clerk/clerk-expo", - "version": "1.0.0-alpha-v5.1", + "version": "1.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/clerk-js": "5.0.0-alpha-v5.1", - "@clerk/clerk-react": "5.0.0-alpha-v5.1", - "@clerk/shared": "2.0.0-alpha-v5.1", + "@clerk/clerk-js": "5.0.0-alpha-v5.2", + "@clerk/clerk-react": "5.0.0-alpha-v5.2", + "@clerk/shared": "2.0.0-alpha-v5.2", "base-64": "1.0.0", "react-native-url-polyfill": "2.0.0" }, "devDependencies": { - "@clerk/types": "^4.0.0-alpha-v5.1", + "@clerk/types": "^4.0.0-alpha-v5.2", "@types/base-64": "^1.0.0", "@types/node": "^18.17.0", "@types/react": "*", @@ -33685,17 +33687,18 @@ "peerDependencies": { "expo-auth-session": ">=4", "expo-web-browser": ">=12", - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" } }, "packages/fastify": { "name": "@clerk/fastify", - "version": "1.0.0-alpha-v5.1", + "version": "1.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/backend": "1.0.0-alpha-v5.1", - "@clerk/shared": "2.0.0-alpha-v5.1", - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/backend": "1.0.0-alpha-v5.2", + "@clerk/shared": "2.0.0-alpha-v5.2", + "@clerk/types": "4.0.0-alpha-v5.2", "cookies": "0.8.0" }, "devDependencies": { @@ -33713,17 +33716,17 @@ } }, "packages/gatsby-plugin-clerk": { - "version": "5.0.0-alpha-v5.1", + "version": "5.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/backend": "1.0.0-alpha-v5.1", - "@clerk/clerk-react": "5.0.0-alpha-v5.1", - "@clerk/clerk-sdk-node": "5.0.0-alpha-v5.1", + "@clerk/backend": "1.0.0-alpha-v5.2", + "@clerk/clerk-react": "5.0.0-alpha-v5.2", + "@clerk/clerk-sdk-node": "5.0.0-alpha-v5.2", "cookie": "0.5.0", "tslib": "2.4.1" }, "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@types/cookie": "^0.5.0", "@types/node": "^18.17.0", "eslint-config-custom": "*", @@ -33743,10 +33746,10 @@ }, "packages/localizations": { "name": "@clerk/localizations", - "version": "2.0.0-alpha-v5.1", + "version": "2.0.0-alpha-v5.2", "license": "MIT", "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@types/node": "^18.17.0", "eslint-config-custom": "*", "tsup": "*", @@ -33756,21 +33759,22 @@ "node": ">=18.17.0" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" } }, "packages/nextjs": { "name": "@clerk/nextjs", - "version": "5.0.0-alpha-v5.1", + "version": "5.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/backend": "1.0.0-alpha-v5.1", - "@clerk/clerk-react": "5.0.0-alpha-v5.1", - "@clerk/shared": "2.0.0-alpha-v5.1", + "@clerk/backend": "1.0.0-alpha-v5.2", + "@clerk/clerk-react": "5.0.0-alpha-v5.2", + "@clerk/shared": "2.0.0-alpha-v5.2", "path-to-regexp": "6.2.1" }, "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@types/node": "^18.17.0", "@types/react": "*", "@types/react-dom": "*", @@ -33784,8 +33788,8 @@ }, "peerDependencies": { "next": ">=10", - "react": "^17.0.2 || ^18.0.0-0", - "react-dom": "^17.0.2 || ^18.0.0-0" + "react": ">=18", + "react-dom": ">=18" } }, "packages/nextjs/node_modules/tslib": { @@ -33795,17 +33799,17 @@ }, "packages/react": { "name": "@clerk/clerk-react", - "version": "5.0.0-alpha-v5.1", + "version": "5.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/shared": "2.0.0-alpha-v5.1", - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/shared": "2.0.0-alpha-v5.2", + "@clerk/types": "4.0.0-alpha-v5.2", "eslint-config-custom": "*", "semver": "^7.5.4", "tslib": "2.4.1" }, "devDependencies": { - "@clerk/themes": "2.0.0-alpha-v5.0", + "@clerk/themes": "2.0.0-alpha-v5.1", "@types/node": "^18.17.0", "@types/react": "*", "@types/react-dom": "*", @@ -33817,7 +33821,8 @@ "node": ">=18.17.0" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" } }, "packages/react/node_modules/tslib": { @@ -33826,17 +33831,17 @@ }, "packages/remix": { "name": "@clerk/remix", - "version": "4.0.0-alpha-v5.1", + "version": "4.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/backend": "1.0.0-alpha-v5.1", - "@clerk/clerk-react": "5.0.0-alpha-v5.1", - "@clerk/shared": "2.0.0-alpha-v5.1", + "@clerk/backend": "1.0.0-alpha-v5.2", + "@clerk/clerk-react": "5.0.0-alpha-v5.2", + "@clerk/shared": "2.0.0-alpha-v5.2", "cookie": "0.5.0", "tslib": "2.4.1" }, "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@remix-run/react": "^2.0.0", "@remix-run/server-runtime": "^2.0.0", "@types/cookie": "^0.5.0", @@ -33852,8 +33857,8 @@ "peerDependencies": { "@remix-run/react": "^2.0.0", "@remix-run/server-runtime": "^2.0.0", - "react": ">=18.0.0", - "react-dom": ">=18.0.0" + "react": ">=18", + "react-dom": ">=18" } }, "packages/remix/node_modules/tslib": { @@ -33862,16 +33867,16 @@ }, "packages/sdk-node": { "name": "@clerk/clerk-sdk-node", - "version": "5.0.0-alpha-v5.1", + "version": "5.0.0-alpha-v5.2", "license": "MIT", "dependencies": { - "@clerk/backend": "1.0.0-alpha-v5.1", - "@clerk/shared": "2.0.0-alpha-v5.1", + "@clerk/backend": "1.0.0-alpha-v5.2", + "@clerk/shared": "2.0.0-alpha-v5.2", "camelcase-keys": "6.2.2", "snakecase-keys": "3.2.1" }, "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@types/express": "4.17.14", "@types/node": "^18.17.0", "eslint-config-custom": "*", @@ -33904,7 +33909,7 @@ }, "packages/shared": { "name": "@clerk/shared", - "version": "2.0.0-alpha-v5.1", + "version": "2.0.0-alpha-v5.2", "license": "MIT", "dependencies": { "glob-to-regexp": "0.4.1", @@ -33912,7 +33917,7 @@ "swr": "2.2.0" }, "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@types/glob-to-regexp": "0.4.1", "@types/js-cookie": "3.0.2", "@types/node": "^18.17.0", @@ -33924,7 +33929,8 @@ "node": ">=18.17.0" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" }, "peerDependenciesMeta": { "react": { @@ -33934,10 +33940,10 @@ }, "packages/themes": { "name": "@clerk/themes", - "version": "2.0.0-alpha-v5.0", + "version": "2.0.0-alpha-v5.1", "license": "MIT", "devDependencies": { - "@clerk/types": "4.0.0-alpha-v5.1", + "@clerk/types": "4.0.0-alpha-v5.2", "@types/node": "^18.17.0", "eslint-config-custom": "*", "typescript": "*" @@ -33946,12 +33952,13 @@ "node": ">=18.17.0" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" } }, "packages/types": { "name": "@clerk/types", - "version": "4.0.0-alpha-v5.1", + "version": "4.0.0-alpha-v5.2", "license": "MIT", "dependencies": { "csstype": "3.1.1" diff --git a/packages/chrome-extension/package.json b/packages/chrome-extension/package.json index ac976e7b7c4..4e38c7549f3 100644 --- a/packages/chrome-extension/package.json +++ b/packages/chrome-extension/package.json @@ -58,7 +58,8 @@ "typescript": "*" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0" diff --git a/packages/clerk-js/package.json b/packages/clerk-js/package.json index 20549c84280..b434a39a739 100644 --- a/packages/clerk-js/package.json +++ b/packages/clerk-js/package.json @@ -97,7 +97,8 @@ "webpack-merge": "^5.9.0" }, "peerDependencies": { - "react": ">=18" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0" diff --git a/packages/expo/package.json b/packages/expo/package.json index c606112c922..7dd5ad1f30c 100644 --- a/packages/expo/package.json +++ b/packages/expo/package.json @@ -60,7 +60,8 @@ "peerDependencies": { "expo-auth-session": ">=4", "expo-web-browser": ">=12", - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0" diff --git a/packages/localizations/package.json b/packages/localizations/package.json index 7f2dbdfe30e..f1ba9f879f8 100644 --- a/packages/localizations/package.json +++ b/packages/localizations/package.json @@ -45,7 +45,8 @@ "typescript": "*" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0" diff --git a/packages/localizations/src/ru-RU.ts b/packages/localizations/src/ru-RU.ts index 8a1daafd25f..af2eef6f501 100644 --- a/packages/localizations/src/ru-RU.ts +++ b/packages/localizations/src/ru-RU.ts @@ -530,16 +530,17 @@ export const ruRU: LocalizationResource = { messageLine1: 'Вы уверены, что хотите удалить эту организацию?', messageLine2: 'Это действие нельзя отменить.', actionDescription: 'Напишите {{organizationName}} в поле ниже, чтобы продолжить.', - successMessage: 'Вы удалили организацию.' - } + successMessage: 'Вы удалили организацию.', + }, }, domainSection: { title: 'Верифицированные домены', - subtitle: 'Разрешите пользователям присоединяться к организации автоматически или по запросу, если домен их электронной почты верифицирован.', + subtitle: + 'Разрешите пользователям присоединяться к организации автоматически или по запросу, если домен их электронной почты верифицирован.', primaryButton: 'Добавить домен', unverifiedDomain_menuAction__verify: 'Верифицировать домен', unverifiedDomain_menuAction__remove: 'Удалить домен', - } + }, }, createDomainPage: { title: 'Добавить домен', @@ -549,21 +550,25 @@ export const ruRU: LocalizationResource = { verifyDomainPage: { title: 'Верификация домена', subtitle: 'Домен {{domainName}} должен быть верифицирован через электронную почту.', - subtitleVerificationCodeScreen: 'Код подтверждения верификации отправлен на почту {{emailAddress}}. Введите его сюда, чтобы продолжить.', + subtitleVerificationCodeScreen: + 'Код подтверждения верификации отправлен на почту {{emailAddress}}. Введите его сюда, чтобы продолжить.', formTitle: 'Код подтверждения', formSubtitle: 'Введите код подтверждения, отправленный на указанную почту', resendButton: 'Не получили код? Отправить ещё раз', }, verifiedDomainPage: { - subtitle: 'Домен {{domain}} верифицирован. Теперь выберите, как пользователи с этим доменом будут присоединяться к организации.', + subtitle: + 'Домен {{domain}} верифицирован. Теперь выберите, как пользователи с этим доменом будут присоединяться к организации.', start: { headerTitle__enrollment: 'Способы присоединения', headerTitle__danger: 'Опасность', }, enrollmentTab: { - subtitle: 'Выберите, каким способом пользователи с этим доменом электронной почты будут присоединяться к организации.', + subtitle: + 'Выберите, каким способом пользователи с этим доменом электронной почты будут присоединяться к организации.', manualInvitationOption__label: 'Только ручное добавление', - manualInvitationOption__description: 'Пользователи не смогут присоединяться самостоятельно, можно добавлять их только вручную.', + manualInvitationOption__description: + 'Пользователи не смогут присоединяться самостоятельно, можно добавлять их только вручную.', automaticInvitationOption__label: 'Автоматические приглашения', automaticInvitationOption__description: 'Пользователи автоматически получают приглашение присоединиться к организации после регистрации и могут принять его в любое время без одобрения администратора', diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 432efcbe562..9b44d48931a 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -75,8 +75,8 @@ }, "peerDependencies": { "next": ">=10", - "react": "^17.0.2 || ^18.0.0-0", - "react-dom": "^17.0.2 || ^18.0.0-0" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0" diff --git a/packages/react/package.json b/packages/react/package.json index 9b123db5517..31cc692e27b 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -72,7 +72,8 @@ "typescript": "*" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0" diff --git a/packages/remix/package.json b/packages/remix/package.json index 2c94b6e6499..0b72b7293da 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -89,8 +89,8 @@ "peerDependencies": { "@remix-run/react": "^2.0.0", "@remix-run/server-runtime": "^2.0.0", - "react": ">=18.0.0", - "react-dom": ">=18.0.0" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0" diff --git a/packages/shared/package.json b/packages/shared/package.json index e867ce39dae..5f05cae3878 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -98,7 +98,8 @@ "typescript": "*" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" }, "peerDependenciesMeta": { "react": { diff --git a/packages/themes/package.json b/packages/themes/package.json index 24515b383e1..5d4e1fa4fd5 100644 --- a/packages/themes/package.json +++ b/packages/themes/package.json @@ -43,7 +43,8 @@ "typescript": "*" }, "peerDependencies": { - "react": ">=16" + "react": ">=18", + "react-dom": ">=18" }, "engines": { "node": ">=18.17.0"