Skip to content

Commit 3e7efc6

Browse files
roni-castromatt-oakes
authored andcommitted
feat: Use Node 10 by default (#37 by @roni-castro)
BREAKING CHANGE: Node 10 is now the default version. The previous default of Node 8 is now end-of-life. Most users will have no issues with upgrading unless they use modules which rely on Node 8 behaviour. You can also now use the `node_version` parameter to set the Node version you require.
1 parent d809b2f commit 3e7efc6

File tree

7 files changed

+36
-8
lines changed

7 files changed

+36
-8
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
paths: .
2222
publish:
2323
docker:
24-
- image: circleci/node:8
24+
- image: circleci/node:12
2525
environment:
2626
- PATH: '~/bin:/opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
2727
steps:

src/commands/setup_macos_executor.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
description: Installs the required packages to build and test Android and iOS applications on the MacOS executor. You need to run this before running any other command on those executors.
22

3+
parameters:
4+
node_version:
5+
description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
6+
type: string
7+
default: '10'
8+
39
steps:
410
- run:
511
name: Configure Environment Variables
612
command: |
7-
echo 'export PATH="$PATH:/usr/local/opt/node@8/bin:~/.yarn/bin:~/project/node_modules/.bin:~/project/example/node_modules/.bin"' >> $BASH_ENV
13+
echo 'export PATH="$PATH:/usr/local/opt/node@<<parameters.node_version>>/bin:~/.yarn/bin:~/project/node_modules/.bin:~/project/example/node_modules/.bin"' >> $BASH_ENV
814
echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
915
echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV
1016
echo 'export PATH="$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH"' >> $BASH_ENV
@@ -21,7 +27,7 @@ steps:
2127
command: |
2228
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
2329
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask >/dev/null
24-
HOMEBREW_NO_AUTO_UPDATE=1 brew install node@8 >/dev/null
30+
HOMEBREW_NO_AUTO_UPDATE=1 brew install node@<<parameters.node_version>> >/dev/null
2531
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
2632
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-sdk >/dev/null
2733
touch .watchmanconfig

src/examples/full.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ usage:
1010
# Custom jobs which are not part of the Orb
1111
jobs:
1212
checkout_code:
13-
executor: rn/linux_js
13+
executor:
14+
name: rn/linux_js
15+
node_version: '10'
1416
steps:
1517
- checkout
1618
- persist_to_workspace:
@@ -87,6 +89,7 @@ usage:
8789
# Build the iOS app in release mode and do not run tests
8890
- rn/ios_build:
8991
name: build_ios_release
92+
node_version: '10'
9093
project_path: ios/Example.xcodeproj
9194
device: "iPhone X"
9295
build_configuration: Release
@@ -96,6 +99,7 @@ usage:
9699

97100
# Build and test the iOS app in release mode
98101
- rn/ios_build_and_test:
102+
node_version: '10'
99103
project_path: "ios/Example.xcodeproj"
100104
device: "iPhone X"
101105
build_configuration: "Release"

src/executors/linux_js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ parameters:
22
node_version:
33
description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
44
type: string
5-
default: '8'
5+
default: '10'
66
resource_class:
77
description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
88
type: string

src/jobs/android_test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,17 @@ parameters:
4747
description: A custom command to run right after yarn install.
4848
type: string
4949
default: ""
50+
# For macos executor
51+
node_version:
52+
description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
53+
type: string
54+
default: '10'
5055

5156
steps:
5257
- attach_workspace:
5358
at: <<parameters.workspace_root>>
54-
- setup_macos_executor
59+
- setup_macos_executor:
60+
node_version: <<parameters.node_version>>
5561
- yarn_install
5662
- when:
5763
condition: <<parameters.on_after_initialize>>

src/jobs/ios_build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ parameters:
4848
description: A custom command to run right after yarn install.
4949
type: string
5050
default: ""
51+
# For macos executor
52+
node_version:
53+
description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
54+
type: string
55+
default: '10'
5156

5257
steps:
5358
- when:
@@ -59,7 +64,8 @@ steps:
5964
steps:
6065
- attach_workspace:
6166
at: <<parameters.workspace_root>>
62-
- setup_macos_executor
67+
- setup_macos_executor:
68+
node_version: <<parameters.node_version>>
6369
- yarn_install
6470
- when:
6571
condition: <<parameters.on_after_initialize>>

src/jobs/ios_build_and_test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ parameters:
5858
description: A custom command to run right after yarn install.
5959
type: string
6060
default: ""
61+
# For macos executor
62+
node_version:
63+
description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
64+
type: string
65+
default: '10'
6166

6267
steps:
6368
- when:
@@ -69,7 +74,8 @@ steps:
6974
steps:
7075
- attach_workspace:
7176
at: <<parameters.workspace_root>>
72-
- setup_macos_executor
77+
- setup_macos_executor:
78+
node_version: <<parameters.node_version>>
7379
- ios_simulator_start:
7480
device: <<parameters.device>>
7581
- yarn_install

0 commit comments

Comments
 (0)