Skip to content

Commit

Permalink
update react 18
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Apr 5, 2022
1 parent 4663a9d commit f2e57af
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
"prettier": "2.5.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-dom-18": "npm:react-dom@next",
"react-18": "npm:react@next",
"react-dom-18": "npm:react-dom@18",
"react-18": "npm:react@18",
"rimraf": "3.0.2",
"swr": "link:./",
"typescript": "4.4.3"
Expand Down
2 changes: 1 addition & 1 deletion test/use-swr-concurrent-rendering.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let React // swc transformer requires to define React at the top

describe('useSWR - concurrent rendering', () => {
let ReactDOM, act, useSWR, reactRoot, renderWithConfig
beforeAll(() => {
beforeEach(() => {
jest.resetModules()
jest.mock('scheduler', () => require('scheduler/unstable_mock'))
jest.mock('react', () => require('react-18'))
Expand Down
35 changes: 16 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5500,22 +5500,20 @@ randombytes@^2.1.0:
dependencies:
safe-buffer "^5.1.0"

"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==
"react-18@npm:react@18":
version "18.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.0.0.tgz#b468736d1f4a5891f38585ba8e8fb29f91c3cb96"
integrity sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

"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==
"react-dom-18@npm:react-dom@18":
version "18.0.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.0.0.tgz#26b88534f8f1dbb80853e1eabe752f24100d8023"
integrity sha512-XqX7uzmFo0pUceWFCt7Gff6IyIMzFUn7QMZrbrQfGxtaxXZIcGQzoNpRLE3fQLnS4XzLLPMZX2T9TRcSrasicw==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
scheduler "0.21.0-rc.0-next-2ed58eb88-20220126"
scheduler "^0.21.0"

react-dom@17.0.1:
version "17.0.1"
Expand Down Expand Up @@ -5807,14 +5805,6 @@ saxes@^5.0.1:
dependencies:
xmlchars "^2.2.0"

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"

scheduler@^0.20.1:
version "0.20.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
Expand All @@ -5823,6 +5813,13 @@ scheduler@^0.20.1:
loose-envify "^1.1.0"
object-assign "^4.1.1"

scheduler@^0.21.0:
version "0.21.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.21.0.tgz#6fd2532ff5a6d877b6edb12f00d8ab7e8f308820"
integrity sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==
dependencies:
loose-envify "^1.1.0"

semver-compare@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
Expand Down

0 comments on commit f2e57af

Please sign in to comment.