Skip to content

Commit 879e536

Browse files
authored
Merge pull request #567 from aws-amplify/node18-support
Support for NodeJS v18
2 parents 234698c + 74d288e commit 879e536

File tree

5 files changed

+903
-1031
lines changed

5 files changed

+903
-1031
lines changed

.circleci/config.base.yml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ machine:
99
executors:
1010
w: &windows-e2e-executor
1111
machine:
12-
image: 'windows-server-2019-vs2019:stable'
12+
image: 'windows-server-2022-gui:current'
1313
resource_class: 'windows.medium'
1414
shell: bash.exe
1515
working_directory: ~/repo
@@ -19,7 +19,7 @@ executors:
1919

2020
l: &linux-e2e-executor
2121
docker:
22-
- image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:latest
22+
- image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18
2323
working_directory: ~/repo
2424
resource_class: large
2525
environment:
@@ -38,7 +38,7 @@ executors:
3838

3939
a: &android-e2e-executor
4040
docker:
41-
- image: cimg/android:2022.09
41+
- image: cimg/android:2023.03
4242
working_directory: ~/repo
4343
resource_class: large
4444
environment:
@@ -78,6 +78,25 @@ jobs:
7878
executor: << parameters.os >>
7979
steps:
8080
- checkout
81+
- when:
82+
condition:
83+
equal: [*windows-e2e-executor, << parameters.os >>]
84+
steps:
85+
- run:
86+
name: Install Node 18
87+
command: |
88+
nvm version
89+
nvm install 18.15.0
90+
nvm use 18.15.0
91+
nvm ls
92+
- run:
93+
name: Install Yarn
94+
command: |
95+
npm install -g yarn
96+
yarn --version
97+
- run:
98+
name: Check node version
99+
command: node -v
81100
- run: yarn config set workspaces-experimental true
82101
- run: yarn cache clean --force
83102
- run: yarn run production-build
@@ -103,8 +122,21 @@ jobs:
103122
- equal: [*windows-e2e-executor, << parameters.os >>]
104123
steps:
105124
- checkout
106-
- run: nvm install 12.22.7
107-
- run: nvm alias default 12.22.7
125+
- run:
126+
name: Install Node 18
127+
command: |
128+
nvm version
129+
nvm install 18.15.0
130+
nvm use 18.15.0
131+
nvm ls
132+
- run:
133+
name: Install Yarn
134+
command: |
135+
npm install -g yarn
136+
yarn --version
137+
- run:
138+
name: Check node version
139+
command: node -v
108140
- run: yarn config set workspaces-experimental true
109141
- run: yarn cache clean --force
110142
- run: yarn run production-build
@@ -234,7 +266,9 @@ jobs:
234266
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
235267
- node/install:
236268
install-yarn: true
237-
node-version: '16.13'
269+
node-version: '18.15'
270+
- run: yarn config set workspaces-experimental true
271+
- run: yarn cache clean --force
238272
- run: yarn run production-build
239273
- run: *install_cli
240274
- run:

.circleci/config.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ machine:
1010
executors:
1111
w: &ref_1
1212
machine:
13-
image: windows-server-2019-vs2019:stable
13+
image: windows-server-2022-gui:current
1414
resource_class: windows.medium
1515
shell: bash.exe
1616
working_directory: ~/repo
@@ -19,7 +19,7 @@ executors:
1919
AMPLIFY_PATH: C:/home/circleci/repo/out/amplify.exe
2020
l: &ref_2
2121
docker:
22-
- image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:latest
22+
- image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18
2323
working_directory: ~/repo
2424
resource_class: large
2525
environment:
@@ -36,7 +36,7 @@ executors:
3636
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64
3737
a:
3838
docker:
39-
- image: cimg/android:2022.09
39+
- image: cimg/android:2023.03
4040
working_directory: ~/repo
4141
resource_class: large
4242
environment:
@@ -73,6 +73,27 @@ jobs:
7373
executor: << parameters.os >>
7474
steps:
7575
- checkout
76+
- when:
77+
condition:
78+
equal:
79+
- *ref_1
80+
- << parameters.os >>
81+
steps:
82+
- run:
83+
name: Install Node 18
84+
command: |
85+
nvm version
86+
nvm install 18.15.0
87+
nvm use 18.15.0
88+
nvm ls
89+
- run:
90+
name: Install Yarn
91+
command: |
92+
npm install -g yarn
93+
yarn --version
94+
- run:
95+
name: Check node version
96+
command: node -v
7697
- run: yarn config set workspaces-experimental true
7798
- run: yarn cache clean --force
7899
- run: yarn run production-build
@@ -100,8 +121,21 @@ jobs:
100121
- << parameters.os >>
101122
steps:
102123
- checkout
103-
- run: nvm install 12.22.7
104-
- run: nvm alias default 12.22.7
124+
- run:
125+
name: Install Node 18
126+
command: |
127+
nvm version
128+
nvm install 18.15.0
129+
nvm use 18.15.0
130+
nvm ls
131+
- run:
132+
name: Install Yarn
133+
command: |
134+
npm install -g yarn
135+
yarn --version
136+
- run:
137+
name: Check node version
138+
command: node -v
105139
- run: yarn config set workspaces-experimental true
106140
- run: yarn cache clean --force
107141
- run: yarn run production-build
@@ -235,7 +269,9 @@ jobs:
235269
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
236270
- node/install:
237271
install-yarn: true
238-
node-version: '16.13'
272+
node-version: '18.15'
273+
- run: yarn config set workspaces-experimental true
274+
- run: yarn cache clean --force
239275
- run: yarn run production-build
240276
- run: *ref_3
241277
- run:

packages/amplify-codegen-e2e-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"fs-extra": "^8.1.0",
2828
"jest-environment-node": "^26.6.2",
2929
"lodash": "^4.17.19",
30-
"node-pty-prebuilt-multiarch": "^0.9.0",
30+
"node-pty": "beta",
3131
"retimer": "2.0.0",
3232
"rimraf": "^3.0.0",
3333
"strip-ansi": "^6.0.0",

packages/amplify-codegen-e2e-core/src/asciinema-recorder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as pty from 'node-pty-prebuilt-multiarch';
1+
import * as pty from 'node-pty';
22
import chalk from 'chalk';
33

44
export type RecordingHeader = {

0 commit comments

Comments
 (0)