From b03fc227400a2640012582d9eb04b512ddc130a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Tue, 20 Jul 2021 13:55:31 +0200 Subject: [PATCH 1/4] fix: peerDeps must be present --- apps/blog-app/package.json | 1 + apps/web-app/package.json | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/blog-app/package.json b/apps/blog-app/package.json index e61e3863c70..0f46814f154 100644 --- a/apps/blog-app/package.json +++ b/apps/blog-app/package.json @@ -89,6 +89,7 @@ "typescript": "4.3.5" }, "dependencies": { + "@babel/core": "7.14.6", "@emotion/react": "11.4.0", "@emotion/styled": "11.3.0", "@headlessui/react": "1.3.0", diff --git a/apps/web-app/package.json b/apps/web-app/package.json index ac3afa37a6b..8acf57eeb4b 100644 --- a/apps/web-app/package.json +++ b/apps/web-app/package.json @@ -96,6 +96,7 @@ "typescript": "4.3.5" }, "dependencies": { + "@babel/core": "7.14.6", "@emotion/react": "11.4.0", "@emotion/styled": "11.3.0", "@headlessui/react": "1.3.0", @@ -107,6 +108,7 @@ "axios": "0.21.1", "cors": "2.8.5", "cross-env": "7.0.3", + "i18next": "20.3.3", "ky": "0.28.5", "next": "11.0.1", "next-auth": "3.27.3", From f39c4914247929c30595b694ef567b1d61228bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Tue, 20 Jul 2021 13:55:54 +0200 Subject: [PATCH 2/4] chore: optional peerDeps for react --- packages/core-lib/package.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/core-lib/package.json b/packages/core-lib/package.json index f05babd3d1c..765dee2d2ab 100644 --- a/packages/core-lib/package.json +++ b/packages/core-lib/package.json @@ -66,5 +66,13 @@ "peerDependencies": { "react": "^16.14.0 || ^17.0.2", "react-dom": "^16.14.0 || ^17.0.2" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } } From 85aa2a15ed1219e96355cac8058828d441317e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Tue, 20 Jul 2021 13:56:17 +0200 Subject: [PATCH 3/4] chore(lock): freshen lock --- yarn.lock | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9515b7d5cf3..3916b0468ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3460,6 +3460,11 @@ __metadata: peerDependencies: react: ^16.14.0 || ^17.0.2 react-dom: ^16.14.0 || ^17.0.2 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true languageName: unknown linkType: soft @@ -4335,6 +4340,7 @@ __metadata: version: 0.0.0-use.local resolution: "blog-app@workspace:apps/blog-app" dependencies: + "@babel/core": 7.14.6 "@emotion/babel-plugin": 11.3.0 "@emotion/react": 11.4.0 "@emotion/styled": 11.3.0 @@ -8106,21 +8112,21 @@ __metadata: languageName: node linkType: hard -"i18next@npm:^19.7.0": - version: 19.9.2 - resolution: "i18next@npm:19.9.2" +"i18next@npm:20.3.3, i18next@npm:^20.1.0": + version: 20.3.3 + resolution: "i18next@npm:20.3.3" dependencies: "@babel/runtime": ^7.12.0 - checksum: a24207707eacb28488975f8921d843bc35b86f2a48504cb82eaf620e1aacddbda8d53a4dc600543a708ba49bc45e61072a753f250e89fad2c1932259190ef81a + checksum: 906fae951a0932403708a47c919a5e1d8b7e2300a254c6e6bb82923474eb0a7e3a66fc7fa03d7ebbc8a04f50a5a272be44d797a54ceb2cddbca6b639ca7e5a8e languageName: node linkType: hard -"i18next@npm:^20.1.0": - version: 20.3.2 - resolution: "i18next@npm:20.3.2" +"i18next@npm:^19.7.0": + version: 19.9.2 + resolution: "i18next@npm:19.9.2" dependencies: "@babel/runtime": ^7.12.0 - checksum: 71867418c1d3e477b453daa0696999fe80a4b2c6d37b27fff073645a5e06b36b6adbf02bff738e288e523add10bb6b16dd72e0c13f3d6a2a3733836dcdbcd5ec + checksum: a24207707eacb28488975f8921d843bc35b86f2a48504cb82eaf620e1aacddbda8d53a4dc600543a708ba49bc45e61072a753f250e89fad2c1932259190ef81a languageName: node linkType: hard @@ -16008,6 +16014,7 @@ resolve@^2.0.0-next.3: version: 0.0.0-use.local resolution: "web-app@workspace:apps/web-app" dependencies: + "@babel/core": 7.14.6 "@emotion/babel-plugin": 11.3.0 "@emotion/react": 11.4.0 "@emotion/styled": 11.3.0 @@ -16048,6 +16055,7 @@ resolve@^2.0.0-next.3: eslint-plugin-react: 7.24.0 eslint-plugin-react-hooks: 4.2.0 eslint-plugin-testing-library: 4.9.1 + i18next: 20.3.3 jest: 27.0.6 jest-css-modules-transform: 4.3.0 ky: 0.28.5 From c5173ea4d9ae5f476c0434ad25a6ff7735350e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Tue, 20 Jul 2021 13:59:03 +0200 Subject: [PATCH 4/4] changeset: mention peerDeps change --- .changeset/forty-masks-shave.md | 6 ++++++ .changeset/thirty-stingrays-double.md | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/forty-masks-shave.md create mode 100644 .changeset/thirty-stingrays-double.md diff --git a/.changeset/forty-masks-shave.md b/.changeset/forty-masks-shave.md new file mode 100644 index 00000000000..8120e43f9c1 --- /dev/null +++ b/.changeset/forty-masks-shave.md @@ -0,0 +1,6 @@ +--- +'blog-app': patch +'web-app': patch +--- + +Fix possible issues with peerDeps diff --git a/.changeset/thirty-stingrays-double.md b/.changeset/thirty-stingrays-double.md new file mode 100644 index 00000000000..5da23639e67 --- /dev/null +++ b/.changeset/thirty-stingrays-double.md @@ -0,0 +1,5 @@ +--- +'@your-org/core-lib': minor +--- + +Allow peerDependencies on react to be optional