From e1914d0c46330d042d5827f48722bc69260795b7 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Sat, 29 Jan 2022 12:33:38 +0100 Subject: [PATCH] update react@next deps --- package.json | 4 +-- test/use-swr-concurrent-rendering.test.tsx | 8 ++--- yarn.lock | 35 +++++++++++----------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index a5dea4c71..751383302 100644 --- a/package.json +++ b/package.json @@ -102,8 +102,8 @@ "prettier": "2.5.0", "react": "17.0.1", "react-dom": "17.0.1", - "react-dom-experimental": "npm:react-dom@alpha", - "react-experimental": "npm:react@alpha", + "react-dom-18": "npm:react-dom@next", + "react-18": "npm:react@next", "rimraf": "3.0.2", "swr": "link:./", "typescript": "4.4.3" diff --git a/test/use-swr-concurrent-rendering.test.tsx b/test/use-swr-concurrent-rendering.test.tsx index c179092bf..81b51f0d9 100644 --- a/test/use-swr-concurrent-rendering.test.tsx +++ b/test/use-swr-concurrent-rendering.test.tsx @@ -12,11 +12,9 @@ describe('useSWR - concurrent rendering', () => { beforeAll(() => { jest.resetModules() jest.mock('scheduler', () => require('scheduler/unstable_mock')) - jest.mock('react', () => require('react-experimental')) - jest.mock('react-dom', () => require('react-dom-experimental')) - jest.mock('react-dom/test-utils', () => - require('react-dom-experimental/test-utils') - ) + jest.mock('react', () => require('react-18')) + jest.mock('react-dom', () => require('react-dom-18')) + jest.mock('react-dom/test-utils', () => require('react-dom-18/test-utils')) React = require('react') ReactDOM = require('react-dom') act = require('react-dom/test-utils').act diff --git a/yarn.lock b/yarn.lock index f4461cd66..16c6e47d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5500,14 +5500,22 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -"react-dom-experimental@npm:react-dom@alpha": - version "18.0.0-alpha-baff3f200-20210921" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.0.0-alpha-baff3f200-20210921.tgz#b79513c6baf7d46a1a96cb7fcce9d0f9cc647ad2" - integrity sha512-BzCuXsZFZ0GJQAiJPUCpzDuXj5U7o4tzUhl5pmqjIWT1BhmjVjIDOxD7acKdxv86uQArXXHHt9KbvuNewTP2ag== +"react-18@npm:react@next": + version "18.0.0-rc.0-next-2ed58eb88-20220126" + resolved "https://registry.yarnpkg.com/react/-/react-18.0.0-rc.0-next-2ed58eb88-20220126.tgz#3a453ceffa92b380fca0d4ce78bfe5e08bd18524" + integrity sha512-ybPE442m/lNNrzys16qNkWhaMcvFz8v7RooQ5cKeE7xWKIUjqInMad+TXUluKvFYzevfBrjwar/kF8ynkZLqBg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" - scheduler "0.21.0-alpha-baff3f200-20210921" + +"react-dom-18@npm:react-dom@next": + version "18.0.0-rc.0-next-2ed58eb88-20220126" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.0.0-rc.0-next-2ed58eb88-20220126.tgz#077cabf5f522ca4f83bd85a6a560861b84c62034" + integrity sha512-taXKmIE04pKxaPzzYTxG60SonzHZrAnhgfEoA9n0OFRp4qSnkxYAYePAmcJOWx2yHH9JFW8LIfQPKH+9ESt3AA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler "0.21.0-rc.0-next-2ed58eb88-20220126" react-dom@17.0.1: version "17.0.1" @@ -5518,14 +5526,6 @@ react-dom@17.0.1: object-assign "^4.1.1" scheduler "^0.20.1" -"react-experimental@npm:react@alpha": - version "18.0.0-alpha-baff3f200-20210921" - resolved "https://registry.yarnpkg.com/react/-/react-18.0.0-alpha-baff3f200-20210921.tgz#2f36c00d87282d864e627ba1f5286981955f821e" - integrity sha512-T3VEpIKpMitpaEt1gjpSRepQ2x+vcAK+ySZ4CgeT6VVpgvb9EVdYzuWNyS+qCIMTJI2XxV02Ze9O/jAndJMzaw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - react-is@^16.8.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -5807,10 +5807,10 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -scheduler@0.21.0-alpha-baff3f200-20210921: - version "0.21.0-alpha-baff3f200-20210921" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.21.0-alpha-baff3f200-20210921.tgz#a37bd518480778555e577443b6bfcc1c3b78c685" - integrity sha512-54soKvnnQG6CiPlRwrg9l9ierBB7WzcShEMLK2Fd5v9HSJ6bufNcBpsTTIsniMXHdMnwDfZcZ0KjpRbuwCC8KQ== +scheduler@0.21.0-rc.0-next-2ed58eb88-20220126: + version "0.21.0-rc.0-next-2ed58eb88-20220126" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.21.0-rc.0-next-2ed58eb88-20220126.tgz#c033b6e7e13c6d3452b0e43a98f73c1ad3c933e5" + integrity sha512-/0uWHNOf62C5G2zeOC0hRpWbBnsyyFRIJRNtHVtDBmN0OZipzv/uBp8yBC4SZwTrNAJfwqj+FaEDqjukBrMi5w== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -6265,6 +6265,7 @@ supports-hyperlinks@^2.0.0: "swr@link:.": version "0.0.0" + uid "" symbol-observable@^1.1.0: version "1.2.0"