Skip to content

Commit

Permalink
bump Node references from 12/14 to 14/16 (#32980)
Browse files Browse the repository at this point in the history
Summary:
Node 16 has been the LTS for quite some time now ([Oct 2021](https://nodejs.org/en/blog/release/v16.13.0/)), so this PR just wants to bring the RN OSS CI up to speed.

(I realized that this was needed while doing the same for macos microsoft#997)

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Changed] - CI moved to Node 16.

Pull Request resolved: #32980

Test Plan: CI itself is the test � locally no significant changes were experienced.

Reviewed By: cortinico

Differential Revision: D33821288

Pulled By: ShikaSD

fbshipit-source-id: 4480ae1cb909e2b8d0b6abba4db76bbe71f0193e
  • Loading branch information
kelset authored and facebook-github-bot committed Jan 28, 2022
1 parent b3c69e8 commit f1488db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Expand Up @@ -28,11 +28,11 @@ executors:
<<: *defaults
docker:
# Note: Version set separately for Windows builds, see below.
- image: circleci/node:14
- image: circleci/node:16
nodeprevlts:
<<: *defaults
docker:
- image: circleci/node:12
- image: circleci/node:14
reactnativeandroid:
<<: *defaults
docker:
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
- run:
name: Configure Environment Variables
command: |
echo 'export PATH=/usr/local/opt/node@14/bin:$PATH' >> $BASH_ENV
echo 'export PATH=/usr/local/opt/node@16/bin:$PATH' >> $BASH_ENV
source $BASH_ENV
- with_brew_cache_span:
Expand All @@ -393,7 +393,7 @@ jobs:
name: Configure Node
# Sourcing find-node.sh will ensure nvm is set up.
# It also helps future invocation of find-node.sh prevent permission issue with nvm.sh.
command: source scripts/find-node.sh && nvm install 14 && nvm alias default 14
command: source scripts/find-node.sh && nvm install 16 && nvm alias default 16

- run:
name: Configure Watchman
Expand Down Expand Up @@ -644,8 +644,8 @@ jobs:
name: Install Node
# Note: Version set separately for non-Windows builds, see above.
command: |
nvm install 14.17.0
nvm use 14.17.0
nvm install 16
nvm use 16
# Setup Dependencies
- run:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": "github:facebook/react-native",
"engines": {
"node": ">=12"
"node": ">=14"
},
"jest-junit": {
"outputDirectory": "reports/junit",
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-ios-test-env.sh
Expand Up @@ -23,7 +23,7 @@ fi
# Check that the correct version of node is installed
NODE_VERSION="$(command node --version | sed 's/[-/a-zA-Z]//g' |sed 's/.\{2\}$//')"

if (( $(echo "${NODE_VERSION} < 12.0" | bc -l) )); then
if (( $(echo "${NODE_VERSION} < 14.0" | bc -l) )); then
echo "Node ${NODE_VERSION} detected. This version of Node is not supported."
echo "See https://reactnative.dev/docs/getting-started for instructions."
exit 1
Expand Down

0 comments on commit f1488db

Please sign in to comment.