Skip to content

Commit 4b92e2e

Browse files
safaiyehfacebook-github-bot
authored andcommitted
Update Node version to >= 12 (#30252)
Summary: Update engines to node >= 12 ## 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] - Update node engine to version 12 Pull Request resolved: #30252 Reviewed By: yungsters Differential Revision: D24558093 Pulled By: fkgozali fbshipit-source-id: 7a10bb935f89ba3374b0909161db9974e1fc477a
1 parent 17a8737 commit 4b92e2e

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

.circleci/Dockerfiles/Dockerfile.android

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# and build a Android application that can be used to run the
1515
# tests specified in the scripts/ directory.
1616
#
17-
FROM reactnativecommunity/react-native-android:2019-10-18
17+
FROM reactnativecommunity/react-native-android:1.0.5
1818

1919
LABEL Description="React Native Android Test Image"
2020
LABEL maintainer="Héctor Ramos <[email protected]>"

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ executors:
3636
reactnativeandroid:
3737
<<: *defaults
3838
docker:
39-
- image: reactnativecommunity/react-native-android:2019-10-18
39+
- image: reactnativecommunity/react-native-android:1.0.5
4040
resource_class: "large"
4141
environment:
4242
- TERM: "dumb"
@@ -381,15 +381,15 @@ jobs:
381381
- run:
382382
name: Configure Environment Variables
383383
command: |
384-
echo 'export PATH=/usr/local/opt/node@10/bin:$PATH' >> $BASH_ENV
384+
echo 'export PATH=/usr/local/opt/node@12/bin:$PATH' >> $BASH_ENV
385385
source $BASH_ENV
386386
387387
- with_brew_cache_span:
388388
steps:
389389
- brew_install:
390390
package: watchman
391391
- brew_install:
392-
package: node@10
392+
package: node@12
393393
- run:
394394
name: "Brew: Tap wix/brew"
395395
command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "MIT",
88
"repository": "github:facebook/react-native",
99
"engines": {
10-
"node": ">=10"
10+
"node": ">=12"
1111
},
1212
"jest-junit": {
1313
"outputDirectory": "reports/junit",
@@ -64,7 +64,7 @@
6464
"prettier": "prettier --write \"./**/*.{js,md,yml}\"",
6565
"format-check": "prettier --list-different \"./**/*.{js,md,yml}\"",
6666
"update-lock": "npx yarn-deduplicate",
67-
"docker-setup-android": "docker pull reactnativecommunity/react-native-android",
67+
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:1.0.5",
6868
"docker-build-android": "docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .",
6969
"test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh",
7070
"test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh",

scripts/.tests.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export ANDROID_SDK_BUILD_API_LEVEL="28"
1010
# Google APIs for Android level
1111
export ANDROID_GOOGLE_API_LEVEL="23"
1212
# Minimum Android API Level we target
13-
export ANDROID_SDK_TARGET_API_LEVEL="19"
13+
export ANDROID_SDK_TARGET_API_LEVEL="21"
1414
# Android Virtual Device name
1515
export AVD_NAME="testAVD"
1616
# ABI to use in Android Virtual Device

scripts/validate-ios-test-env.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# testing environment.
99
#
1010
# In particular, it checks that the minimum required Xcode version is installed.
11-
# It also checks that the correct Node version is installed. Node 10 is not fully
12-
# supported at the time and Node 6 is no longer supported.
11+
# It also checks that the correct Node version is installed.
1312

1413
# Function used to compare dot separated version numbers
1514
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
@@ -24,7 +23,7 @@ fi
2423
# Check that the correct version of node is installed
2524
NODE_VERSION="$(command node --version | sed 's/[-/a-zA-Z]//g' |sed 's/.\{2\}$//')"
2625

27-
if (( $(echo "${NODE_VERSION} <= 6.0" | bc -l) )); then
26+
if (( $(echo "${NODE_VERSION} < 12.0" | bc -l) )); then
2827
echo "Node ${NODE_VERSION} detected. This version of Node is not supported."
2928
echo "See https://reactnative.dev/docs/getting-started.html for instructions."
3029
exit 1

0 commit comments

Comments
 (0)