* [LOCAL][RN][Release Testing] Update the testing script to run with the community template
* fix prettier
---------
Co-authored-by: Nicola Corti <ncor@meta.com>
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44908
Changelog: [General] [Changed] - CircleCI test to Helloworld, but disabled for now until we remove the template
Reviewed By: cipolleschi
Differential Revision: D58469912
fbshipit-source-id: 718a774946bd70347697f18bbfc470b2897d2f87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45006
The steps were pointing to an incorrect folder. Updated to points to react-native/packages
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D58669426
fbshipit-source-id: b58b9bc7d8c7860f2f46c8bdf4bf0636e82ee357
Summary:
After updating my project to 0.73.2 I noticed that even though I had a specific port set in my `metro.config.js`, every time I'd start my project, it was running on port 8081. Passing the `--port` argument would allow me to change the port, but the config from metro did not. I checked if the metro config was being properly applied, using `--verbose` and it was.
So I dug a bit, trying to figure out what had changed and noticed the coalescing of the value, whenever the argument `--port` is not present. That seemed odd since it meant that there's always a port defined for the `options` of `loadMetroConfig`, which would always be used in the `loadConfig` step.
To confirm I was on the right track I went to the [cli-plugin-metro](https://github.com/react-native-community/cli/blob/v11.3.10/packages/cli-plugin-metro) repo, to the last release before the move here, and noticed that there was [no coalescing in the same method](https://github.com/react-native-community/cli/blob/v11.3.10/packages/cli-plugin-metro/src/commands/start/runServer.ts#L60).
In this PR, I remove the coalescing of the port from `runServer.js` from the `community-cli-plugin`, to allow the port configuration through `metro.config.js`.
## Changelog:
[INTERNAL] [FIXED] - Fix server port configuration via `metro.config.js`
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/44957
Test Plan:
Running `yarn start` and verifying that:
- it would listen to port `8081` if no argument nor a custom port was set in `metro.config.js`
- it would listen to port `8082` if that one was defined in `metro.config.js`
- it would listend to port `8083` if that port was passed as an argument to the command (i.e. `yarn start --port 8083` even though port 8082 was defined in `metro.config.js`
Reviewed By: cortinico
Differential Revision: D58605152
Pulled By: robhogan
fbshipit-source-id: 9cf7a8b6a0d9de3af1ca4092906b4c648acee373
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45005
We've had failures owing to running out of disk space, however this isn't a stable failure. Adding more data about disk availability and utilisation to help debug these issues.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D58667190
fbshipit-source-id: 3d5f7cc985ac71044818f7b5663ef7400ad691b5
Summary:
Implements `requestIdleCallback` and `cancelIdleCallback`
### Notes
Proposed implementation does yet cover all WHATWG eventloop requirements.
- Deadline computation is not implemented and is polyfilled by giving each callback `50ms`, rather than it being shared between other idle callbacks.
- The requested callbacks are called with lowest priority by the scheduler as of now, but the execution is not as described in the standard.
## Changelog:
- [GENERAL] [ADDED] - Implemented `requestIdleCallback` and `cancelIdleCallback`
Pull Request resolved: https://github.com/facebook/react-native/pull/44759
Reviewed By: javache, sammy-SC
Differential Revision: D58415077
Pulled By: rubennorte
fbshipit-source-id: 46189d4e3ca1d353fa6059a904d677c28c61b604
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44991
Updates the open source renderers for React 19. This is in preparation for React Native 0.75.
Notable, this incorporates the feature flag changes from [facebook/react#29903](https://github.com/facebook/react/pull/29903).
Changelog:
[General][Changed] - Upgrade Renderers for React 19
Reviewed By: robhogan
Differential Revision: D58632199
fbshipit-source-id: 674bb47554e4b0c6ab5127fb9683ed8284b7a4ce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44990
Upgrades React Native and Relay to depend on React 19, which is currently published as release candidates. This is in preparation for React Native 0.75.
This will depend on updating open source renderers after [facebook/react#29903](https://github.com/facebook/react/pull/29903) is merged.
Changelog:
[General][Changed] - Upgrade to React 19
Reviewed By: robhogan
Differential Revision: D58625271
fbshipit-source-id: f9ad95b18716a9ce02f7cfbcc7248bdfb244c010
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44989
Enables these 2 global feature flags for React Native Jest testing:
- `IS_REACT_ACT_ENVIRONMENT`
- `IS_REACT_NATIVE_TEST_ENVIRONMENT`
Changelog:
[General][Changed] - Enables React global flag that causes Jest testing environment to require `act()`
Reviewed By: robhogan
Differential Revision: D58644562
fbshipit-source-id: 4de5ea3a89e8ca99ac4c1c21721872db4f5552b3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45002
There are a couple Jest unit test cases for `VirtualizedList-test.js` that require further investigation.
We believe that these are problems with Jest fake timers in the test and not with the component itself, so for now let's skip them so as to unblock the upgrade to React 19.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58656948
fbshipit-source-id: d52f3ad8277def6eae20cbbc11751d73b769d929
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44997
Wrap `VirtualizedList-test` uses of `react-test-renderer` in `act` as appropriate, so as to pass under current React and mostly pass under React 19, with further fixes to come.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D58649295
fbshipit-source-id: 5e0fa791d581fbf004a2ca7eaa5c4b4d9a15ddfe
Summary:
Migrate `VirtualizedSectionList-test` to use `act`-wrapping in prepation for React 19.
Avoid the `react-native/jest/renderer` abstractions as this is a separate package.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58653558
fbshipit-source-id: 0e19fff5c3998fb00b71c3d07100a2064682cb4c
Summary:
Use `act`-wrapping abstractions for `create`/`update`/`unmount` in `Animated-test` so that it's React 19-ready.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58653231
fbshipit-source-id: 44075dfde9740070279c0d1004674349d63de9cd
Summary:
Wrap `ReactTestRenderer.create` in `act` within `ReactNativeTestTools.expectRendersMatchingSnapshot`, as required for concurrent rendering and `IS_REACT_ACT_ENVIRONMENT` in React 19.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58653136
fbshipit-source-id: 9ca0d053bda3e87dd92b762061b839d7bdd571b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44961
Switch the "number of lines" warning, which ensures this value is not negative, to only fire in DEV.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58472148
fbshipit-source-id: e52849effe9a6dc3f25288a64deebd4fd7624e4e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44999
Use `act`-wrapped abstraction for test rendering in preparation for this becoming mandatory.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58651098
fbshipit-source-id: d797c792b1f6ac155f02951a8264cf0631961d83
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44998
Add async helpers to the existing `jest/renderer` module to wrap `react-test-renderer`'s `update` and `unmount` in `act`.
Migrate one test `ScrollView-test` as a usage example and to make it compatible with incoming React 19 concurrency requirements.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58650989
fbshipit-source-id: 5eb48722ee7a5487355969e553ba79c3ce361067
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44994
For RN monorepo tests, wrap `create` calls through our `jest/renderer` abstraction in `await act`.
This is a no-op under current React but will be required under `react-test-renderer@19` with `IS_REACT_ACT_ENVIRONMENT`.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58650940
fbshipit-source-id: 4013af89dd7c9f447b2dd493989f3a4fdf2b6508
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44996
Mock out some LogBoxData symbolication in LogBoxInspector-test that would otherwise make it sensitive to an async `useEffect` when wrapping in `act`.
This is immaterial to the snapshot under test (changing a state from `PENDING` to `NONE`).
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58651811
fbshipit-source-id: d47100a87d83102bbe183cb7266d66344e75b0b0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44993
Use our existing thin abstraction around `react-test-renderer` `create` within `react-native/jest/renderer`, in order to benefit from the introduction of async `act` wrapping in that abstraction.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58650874
fbshipit-source-id: d3d1967fa68568e3ae2d8069478cb79aa7049ed0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44992
To allow for async `act` in a subsequent diff, make this utility method async and awaited at all call sites.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58647828
fbshipit-source-id: 3a47c57569814638c216309eed1885dd37521dde
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44995
Use our existing abstraction around `react-test-renderer`'s `create` and make it asynchronous, to allow for wrapping `create` in `act` in a subsequent diff, and using the async API per guidance in https://react.dev/reference/react/act?#await-act-async-actfn .
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D58647827
fbshipit-source-id: f81cf382892ef5ba14b452bd32980c98bd7ef03b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44982
Removes `react-shallow-renderer` dependency from the `react-native` package because it is no longer used.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643454
fbshipit-source-id: f9aa62af2ff0282d6b54b97da6f2870a38881947
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44973
Changes `expectRendersMatchingSnapshot` to no longer make assertions about shallow rendering, because shallow rendering is now deprecated.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643365
fbshipit-source-id: 03653045a44a176095c53fc0ff27743cc8ea1820
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44980
These Jest unit test cases were making assertions about shallow rendering, but that shallow rendering is now deprecated.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643065
fbshipit-source-id: 34a31989f298535546a64c3ccd2888d648c1cdf1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44977
These Jest unit test cases were making assertions about shallow rendering, but that shallow rendering is now deprecated.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643060
fbshipit-source-id: a61dfcf6cd778a8556aec874fd5e42f8e11f2be2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44970
These Jest unit test cases were making assertions about shallow rendering, but that shallow rendering is now deprecated.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643058
fbshipit-source-id: 75c95b3ef8f9c481b50d90bf195ba3bd90196f0b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44975
These Jest unit test cases were making assertions about shallow rendering, but that shallow rendering is now deprecated.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643064
fbshipit-source-id: 19cb05df25b4b92ee584ea126d238276f5b214f7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44981
Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643062
fbshipit-source-id: 6d7bba78945509bbb6bdab1e6347ba0d90343ec3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44971
Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643068
fbshipit-source-id: f3a0331140fbaa9ee19b76da8700e60b3efc525a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44976
Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643067
fbshipit-source-id: 2e298e2736227afb9322463daa3db0578638559a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44969
Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643057
fbshipit-source-id: 0d2943a714ca718841ab4bec5a33f6c9e48fea92
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44986
Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D58643069
fbshipit-source-id: a2dbba104a7f6af57b6990da3cb0055a5390bc00