Skip to content

Commit

Permalink
Update Node version to >= 12 (#30252)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
safaiyeh authored and facebook-github-bot committed Oct 29, 2020
1 parent 17a8737 commit 4b92e2e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# and build a Android application that can be used to run the
# tests specified in the scripts/ directory.
#
FROM reactnativecommunity/react-native-android:2019-10-18
FROM reactnativecommunity/react-native-android:1.0.5

LABEL Description="React Native Android Test Image"
LABEL maintainer="Héctor Ramos <hector@fb.com>"
Expand Down
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ executors:
reactnativeandroid:
<<: *defaults
docker:
- image: reactnativecommunity/react-native-android:2019-10-18
- image: reactnativecommunity/react-native-android:1.0.5
resource_class: "large"
environment:
- TERM: "dumb"
Expand Down Expand Up @@ -381,15 +381,15 @@ jobs:
- run:
name: Configure Environment Variables
command: |
echo 'export PATH=/usr/local/opt/node@10/bin:$PATH' >> $BASH_ENV
echo 'export PATH=/usr/local/opt/node@12/bin:$PATH' >> $BASH_ENV
source $BASH_ENV
- with_brew_cache_span:
steps:
- brew_install:
package: watchman
- brew_install:
package: node@10
package: node@12
- run:
name: "Brew: Tap wix/brew"
command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": "github:facebook/react-native",
"engines": {
"node": ">=10"
"node": ">=12"
},
"jest-junit": {
"outputDirectory": "reports/junit",
Expand Down Expand Up @@ -64,7 +64,7 @@
"prettier": "prettier --write \"./**/*.{js,md,yml}\"",
"format-check": "prettier --list-different \"./**/*.{js,md,yml}\"",
"update-lock": "npx yarn-deduplicate",
"docker-setup-android": "docker pull reactnativecommunity/react-native-android",
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:1.0.5",
"docker-build-android": "docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .",
"test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh",
"test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh",
Expand Down
2 changes: 1 addition & 1 deletion scripts/.tests.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export ANDROID_SDK_BUILD_API_LEVEL="28"
# Google APIs for Android level
export ANDROID_GOOGLE_API_LEVEL="23"
# Minimum Android API Level we target
export ANDROID_SDK_TARGET_API_LEVEL="19"
export ANDROID_SDK_TARGET_API_LEVEL="21"
# Android Virtual Device name
export AVD_NAME="testAVD"
# ABI to use in Android Virtual Device
Expand Down
5 changes: 2 additions & 3 deletions scripts/validate-ios-test-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# testing environment.
#
# In particular, it checks that the minimum required Xcode version is installed.
# It also checks that the correct Node version is installed. Node 10 is not fully
# supported at the time and Node 6 is no longer supported.
# It also checks that the correct Node version is installed.

# Function used to compare dot separated version numbers
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
Expand All @@ -24,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} <= 6.0" | bc -l) )); then
if (( $(echo "${NODE_VERSION} < 12.0" | bc -l) )); then
echo "Node ${NODE_VERSION} detected. This version of Node is not supported."
echo "See https://reactnative.dev/docs/getting-started.html for instructions."
exit 1
Expand Down

0 comments on commit 4b92e2e

Please sign in to comment.