Commit Graph

66 Commits

Author SHA1 Message Date
Michał Pierzchała fc6d7d4f0f Update RNC CLI in RNTester to v20.0.0 (#53206)
Summary:
Bump CLI to stable v20 for RNTester

## Changelog:

[INTERNAL] [CHANGED] - Update RNC CLI in RNTester to v20.0.0

<!-- 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/53206

Reviewed By: cortinico

Differential Revision: D79997077

Pulled By: rshest

fbshipit-source-id: 7264d942967fbfbc7fa5704f1089c0e7dbd3eb4b
2025-08-11 09:37:54 -07:00
Riccardo Cipolleschi ec5a98b1f5 Sync React 19.1.1 into React Native (#52887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52887

Syncs Reac 19.1.1 into React Native.

This commit should contains the fix for:
- React owner stack in React Native
- An issue with React holding shadow node for longer than it needed
- An issue that made `startTransition` not working with React Native.

## Changelog:
[General][Changed] - Bumped React to 19.1.1

bypass-github-export-checks

Reviewed By: cortinico

Differential Revision: D79096406

fbshipit-source-id: cbb2f846b1f08ba5ff482cfed5aaddc16df075cc
2025-07-29 08:05:38 -07:00
Nicola Corti 59101d6809 Remove unnecessary OSSLibraryExample (#52705)
Summary:
This module is currently unused, so we can clean it up.

## Changelog:

[INTERNAL] -

Pull Request resolved: https://github.com/facebook/react-native/pull/52705

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D78555763

Pulled By: cortinico

fbshipit-source-id: 0a6152ab3d357cac0c6d7669f292680af7b87074
2025-07-22 03:16:48 -07:00
Nicola Corti 9f0903780b Bump monorepo packages to 0.82.0-main (#52706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52706

This just prepares the repo for the next branch cut.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D78558445

fbshipit-source-id: 2132d560dad447b3685874438387a519587f8554
2025-07-18 09:23:10 -07:00
Alex Hunt e247be793c Lower minimum Node.js version to 20.19.4 (#52678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52678

From partner feedback, there's still appetite to support Node 20.x for the next <1y of life. Lower min version to `20.19.4` (Jul 2025) and widen test matrix in CI.

Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 20 (Overrides #51840)

Reviewed By: cortinico

Differential Revision: D78494491

fbshipit-source-id: c8d9dc6250cb11f8a12ca7e761b65f4a8dae9265
2025-07-18 03:32:13 -07:00
szymonrybczak 9d63098520 chore: bump @react-native-community/cli* devDependencies to 20.0.0-alpha (#52460)
Summary:
Upgrade `react-native-community/cli` to version 20.

## Changelog:

[INTERNAL] [CHANGED] - Upgrade react-native-community/cli to v20

Pull Request resolved: https://github.com/facebook/react-native/pull/52460

Test Plan: n/a

Reviewed By: huntie

Differential Revision: D77860027

Pulled By: cortinico

fbshipit-source-id: 3eb3942b38091b4216628b94cdf1449838daa8d3
2025-07-07 05:17:07 -07:00
Nicola Corti b578a70bd5 Bump packages for next release (#52359)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52359

This is needed ahead of the 81 branch cut.

Changelog:
[Internal] - Bump all packages to 0.81.0-main

Reviewed By: huntie

Differential Revision: D77602196

fbshipit-source-id: 1b52a7d1577783d72aba8d20f98032f29ffcc7df
2025-07-02 03:53:34 -07:00
Alex Hunt df39eadc03 Bump minimum Node.js version to 22.14.0 (#51840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51840

Bumps the minimum version of Node.js in React Native to the current active LTS release (22.x, upgraded from 18.x which is now out of support).

- CI configurations are reduced from `[22, 20, 18]` to `[24, 22]`.

{F1978909878}

See https://nodejs.org/en/about/previous-releases.

Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 22

Reviewed By: yungsters, cortinico

Differential Revision: D76037015

fbshipit-source-id: b6e4b3ee279a9a93d716a13297420bba73f45250
2025-06-06 05:21:39 -07:00
Nicola Corti be113b4406 Stop building JSC inside RN-Tester (#51865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51865

As in 0.81 we're stopping 1st party support for JSC, we can now cleanup the RNTester
flavor for JSC and simplify the setup here.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D76051319

fbshipit-source-id: 79b01cc64af2466a0be47ceaa0cd211cb6b02f53
2025-06-06 04:54:44 -07:00
Riccardo Cipolleschi 58a9046978 Improve cleanup script for ios (#51046)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51046

This small change improves the cleanup script for ios, which is now not deleting the workspace and that it might be keeping an outdated version of the codegen for OSS.

## Changelog:
[Internal] - Improve yarn clean-ios script

Reviewed By: cortinico

Differential Revision: D73988442

fbshipit-source-id: 6de5d6ab08812ba7fdb19b0cc955a38840d82f89
2025-05-02 04:21:12 -07:00
Alex Hunt 3cf0102007 Redesign New App Screen and move to package (#50939)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50939

Redesigns React Native's `NewAppScreen` component, and moves it into a new `react-native/new-app-screen` package with a single component export. Deletes the old New App Screen under `'react-native/Libraries/NewAppScreen/'`.

{F1977434404}

**Motivation**

- **Reduces our public API** (see https://github.com/react-native-community/discussions-and-proposals/pull/894)
    - Separates this screen from the main `react-native` package, where it was a number of subpath exports.
    - Reduces the size of the main `react-native` package, including image assets — which are redundant for consumers like Expo.
- **Updated visual treatment**
    - Replace outdated logo, update to a responsive tablet/windowed layout.
    - Removes outdated guidance (e.g. "use cmd+R to reload"), and generally simplifies the layout (with the aim of reducing future maintenance).
- **Simplifies template boilerplate**
    - `NewAppScreen` is now a fully encapsulated screen layout, avoiding the cruft of the previous modular design.

**Integration plan**

When we cut the `0.80-stable` branch, we'll update [the template](https://github.com/react-native-community/template/blob/main/template/App.tsx) to import and use `<NewAppScreen />`.

- This will cause an extra runtime dependency in the template `package.json`, which will require user cleanup. We are happy with this tradeoff, given the self-evident package name, reduction of template boilerplate, and size reduction on the main `react-native` package.

Changelog:
[General][Breaking] - The `NewAppScreen` component is redesigned and moved to the `react-native/new-app-screen` package

Reviewed By: cipolleschi

Differential Revision: D73657878

fbshipit-source-id: 9ca07afa9fbdd6f32015eafa2f27d52ed182918e
2025-04-28 04:17:21 -07:00
Riccardo Cipolleschi 0e11e6a28b Sync React 19.1 into React Native OSS (#50865)
Summary:
X-link: https://github.com/facebook/metro/pull/1492

Pull Request resolved: https://github.com/facebook/react-native/pull/50865

This change updates React in React Native OSS from 19 to 19.1
bypass-github-export-checks
## Changelog:
[General][Changed] - Bump React to 19.1

## Internal:
jest_e2e[run_all_tests]

Reviewed By: cortinico

Differential Revision: D73502629

fbshipit-source-id: 362897e8b491d1474f433ee7ad3306baf95d2e6c
2025-04-24 10:15:42 -07:00
Ramanpreet Nara 45fa563d3a Remove RCTUnsafeExecuteOnMainQueueSync from sample modules (#50149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50149

Let's just remove RCTUnsafeExecuteOnMainQueueSync from the examples.

That way, people don't copy-paste it, thinking it's okay to use.

Changelog: [Internal]

Reviewed By: lyahdav

Differential Revision: D71505823

fbshipit-source-id: f8d51b1a16bfdd6abdf62a6ba09ffff49d79a3f1
2025-03-20 16:25:15 -07:00
Alex Hunt 24957ac248 Bump CLI to 17 (RNTester) (#49973)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49973

We still depend on the Community CLI directly, supporting local development in  `packages/rn-tester`. Bump to latest — contains a number of build improvements, and will align us closer to prod/next.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D71033085

fbshipit-source-id: ddbf7df5a35951b77c36d111cfd12ad64c3b73f7
2025-03-12 11:07:20 -07:00
Alex Hunt e70961e05c Bump packages for next release (#49972)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49972

Follows the recent `0.79-stable` branch cut.

Changelog: [Internal] - Bump all packages to `0.80.0-main`

Reviewed By: cortinico

Differential Revision: D70976555

fbshipit-source-id: e81e4c45c6a510e114d02853c5bb90a715b7df8b
2025-03-12 05:11:16 -07:00
Riccardo Cipolleschi e77fe5c471 Bump React Native monorepo packages (#48975)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48975

After cutting 0.78-stable, we need to bump the monorepo packages to `0.79.0-main`

## Changelog:
[Internal] - Bump monorepo packages to `0.79.0-main`

Reviewed By: cortinico, huntie

Differential Revision: D68715005

fbshipit-source-id: cb5abbf05e8638683687be8d61d66b3037111572
2025-01-27 11:01:34 -08:00
Riccardo Cipolleschi 140b3b38df Add prepare-ios script (#48799)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48799

This change moves the same scripts we have to prepare the HelloWorld project to RNTester.
This is something we forgot to do when we were decoupling the reacrt-native from the community CLI.
This is also the base to start deprecating cocoapods and add more configuration steps for the project.

## Changelog:
[Internal] - Copy cli.js script from HelloWorld to RNTester

Reviewed By: cortinico

Differential Revision: D68413419

fbshipit-source-id: 7cf19d86bd3c1beb0c1e7f3380331174352a1651
2025-01-20 12:20:36 -08:00
Riccardo Cipolleschi 5a81ceed2a React Native sync for revisions de68d2f...372ec00 (#48196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48196

X-link: https://github.com/facebook/metro/pull/1400

- **[372ec00c03](https://github.com/facebook/react/commit/372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([#31714](https://github.com/facebook/react/pull/31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](https://github.com/facebook/react/commit/3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([#31713](https://github.com/facebook/react/pull/31713)) //<Sebastian Markbåge>//
- **[1c9b138714](https://github.com/facebook/react/commit/1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([#31671](https://github.com/facebook/react/pull/31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](https://github.com/facebook/react/commit/de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([#31667](https://github.com/facebook/react/pull/31667)) //<Josh Story>//
- **[16d2bbbd1f](https://github.com/facebook/react/commit/16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([#31620](https://github.com/facebook/react/pull/31620)) //<Josh Story>//
- **[5b0ef217ef](https://github.com/facebook/react/commit/5b0ef217ef )**: s/server action/server function ([#31005](https://github.com/facebook/react/pull/31005)) //<Ricky>//
- **[e3b7ef32be](https://github.com/facebook/react/commit/e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([#31617](https://github.com/facebook/react/pull/31617)) //<lauren>//
- **[aba370f1e4](https://github.com/facebook/react/commit/aba370f1e4 )**: Add moveBefore Experiment ([#31596](https://github.com/facebook/react/pull/31596)) //<Sebastian Markbåge>//
- **[1345c37941](https://github.com/facebook/react/commit/1345c37941 )**: Mark all lanes in order on every new render ([#31615](https://github.com/facebook/react/pull/31615)) //<Sebastian Markbåge>//
- **[91061073d5](https://github.com/facebook/react/commit/91061073d5 )**: Mark ping time as update ([#31611](https://github.com/facebook/react/pull/31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](https://github.com/facebook/react/commit/a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([#31610](https://github.com/facebook/react/pull/31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](https://github.com/facebook/react/commit/c11c9510fa )**: [crud] Fix deps comparison bug ([#31599](https://github.com/facebook/react/pull/31599)) //<lauren>//
- **[64f89510af](https://github.com/facebook/react/commit/64f89510af )**: [crud] Enable on RTR FB builds ([#31590](https://github.com/facebook/react/pull/31590)) //<lauren>//
- **[7558ffe84d](https://github.com/facebook/react/commit/7558ffe84d )**: [crud] Fix copy paste typo ([#31588](https://github.com/facebook/react/pull/31588)) //<lauren>//
- **[7c254b6576](https://github.com/facebook/react/commit/7c254b6576 )**: Log yielded time in the Component Track ([#31563](https://github.com/facebook/react/pull/31563)) //<Sebastian Markbåge>//
- **[6177b18c66](https://github.com/facebook/react/commit/6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([#31552](https://github.com/facebook/react/pull/31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](https://github.com/facebook/react/commit/eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([#31119](https://github.com/facebook/react/pull/31119)) //<Mark Skelton>//
- **[047d95e85f](https://github.com/facebook/react/commit/047d95e85f )**: [crud] Basic implementation ([#31523](https://github.com/facebook/react/pull/31523)) //<lauren>//
- **[92c0f5f85f](https://github.com/facebook/react/commit/92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([#31554](https://github.com/facebook/react/pull/31554)) //<Sebastian Markbåge>//
- **[053b3cb050](https://github.com/facebook/react/commit/053b3cb050 )**: [crud] Rename Effect type ([#31557](https://github.com/facebook/react/pull/31557)) //<lauren>//
- **[7dd6b9e68a](https://github.com/facebook/react/commit/7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([#31556](https://github.com/facebook/react/pull/31556)) //<lauren>//
- **[d8afd1c82e](https://github.com/facebook/react/commit/d8afd1c82e )**: [crud] Scaffold initial types ([#31555](https://github.com/facebook/react/pull/31555)) //<lauren>//
- **[3720870a97](https://github.com/facebook/react/commit/3720870a97 )**: Log Render Phases that Never Committed ([#31548](https://github.com/facebook/react/pull/31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](https://github.com/facebook/react/commit/8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path  ([#31547](https://github.com/facebook/react/pull/31547)) //<Sebastian Markbåge>//
- **[63cde684f5](https://github.com/facebook/react/commit/63cde684f5 )**: (chore): copy fix in <style> precedence error ([#31524](https://github.com/facebook/react/pull/31524)) //<Zack Tanner>//
- **[b01722d585](https://github.com/facebook/react/commit/b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([#31536](https://github.com/facebook/react/pull/31536)) //<Sebastian Markbåge>//
- **[c13986da78](https://github.com/facebook/react/commit/c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([#31528](https://github.com/facebook/react/pull/31528)) //<Sebastian Markbåge>//
- **[4686872159](https://github.com/facebook/react/commit/4686872159 )**: Log passive commit phase when it wasn't delayed ([#31526](https://github.com/facebook/react/pull/31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](https://github.com/facebook/react/commit/5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([#31540](https://github.com/facebook/react/pull/31540)) //<lauren>//
- **[3644f0bd21](https://github.com/facebook/react/commit/3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([#31527](https://github.com/facebook/react/pull/31527)) //<Sebastian Markbåge>//
- **[8657869999](https://github.com/facebook/react/commit/8657869999 )**: Separate Tracks for Components and Phases ([#31525](https://github.com/facebook/react/pull/31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](https://github.com/facebook/react/commit/b15135b9f5 )**: [ez] Update useMemoCache return type ([#31539](https://github.com/facebook/react/pull/31539)) //<lauren>//

Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0

bypass-github-export-checks
jest_e2e[run_all_tests]

Reviewed By: cortinico

Differential Revision: D67018480

fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
2024-12-16 06:58:21 -08:00
Riccardo Cipolleschi fe1057afcd Let lib maintainer be explicit with componentProvider mapping (#47520)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47520

Right now, when a 3p library needs to register a component in the component system, we have to crawl the library to try and get the mappng, best effort.

With this approach, we are enriching the `codegenConfig` property to allow library developers to define the mapping themselves.

For example:
```json
//...
"codegenConfig": {
    //..
    "ios": {
      "componentProvider": {
        "RNTMyNativeView": "RNTMyNativeViewComponentView"
      }
    }
  },
```
means that the JS component `RNTMyNativeView` will be mapped to the `RNTMyNativeViewComponentView` class.

This also work for local apps, and it warns the users about what libraries are using the deprecated approach, so they can open an issue or a PR to those libraries.

## Changelog:
[iOS][Added] - Allow 3p developers to specify the association between components and classes in Fabric

Reviewed By: dmytrorykun

Differential Revision: D65666061

fbshipit-source-id: 692e753635873ff9260e131d2d18ed226b2378c2
2024-11-12 07:38:03 -08:00
Nicola Corti 7e268c9d52 Revert React 19RC to React 18.3.1 (#47380)
Summary:
While we're waiting for 19 stable, let's bring main back to 18.3.1 ahead of the 0.77 branch cut. We'll land this change just after 19 stable lands.

This is a cherry pick of b93b378fa0 which landed in 0.76 already

bypass-github-export-checks

## Changelog:

[INTERNAL] - Revert React 19RC to React 18.3.1

Pull Request resolved: https://github.com/facebook/react-native/pull/47380

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D65430775

Pulled By: cortinico

fbshipit-source-id: f0f211754c8ffe5d037fd299e4de52c29d1d7913
2024-11-08 08:27:37 -08:00
Riccardo Cipolleschi 9e2e8c1a27 Prepare scripts to simplify E2E testing (#46545)
Summary:
Add tests to simplify running Maestro e2e tests locally.
Thanks to these scripts, users can just, from the root folder:

```sh
yarn install
cd packages/rn-tester

# build android for testing
yarn e2e-build- android

# run tests on android
yarn e2e-test-android

# build iOS for testing
yarn e2e-build-ios

# run tests on iOS
yarn e2e-test-ios
```

This is a preliminary step for a future umbrella issue. We can also use these command in CI to simplify the scripts.

## Changelog:
[Internal] - add script to simplify e2e testing

Pull Request resolved: https://github.com/facebook/react-native/pull/46545

Test Plan: Tested the command locally

Reviewed By: cortinico

Differential Revision: D62879105

Pulled By: cipolleschi

fbshipit-source-id: 6f68aebb3f8112302a458ca9e118180d3dbaf180
2024-09-20 03:29:43 -07:00
Riccardo Cipolleschi 120558c0cd Bump main to 0.77
Summary:
This change bumps the React Native version in main to 0.77

bypass-github-export-checks

## Changelog:
[General][Changed] - Bump main to 0.77-main

## Facebook:
generated by running `js1 publish react-native 0.77.0-main`

Reviewed By: cortinico

Differential Revision: D62575939

fbshipit-source-id: 6d239fca2eed6cfe51f8c37f78d8dc8730c18b8c
2024-09-12 09:23:23 -07:00
Riccardo Cipolleschi 148066e8f9 Bump CLI to 15 (#46394)
Summary:
Bumps the CLI to the next version

## Changelog:
[General][Changed] - Bump cli dependencies to 15.0.0-alpha.2

Pull Request resolved: https://github.com/facebook/react-native/pull/46394

Test Plan: CI

Reviewed By: huntie

Differential Revision: D62375405

Pulled By: cipolleschi

fbshipit-source-id: fec99216bc7ad6decfd83840091d807f603184da
2024-09-09 03:54:43 -07:00
Blake Friedman bd3a3e3de0 Remove @react-native-community/cli direct dependencies (#45927)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45927

This was attempted earlier in the year, and was unsuccessful because HelloWorld had a hidden dependency on this.

Changelog: [General][Breaking] Projects that intend to use the community CLI will now have to declare that dependency instead of transitively having the react-native package handle this.

Reviewed By: GijsWeterings

Differential Revision: D60898346

fbshipit-source-id: 1d62615f718e06caf684f48ecfaf610bf1f51f8e
2024-08-14 12:55:50 -07:00
Alex Hunt ebf1a7b79b Bump packages for next major release (#45015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45015

Set package versions to `0.76.0-main` (`0.75-stable` branch was cut).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D58687399

fbshipit-source-id: 27ed987e4557705845d57d64e7547cddbd982a03
2024-06-26 07:59:49 -07:00
Tim Yung 0dd8224a71 RN/Relay: Bump Dependency to React 19 (#44990)
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
2024-06-17 02:59:55 -07:00
Tim Yung abb7070a51 RN/Relay: Upgrade to React v18.3.1 (#44397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44397

X-link: https://github.com/facebook/metro/pull/1270

Upgrades `react-native` and `relay` to the newly published `react@18.3.1`.

Changelog:
[General][Changed] - Upgrade to `react@18.3.1`

Reviewed By: jackpope

Differential Revision: D56901818

fbshipit-source-id: 423d35205bb533c6a39c0fed25a1ffea1f0bc12d
2024-05-02 16:18:26 -07:00
Dmitry Rykun 1cb0a3342a Add react-native-test-library package (#43068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43068

This diff adds `react-native-test-library` package.
It contains native module and native component example, and targets both the new and the old architecture. It has structure similar to many OSS React Native libraries, and is supposed to be used to test the integration with third-party libraries.

It is integrated with RNTester as the **OSS Library Example** screen.

{F1457510909}

**Change Background** tests native commands.
**Set Opacity** tests native props.
**Get Random Number** tests native module.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D50793835

fbshipit-source-id: ff6daefab10e6e9f13049e3013f8f63cfa8a929e
2024-04-09 11:35:43 -07:00
Blake Friedman a380ea55fb Summary: minor fix found in nightly logs from Publish NPM job (#43519)
Summary:
Minor fix to package.json which newer version of npm warn about when publishing, after running `npm pkg fix -ws` on the workspace.

{F1470070110}

## Changelog: [Internal] npm pkg fix -ws

Pull Request resolved: https://github.com/facebook/react-native/pull/43519

Test Plan: eyescloseddog

Reviewed By: cortinico

Differential Revision: D55012872

Pulled By: blakef

fbshipit-source-id: ff3c63a3eefaf56d369219a3d4b32d44d6d842c9
2024-03-18 08:29:10 -07:00
Alex Hunt f57be12977 Bump packages for next major release (#43132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43132

Command run:

```
node scripts/releases/set-version 0.75.0-main --skip-react-native-version
```

Changelog: [Internal]

Reviewed By: lunaleaps, cipolleschi

Differential Revision: D54006327

fbshipit-source-id: 7afe9e7ca3020faf399fdba2221fab8a102c56c7
2024-03-04 07:54:37 -08:00
Ramanpreet Nara 8bced4b29d Pull PopupMenuAndroid out of React Native core
Summary:
**History:** This component was originally introduced into React Native core in D52712758, to replace UIManagerModule.showPopupMenu().

**Problem:** But, React Native core should be lean. Adding this component to React Native bloats the core.

**Changes:** So, this diff pulls PopupMenuAndroid out into its own package in the react-native GitHub repository.

In the future, this will be migrated to a community package!

Changelog: [Android][Removed] Move PopupMenu out of React Native core

Reviewed By: NickGerleman

Differential Revision: D53328110

fbshipit-source-id: 469d8dc3e756c06040c72e08fa004aafa1bd6e18
2024-02-23 16:43:18 -08:00
Nicola Corti 2697b9af5c Back out "Add cxxModule to RN-Tester's codegenConfig" (#43051)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43051

Original commit changeset: 97b9985b94ef

Original Phabricator Diff: D53669913

Changelog:
[Internal] [Changed] - Back out "[RN][Android][TmCxxAutolinking] Add cxxModule to RN-Tester's codegenConfig"

Reviewed By: cipolleschi

Differential Revision: D53812108

fbshipit-source-id: 5c5dfbaf95685953ef20cf35061a72afffe00ed3
2024-02-16 09:20:02 -08:00
Nicola Corti 2e3508d6cb Add cxxModule to RN-Tester's codegenConfig
Summary:
This introduces the `cxxModule` field for RNTester where the local TM-CXX modules
are specified.

Changelog:
[Internal] [Changed] - Add cxxModule to RN-Tester's codegenConfig

Reviewed By: cipolleschi

Differential Revision: D53669913

fbshipit-source-id: 97b9985b94efe79566d2d06f6081e65fb66478ff
2024-02-13 09:35:39 -08:00
Nicola Corti b15a2c3fc1 Unblock yarn android on main (#39413)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39413

`yarn android` on main is currently broken due to the CLI attempting to search for the manifest inside the src/androidTest folder.
This fixes it by specifying the exact path of the Android Manifest.
The fix to the CLI is also pending to prevent the CLI from searching inside test folders.

Fix for the CLI is here:
- https://github.com/react-native-community/cli/pull/2075

Changelog:
[Internal] [Changed] - Unblock `yarn android` on main

Reviewed By: huntie

Differential Revision: D49190626

fbshipit-source-id: 99309f17cb08a33be2a565f5faa29130862686ea
2023-09-13 08:56:22 -07:00
Arushi Kesarwani 2eb25cbdbe Update Node.js to v18 in all RN packages (#37791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37791

## Bump minimum Node JS version to 18 via `react-native/package.json#engines`

In https://github.com/facebook/react-native/pull/35443 we bumped up the node version from 16 to 18.

Node 16 [ends maintenance releases on 2023-09-11](https://nodejs.org/en/blog/announcements/nodejs16-eol/), and bumping this minimum will allow other associated Node JS tools (CLI, Metro, Jest) to reduce their support burden.

This follows up by formally making Node 18 the minimum supported version.

**Docs PR:**
https://github.com/facebook/react-native-website/pull/3748

**Changelog:**
[General][Breaking] Bump minimum Node JS version to 18

Reviewed By: cortinico, NickGerleman

Differential Revision: D46583997

fbshipit-source-id: 1f31e2f205ac8b09494c2a7d3b73b9f36eff221b
2023-06-22 09:53:21 -07:00
Nicola Corti 40f816d5bc Add scripts to yarn start and yarn android from root
Summary:
This adds script to better work with RN Tester from the root of the repo.
- `yarn start` is broken as of today
- `yarn android` is not working fine and I've adapter it here.

This should make easier to work with RN Tester from within the Repo.

Changelog:
[Internal] [Changed] - Add scripts to `yarn start` and `yarn android` from root

Reviewed By: mdvacca, cipolleschi

Differential Revision: D45735926

fbshipit-source-id: eaebf80b8819ee42ccb9c14b67f8945167bf05e6
2023-05-11 00:03:00 -07:00
Tim Yung 77be932bc0 RN: Upgrade to flow-enums-runtime@0.0.6 (#37342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37342

Upgrades to `flow-enums-runtime@0.0.6`, which is just a `README.md` update.

Changelog:
[Internal]

Differential Revision: D45713984

fbshipit-source-id: a458ccb099df53401fa41826f3571bca7e292dbf
2023-05-09 19:31:47 -07:00
Pranav Yadav 14316bd635 Add missing READMEs & Update package.json in all RN packages (#37090)
Summary:
This diff adds _missing_ README files for all public RN packages.

#### Changes:
For all public RN packages:
- Add _Missing_ READMEs

Update package.json in all RN packages to add:
- Issues, Bugs urls
- Keywords and Homepage urls to respective pkgs

## Changelog:

[GENERAL][ADDED] - Add missing README files for all public RN packages.
[GENERAL][CHANGED] - Update package.json in all RN packages to add required fields.

Pull Request resolved: https://github.com/facebook/react-native/pull/37090

Test Plan: - `yarn lint && yarn flow && yarn test-ci` --> _should be green_

Reviewed By: cortinico

Differential Revision: D45390861

Pulled By: hoxyq

fbshipit-source-id: 524a92de56a7cb553573d9f54ccf40a998dfd35f
2023-04-28 04:26:20 -07:00
Pranav Yadav a58dea1e9e Update Node.js to v16 in all RN packages (#37073)
Summary:
**NOTE**: This is a **BREAKING** change.
TLDR; Enforce minimum Node.js v16 in all RN packages.

This diff **Updates Node.js to v16** across all RN packages.

#### Context:

- For RN development and new project created; bump to node 16 was in https://github.com/facebook/react-native/pull/36217
- Recently `react-native-windows` also; updated node to v16, https://github.com/microsoft/react-native-windows/pull/11500

#### Changes:

- [BREAKING] Update Node.js to v16 across all RN packages under 'packages/' dir

## Changelog:

[GENERAL][BREAKING] - Update Node.js to v16 in all RN packages

Pull Request resolved: https://github.com/facebook/react-native/pull/37073

Test Plan: - `yarn lint && yarn flow && yarn test-ci` --> _should be green_

Reviewed By: cipolleschi

Differential Revision: D45306108

Pulled By: jacdebug

fbshipit-source-id: e3ba7d0151b86a6a0a3d63fb29c2bd887e1ac1e7
2023-04-26 08:24:06 -07:00
Alex Hunt c5a47abaf8 Bump RN CLI, add @react-native/metro-config to template (#36623)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36623

Changelog:
[General][Changed] - The default `metro.config.js` in apps now extends `react-native/metro-config`, and should be updated in existing apps.

~~`react-native/rn-get-polyfills.js` is removed and should be updated to `react-native/js-polyfills` in existing apps (this is part of the new default config).~~

#publish-packages-to-npm

## Context

### React Native Metro config → React Native repo (https://github.com/facebook/react-native/pull/36502)

We (the React Native team) are aiming to relocate the default Metro config for React Native out of `react-native-community/cli-plugin-metro` and **into the React Native repo + app template** as a new `react-native/metro-config` package.

This is the first (and minimum viable) phase we can ship to separate the release process of Metro from RN CLI in order to reduce coupling and iterate faster for our users.

**See full motivation, design, and test plan (which previewed the CLI bump) here: https://github.com/facebook/react-native/pull/36502**

## Changes

NOTE: This PR is pending the inclusion of a bump to `react-native-community/cli`, and will be sequenced after https://github.com/react-native-community/cli/pull/1875 is merged.

- Upgrade `react-native-community/cli` to `11.0.0`, upgrade all `metro` packages to `0.76.0` (version distributed in this CLI release).
- Update the `metro.config.js` file in `packages/react-native/template/`.
    - Now merges defaults from `react-native/metro-config`, and can be used with CLI >= 11.0.0.
- Update the `metro.config.js` files for `packages/react-native/` and `packages/rn-tester/` (these are integration test locations).
    - Now merges defaults from `react-native/metro-config`, and can be used with CLI >= 11.0.0.

Changes to `react-native/metro-config` — `0.72.1` (prepared but not depended on yet):

- Export `mergeConfig` util (removing direct `metro-config` dependency in consuming projects).
- Explicitly depend on `metro-react-native-babel-transformer` and `metro-runtime` (transitively included today).

Reviewed By: cortinico, blakef

Differential Revision: D44099691

fbshipit-source-id: 405635dd69fd50a1e9548279eaeda3c932b5b167
2023-03-30 07:30:54 -07:00
Alex Hunt 32e836dd8b Fix paths in objc-test.sh, temporarily exclude /IntegrationTests (#36648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36648

Changelog: [Internal]

Blocker for https://github.com/facebook/react-native/pull/36623. The `test-ios` job in CI was misconfigured following the monorepo migration — and this becomes load-bearing with the incoming version of React Native CLI.

- Update `objc-test.sh` to run in `packages/rn-tester`, and exclude tests under `/IntegrationTests` which are outside of a Metro project directory.
    - **This is temporary** — a task has been created to move/split up/otherwise restore tests in `IntegrationTests`, which cipolleschi is following up (thanks!).
- Also fix `yarn start` script in `packages/rn-tester`.

Reviewed By: cipolleschi

Differential Revision: D44416533

fbshipit-source-id: 59c5b743d9d8fda206a12e37d94324ed9bfd703e
2023-03-27 11:21:56 -07:00
Ruslan Lesiutin dacb1593de RN: add @react-native/tester as a workspace to xplat/js/public (#36531)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36531

Changelog: [Internal]

In order to make `react-native/tester` imports work, adding this package to `xplat/js/public`

Also moving devDependecies from `react-native/tester/package.json` to root package json to avoid checking in dev dependencies in `xplat/js/public/node_modules`

Reviewed By: cortinico

Differential Revision: D44030539

fbshipit-source-id: b06e49869cdad6e511b1675d1063a1ceac56e3e6
2023-03-20 07:05:52 -07:00
Ruslan Lesiutin 714b502b0c | RN Monorepo | Migrate to package (#36434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36434

Changelog: [Internal]

This is a squashed stack of 18 commits, starting from D43202126

allow-large-files

Reviewed By: cortinico

Differential Revision: D43977381

fbshipit-source-id: 0da552ddb85f2f61a0be0ef071915b35f3f8555c
2023-03-17 05:03:25 -07:00
Christoph Purrer 292a9904c4 react-native code-gen > C++ TurboModules enum example (#36083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36083

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D43036612

fbshipit-source-id: fc70650bc4ba48d11f489556d1290ae9e7e58016
2023-02-08 20:24:28 -08:00
Gabriel Donadel Dall'Agnol fa22a6e2d7 build: Bump ws to 6.2.2 due to ReDoS vulnerability (#34759)
Summary:
A moderate vulnerability was found in all versions of `ws` below 7.4.6 June last year. React native current uses v6.1.4 which is susceptible to it, fortunately this security fix has been backported to v6.X.X and we don't need to upgrade any major versions/worry about breaking changes. This PR bumps `ws` to 6.2.2 ([CHANGELOG](https://github.com/websockets/ws/releases/tag/6.2.2)) due to this ReDoS vulnerability

More information about this vulnerability can be found here -> https://github.com/advisories/GHSA-6fc8-4gx4-v693

Closes https://github.com/facebook/react-native/issues/31646

## Changelog

[Internal] [Security] - Bump ws to 6.2.2 due to ReDoS vulnerability

Pull Request resolved: https://github.com/facebook/react-native/pull/34759

Test Plan:
Ensure WebSocket tests are working as expected

Tested HMR working on Twilight
| iOS | Android |
| https://pxl.cl/2g70M | https://pxl.cl/2g70V |

Reviewed By: hramos, cortinico

Differential Revision: D39722905

fbshipit-source-id: 12088ab5ea26d904675de484e2014949d6696465
2022-10-10 02:58:40 -07:00
Tommy Nguyen 49c90f7a7e @react-native/tester should be private (#34570)
Summary:
Made `react-native/tester` private.

## Changelog

[Internal] [Fixed] - Made `react-native/tester` private

Pull Request resolved: https://github.com/facebook/react-native/pull/34570

Test Plan: n/a

Reviewed By: lunaleaps

Differential Revision: D39235797

Pulled By: cortinico

fbshipit-source-id: d5dee20f1ddfc198b3a776464a91de470ce824f6
2022-09-16 03:46:03 -07:00
Samuel Susla 434adbdb00 React Native sync for revisions d300ceb...9e3b772
Summary:
Sync goes to v18.2 release.

I had to manually trigger CircleCI builds because TTL for build artefacts is 30 days.

This sync includes the following changes:
- **[060505e9d](https://github.com/facebook/react/commit/060505e9d )**: Fix misapplying prod error opt-out ([#24688](https://github.com/facebook/react/pull/24688)) //<Josh Story>//
- **[47944142f](https://github.com/facebook/react/commit/47944142f )**: `now` isn't part of the react-reconciler config anymore ([#24689](https://github.com/facebook/react/pull/24689)) //<Mathieu Dutour>//
- **[b34552352](https://github.com/facebook/react/commit/b34552352 )**: [Fizz] Support abort reasons ([#24680](https://github.com/facebook/react/pull/24680)) //<Josh Story>//
- **[79f54c16d](https://github.com/facebook/react/commit/79f54c16d )**: Bugfix: Revealing a hidden update ([#24685](https://github.com/facebook/react/pull/24685)) //<Andrew Clark>//
- **[7e8a020a4](https://github.com/facebook/react/commit/7e8a020a4 )**: Remove extra Server Context argument ([#24683](https://github.com/facebook/react/pull/24683)) //<Sebastian Markbåge>//
- **[4f29ba1cc](https://github.com/facebook/react/commit/4f29ba1cc )**: support errorInfo in onRecoverableError ([#24591](https://github.com/facebook/react/pull/24591)) //<Josh Story>//
- **[1cd90d2cc](https://github.com/facebook/react/commit/1cd90d2cc )**: Refactor of interleaved ("concurrent") update queue ([#24663](https://github.com/facebook/react/pull/24663)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions d300ceb...9e3b772

jest_e2e[run_all_tests]

Reviewed By: JoshuaGross

Differential Revision: D38496392

fbshipit-source-id: 3ecffc2b3354104562eb23a2643fe0a37a01a7e6
2022-08-08 16:44:55 -07:00
Héctor Ramos 1115bc77db Make Hermes the default engine on iOS (#34085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34085

Hermes is now the default engine on iOS.

Apps can choose to continue using JSC by setting `hermes_enabled` to `false` in their Podfile.

The RNTester app now uses Hermes, as well. Use JSC in RNTester by setting `USE_HERMES=0` when running `pod install`.

Changelog:

[iOS][Changed] Hermes is now the default engine on iOS. This setting is controlled via `flags[:hermes_enabled]` in the Podfile.

Reviewed By: cortinico, cipolleschi

Differential Revision: D37361468

fbshipit-source-id: e6dda6a23eea4a824ad157d1a26f17e181db33cd
2022-06-28 10:04:51 -07:00
Jack Worden 56051caac5 Back out "React Native sync for revisions d300ceb...256aefb"
Summary:
Original commit changeset: 4c0afc95abe8

Original Phabricator Diff: D37155957 (https://github.com/facebook/react-native/commit/d1321d88bdc80b209aeb781991d8143d6ce2f9a9)

See attached UBN task for more details, I am reverting the whole diff now while investigating the root cause.

Changelog:
[General][Changed] - Revert "React Native sync for revisions d300ceb...256aefb"

jest_e2e[run_all_tests]

=== update
klein did a bisect for S276290, it seems Original Phabricator Diff: D37155957 (https://github.com/facebook/react-native/commit/d1321d88bdc80b209aeb781991d8143d6ce2f9a9) is the blame diff.
jackworden also has verified backout can fix it for both ios and android.

Reviewed By: ahujap-fb, kacieb

Differential Revision: D37205394

fbshipit-source-id: 600e6593532da064631c016aace317932f290c67
2022-06-17 03:13:14 -07:00
Rick Hanlon d1321d88bd React Native sync for revisions d300ceb...256aefb
Summary:
This sync includes the following changes:
- **[5cc2487e0](https://github.com/facebook/react/commit/5cc2487e0 )**: bump versions for next release ([#24725](https://github.com/facebook/react/pull/24725)) //<Josh Story>//
- **[54f17e490](https://github.com/facebook/react/commit/54f17e490 )**: [Transition Tracing] Fix Cache and Transitions Pop Order ([#24719](https://github.com/facebook/react/pull/24719)) //<Luna Ruan>//
- **[7cf8dfd94](https://github.com/facebook/react/commit/7cf8dfd94 )**: [Transition Tracing] Create/Process Marker Complete Callback ([#24700](https://github.com/facebook/react/pull/24700)) //<Luna Ruan>//
- **[327e4a1f9](https://github.com/facebook/react/commit/327e4a1f9 )**: [Follow-up] Land enableClientRenderFallbackOnTextMismatch //<Andrew Clark>//
- **[a8c9cb18b](https://github.com/facebook/react/commit/a8c9cb18b )**: Land enableSuspenseLayoutEffectSemantics flag ([#24713](https://github.com/facebook/react/pull/24713)) //<Andrew Clark>//
- **[a8555c308](https://github.com/facebook/react/commit/a8555c308 )**: [Transition Tracing] Add Tracing Marker Stack ([#24661](https://github.com/facebook/react/pull/24661)) //<Luna Ruan>//
- **[8186b1937](https://github.com/facebook/react/commit/8186b1937 )**: Check for infinite update loops even if unmounted ([#24697](https://github.com/facebook/react/pull/24697)) //<Andrew Clark>//
- **[060505e9d](https://github.com/facebook/react/commit/060505e9d )**: Fix misapplying prod error opt-out ([#24688](https://github.com/facebook/react/pull/24688)) //<Josh Story>//
- **[47944142f](https://github.com/facebook/react/commit/47944142f )**: `now` isn't part of the react-reconciler config anymore ([#24689](https://github.com/facebook/react/pull/24689)) //<Mathieu Dutour>//
- **[b34552352](https://github.com/facebook/react/commit/b34552352 )**: [Fizz] Support abort reasons ([#24680](https://github.com/facebook/react/pull/24680)) //<Josh Story>//
- **[79f54c16d](https://github.com/facebook/react/commit/79f54c16d )**: Bugfix: Revealing a hidden update ([#24685](https://github.com/facebook/react/pull/24685)) //<Andrew Clark>//
- **[7e8a020a4](https://github.com/facebook/react/commit/7e8a020a4 )**: Remove extra Server Context argument ([#24683](https://github.com/facebook/react/pull/24683)) //<Sebastian Markbåge>//
- **[4f29ba1cc](https://github.com/facebook/react/commit/4f29ba1cc )**: support errorInfo in onRecoverableError ([#24591](https://github.com/facebook/react/pull/24591)) //<Josh Story>//
- **[1cd90d2cc](https://github.com/facebook/react/commit/1cd90d2cc )**: Refactor of interleaved ("concurrent") update queue ([#24663](https://github.com/facebook/react/pull/24663)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions d300ceb...256aefb

jest_e2e[run_all_tests]

Reviewed By: cortinico

Differential Revision: D37155957

fbshipit-source-id: 4c0afc95abe8fa13c3803584922c8dc0059ff562
2022-06-15 12:23:01 -07:00