140 Commits
Author SHA1 Message Date
Rob Hogan c33c241c98 Bump @babel/parser to ^7.29.9, @babel/types to ^7.29.8 (#58641)
Summary:
X-link: https://github.com/react/metro/pull/1962

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

This picks up https://github.com/babel/babel/pull/18241, fixing parsing of arrow function params inside ternaries with Flow (eg `cond ? async (...args) => {} : null`).

(I remember hitting this one internally and not realising where it came from - IIRC it also applies to arrows within conditional types)

The update brings `babel/types` 7.29.7 -> 7.29.8, requiring regeneration of generated flow types. ~~**The `xplat/js/yarn.lock` version will likely need updating to match, or the Babel types sync test will fail**~~ - I've updated specifiers to bring everyone onto that version.

Changelog: [Internal]

X-link: https://github.com/react/metro/pull/1958

Test Plan: CI

Reviewed By: javache

Differential Revision: D121188416

Pulled By: vzaidman

fbshipit-source-id: 60f9c3514b5d6018825423644c47e66b3610b652
2026-09-24 09:18:50 -07:00
Rob Hogan 9a49fc2a99 Bump flow-{api-translator,eslint,parser} to 0.331.0 (#58391)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58391

Regenerate API snapshots after the bump. `flow-api-translator` picks up the fix in https://github.com/facebook/flow/pull/9486, which stops treating `async` functions with no explicit return annotation as `void` — updating `DependencyGraph#end` and `MetroServer#end` to their correct `Promise<void>` return type in `packages/metro/API.md`.

Changelog: [Internal]

Changelog: **[Types]**: `DependencyGraph#end` and `MetroServer#end` are now correctly declared as returning `Promise<void>` rather than `void`

X-link: https://github.com/react/metro/pull/1909

Test Plan:
```
yarn typecheck
yarn lint
yarn build
yarn run verify-api-snapshots
```
All pass.

Reviewed By: mweststrate

Differential Revision: D119090467

Pulled By: javache

fbshipit-source-id: 21b65f90ed511e0cb035917eaf1b0ca399ece855
2026-09-08 07:17:37 -07:00
Sam Zhou 88043334e3 Remove unused babel-plugin-syntax-hermes-parser (#57958)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57958

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D115933669

fbshipit-source-id: beb16a462472effcdcc2f9aea3d1baae5fd075b8
2026-08-13 17:58:27 -07:00
Sam Zhou 704c2b1954 Bump flow-{estree,parser,eslint,transform,api-translator} to latest (#57932)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57932

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D115802149

fbshipit-source-id: aa4c730e47ab9b362f7a6e1a16c8127117b09c08
2026-08-13 12:21:06 -07:00
Sam Zhou 727e87ed26 Fully replace hermes-(estree|parser|eslint|transform) packages with flow-* counterparts in react-native (#57851)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57851

The flow-* packages have support for all latest syntax and is better maintained.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D115064040

fbshipit-source-id: 7265eb722910a460c76d0dbde0603cf962fe4e4e
2026-08-10 07:21:52 -07:00
Sam Zhou 3365667479 Install flow-{estree,eslint,parser,transform} counterparts to the hermes-* packages (#57769)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57769

Eventually, we will replace the hermes ones with the `flow-{estree,eslint,parser,transform}` packages. This diff first installs the flow ones.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D114226573

fbshipit-source-id: a693cdac57d2ce77c002a8ac455aceabaadbcf20
2026-07-30 10:37:48 -07:00
Sam Zhou 30d9593c7b Update hermes-parser and related packages in fbsource to 0.37.0 (#57567)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57567

Bump hermes-parser and related packages to [0.37.0](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision: D112000723

fbshipit-source-id: e2851d8c48d19c4f64e8f9ea278fcb31654cdcd1
2026-07-15 08:57:22 -07:00
Sam Zhou 537d867316 Bump to latest prettier (#57473)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57473

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D110952668

fbshipit-source-id: a2278dbe978b42d42f57ddea10a947703a181797
2026-07-08 05:24:04 -07:00
Rob Hogan dcbd8608a6 Update package.json references to GitHub org "facebook" -> "react" (#57258)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57258

Reflecting the move to https://github.com/react/react-native , update references in first-party `package.json`s

The `repository.url` field in particular is load-bearing for Trusted Publish.

Changelog: [Internal]

___

Reviewed By: fabriziocucci

Differential Revision: D108986410

fbshipit-source-id: 78513ffefc32ddf417dc1479a4834ebc44240080
2026-06-18 02:00:52 -07:00
Alex Hunt a0d39e7a9c Bump minimum Node.js version to 22 (#56887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56887

Drop support for Node.js 20. The minimum supported version is now `^22.13.0 || ^24.3.0 || >= 26.0.0`.

Node.js 20 reached end-of-life in April 2026 and is no longer actively maintained. This aligns React Native with the upcoming Metro requirement.

Changelog:
[General][Breaking] - Require Node.js >= 22.13.0

Reviewed By: christophpurrer, cortinico

Differential Revision: D105685641

fbshipit-source-id: f490e5a13e4289daba98c4d56dd8fdd341aef0db
2026-05-19 11:53:54 -07:00
Ivor Zhou ef38dbb28d Update hermes-parser and related packages in fbsource to 0.36.1 (#56806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56806

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

Bump hermes-parser and related packages to 0.36.1.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D104122338

fbshipit-source-id: 7e938ec114355cf517ff2e76ffbb941f6352d213
2026-05-14 22:13:53 -07:00
Rob Hogan 783f45746e Bump packages to 0.87.0-main following 0.86 cut (#56716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56716

Now that we've cut 0.86, bump all versions on `main` ready for the 0.87 cut.

Changelog: [Internal]

Reviewed By: cortinico, fabriziocucci

Differential Revision: D104219534

fbshipit-source-id: 86f2ebe5b44f67608a7a9495bf9840f2cdd52e5b
2026-05-07 07:23:06 -07:00
Marco Wang 0b3df3f382 Update hermes-parser and related packages in fbsource to 0.36.0 (#56662)
Summary:
X-link: https://github.com/facebook/hermes/pull/2003

X-link: https://github.com/facebook/relay/pull/5265

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

X-link: https://github.com/facebook/flow/pull/9405

Bump hermes-parser and related packages to [0.36.0](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D103172778

fbshipit-source-id: 81bb5f18da6f46d07955956fb0b721f74cceca47
2026-04-30 15:26:55 -07:00
Marco Wang 50768cbb15 Update hermes-parser and related packages in fbsource to 0.35.0 (#56408)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56408

X-link: https://github.com/facebook/relay/pull/5238

X-link: https://github.com/facebook/hermes/pull/1978

X-link: https://github.com/facebook/flow/pull/9396

Bump hermes-parser and related packages to [0.35.0](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: bherila

Differential Revision: D100198457

fbshipit-source-id: 06dcada56d61ae359c1d7a8362f80fdfb4e2d5b5
2026-04-09 22:17:51 -07:00
George Zahariev cd0dbf5bc5 Update hermes-parser and related packages in xplat to 0.34.0 (#56107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56107

Bump hermes-parser and related packages to [0.34.0](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D96556729

fbshipit-source-id: fd6568de0efa43851c45584bba5a2c4ef49bfabe
2026-03-16 12:41:13 -07:00
Marco Wang b8876b56b9 switch to hermes for react-native-codegen (#56024)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56024

Switch js/react-native-github/packages/react-native-codegen/package.json to use hermes instead of babel

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D95878474

fbshipit-source-id: 566e054abedc7062c34e1ea68f592071c2a83c6b
2026-03-10 13:53:04 -07:00
Alan Lee bbaabe6a16 Bump packages for next release (#55946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55946

Follows the recent `0.85-stable` branch cut.

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

Reviewed By: cortinico

Differential Revision: D95410323

fbshipit-source-id: dacfee00f1111dbf57ef2e608963a4bffa669884
2026-03-10 00:35:59 -07:00
Rob Hogan a08b2d2226 Bump some babel deps (code-frame,generator,parser,template,traverse,types) to latest minors (#55543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55543

@public

This diff updates several Babel packages to their latest versions:
- `babel/code-frame`: 7.29.0
- `babel/generator`: 7.29.1
- `babel/parser`: 7.29.0
- `babel/template`: 7.28.6
- `babel/traverse`: 7.29.0
- `babel/types`: 7.29.0

Not bumping `core` or `runtime` here because they're a bit more involved, and I'm mainly interested in `traverse`. The packages here are the closure of traverse's dependency graph.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D92983519

fbshipit-source-id: 9f2e71fb5d453606c697d52539f0056b7a29bc45
2026-02-13 07:11:13 -08:00
Alex Hunt f1bedfb92b Bump packages for next release (#55172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55172

Follows the recent `0.84-stable` branch cut.

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

Reviewed By: vzaidman

Differential Revision: D90698490

fbshipit-source-id: b81b840bfd66e631f160a11c4c64baa6850e3393
2026-01-14 12:17:16 -08:00
Rob Hogan c9c601d61a Node.js: Drop support for Node.js versions released before 20.19.4, and EOL v21,v23 (#55114)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55114

Our official [docs](https://reactnative.dev/docs/set-up-your-environment#node--watchman) require:

> Node 20.19.4 or newer

Currently, our `package.json#engines` fields express this as `"node": ">= 20.19.4"`

This is a bit imprecise because of Node's overlapping release lines - e.g. v24.0.0 is actually older than v20.19.4 (2025-07-15), and the whole v21 line was already EOL before v20.19.4.

The release *date* is relevant because Node.js frequently backports the most important updates - notably, `require(esm)` is already stable in Node 20.19 but is not unflagged in v22 until v22.12.

This makes the `package.json#engines` requirement truer to the documented requirement, dropping some old minors and EOL majors that prevent us using features included in v20.19.

Notably, `require(esm)` is stable and unflagged on all versions supported from this diff.

 - v21 and v23 are EOL, so are dropped.
 - v22.13 pre-dates 20.19.4 and is the first to have unflagged silent `require(esm)`
 - v24.3.0 pre-dates 20.19.4 and is the first to unflag TS-stripping
 - Support v25 and newer.

Changelog:
[General][Breaking] Drop support for EOL Node.js lines and old minors.

Reviewed By: cortinico, huntie

Differential Revision: D90467358

fbshipit-source-id: a5fdfb1b93a9d6cffe78eb6811ff7420ab906f44
2026-01-14 10:49:05 -08:00
George Zahariev 393eca54eb Update hermes-parser and related packages in fbsource to 0.33.3 (#55092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55092

Bump hermes-parser and related packages to [0.33.3](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: javache

Differential Revision: D90293157

fbshipit-source-id: 6982d4275aa5ea1305491627051f100237f6f1b4
2026-01-12 23:52:57 -08:00
Rob Hogan 0cda10b00a Revert: Bump minimum Node.js version to v22.11 (prev LTS) (#55113)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55113

Reverts https://github.com/facebook/react-native/pull/55038

Dropping v20 (still in LTS) causes friction with Expo's LTS policy, so we're restoring support for v20.19.

Changelog: [General][Added] Revert https://github.com/facebook/react-native/pull/55038

Reviewed By: shwanton

Differential Revision: D90467161

fbshipit-source-id: d876cf7869f11e04058f88239f553704e0706514
2026-01-11 14:30:40 -08:00
Rob Hogan 8f10b339d4 Breaking: Bump minimum Node.js version to v22.11 (prev LTS) (#55038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55038

Bump the minimum to Node.js v22.11, which is the previous LTS now that v24 is in LTS. Drop support for Node v20.

https://nodejs.org/en/blog/release/v22.11.0
https://nodejs.org/en/about/previous-releases

Changelog: [General][Breaking] Bump minimum Node.js version to v22.11

Reviewed By: cortinico, huntie

Differential Revision: D90109056

fbshipit-source-id: 178f29d3131f21fccf956decc9ac94365a2bfe53
2026-01-05 06:21:25 -08:00
Phil Pluckthun 41eace0093 Replace glob@^7.0.0 with tinyglobby@^0.2.15 (#54737)
Summary:
This replaces `glob@^7.0.0` with `tinyglobby@^0.2.15`. `glob@7` has been deprecated for a while and some versions after had security notices released for them. The plan is to backport this PR to `0.81.x` and onwards.

> [!NOTE]
> This is a stopgap solution until `fs.glob` becomes generally available with the EOL of Node v20

Succeeds:
- https://github.com/facebook/react-native/issues/54669
- https://github.com/facebook/react-native/issues/48875

## Changelog:

[GENERAL] [SECURITY] - Replace `glob@^7.0.0` with `tinyglobby@^0.2.15`

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

Test Plan:
- Ran all modified commands manually and `pod install in `rn-tester`
- NOTE: `ios-prebuild`-related scripts haven't been run manually yet

Reviewed By: robhogan

Differential Revision: D88069145

Pulled By: huntie

fbshipit-source-id: 0c455342a4c6d1d6605fd09fe47b418e5d751491
2025-12-03 05:45:48 -08:00
Alex Hunt a1e534a604 Bump packages for next release (#54452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54452

Follows the recent `0.83-stable` branch cut.

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

Reviewed By: cipolleschi

Differential Revision: D86534507

fbshipit-source-id: 47b88dce919857398f41516d03d60259730d2887
2025-11-12 04:22:19 -08:00
Nicola Corti d9a582e949 Bump packages to 0.83.0-main (#54009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54009

Packages haven't been bumped on main ahead of 0.83. This takes care of it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi, huntie

Differential Revision: D83580515

fbshipit-source-id: 7471e77f74e3fb3b4ee6538a49369b5df1393098
2025-10-01 07:13:33 -07:00
Sam Zhou 89fd398342 Update hermes-parser and related packages in fbsource to 0.32.0 (#53377)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53377

Bump hermes-parser and related packages to [0.32.0](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: gkz

Differential Revision: D80622389

fbshipit-source-id: d35ad5179eacbc83132517e6b9c9436fda972d28
2025-08-20 11:45:16 -07:00
George Zahariev c7591d9b40 Update hermes-parser and related packages in fbsource to 0.31.2 (#53313)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53313

Bump hermes-parser and related packages to [0.31.2](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D80408745

fbshipit-source-id: 38aff450c0e44db23624f4769f1c7856440fb785
2025-08-17 21:45:53 -07:00
Tommy Nguyen bf2c3af93b fix(codegen): fix missing dependencies (#52884)
Summary:
`react-native/codegen` uses `babel/parser` and `babel/core` but does not declare dependency on them. Depending on how packages are hoisted (and especially in pnpm setups), this causes crashes during codegen.

Resolves https://github.com/facebook/react-native/issues/52883

## Changelog:

[GENERAL] [FIXED] - Add missing Babel dependencies

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

Test Plan: See https://github.com/facebook/react-native/issues/52883

Reviewed By: cortinico, christophpurrer

Differential Revision: D79103092

Pulled By: robhogan

fbshipit-source-id: ecaf690f994393a652ea7f0d4f30bbabeb23a434
2025-08-06 08:19:47 -07:00
Sam Zhou 869a976a5d Bump to prettier v3 across xplat (#52844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52844

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78787920

fbshipit-source-id: fc2582001ee6775f53b452dd3659e37521ea6387
2025-07-27 18:50:47 -07:00
Sam Zhou f47da61e51 Bump hermes-parser related packages across fbsource (#52841)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52841

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D78949440

fbshipit-source-id: 5c5015f602b9fe591aa68f179163bd37dfb0dcff
2025-07-25 10:46:51 -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
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
George Zahariev 2e6cf96e47 Update hermes-parser and related packages in xplat/arvr/socialvr to 0.29.1 (#52316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52316

Bump hermes-parser and related packages to [0.29.1](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D77431991

fbshipit-source-id: d0ab4d7a338fdb68a529ed8151c7e1924600a809
2025-06-27 21:48:28 -07:00
George Zahariev 3306691d64 Update hermes-parser and related packages in xplat and socialvr to 0.29.0 (#52211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52211

Update hermes-parser and related packages in xplat and socialvr to 0.29.0

Changelog: [Internal]

Blocked on: https://fb.workplace.com/groups/relay.support/posts/28766057099682865

Reviewed By: SamChou19815

Differential Revision: D77004095

fbshipit-source-id: 5400ac07c0cbf1f9709d374929d842af9dd15d08
2025-06-23 19:19:50 -07:00
Alex Hunt 62bf92c896 Replace chalk in packages (#51905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51905

Replaces `chalk` with Node's `util.styleText` in `packages/`.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76273412

fbshipit-source-id: edaea5896751be1252056e0858daae46e97acc46
2025-06-09 18:21:18 -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
George Zahariev 6ad41f9a3f Update hermes-parser and related packages in xplat to 0.28.1 (#50803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50803

Bump hermes-parser and related packages to [0.28.1](https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision: D73242526

fbshipit-source-id: fbe0a233b4ae1315eb0e060c6338eb7156a5c6ea
2025-04-21 07:50:22 -07:00
Jakub Piasecki 86bede9c60 Update hermes-parser and related packages in fbsource to 0.28.0 (#50695)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50695

Bump hermes-parser and related packages to 0.28.0.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D72693713

fbshipit-source-id: f529b78a933ae7a6497f67f1f616c1acb95995c3
2025-04-15 03:56:39 -07:00
Evghenii Nicolaev d3daabfe2b Revert D71805075: Update hermes-parser and related packages in fbsource to 0.27.0
Differential Revision:
D71805075

Original commit changeset: 685194c12ac0

Original Phabricator Diff: D71805075

fbshipit-source-id: b28f0f83ad8b4f4f6b5e62fdc9ff323af79c1d43
2025-04-01 03:45:23 -07:00
Alex Hunt f13c8a7417 Update hermes-parser and related packages in fbsource to 0.27.0 (#50241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50241

Bump hermes-parser and related packages to [0.27.0](https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71805075

fbshipit-source-id: 685194c12ac037f74cc4fd54eb0d777a74507727
2025-04-01 01:01:05 -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
Phil Pluckthun b52f0d8391 chore(react-native-codegen): Remove fixtures and outdated transforms from build output (#49916)
Summary:
- Update ignore micromatch pattern to filter out `__test_fixtures__` from build output
- Remove `babel/plugin-transform-object-rest-spread`
- Remove `babel/plugin-transform-async-to-generator`
- Remove `babel/plugin-transform-destructuring`

The `package.json:engines:node` field is already set to `>=18` which makes the three Babel transforms that were removed redundant.

## Changelog:

[INTERNAL] [CHANGED] - Remove fixtures files and outdated Babel transforms from `react-native/codegen` build output

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

Test Plan: - Ran against Node 18

Reviewed By: robhogan

Differential Revision: D70885090

Pulled By: cortinico

fbshipit-source-id: 328b75a6031a7ca6a9b3ed170061ffb0a47d6d93
2025-03-10 05:44:32 -07:00
Phil Pluckthun 8f19201c5e refactor(react-native-codegen): Replace jscodeshift with @babel/core (#49641)
Summary:
`jscodeshift` is only used in one module (`src/generators/components/GenerateViewConfigJs.js`, but depends on a rather complex dependency chain and has a rather large maintenance burden relative to what it's used for and the value it adds in the codebase.

Since the `GenerateViewConfigJs` module creates simple templates, using `babel/core` (and implicitly `babel/template` and `babel/types`) is a lot simpler and changes little code. The only change this introduces to the output are formatting changes (`singleQuote` and `trailingCommas` options are discarded). The code is otherwise functionally identical.

## Changelog:

[INTERNAL] [CHANGED] - Drop jscodeshift dependency from react-native/codegen

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

Test Plan:
This was tested against a React Native build with the `react-native/babel-plugin-codegen` plugina active and using the snapshots in the repo itself. While the snapshots have changed in formatting, none of the outputs change the code's AST.

<details>
<summary>
Example output from <code>react-native/babel-plugin-codegen</code> to supplement the snapshot tests
</summary>

This is the example bundling output of `AndroidSwipeRefreshLayout`. This demonstrates that both the view config output and the `Commands` export continue to be generated correctly.

```js
var _interopRequireDefault = require(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.__INTERNAL_VIEW_CONFIG = exports.Commands = undefined;
var _codegenNativeCommands = _interopRequireDefault(require(_dependencyMap[1]));
var _codegenNativeComponent = _interopRequireDefault(require(_dependencyMap[2]));
var React = _interopRequireWildcard(require(_dependencyMap[3]));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var NativeComponentRegistry = require(_dependencyMap[4]);
var _require = require(_dependencyMap[5]),
  ConditionallyIgnoredEventHandlers = _require.ConditionallyIgnoredEventHandlers;
var _require2 = require(_dependencyMap[6]),
  dispatchCommand = _require2.dispatchCommand;
var nativeComponentName = 'AndroidSwipeRefreshLayout';
var __INTERNAL_VIEW_CONFIG = exports.__INTERNAL_VIEW_CONFIG = {
  uiViewClassName: "AndroidSwipeRefreshLayout",
  directEventTypes: {
    topRefresh: {
      registrationName: "onRefresh"
    }
  },
  validAttributes: {
    enabled: true,
    colors: {
      process: (req => 'default' in req ? req.default : req)(require(_dependencyMap[7]))
    },
    progressBackgroundColor: {
      process: require(_dependencyMap[8]).default
    },
    size: true,
    progressViewOffset: true,
    refreshing: true,
    ...ConditionallyIgnoredEventHandlers({
      onRefresh: true
    })
  }
};
var _default = exports.default = NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
var Commands = exports.Commands = {
  setNativeRefreshing(ref, value) {
    dispatchCommand(ref, "setNativeRefreshing", [value]);
  }
};
```

</details>

Reviewed By: yungsters

Differential Revision: D70580474

Pulled By: elicwhite

fbshipit-source-id: 85bc6578b685f19a1565ded8d7e56dc2a1ff1999
2025-03-05 14:06:46 -08: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
Alex Hunt 113337f269 Update hermes-parser and related packages in fbsource to 0.25.1 (#47573)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47573

Bump hermes-parser and related packages to [0.25.1](https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D65816542

fbshipit-source-id: cb445eb77790fb2632d3bc318c6eb59f097b1518
2024-11-21 05:41:39 -08:00
Sam Zhou 94009f30e0 Update hermes-parser and related packages in fbsource to 0.24.0 (#46802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46802

Bump hermes-parser and related packages to [0.24.0](https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: javache

Differential Revision: D63797332

fbshipit-source-id: 98179d3cd777ff6824dfd10ceb7236a02dc6c9d6
2024-10-03 08:20:16 -07:00
Cedric van Putten 39c98fb8f8 fix(react-native-codegen): upgrade jscodeshift@17.0.0 to resolve outdated dependencies (#46724)
Summary:
This upgrades `jscodeshift` from `0.14.0` to `17.0.0`, to resolve unsupported babel dependencies when installing React Native. See https://github.com/expo/expo/issues/31613

## Changelog:

[GENERAL] [FIXED] - Upgrade Codegen dependency `jscodeshift@17.0.0` to resolve outdated dependencies

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

Test Plan:
To test it out yourself:

- `npx create-expo@latest ./test-codegen`
- `cd ./test-codegen`
- `npm why babel/plugin-proposal-nullish-coalescing-operator@7.18.6 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/babel/plugin-proposal-nullish-coalescing-operator/v/7.18.6)
- `npm why babel/plugin-proposal-class-properties@7.18.6 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/babel/plugin-proposal-class-properties/v/7.18.6)
- `npm why rimraf@2.6.3 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/rimraf/v/2.6.3)
- `npm why babel/plugin-proposal-optional-chaining@7.21.0 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/babel/plugin-proposal-optional-chaining/v/7.21.0)

> [!IMPORTANT]
> There are other dependencies that require an update, unfortunately there are no flow typings available (yet).
> - `npm why glob@7.2.3 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/glob/v/7.2.3)

Reviewed By: cortinico

Differential Revision: D63629133

Pulled By: huntie

fbshipit-source-id: 3799e49677b8e5fd64841e6c7f855bde10e15072
2024-10-01 05:14:16 -07:00
anirudh.bharti 7cdb87eb19 chore: replace mkdirp with mkdir fs (#46388)
Summary:
This pull request replaces the use of mkdirp with Node.js's built-in fs.mkdirSync({ recursive: true }) function, which is available in Node.js version 10.12.0 and above. This change reduces the number of external dependencies and simplifies the codebase by using the native capabilities of Node.js.

The motivation behind this change is to remove the unnecessary mkdirp dependency, as Node.js natively supports recursive directory creation since version 10.12.0. This streamlines the code and reduces the reliance on external libraries.

## Changelog:

[INTERNAL] [REMOVED] - Replaced mkdirp with fs.mkdirSync({ recursive: true }) in build scripts and codegen. Requires Node.js 10.12.0 and above.

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

Test Plan: I ran the build and codegen scripts locally with Node.js version 10.12.0 and above after replacing mkdirp, ensuring the scripts work as expected. No issues were encountered, and all processes, including directory creation and file handling, function correctly.

Reviewed By: cortinico

Differential Revision: D62852488

Pulled By: huntie

fbshipit-source-id: 76f44102a80b499521c156308d276a17d279ce38
2024-09-17 07:03:44 -07:00