From c58e397241579734da25199e63131809e95ccd81 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 5 Dec 2024 18:39:00 -0600 Subject: [PATCH] Migrate to React 19 --- .github/workflows/test.yml | 12 +-- package.json | 12 +-- yarn.lock | 213 ++++++++++++++++++++++++------------- 3 files changed, 149 insertions(+), 88 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e7ed0299..293c75de3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,9 +55,9 @@ jobs: react-dom: { version: '^18', types: '^18' }, }, { - version: 'rc', - types: 'npm:types-react@rc', - react-dom: { version: 'rc', types: 'npm:types-react-dom@rc' }, + version: '^19', + types: '^19', + react-dom: { version: '^19', types: '^19' }, }, ] @@ -261,9 +261,9 @@ jobs: react-dom: { version: '^18', types: '^18' }, }, { - version: 'rc', - types: 'npm:types-react@rc', - react-dom: { version: 'rc', types: 'npm:types-react-dom@rc' }, + version: '^19', + types: '^19', + react-dom: { version: '^19', types: '^19' }, }, ] diff --git a/package.json b/package.json index cb66841dc..7f9c8187f 100644 --- a/package.json +++ b/package.json @@ -64,8 +64,8 @@ } }, "dependencies": { - "@types/use-sync-external-store": "npm:types-use-sync-external-store@rc", - "use-sync-external-store": "^1.2.2 || ^1.4.0-rc" + "@types/use-sync-external-store": "^0.0.6", + "use-sync-external-store": "^1.4.0" }, "devDependencies": { "@babel/cli": "^7.24.7", @@ -85,8 +85,8 @@ "@testing-library/react": "^16.1.0", "@types/node": "^20.14.2", "@types/prop-types": "^15.7.12", - "@types/react": "npm:types-react@rc", - "@types/react-dom": "npm:types-react-dom@rc", + "@types/react": "^19.0.1", + "@types/react-dom": "^19.0.1", "babel-eslint": "^10.1.0", "codecov": "^3.8.3", "cross-env": "^7.0.3", @@ -98,8 +98,8 @@ "eslint-plugin-react": "^7.34.2", "jsdom": "^25.0.1", "prettier": "^3.3.3", - "react": "19.0.0-rc.1", - "react-dom": "19.0.0-rc.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "redux": "^5.0.1", "rimraf": "^5.0.7", "tsup": "^8.3.5", diff --git a/yarn.lock b/yarn.lock index 8ea866854..4486977f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -90,7 +90,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.26.0": +"@babel/generator@npm:^7.25.9": version: 7.26.2 resolution: "@babel/generator@npm:7.26.2" dependencies: @@ -103,6 +103,19 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.26.0": + version: 7.26.3 + resolution: "@babel/generator@npm:7.26.3" + dependencies: + "@babel/parser": "npm:^7.26.3" + "@babel/types": "npm:^7.26.3" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10/c1d8710cc1c52af9d8d67f7d8ea775578aa500887b327d2a81e27494764a6ef99e438dd7e14cf7cd3153656492ee27a8362980dc438087c0ca39d4e75532c638 + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" @@ -317,7 +330,18 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.7.0": +"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.3, @babel/parser@npm:^7.7.0": + version: 7.26.3 + resolution: "@babel/parser@npm:7.26.3" + dependencies: + "@babel/types": "npm:^7.26.3" + bin: + parser: ./bin/babel-parser.js + checksum: 10/e7e3814b2dc9ee3ed605d38223471fa7d3a84cbe9474d2b5fa7ac57dc1ddf75577b1fd3a93bf7db8f41f28869bda795cddd80223f980be23623b6434bf4c88a8 + languageName: node + linkType: hard + +"@babel/parser@npm:^7.26.2": version: 7.26.2 resolution: "@babel/parser@npm:7.26.2" dependencies: @@ -1323,6 +1347,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.26.3": + version: 7.26.3 + resolution: "@babel/types@npm:7.26.3" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10/c31d0549630a89abfa11410bf82a318b0c87aa846fbf5f9905e47ba5e2aa44f41cc746442f105d622c519e4dc532d35a8d8080460ff4692f9fc7485fbf3a00eb + languageName: node + linkType: hard + "@esbuild/aix-ppc64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/aix-ppc64@npm:0.21.5" @@ -2227,45 +2261,35 @@ __metadata: languageName: node linkType: hard -"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.12": - version: 15.7.13 - resolution: "@types/prop-types@npm:15.7.13" - checksum: 10/8935cad87c683c665d09a055919d617fe951cb3b2d5c00544e3a913f861a2bd8d2145b51c9aa6d2457d19f3107ab40784c40205e757232f6a80cc8b1c815513c +"@types/prop-types@npm:^15.7.12": + version: 15.7.14 + resolution: "@types/prop-types@npm:15.7.14" + checksum: 10/d0c5407b9ccc3dd5fae0ccf9b1007e7622ba5e6f1c18399b4f24dff33619d469da4b9fa918a374f19dc0d9fe6a013362aab0b844b606cfc10676efba3f5f736d languageName: node linkType: hard -"@types/react-dom@npm:types-react-dom@rc": - version: 19.0.0-rc.1 - resolution: "types-react-dom@npm:19.0.0-rc.1" +"@types/react-dom@npm:^19.0.1": + version: 19.0.1 + resolution: "@types/react-dom@npm:19.0.1" dependencies: "@types/react": "npm:*" - checksum: 10/fca4e7565308a109d4b126e5c7f5c387789a0187c9a46cb2a5af6120a7014beaa05736841be0ae658c7115871088500ddb0ef0bce60a21af4ec899cee8bb3c75 + checksum: 10/59d0704e445a3e0d034ef016c92dc1bbec0ba6c1af084bf6de18f0ac3abd18a632961b7fd48668c519137d0bd7bfa77a8135a66c2725d4b7f68b830be263a564 languageName: node linkType: hard -"@types/react@npm:*": - version: 18.3.12 - resolution: "@types/react@npm:18.3.12" +"@types/react@npm:*, @types/react@npm:^19.0.1": + version: 19.0.1 + resolution: "@types/react@npm:19.0.1" dependencies: - "@types/prop-types": "npm:*" csstype: "npm:^3.0.2" - checksum: 10/c9bbdfeacd5347d2240e0d2cb5336bc57dbc1b9ff557b6c4024b49df83419e4955553518169d3736039f1b62608e15b35762a6c03d49bd86e33add4b43b19033 + checksum: 10/930dd4904047059c48ae64a90fc5e8078b5bac0a14c9d927917e5a07e88e4e5073ddc944cbde90a955f9f815c23b7112caea63e407bc423913073bedecb097aa languageName: node linkType: hard -"@types/react@npm:types-react@rc": - version: 19.0.0-rc.1 - resolution: "types-react@npm:19.0.0-rc.1" - dependencies: - csstype: "npm:^3.0.2" - checksum: 10/342da9ffeab93600a0cff4c8829e5350d935577e3f81bce7ead41d7cd074035e2c4a4bdd976fa8e3f5390fe6a32169370a805291a88a77c2f2ce2613bde54587 - languageName: node - linkType: hard - -"@types/use-sync-external-store@npm:types-use-sync-external-store@rc": - version: 19.0.0-rc.1 - resolution: "types-use-sync-external-store@npm:19.0.0-rc.1" - checksum: 10/a57e1e6fcd8b34716432ada9cef9a6a1fbfc70b0c34d97442c997cf70895929ff85a574eb82e15799d024e90251ec28f3f1e4afada780a951b49c7cb84558501 +"@types/use-sync-external-store@npm:^0.0.6": + version: 0.0.6 + resolution: "@types/use-sync-external-store@npm:0.0.6" + checksum: 10/a95ce330668501ad9b1c5b7f2b14872ad201e552a0e567787b8f1588b22c7040c7c3d80f142cbb9f92d13c4ea41c46af57a20f2af4edf27f224d352abcfe4049 languageName: node linkType: hard @@ -2958,16 +2982,25 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": - version: 1.0.7 - resolution: "call-bind@npm:1.0.7" +"call-bind-apply-helpers@npm:^1.0.0": + version: 1.0.0 + resolution: "call-bind-apply-helpers@npm:1.0.0" dependencies: - es-define-property: "npm:^1.0.0" es-errors: "npm:^1.3.0" function-bind: "npm:^1.1.2" + checksum: 10/853e9c30632a356ad0f66037b65f6c45eabecb5570012b6be53f2d83f03c61c845fcb0e4eb5ff8a0d7e3877d36588950d822d4beb742c9cfa90f4bf62a9fe960 + languageName: node + linkType: hard + +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": + version: 1.0.8 + resolution: "call-bind@npm:1.0.8" + dependencies: + call-bind-apply-helpers: "npm:^1.0.0" + es-define-property: "npm:^1.0.0" get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.1" - checksum: 10/cd6fe658e007af80985da5185bff7b55e12ef4c2b6f41829a26ed1eef254b1f1c12e3dfd5b2b068c6ba8b86aba62390842d81752e67dcbaec4f6f76e7113b6b7 + set-function-length: "npm:^1.2.2" + checksum: 10/659b03c79bbfccf0cde3a79e7d52570724d7290209823e1ca5088f94b52192dc1836b82a324d0144612f816abb2f1734447438e38d9dafe0b3f82c2a1b9e3bce languageName: node linkType: hard @@ -3251,15 +3284,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.7": - version: 4.3.7 - resolution: "debug@npm:4.3.7" +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.7": + version: 4.4.0 + resolution: "debug@npm:4.4.0" dependencies: ms: "npm:^2.1.3" peerDependenciesMeta: supports-color: optional: true - checksum: 10/71168908b9a78227ab29d5d25fe03c5867750e31ce24bf2c44a86efc5af041758bb56569b0a3d48a9b5344c00a24a777e6f4100ed6dfd9534a42c1dde285125a + checksum: 10/1847944c2e3c2c732514b93d11886575625686056cd765336212dc15de2d2b29612b6cd80e1afba767bb8e1803b778caf9973e98169ef1a24a7a7009e1820367 languageName: node linkType: hard @@ -3272,6 +3305,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.5": + version: 4.3.7 + resolution: "debug@npm:4.3.7" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/71168908b9a78227ab29d5d25fe03c5867750e31ce24bf2c44a86efc5af041758bb56569b0a3d48a9b5344c00a24a777e6f4100ed6dfd9534a42c1dde285125a + languageName: node + linkType: hard + "decimal.js@npm:^10.4.3": version: 10.4.3 resolution: "decimal.js@npm:10.4.3" @@ -3379,6 +3424,17 @@ __metadata: languageName: node linkType: hard +"dunder-proto@npm:^1.0.0": + version: 1.0.0 + resolution: "dunder-proto@npm:1.0.0" + dependencies: + call-bind-apply-helpers: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.2.0" + checksum: 10/08e0487edc6b5f5e7cc91cbbe2cd7a81919f296b2e8092277776a75280005b340ab22c12b16ad0371c531e76d11898dae617325573144f50839e8f310df2a6ef + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -3502,11 +3558,9 @@ __metadata: linkType: hard "es-define-property@npm:^1.0.0": - version: 1.0.0 - resolution: "es-define-property@npm:1.0.0" - dependencies: - get-intrinsic: "npm:^1.2.4" - checksum: 10/f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 + version: 1.0.1 + resolution: "es-define-property@npm:1.0.1" + checksum: 10/f8dc9e660d90919f11084db0a893128f3592b781ce967e4fccfb8f3106cb83e400a4032c559184ec52ee1dbd4b01e7776c7cd0b3327b1961b1a4a7008920fe78 languageName: node linkType: hard @@ -4435,12 +4489,10 @@ __metadata: languageName: node linkType: hard -"gopd@npm:^1.0.1, gopd@npm:^1.1.0": - version: 1.1.0 - resolution: "gopd@npm:1.1.0" - dependencies: - get-intrinsic: "npm:^1.2.4" - checksum: 10/4e633d3425483d8639daf85ea5dc50f8cdfb497bcf5ac814a3d66595b2b39a008e5491ee59118e281d486e5e53487bc9a95f9477d022e99a0c2d956f8b91f9e9 +"gopd@npm:^1.0.1, gopd@npm:^1.1.0, gopd@npm:^1.2.0": + version: 1.2.0 + resolution: "gopd@npm:1.2.0" + checksum: 10/94e296d69f92dc1c0768fcfeecfb3855582ab59a7c75e969d5f96ce50c3d201fd86d5a2857c22565764d5bb8a816c7b1e58f133ec318cd56274da36c5e3fb1a1 languageName: node linkType: hard @@ -4481,7 +4533,7 @@ __metadata: languageName: node linkType: hard -"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": +"has-proto@npm:^1.0.1": version: 1.1.0 resolution: "has-proto@npm:1.1.0" dependencies: @@ -4490,6 +4542,15 @@ __metadata: languageName: node linkType: hard +"has-proto@npm:^1.0.3": + version: 1.2.0 + resolution: "has-proto@npm:1.2.0" + dependencies: + dunder-proto: "npm:^1.0.0" + checksum: 10/7eaed07728eaa28b77fadccabce53f30de467ff186a766872669a833ac2e87d8922b76a22cc58339d7e0277aefe98d6d00762113b27a97cdf65adcf958970935 + languageName: node + linkType: hard + "has-symbols@npm:^1.0.3": version: 1.1.0 resolution: "has-symbols@npm:1.1.0" @@ -6083,14 +6144,14 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:19.0.0-rc.1": - version: 19.0.0-rc.1 - resolution: "react-dom@npm:19.0.0-rc.1" +"react-dom@npm:^19.0.0": + version: 19.0.0 + resolution: "react-dom@npm:19.0.0" dependencies: - scheduler: "npm:0.25.0-rc.1" + scheduler: "npm:^0.25.0" peerDependencies: - react: 19.0.0-rc.1 - checksum: 10/9c3f79fe8f8fd10e8a86476df1670d3920f1c1083e56285b5c31d96ca18d223e9d1e78b6b5534ce7ab90a57e2d47ca96d2b3ced3a08a993c937c7f49561b337d + react: ^19.0.0 + checksum: 10/aa64a2f1991042f516260e8b0eca0ae777b6c8f1aa2b5ae096e80bbb6ac9b005aef2bca697969841d34f7e1819556263476bdfea36c35092e8d9aefde3de2d9a languageName: node linkType: hard @@ -6136,9 +6197,9 @@ __metadata: "@testing-library/react": "npm:^16.1.0" "@types/node": "npm:^20.14.2" "@types/prop-types": "npm:^15.7.12" - "@types/react": "npm:types-react@rc" - "@types/react-dom": "npm:types-react-dom@rc" - "@types/use-sync-external-store": "npm:types-use-sync-external-store@rc" + "@types/react": "npm:^19.0.1" + "@types/react-dom": "npm:^19.0.1" + "@types/use-sync-external-store": "npm:^0.0.6" babel-eslint: "npm:^10.1.0" codecov: "npm:^3.8.3" cross-env: "npm:^7.0.3" @@ -6150,14 +6211,14 @@ __metadata: eslint-plugin-react: "npm:^7.34.2" jsdom: "npm:^25.0.1" prettier: "npm:^3.3.3" - react: "npm:19.0.0-rc.1" - react-dom: "npm:19.0.0-rc.1" + react: "npm:^19.0.0" + react-dom: "npm:^19.0.0" redux: "npm:^5.0.1" rimraf: "npm:^5.0.7" tsup: "npm:^8.3.5" typescript: "npm:^5.5.4" typescript-eslint: "npm:^7.12.0" - use-sync-external-store: "npm:^1.2.2 || ^1.4.0-rc" + use-sync-external-store: "npm:^1.4.0" vitest: "npm:^1.6.0" peerDependencies: "@types/react": ^18.2.25 || ^19 @@ -6171,10 +6232,10 @@ __metadata: languageName: unknown linkType: soft -"react@npm:19.0.0-rc.1": - version: 19.0.0-rc.1 - resolution: "react@npm:19.0.0-rc.1" - checksum: 10/4da93b26f6d8ca24a4657551fe9e6db92b42e6d8cb54821e3c2c8c5af2098094e5d997b261314a2b5723ad1e0a444a63312b7645f72394f21660da38ea4554f1 +"react@npm:^19.0.0": + version: 19.0.0 + resolution: "react@npm:19.0.0" + checksum: 10/2490969c503f644703c88990d20e4011fa6119ddeca451e9de48f6d7ab058d670d2852a5fcd3aa3cd90a923ab2815d532637bd4a814add402ae5c0d4f129ee71 languageName: node linkType: hard @@ -6558,10 +6619,10 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:0.25.0-rc.1": - version: 0.25.0-rc.1 - resolution: "scheduler@npm:0.25.0-rc.1" - checksum: 10/b9dbc9e406ab4af245c3c7cfd1d39e983aa6184ab941cfd7ee5dc1695854280a5dee556f7f81d9e0f392dbe4f2f85966f2b6988beed39f1d5f5e844b1db02c60 +"scheduler@npm:^0.25.0": + version: 0.25.0 + resolution: "scheduler@npm:0.25.0" + checksum: 10/e661e38503ab29a153429a99203fefa764f28b35c079719eb5efdd2c1c1086522f6653d8ffce388209682c23891a6d1d32fa6badf53c35fb5b9cd0c55ace42de languageName: node linkType: hard @@ -6603,7 +6664,7 @@ __metadata: languageName: node linkType: hard -"set-function-length@npm:^1.2.1": +"set-function-length@npm:^1.2.2": version: 1.2.2 resolution: "set-function-length@npm:1.2.2" dependencies: @@ -7488,12 +7549,12 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:^1.2.2 || ^1.4.0-rc": - version: 1.4.0-rc-fb9a90fa48-20240614 - resolution: "use-sync-external-store@npm:1.4.0-rc-fb9a90fa48-20240614" +"use-sync-external-store@npm:^1.4.0": + version: 1.4.0 + resolution: "use-sync-external-store@npm:1.4.0" peerDependencies: - react: 19.0.0-rc-fb9a90fa48-20240614 - checksum: 10/5b31aef4df66f5172dc65170151c68bf838558a8beb4674193279aa8c1a03e3f58a30afbb7a2619d9271a5c7132a8b20cfecc4b5530440539245c1f6bd5b5aae + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10/08bf581a8a2effaefc355e9d18ed025d436230f4cc973db2f593166df357cf63e47b9097b6e5089b594758bde322e1737754ad64905e030d70f8ff7ee671fd01 languageName: node linkType: hard