Skip to content

Commit 259547d

Browse files
authored
ci(NODE-5271): add node 20 (#577)
1 parent 915c517 commit 259547d

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

.evergreen/config.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ tasks:
100100
commands:
101101
- func: fetch source
102102
vars:
103-
NODE_LTS_NAME: fermium
103+
NODE_LTS_VERSION: 14
104104
- func: install dependencies
105105
- func: run tests
106106
vars:
@@ -110,7 +110,7 @@ tasks:
110110
commands:
111111
- func: fetch source
112112
vars:
113-
NODE_LTS_NAME: gallium
113+
NODE_LTS_VERSION: 16
114114
- func: install dependencies
115115
- func: run tests
116116
vars:
@@ -120,17 +120,25 @@ tasks:
120120
commands:
121121
- func: fetch source
122122
vars:
123-
NODE_LTS_NAME: hydrogen
123+
NODE_LTS_VERSION: 18
124124
- func: install dependencies
125125
- func: run tests
126126
vars:
127127
TEST_TARGET: node
128+
- name: node-tests-v20
129+
tags: ["node"]
130+
commands:
131+
- func: fetch source
132+
vars:
133+
NODE_LTS_VERSION: 20
134+
- func: install dependencies
135+
- func: run tests
128136
- name: node-tests-latest
129137
tags: ["node"]
130138
commands:
131139
- func: fetch source
132140
vars:
133-
NODE_LTS_NAME: latest
141+
NODE_LTS_VERSION: latest
134142
- func: install dependencies
135143
- func: run tests
136144
vars:
@@ -140,7 +148,7 @@ tasks:
140148
commands:
141149
- func: fetch source
142150
vars:
143-
NODE_LTS_NAME: hydrogen
151+
NODE_LTS_VERSION: 20
144152
- func: install dependencies
145153
- func: run tests
146154
vars:
@@ -149,15 +157,15 @@ tasks:
149157
commands:
150158
- func: fetch source
151159
vars:
152-
NODE_LTS_NAME: hydrogen
160+
NODE_LTS_VERSION: 20
153161
- func: install dependencies
154162
- func: run bundling
155163
- name: no-bigint-web-tests
156164
tags: ["no-bigint", "web"]
157165
commands:
158166
- func: fetch source
159167
vars:
160-
NODE_LTS_NAME: hydrogen
168+
NODE_LTS_VERSION: 20
161169
- func: install dependencies
162170
- func: run tests
163171
vars:
@@ -169,14 +177,14 @@ tasks:
169177
commands:
170178
- func: fetch source
171179
vars:
172-
NODE_LTS_NAME: hydrogen
180+
NODE_LTS_VERSION: 20
173181
- func: install dependencies
174182
- func: run checks
175183
- name: check-typescript-oldest
176184
commands:
177185
- func: fetch source
178186
vars:
179-
NODE_LTS_NAME: hydrogen
187+
NODE_LTS_VERSION: 20
180188
- func: install dependencies
181189
- func: "run typescript"
182190
vars:
@@ -186,7 +194,7 @@ tasks:
186194
commands:
187195
- func: fetch source
188196
vars:
189-
NODE_LTS_NAME: hydrogen
197+
NODE_LTS_VERSION: 20
190198
- func: install dependencies
191199
- func: "run typescript"
192200
vars:
@@ -196,7 +204,7 @@ tasks:
196204
commands:
197205
- func: fetch source
198206
vars:
199-
NODE_LTS_NAME: hydrogen
207+
NODE_LTS_VERSION: 20
200208
- func: install dependencies
201209
- func: "run typescript"
202210
vars:
@@ -206,7 +214,7 @@ tasks:
206214
commands:
207215
- func: fetch source
208216
vars:
209-
NODE_LTS_NAME: hydrogen
217+
NODE_LTS_VERSION: 20
210218
- func: install dependencies
211219
- func: run eslint plugin tests
212220

.evergreen/install-dependencies.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

4-
NODE_LTS_NAME=${NODE_LTS_NAME:-fermium}
4+
NODE_LTS_VERSION=${NODE_LTS_VERSION:-14}
55
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY:-$(pwd)}/node-artifacts"
66
if [[ "$OS" = "Windows_NT" ]]; then NODE_ARTIFACTS_PATH=$(cygpath --unix "$NODE_ARTIFACTS_PATH"); fi
77

@@ -28,11 +28,12 @@ curl "${CURL_FLAGS[@]}" "https://nodejs.org/dist/index.tab" --output node_index.
2828

2929
while IFS=$'\t' read -r -a row; do
3030
node_index_version="${row[0]}"
31+
node_index_major_version=$(echo $node_index_version | sed -E 's/^v([0-9]+).*$/\1/')
3132
node_index_date="${row[1]}"
3233
node_index_lts="${row[9]}"
3334
[[ "$node_index_version" = "version" ]] && continue # skip tsv header
34-
[[ "$NODE_LTS_NAME" = "latest" ]] && break # first line is latest
35-
[[ "$NODE_LTS_NAME" = "$node_index_lts" ]] && break # case insensitive compare
35+
[[ "$NODE_LTS_VERSION" = "latest" ]] && break # first line is latest
36+
[[ "$NODE_LTS_VERSION" = "$node_index_major_version" ]] && break # case insensitive compare
3637
done < node_index.tab
3738

3839
if [[ "$OS" = "Windows_NT" ]]; then

.evergreen/setup-environment.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env bash
22

3-
if [ -z "$NODE_LTS_NAME" ]; then
4-
echo "NODE_LTS_NAME environment variable must be specified"
3+
if [ -z "$NODE_LTS_VERSION" ]; then
4+
echo "NODE_LTS_VERSION environment variable must be specified"
55
exit 1
66
fi
77

@@ -16,12 +16,12 @@ export PROJECT_DIRECTORY="$(pwd)"
1616
cat <<EOT > expansion.yml
1717
CURRENT_VERSION: "$CURRENT_VERSION"
1818
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
19-
NODE_LTS_NAME: "$NODE_LTS_NAME"
19+
NODE_LTS_VERSION: "$NODE_LTS_VERSION"
2020
PREPARE_SHELL: |
2121
set -o errexit
2222
set -o xtrace
2323
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
24-
export NODE_LTS_NAME="$NODE_LTS_NAME"
24+
export NODE_LTS_VERSION="$NODE_LTS_VERSION"
2525
EOT
2626
# See what we've done
2727
cat expansion.yml

0 commit comments

Comments
 (0)