From fb5f1494c98149747de2db402744d6da433ae09a Mon Sep 17 00:00:00 2001 From: eps1lon Date: Sat, 26 Jun 2021 11:19:30 +0200 Subject: [PATCH 1/4] REVERT LATER use latest react next --- package.json | 9 +++++-- yarn.lock | 70 ++++++++++++++++++++++------------------------------ 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 63f3c773cc3806..b1b3b5944ca5dd 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@babel/register": "^7.10.1", "@emotion/react": "^11.4.0", "@emotion/styled": "^11.0.0", - "@eps1lon/enzyme-adapter-react-17": "^0.1.0", + "@eps1lon/enzyme-adapter-react-17": "npm:@eps1lon/enzyme-adapter-react-next", "@octokit/rest": "^18.0.14", "@rollup/plugin-replace": "^2.3.1", "@testing-library/dom": "^8.0.0", @@ -198,7 +198,12 @@ "**/@types/react-dom": "^17.0.0", "**/cross-fetch": "^3.0.5", "**/dot-prop": "^5.2.0", - "**/react-is": "^17.0.1" + "**/react-is": "^17.0.1", + "scheduler": "0.21.0-alpha-73ffce1b6-20210624", + "react-dom": "18.0.0-alpha-73ffce1b6-20210624", + "react-test-renderer": "18.0.0-alpha-73ffce1b6-20210624", + "react-is": "18.0.0-alpha-73ffce1b6-20210624", + "react": "18.0.0-alpha-73ffce1b6-20210624" }, "nyc": { "include": [ diff --git a/yarn.lock b/yarn.lock index 1c3e5b0830f172..911711781365ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1344,20 +1344,19 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== -"@eps1lon/enzyme-adapter-react-17@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@eps1lon/enzyme-adapter-react-17/-/enzyme-adapter-react-17-0.1.0.tgz#68e8db7fe231d29f86ce3c4b0331b6d04ee14dd3" - integrity sha512-NiiEG6rfeE7NuZc1oNr8CBb6zNpDO4gpVt4JiVCYnaLOEMEE9Kj3I+vFjawEYLxnMfptTdawHgYVvSeTenZSVw== +"@eps1lon/enzyme-adapter-react-17@npm:@eps1lon/enzyme-adapter-react-next": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@eps1lon/enzyme-adapter-react-next/-/enzyme-adapter-react-next-0.0.1.tgz#e44d436323a00d8065788e3ab4493efed216edce" + integrity sha512-oGecpGf84lE3jpsI48HZhT4TtuVeHpKDXYvrsGVYBvLJS7LT3mCB1R4Etrcg5SnCVwxrNLRKiquHo5hXBsKJjg== dependencies: - enzyme-adapter-utils "^1.13.1" - enzyme-shallow-equal "^1.0.4" + enzyme-adapter-utils "^1.13.0" + enzyme-shallow-equal "^1.0.1" has "^1.0.3" object.assign "^4.1.0" object.values "^1.1.1" prop-types "^15.7.2" - react-is "^17.0.0" - react-reconciler "^0.26.1" - react-test-renderer "^17.0.0" + react-is "^16.12.0" + react-test-renderer "^16.0.0-0" semver "^5.7.0" "@eslint/eslintrc@^0.4.2": @@ -7100,7 +7099,7 @@ envinfo@^7.7.3, envinfo@^7.7.4: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== -enzyme-adapter-utils@^1.13.1: +enzyme-adapter-utils@^1.13.0: version "1.14.0" resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz#afbb0485e8033aa50c744efb5f5711e64fbf1ad0" integrity sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg== @@ -7113,7 +7112,7 @@ enzyme-adapter-utils@^1.13.1: prop-types "^15.7.2" semver "^5.7.1" -enzyme-shallow-equal@^1.0.1, enzyme-shallow-equal@^1.0.4: +enzyme-shallow-equal@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz#b9256cb25a5f430f9bfe073a84808c1d74fced2e" integrity sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q== @@ -13436,14 +13435,14 @@ react-docgen@^5.0.0-beta.1: node-dir "^0.1.10" strip-indent "^3.0.0" -react-dom@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +react-dom@18.0.0-alpha-73ffce1b6-20210624, react-dom@^17.0.1: + version "18.0.0-alpha-73ffce1b6-20210624" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.0.0-alpha-73ffce1b6-20210624.tgz#3d789e4f3446abc685a7754c8dc74dea0ffb4247" + integrity sha512-TgA+VhVas3mJdhy6AQLXnPzBN2JeNKC7EGhLKU11XOxUODCGQ94nyT04i1ta2R3Fv0QevMLp0Wb5hccan0wMEg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" - scheduler "^0.20.2" + scheduler "0.21.0-alpha-73ffce1b6-20210624" react-draggable@^4.0.3: version "4.4.3" @@ -13474,7 +13473,7 @@ react-final-form@^6.3.0: dependencies: "@babel/runtime" "^7.12.1" -react-is@16.10.2, react-is@16.13.1, "react-is@^16.12.0 || ^17.0.0", react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^17.0.0, react-is@^17.0.1, react-is@^17.0.2: +react-is@16.10.2, react-is@16.13.1, react-is@18.0.0-alpha-73ffce1b6-20210624, react-is@^16.12.0, "react-is@^16.12.0 || ^17.0.0", react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^17.0.0, react-is@^17.0.1, 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== @@ -13508,15 +13507,6 @@ react-number-format@^4.0.8: dependencies: prop-types "^15.7.2" -react-reconciler@^0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.26.1.tgz#860952dd359fd870f94895c254271e3a9de3b2d6" - integrity sha512-6E/CvH9zcDmHjhiNJlP0qJ8+3ufnY2b5RWs774Uy8XKWN0l6qfnlkz0XnDacxqj2rbJdq76w9dlFXjPPOQrmqA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.1" - react-redux@^7.1.1: version "7.2.4" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.4.tgz#1ebb474032b72d806de2e0519cd07761e222e225" @@ -13629,15 +13619,15 @@ react-swipeable-views@^0.14.0-alpha.0: react-swipeable-views-utils "^0.14.0" warning "^4.0.1" -react-test-renderer@^17.0.0, react-test-renderer@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-17.0.2.tgz#4cd4ae5ef1ad5670fc0ef776e8cc7e1231d9866c" - integrity sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ== +react-test-renderer@18.0.0-alpha-73ffce1b6-20210624, react-test-renderer@^16.0.0-0, react-test-renderer@^17.0.1: + version "18.0.0-alpha-73ffce1b6-20210624" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-18.0.0-alpha-73ffce1b6-20210624.tgz#11061c252680b05e0c1879fa92fde6693eef33fd" + integrity sha512-ob4VHiWkDdHKNbKvvfG2Oz4P16f+ewVKzFTOi1BwquZqTXNeYpRZRpJzGa/A4C3g7yaBfPbi++Zk/ZH9TIO4WA== dependencies: object-assign "^4.1.1" - react-is "^17.0.2" + react-is "18.0.0-alpha-73ffce1b6-20210624" react-shallow-renderer "^16.13.1" - scheduler "^0.20.2" + scheduler "0.21.0-alpha-73ffce1b6-20210624" react-text-mask@^5.0.2: version "5.4.3" @@ -13686,10 +13676,10 @@ react-window@^1.8.5: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6" -react@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== +react@18.0.0-alpha-73ffce1b6-20210624, react@^17.0.1: + version "18.0.0-alpha-73ffce1b6-20210624" + resolved "https://registry.yarnpkg.com/react/-/react-18.0.0-alpha-73ffce1b6-20210624.tgz#d9fb8700c6fad8de752ec0427f2ae3a941eea951" + integrity sha512-Qaj2vhrMlYc169Yh0gXBB7WeKWMeIVx99JnuouuT71Jku2Cly9TxAWurc+h6PSgz/qjjmDA2NOtHCb6mGlmzGA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -14464,10 +14454,10 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -scheduler@^0.20.1, scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== +scheduler@0.21.0-alpha-73ffce1b6-20210624, scheduler@^0.20.2: + version "0.21.0-alpha-73ffce1b6-20210624" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.21.0-alpha-73ffce1b6-20210624.tgz#6fff95e26af73cfaa365b68fa3b68c4c66dfe347" + integrity sha512-7SXTiepGRo63F5Yp/fxLhZDYi5TInsqjnMTYF6GwtunUGAwyuK4V/AFiF0Q1gtB32U/e+C+OE4SSj9LtBYBjYw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" From 39c3fa2547b45ad53933ab48cd31b482d39aab06 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Sat, 26 Jun 2021 11:20:09 +0200 Subject: [PATCH 2/4] [test] Update tests to pass react@next --- .../material-ui/src/useAutocomplete/useAutocomplete.test.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/material-ui/src/useAutocomplete/useAutocomplete.test.js b/packages/material-ui/src/useAutocomplete/useAutocomplete.test.js index ee66f973016ffd..d2d727998ff5c8 100644 --- a/packages/material-ui/src/useAutocomplete/useAutocomplete.test.js +++ b/packages/material-ui/src/useAutocomplete/useAutocomplete.test.js @@ -255,11 +255,9 @@ describe('useAutocomplete', () => { }; const devErrorMessages = [ - !React.version.startsWith('18') && - "Error: Uncaught [TypeError: Cannot read property 'removeAttribute' of null]", + "Error: Uncaught [TypeError: Cannot read property 'removeAttribute' of null]", 'Material-UI: Unable to find the input element.', - !React.version.startsWith('18') && - "Error: Uncaught [TypeError: Cannot read property 'removeAttribute' of null]", + "Error: Uncaught [TypeError: Cannot read property 'removeAttribute' of null]", 'The above error occurred in the