From 59d2a44230c084ddd404a3035d2f93ec148d5c61 Mon Sep 17 00:00:00 2001 From: David Cho-Lerat Date: Fri, 24 Nov 2023 10:22:56 +0100 Subject: [PATCH] SONAR-21017 Update react, react-dom and related types (RTL *not* updated yet, no move to `createRoot` yet => no automatic batching) See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#automatic-batching --- server/sonar-web/design-system/package.json | 6 +- server/sonar-web/package.json | 18 +-- server/sonar-web/yarn.lock | 152 +++++++++++--------- 3 files changed, 95 insertions(+), 81 deletions(-) diff --git a/server/sonar-web/design-system/package.json b/server/sonar-web/design-system/package.json index d115b7905ba..cf887b89002 100644 --- a/server/sonar-web/design-system/package.json +++ b/server/sonar-web/design-system/package.json @@ -27,7 +27,7 @@ "@types/d3-array": "3.2.0", "@types/d3-zoom": "3.0.6", "@types/lodash": "4.14.200", - "@types/react": "17.0.39", + "@types/react": "18.2.37", "@types/react-highlight-words": "0.16.6", "@types/react-modal": "3.16.2", "@types/react-virtualized": "9.21.26", @@ -64,9 +64,9 @@ "d3-zoom": "3.0.0", "date-fns": "2.30.0", "lodash": "4.17.21", - "react": "17.0.2", + "react": "18.2.0", "react-day-picker": "8.9.1", - "react-dom": "17.0.2", + "react-dom": "18.2.0", "react-helmet-async": "1.3.0", "react-highlight-words": "0.20.0", "react-intl": "6.5.1", diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index b913e5f06bf..5c119c0cad6 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -27,12 +27,12 @@ "date-fns": "2.30.0", "diff": "5.1.0", "dompurify": "3.0.6", - "formik": "2.4.1", + "formik": "2.4.5", "lodash": "4.17.21", "lunr": "2.3.9", - "react": "17.0.2", + "react": "18.2.0", "react-day-picker": "8.9.1", - "react-dom": "17.0.2", + "react-dom": "18.2.0", "react-draggable": "4.4.6", "react-helmet-async": "1.3.0", "react-highlight-words": "0.20.0", @@ -63,12 +63,12 @@ "@types/d3-shape": "3.1.4", "@types/diff": "5.0.7", "@types/dompurify": "3.0.4", - "@types/jest": "29.5.7", - "@types/jest-axe": "3.5.7", + "@types/jest": "29.5.8", + "@types/jest-axe": "3.5.8", "@types/lodash": "4.14.200", "@types/node": "18.17.14", - "@types/react": "17.0.39", - "@types/react-dom": "17.0.11", + "@types/react": "18.2.37", + "@types/react-dom": "18.2.15", "@types/react-helmet": "6.1.8", "@types/react-highlight-words": "0.16.6", "@types/react-modal": "3.16.2", @@ -112,10 +112,6 @@ "typescript": "5.2.2", "whatwg-fetch": "3.6.19" }, - "resolutions": { - "@types/react": "17.0.39", - "@types/react-dom": "17.0.11" - }, "scripts": { "start": "node scripts/start.js", "start:force": "node scripts/start.js --force-build-design-system", diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index 6aa949f1c0b..f8a3adace92 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -13,9 +13,9 @@ __metadata: linkType: hard "@adobe/css-tools@npm:^4.0.1": - version: 4.0.1 - resolution: "@adobe/css-tools@npm:4.0.1" - checksum: 80226e2229024c21da9ffa6b5cd4a34b931f071e06f45aba4777ade071d7a6c94605cf73b13718b0c4b34e8b124c65c607b82eaa53a326d3eb73d9682a04a593 + version: 4.3.1 + resolution: "@adobe/css-tools@npm:4.3.1" + checksum: ad43456379ff391132aff687ece190cb23ea69395e23c9b96690eeabe2468da89a4aaf266e4f8b6eaab53db3d1064107ce0f63c3a974e864f4a04affc768da3f languageName: node linkType: hard @@ -4252,18 +4252,18 @@ __metadata: linkType: hard "@testing-library/dom@npm:^8.0.0": - version: 8.13.0 - resolution: "@testing-library/dom@npm:8.13.0" + version: 8.20.1 + resolution: "@testing-library/dom@npm:8.20.1" dependencies: "@babel/code-frame": ^7.10.4 "@babel/runtime": ^7.12.5 - "@types/aria-query": ^4.2.0 - aria-query: ^5.0.0 + "@types/aria-query": ^5.0.1 + aria-query: 5.1.3 chalk: ^4.1.0 dom-accessibility-api: ^0.5.9 - lz-string: ^1.4.4 + lz-string: ^1.5.0 pretty-format: ^27.0.2 - checksum: 880f1872b9949800d4444e3bdbd03df86d6f41ec7c27136dff1da29e87d2df2d7ee904afcdf895ffce351c25bd12119117eae023354d50e707ad56d43b2ed3ed + checksum: 06fc8dc67849aadb726cbbad0e7546afdf8923bd39acb64c576d706249bd7d0d05f08e08a31913fb621162e3b9c2bd0dce15964437f030f9fa4476326fdd3007 languageName: node linkType: hard @@ -4567,13 +4567,13 @@ __metadata: languageName: node linkType: hard -"@types/jest-axe@npm:3.5.7": - version: 3.5.7 - resolution: "@types/jest-axe@npm:3.5.7" +"@types/jest-axe@npm:3.5.8": + version: 3.5.8 + resolution: "@types/jest-axe@npm:3.5.8" dependencies: "@types/jest": "*" axe-core: ^3.5.5 - checksum: 939581917fc119250ffab78d64c54124210b9153a0248ec9a69aa65b288bd91ca3c2a02a53aaab5bff218628aa00e7936e4ac2b2870f727f839583882f0d71ac + checksum: 753eba3d8a7a83b7fb085fd16568a25e1bb693a70c061abe029f7166ed6fe7266b35db317502b8641ccb802290f12fcbe565dacd9924111f98f97a44b56edf72 languageName: node linkType: hard @@ -4587,13 +4587,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:29.5.7": - version: 29.5.7 - resolution: "@types/jest@npm:29.5.7" +"@types/jest@npm:29.5.8": + version: 29.5.8 + resolution: "@types/jest@npm:29.5.8" dependencies: expect: ^29.0.0 pretty-format: ^29.0.0 - checksum: e28624ccb0ef1255a03fbbb4b5bc3e5cbcdc450d39e0739985ff679b124198f808c38c8c3e67859c6efc0e848196deeb8cfed028e12a821c511dfc1112a2d6e9 + checksum: ca8438a5b4c098c8c023e9d5b279ea306494a1d0b5291cfb498100fa780377145f068b2a021d545b0398bbe0328dcc37044dd3aaf3c6c0fe9b0bef7b46a63453 languageName: node linkType: hard @@ -4657,12 +4657,21 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:17.0.11": - version: 17.0.11 - resolution: "@types/react-dom@npm:17.0.11" +"@types/react-dom@npm:18.2.15": + version: 18.2.15 + resolution: "@types/react-dom@npm:18.2.15" dependencies: "@types/react": "*" - checksum: 4d5730dffbef86c887cecad7e3cecda424ce6a64d0b5441c63b5b015d48219868660a2bb1aa15e897e565ad8867fa6b885d4358b04e1c4e589ba4c07c3fda55c + checksum: 8e9631600c21ff561328e38a951d1991b3b3b20f538af4c0efbd1327c883a5573a63f50e1b945c34fa51b114b30e1ca5e62317bd54f21e063d6697b4be843a03 + languageName: node + linkType: hard + +"@types/react-dom@npm:<18.0.0": + version: 17.0.24 + resolution: "@types/react-dom@npm:17.0.24" + dependencies: + "@types/react": ^17 + checksum: 6ec88a77c757df268ba20495345ebdda0f30858734c1182ac6a06200885fae588361ff0d51c3ca49c1e3c8857bc93dd5c4abcbc2834fe14b0e962efbb4974c93 languageName: node linkType: hard @@ -4712,14 +4721,25 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:17.0.39": - version: 17.0.39 - resolution: "@types/react@npm:17.0.39" +"@types/react@npm:*, @types/react@npm:16 || 17 || 18, @types/react@npm:18.2.37": + version: 18.2.37 + resolution: "@types/react@npm:18.2.37" dependencies: "@types/prop-types": "*" "@types/scheduler": "*" csstype: ^3.0.2 - checksum: bf04d3c2894559012710d595553e12b422d3b91cd8f4f7e122d8cb044ba9c2ba17f6e8a4e09581359cc5509ddc59cd8c8fabd6774f3505a40a45393f074d6e6e + checksum: 2d2599f1a09e4f678509161fea8baeaf76d21deee460f4f3ccc1ca431ebe85f896d7d0b906127de17e97ed57240cec61955eb97d0b5d9cbf4e97fd6620b1acdb + languageName: node + linkType: hard + +"@types/react@npm:^17": + version: 17.0.71 + resolution: "@types/react@npm:17.0.71" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: c72dbebdced882fa39de867b0179ed91259331172458d69250ff30fdb3c61e3d1f3373dacca3771c3de4b19162fd65758179252b17961729213496a016b918d7 languageName: node linkType: hard @@ -4745,11 +4765,11 @@ __metadata: linkType: hard "@types/testing-library__jest-dom@npm:^5.9.1": - version: 5.14.2 - resolution: "@types/testing-library__jest-dom@npm:5.14.2" + version: 5.14.9 + resolution: "@types/testing-library__jest-dom@npm:5.14.9" dependencies: "@types/jest": "*" - checksum: e08715a565cc189112a6611485d779a0f1ceb546a9d4601b21aacff7596d7acf8b7c702e4c5f825677431ff601df3e635887dc8a5735da1a263cc857eb7c3833 + checksum: d364494fc2545316292e88861146146af1e3818792ca63b62a63758b2f737669b687f4aaddfcfbcb7d0e1ed7890a9bd05de23ff97f277d5e68de574497a9ee72 languageName: node linkType: hard @@ -5246,12 +5266,12 @@ __metadata: "@types/d3-shape": 3.1.4 "@types/diff": 5.0.7 "@types/dompurify": 3.0.4 - "@types/jest": 29.5.7 - "@types/jest-axe": 3.5.7 + "@types/jest": 29.5.8 + "@types/jest-axe": 3.5.8 "@types/lodash": 4.14.200 "@types/node": 18.17.14 - "@types/react": 17.0.39 - "@types/react-dom": 17.0.11 + "@types/react": 18.2.37 + "@types/react-dom": 18.2.15 "@types/react-helmet": 6.1.8 "@types/react-highlight-words": 0.16.6 "@types/react-modal": 3.16.2 @@ -5288,7 +5308,7 @@ __metadata: eslint-plugin-react: 7.33.2 eslint-plugin-react-hooks: 4.6.0 eslint-plugin-testing-library: 5.11.0 - formik: 2.4.1 + formik: 2.4.5 fs-extra: 11.1.1 http-proxy: 1.18.1 jest: 29.7.0 @@ -5305,9 +5325,9 @@ __metadata: postcss-calc: 9.0.1 postcss-custom-properties: 12.1.11 prettier: 3.0.3 - react: 17.0.2 + react: 18.2.0 react-day-picker: 8.9.1 - react-dom: 17.0.2 + react-dom: 18.2.0 react-draggable: 4.4.6 react-helmet-async: 1.3.0 react-highlight-words: 0.20.0 @@ -6923,7 +6943,7 @@ __metadata: "@types/d3-array": 3.2.0 "@types/d3-zoom": 3.0.6 "@types/lodash": 4.14.200 - "@types/react": 17.0.39 + "@types/react": 18.2.37 "@types/react-highlight-words": 0.16.6 "@types/react-modal": 3.16.2 "@types/react-virtualized": 9.21.26 @@ -6964,9 +6984,9 @@ __metadata: d3-zoom: 3.0.0 date-fns: 2.30.0 lodash: 4.17.21 - react: 17.0.2 + react: 18.2.0 react-day-picker: 8.9.1 - react-dom: 17.0.2 + react-dom: 18.2.0 react-helmet-async: 1.3.0 react-highlight-words: 0.20.0 react-intl: 6.5.1 @@ -8254,20 +8274,21 @@ __metadata: languageName: node linkType: hard -"formik@npm:2.4.1": - version: 2.4.1 - resolution: "formik@npm:2.4.1" +"formik@npm:2.4.5": + version: 2.4.5 + resolution: "formik@npm:2.4.5" dependencies: + "@types/hoist-non-react-statics": ^3.3.1 deepmerge: ^2.1.1 hoist-non-react-statics: ^3.3.0 lodash: ^4.17.21 lodash-es: ^4.17.21 react-fast-compare: ^2.0.1 tiny-warning: ^1.0.2 - tslib: ^1.10.0 + tslib: ^2.0.0 peerDependencies: react: ">=16.8.0" - checksum: c4238b81c7780b3772f2ef2a439f676822f5c4a944de45505fd15eaf8dd84051420c91ce2ccc72da047d89e2ab630a76c992719de643fe3f302fb4af948d4bbc + checksum: 316c91fc4e440094655c0d0ba47277a0f84f6082f77ae2ae959e97e2eebb8eab5b866a9e43d93a28efdae07c3f23e779da67922e2f2a1fb47d135b7346e0b5f3 languageName: node linkType: hard @@ -11704,16 +11725,15 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:17.0.2": - version: 17.0.2 - resolution: "react-dom@npm:17.0.2" +"react-dom@npm:18.2.0": + version: 18.2.0 + resolution: "react-dom@npm:18.2.0" dependencies: loose-envify: ^1.1.0 - object-assign: ^4.1.1 - scheduler: ^0.20.2 + scheduler: ^0.23.0 peerDependencies: - react: 17.0.2 - checksum: 1c1eaa3bca7c7228d24b70932e3d7c99e70d1d04e13bb0843bbf321582bc25d7961d6b8a6978a58a598af2af496d1cedcfb1bf65f6b0960a0a8161cb8dab743c + react: ^18.2.0 + checksum: 7d323310bea3a91be2965f9468d552f201b1c27891e45ddc2d6b8f717680c95a75ae0bc1e3f5cf41472446a2589a75aed4483aee8169287909fcd59ad149e8cc languageName: node linkType: hard @@ -11996,13 +12016,12 @@ __metadata: languageName: node linkType: hard -"react@npm:17.0.2": - version: 17.0.2 - resolution: "react@npm:17.0.2" +"react@npm:18.2.0": + version: 18.2.0 + resolution: "react@npm:18.2.0" dependencies: loose-envify: ^1.1.0 - object-assign: ^4.1.1 - checksum: b254cc17ce3011788330f7bbf383ab653c6848902d7936a87b09d835d091e3f295f7e9dd1597c6daac5dc80f90e778c8230218ba8ad599f74adcc11e33b9d61b + checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b languageName: node linkType: hard @@ -12437,13 +12456,12 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.20.2": - version: 0.20.2 - resolution: "scheduler@npm:0.20.2" +"scheduler@npm:^0.23.0": + version: 0.23.0 + resolution: "scheduler@npm:0.23.0" dependencies: loose-envify: ^1.1.0 - object-assign: ^4.1.1 - checksum: c4b35cf967c8f0d3e65753252d0f260271f81a81e427241295c5a7b783abf4ea9e905f22f815ab66676f5313be0a25f47be582254db8f9241b259213e999b8fc + checksum: d79192eeaa12abef860c195ea45d37cbf2bbf5f66e3c4dcd16f54a7da53b17788a70d109ee3d3dde1a0fd50e6a8fc171f4300356c5aee4fc0171de526bf35f8a languageName: node linkType: hard @@ -13227,13 +13245,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.10.0": - version: 1.14.1 - resolution: "tslib@npm:1.14.1" - checksum: dbe628ef87f66691d5d2959b3e41b9ca0045c3ee3c7c7b906cc1e328b39f199bb1ad9e671c39025bd56122ac57dfbf7385a94843b1cc07c60a4db74795829acd - languageName: node - linkType: hard - "tslib@npm:^1.8.1": version: 1.11.1 resolution: "tslib@npm:1.11.1" @@ -13241,6 +13252,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.0.0": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + "tslib@npm:^2.4.0": version: 2.5.0 resolution: "tslib@npm:2.5.0" -- 2.39.5