Skip to content

Commit 225ca2b

Browse files
motiz88huntierobhogancortinico
authored
[0.81] Lower minimum Node.js version to 20.19.4 (#52879)
* Lower minimum Node.js version to 20.19.4 (#52678) Summary: Pull Request resolved: #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 * Bump Metro to ^0.83.1, lower minimum Node.js version to 20.19 Summary: Metro release notes: https://github.com/facebook/metro/releases/tag/v0.83.1 The only public-facing change is a lowering of the minimum Node.js version from 22.14 to 20.19. This will need picking to RN `0.81-stable` Changelog: [General][Changed] Metro to ^0.83.1 Reviewed By: huntie Differential Revision: D78895160 fbshipit-source-id: b9ccffe972249b73897f51c14873861e57a97161 * Do not setup-node twice in test_js (#52737) Summary: I've noticed that test_js (20) and test_js (24) are actually running on Node 22. That's because the `yarn-install` action is invoking setup-node again with the default value (22). This changes it. Also I'm cleaning up the workflows so that every `yarn-install` invocation is happening just after the `setup-node` invocation. ## Changelog: [INTERNAL] - Pull Request resolved: #52737 Test Plan: CI which will most likely be red for test_js (20) so will need a follow-up Reviewed By: cipolleschi Differential Revision: D78664671 Pulled By: cortinico fbshipit-source-id: c73390930d1511d1bf0f2d4ea92e83f50b10247f --------- Co-authored-by: Alex Hunt <huntie@meta.com> Co-authored-by: Rob Hogan <robhogan@meta.com> Co-authored-by: Nicola Corti <ncor@meta.com>
1 parent 3695258 commit 225ca2b

34 files changed

Lines changed: 139 additions & 137 deletions

File tree

.github/actions/build-hermes-macos/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ runs:
1515
steps:
1616
- name: Setup xcode
1717
uses: ./.github/actions/setup-xcode
18-
- name: Setup node.js
19-
uses: ./.github/actions/setup-node
2018
- name: Restore Hermes workspace
2119
uses: ./.github/actions/restore-hermes-workspace
2220
- name: Restore Cached Artifacts
@@ -45,6 +43,8 @@ runs:
4543
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
4644
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
4745
fi
46+
- name: Setup node.js
47+
uses: ./.github/actions/setup-node
4848
- name: Yarn- Install Dependencies
4949
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
5050
uses: ./.github/actions/yarn-install

.github/actions/build-npm-package/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ runs:
116116
- name: Print Artifacts Directory
117117
shell: bash
118118
run: ls -lR ./packages/react-native/ReactAndroid/external-artifacts/artifacts/
119-
- name: Setup node.js
120-
uses: ./.github/actions/setup-node
121119
- name: Setup gradle
122120
uses: ./.github/actions/setup-gradle
123121
with:
124122
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
123+
- name: Setup node.js
124+
uses: ./.github/actions/setup-node
125125
- name: Install dependencies
126126
uses: ./.github/actions/yarn-install
127127
- name: Build packages

.github/actions/create-release/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ inputs:
1414
runs:
1515
using: composite
1616
steps:
17+
- name: Setup node.js
18+
uses: ./.github/actions/setup-node
1719
- name: Yarn install
1820
uses: ./.github/actions/yarn-install
1921
- name: Configure Git

.github/actions/maestro-ios/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ runs:
3535
with:
3636
java-version: '17'
3737
distribution: 'zulu'
38+
- name: Setup node.js
39+
uses: ./.github/actions/setup-node
3840
- name: Run yarn install
3941
uses: ./.github/actions/yarn-install
4042
- name: Start Metro in Debug

.github/actions/prepare-hermes-workspace/action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ outputs:
1717
runs:
1818
using: composite
1919
steps:
20-
- name: Setup node.js
21-
uses: ./.github/actions/setup-node
22-
2320
- name: Setup hermes version
2421
shell: bash
2522
id: hermes-version
@@ -67,6 +64,8 @@ runs:
6764
echo "HERMES_CACHED=true" >> "$GITHUB_OUTPUT"
6865
fi
6966
67+
- name: Setup node.js
68+
uses: ./.github/actions/setup-node
7069
- name: Yarn- Install Dependencies
7170
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
7271
uses: ./.github/actions/yarn-install

.github/actions/test-ios-helloworld/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ runs:
2323
uses: ./.github/actions/setup-xcode
2424
- name: Setup node.js
2525
uses: ./.github/actions/setup-node
26+
- name: Run yarn install
27+
uses: ./.github/actions/yarn-install
2628
- name: Create Hermes folder
2729
shell: bash
2830
run: mkdir -p "$HERMES_WS_DIR"
@@ -34,8 +36,6 @@ runs:
3436
- name: Print Downloaded hermes
3537
shell: bash
3638
run: ls -lR "$HERMES_WS_DIR"
37-
- name: Run yarn
38-
uses: ./.github/actions/yarn-install
3939
- name: Setup ruby
4040
uses: ruby/setup-ruby@v1
4141
with:

.github/actions/yarn-install/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: yarn-install
22
runs:
33
using: composite
44
steps:
5-
- name: Setup node.js
6-
uses: ./.github/actions/setup-node
75
- name: Install dependencies
86
shell: bash
97
run: |

.github/workflows/test-all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ jobs:
594594
fail-fast: false
595595
matrix:
596596
node-version: ["24", "22"]
597+
# node-version: ["24", "22", "20.19.4"]
597598
steps:
598599
- name: Checkout
599600
uses: actions/checkout@v4

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@
9090
"jest-snapshot": "^29.7.0",
9191
"markdownlint-cli2": "^0.17.2",
9292
"markdownlint-rule-relative-links": "^3.0.0",
93-
"metro-babel-register": "^0.83.0",
93+
"metro-babel-register": "^0.83.1",
9494
"metro-memory-fs": "^0.82.5",
95-
"metro-transform-plugins": "^0.83.0",
95+
"metro-transform-plugins": "^0.83.1",
9696
"micromatch": "^4.0.4",
9797
"node-fetch": "^2.2.0",
9898
"nullthrows": "^1.1.1",

packages/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"bugs": "https://github.com/facebook/react-native/issues",
1919
"engines": {
20-
"node": ">= 22.14.0"
20+
"node": ">= 20.19.4"
2121
},
2222
"files": [
2323
"path-support.js",

0 commit comments

Comments
 (0)