Skip to content

RN/Relay: Bump Dependency to React 19 #44990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,16 @@
"nullthrows": "^1.1.1",
"prettier": "2.8.8",
"prettier-plugin-hermes-parser": "0.22.0",
"react": "18.3.1",
"react-test-renderer": "18.3.1",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
"rimraf": "^3.0.2",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"supports-color": "^7.1.0",
"typescript": "5.0.4",
"ws": "^6.2.2"
},
"resolutions": {
"react-is": "19.0.0-rc-fb9a90fa48-20240614"
}
}
4 changes: 2 additions & 2 deletions packages/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "jest"
},
"dependencies": {
"react": "18.3.1",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-native": "1000.0.0"
},
"devDependencies": {
Expand All @@ -29,7 +29,7 @@
"eslint": "^8.19.0",
"jest": "^29.6.3",
"listr2": "^8.2.1",
"react-test-renderer": "18.3.1",
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
"rxjs": "^7.8.1"
},
"engines": {
Expand Down
5 changes: 5 additions & 0 deletions packages/react-native/jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

'use strict';

global.IS_REACT_ACT_ENVIRONMENT = true;
// Suppress the `react-test-renderer` warnings until New Architecture and legacy
// mode are no longer supported by React Native.
global.IS_REACT_NATIVE_TEST_ENVIRONMENT = true;

const MockNativeMethods = jest.requireActual('./MockNativeMethods');
const mockComponent = jest.requireActual('./mockComponent');

Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
},
"peerDependencies": {
"@types/react": "^18.2.6",
"react": "^18.2.0"
"react": "^19.0.0-rc-fb9a90fa48-20240614"
},
"peerDependenciesMeta": {
"@types/react": {
Expand Down Expand Up @@ -140,7 +140,7 @@
"react-devtools-core": "5.1.0",
"react-refresh": "^0.14.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "0.24.0-canary-efb381bbf-20230505",
"scheduler": "0.25.0-rc-fb9a90fa48-20240614",
"semver": "^7.1.3",
"stacktrace-parser": "^0.1.10",
"whatwg-fetch": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test": "jest"
},
"dependencies": {
"react": "18.3.1",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-native": "1000.0.0"
},
"devDependencies": {
Expand All @@ -27,7 +27,7 @@
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.3.1",
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
"typescript": "5.0.4"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@react-native/popup-menu-android": "0.75.0-main"
},
"peerDependencies": {
"react": "18.3.1",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-native": "*"
},
"codegenConfig": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ describe('VirtualizedList', () => {
expect(scrollRef.measureInWindow).toBeInstanceOf(jest.fn().constructor);
});

it('calls onStartReached when near the start', async () => {
// TODO: Revisit this test case after upgrading to React 19.
it.skip('calls onStartReached when near the start', async () => {
const ITEM_HEIGHT = 40;
const layout = {width: 300, height: 600};
let data = Array(40)
Expand Down Expand Up @@ -1740,7 +1741,8 @@ it('retains initial render region when an item is appended', async () => {
expect(component).toMatchSnapshot();
});

it('retains batch render region when an item is appended', async () => {
// TODO: Revisit this test case after upgrading to React 19.
it.skip('retains batch render region when an item is appended', async () => {
const items = generateItems(10);
const ITEM_HEIGHT = 10;

Expand All @@ -1764,7 +1766,9 @@ it('retains batch render region when an item is appended', async () => {
performAllBatches();
});

await jest.runAllTimersAsync();
await act(async () => {
await jest.runAllTimersAsync();
});

await act(() => {
component.update(
Expand Down
2 changes: 1 addition & 1 deletion packages/virtualized-lists/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"nullthrows": "^1.1.1"
},
"devDependencies": {
"react-test-renderer": "18.3.1"
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614"
},
"peerDependencies": {
"@types/react": "^18.2.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"react": "18.3.1",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-native": "1000.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ exports[`setVersion updates monorepo for nightly: packages/react-native/template
\\"version\\": \\"0.0.1\\",
\\"private\\": true,
\\"dependencies\\": {
\\"react\\": \\"18.3.1\\",
\\"react\\": \\"19.0.0-rc-fb9a90fa48-20240614\\",
\\"react-native\\": \\"0.81.0-nightly-29282302-abcd1234\\"
},
\\"devDependencies\\": {
Expand Down Expand Up @@ -187,7 +187,7 @@ exports[`setVersion updates monorepo for release-candidate: packages/react-nativ
\\"version\\": \\"0.0.1\\",
\\"private\\": true,
\\"dependencies\\": {
\\"react\\": \\"18.3.1\\",
\\"react\\": \\"19.0.0-rc-fb9a90fa48-20240614\\",
\\"react-native\\": \\"0.80.0-rc.3\\"
},
\\"devDependencies\\": {
Expand Down Expand Up @@ -287,7 +287,7 @@ exports[`setVersion updates monorepo for stable version: packages/react-native/t
\\"version\\": \\"0.0.1\\",
\\"private\\": true,
\\"dependencies\\": {
\\"react\\": \\"18.3.1\\",
\\"react\\": \\"19.0.0-rc-fb9a90fa48-20240614\\",
\\"react-native\\": \\"0.80.1\\"
},
\\"devDependencies\\": {
Expand Down Expand Up @@ -387,7 +387,7 @@ exports[`setVersion updates monorepo on main after release cut: packages/react-n
\\"version\\": \\"0.0.1\\",
\\"private\\": true,
\\"dependencies\\": {
\\"react\\": \\"18.3.1\\",
\\"react\\": \\"19.0.0-rc-fb9a90fa48-20240614\\",
\\"react-native\\": \\"1000.0.0\\"
},
\\"devDependencies\\": {
Expand Down
73 changes: 19 additions & 54 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7409,7 +7409,7 @@ long@^5.0.0:
resolved "https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61"
integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==

loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
loose-envify@^1.0.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
Expand Down Expand Up @@ -8566,54 +8566,28 @@ react-devtools-core@5.1.0:
shell-quote "^1.6.1"
ws "^7"

"react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==

react-is@^16.13.1, react-is@^16.8.4:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

react-is@^17.0.1:
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==

react-is@^18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==
react-is@19.0.0-rc-fb9a90fa48-20240614, react-is@^16.13.1, react-is@^16.8.4, react-is@^17.0.1, react-is@^18.0.0:
version "19.0.0-rc-fb9a90fa48-20240614"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-19.0.0-rc-fb9a90fa48-20240614.tgz#6987893799abdedf2e9929e31541cb6d7dc8285a"
integrity sha512-60qI7v1B9RhmZwjTCnAgzcuABOQsIH20vTbETQPaze96s1lY2lSawv9dvXAfF8Z1MIqOppWSKLNOshF0WsZ3OA==

react-refresh@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==

react-shallow-renderer@^16.15.0:
version "16.15.0"
resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz#48fb2cf9b23d23cde96708fe5273a7d3446f4457"
integrity sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==
dependencies:
object-assign "^4.1.1"
react-is "^16.12.0 || ^17.0.0 || ^18.0.0"

react-test-renderer@18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-18.3.1.tgz#e693608a1f96283400d4a3afead6893f958b80b4"
integrity sha512-KkAgygexHUkQqtvvx/otwxtuFu5cVjfzTCtjXLH9boS19/Nbtg84zS7wIQn39G8IlrhThBpQsMKkq5ZHZIYFXA==
react-test-renderer@19.0.0-rc-fb9a90fa48-20240614:
version "19.0.0-rc-fb9a90fa48-20240614"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-19.0.0-rc-fb9a90fa48-20240614.tgz#6657b3d05a533afad5ea0516f9ed29cadf72334f"
integrity sha512-cV3mGgsKTJCB8f4tZxWIp0ot4PMgx791XTkwpapf06ZlUk5BCP3C1CbIqRXcKeiQODvFJClZX26TFTPAklTq7A==
dependencies:
react-is "^18.3.1"
react-shallow-renderer "^16.15.0"
scheduler "^0.23.2"
react-is "19.0.0-rc-fb9a90fa48-20240614"
scheduler "0.25.0-rc-fb9a90fa48-20240614"

react@18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
dependencies:
loose-envify "^1.1.0"
react@19.0.0-rc-fb9a90fa48-20240614:
version "19.0.0-rc-fb9a90fa48-20240614"
resolved "https://registry.yarnpkg.com/react/-/react-19.0.0-rc-fb9a90fa48-20240614.tgz#90eb43a0b005e8cc3cbf0d801c14816d01df1b08"
integrity sha512-nvE3Gy+IOIfH/DXhkyxFVQSrITarFcQz4+shzC/McxQXEUSonpw2oDy/Wi9hdDtV3hlP12VYuDL95iiBREedNQ==

readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@~2.3.6:
version "2.3.8"
Expand Down Expand Up @@ -8942,19 +8916,10 @@ safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1,
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==

scheduler@0.24.0-canary-efb381bbf-20230505:
version "0.24.0-canary-efb381bbf-20230505"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.24.0-canary-efb381bbf-20230505.tgz#5dddc60e29f91cd7f8b983d7ce4a99c2202d178f"
integrity sha512-ABvovCDe/k9IluqSh4/ISoq8tIJnW8euVAWYt5j/bg6dRnqwQwiGO1F/V4AyK96NGF/FB04FhOUDuWj8IKfABA==
dependencies:
loose-envify "^1.1.0"

scheduler@^0.23.2:
version "0.23.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==
dependencies:
loose-envify "^1.1.0"
scheduler@0.25.0-rc-fb9a90fa48-20240614:
version "0.25.0-rc-fb9a90fa48-20240614"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0-rc-fb9a90fa48-20240614.tgz#9ee11063b7c0f47aef3fea53d9f1be3f13794dce"
integrity sha512-HHqQ/SqbeiDfXXVKgNxTpbQTD4n7IUb4hZATvHjp03jr3TF7igehCyHdOjeYTrzIseLO93cTTfSb5f4qWcirMQ==

selenium-webdriver@4.1.2:
version "4.1.2"
Expand Down