@@ -29,21 +29,13 @@ jobs:
29
29
- windows-latest
30
30
- macos-14
31
31
node-version :
32
- - ' 22'
33
- - ' 20'
34
- - ' 18'
35
- - ' 16'
36
- - ' 14'
32
+ - 23-nightly
37
33
bundle :
38
34
- ' true'
39
35
include :
40
- - node-version : ' * '
36
+ - node-version : 23-nightly
41
37
bundle : false
42
38
os : ubuntu-latest
43
- exclude :
44
- # No Node 14 on ARM macOS
45
- - node-version : ' 14'
46
- os : macos-14
47
39
48
40
runs-on : ${{ matrix.os }}
49
41
name : Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }}
@@ -55,19 +47,29 @@ jobs:
55
47
with :
56
48
node-version : ${{ matrix.node-version }}
57
49
check-latest : true
50
+
51
+ - run : |
52
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
53
+ name: Enable require(ESM)
54
+ id: node-options
55
+
58
56
- run : npm ci
59
57
60
58
- name : Tests
61
59
id : test
62
60
# run tests, but lint separately
63
61
run : npm run test -- --no-lint --bundle=${{ matrix.bundle }}
62
+ env :
63
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
64
64
65
65
- name : Print baseline diff on failure
66
66
if : ${{ failure() && steps.test.conclusion == 'failure' }}
67
67
run : |
68
68
npx hereby baseline-accept
69
69
git add tests/baselines/reference
70
70
git diff --staged --exit-code
71
+ env :
72
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
71
73
72
74
lint :
73
75
runs-on : ubuntu-latest
76
78
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
77
79
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
78
80
with :
79
- node-version : ' * '
81
+ node-version : ' 23-nightly '
80
82
check-latest : true
81
83
- run : npm ci
82
84
@@ -104,7 +106,7 @@ jobs:
104
106
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
105
107
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
106
108
with :
107
- node-version : ' * '
109
+ node-version : ' 23-nightly '
108
110
check-latest : true
109
111
- run : npm ci
110
112
@@ -125,7 +127,7 @@ jobs:
125
127
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
126
128
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
127
129
with :
128
- node-version : ' * '
130
+ node-version : ' 23-nightly '
129
131
check-latest : true
130
132
- run : npm ci
131
133
@@ -142,7 +144,7 @@ jobs:
142
144
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
143
145
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
144
146
with :
145
- node-version : ' * '
147
+ node-version : ' 23-nightly '
146
148
check-latest : true
147
149
- run : npm ci
148
150
@@ -157,8 +159,14 @@ jobs:
157
159
158
160
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
159
161
with :
160
- node-version : ' * '
162
+ node-version : ' 23-nightly '
161
163
check-latest : true
164
+
165
+ - run : |
166
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
167
+ name: Enable require(ESM)
168
+ id: node-options
169
+
162
170
- run : |
163
171
npm --version
164
172
# corepack enable npm
@@ -168,12 +176,16 @@ jobs:
168
176
- run : npm ci
169
177
170
178
- run : npx hereby lkg
179
+ env :
180
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
171
181
- run : |
172
182
node ./scripts/addPackageJsonGitHead.mjs package.json
173
183
npm pack
174
184
mv typescript*.tgz typescript.tgz
175
185
echo "package=$PWD/typescript.tgz" >> "$GITHUB_OUTPUT"
176
186
id: pack
187
+ env:
188
+ NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
177
189
178
190
- name : Smoke test
179
191
run : |
@@ -189,6 +201,8 @@ jobs:
189
201
190
202
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript
191
203
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript/lib/tsserverlibrary
204
+ env :
205
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
192
206
193
207
package-size :
194
208
runs-on : ubuntu-latest
@@ -206,7 +220,7 @@ jobs:
206
220
207
221
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
208
222
with :
209
- node-version : ' * '
223
+ node-version : ' 23-nightly '
210
224
check-latest : true
211
225
- run : |
212
226
npm --version
@@ -240,7 +254,7 @@ jobs:
240
254
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
241
255
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
242
256
with :
243
- node-version : ' * '
257
+ node-version : 23-nightly
244
258
check-latest : true
245
259
- run : npm ci
246
260
@@ -257,18 +271,30 @@ jobs:
257
271
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
258
272
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
259
273
with :
260
- node-version : ' * '
274
+ node-version : 23-nightly
261
275
check-latest : true
276
+
277
+ - run : |
278
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
279
+ name: Enable require(ESM)
280
+ id: node-options
281
+
262
282
- run : npm ci
263
283
264
284
- name : Build tsc
265
285
run : npx hereby tsc
286
+ env :
287
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
266
288
267
289
- name : Clean
268
290
run : npx hereby clean-src
291
+ env :
292
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
269
293
270
294
- name : Self build
271
295
run : npx hereby build-src --built
296
+ env :
297
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
272
298
273
299
baselines :
274
300
runs-on : ubuntu-latest
@@ -277,20 +303,30 @@ jobs:
277
303
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
278
304
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
279
305
with :
280
- node-version : ' * '
306
+ node-version : 23-nightly
281
307
check-latest : true
308
+
309
+ - run : |
310
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
311
+ name: Enable require(ESM)
312
+ id: node-options
313
+
282
314
- run : npm ci
283
315
284
316
- name : Remove all baselines
285
317
run : rm -rf tests/baselines/reference
286
318
287
319
- name : Run tests
288
320
run : npm test &> /dev/null || exit 0
321
+ env :
322
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
289
323
290
324
- name : Accept baselines
291
325
run : |
292
326
npx hereby baseline-accept
293
327
git add tests/baselines/reference
328
+ env :
329
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
294
330
295
331
- name : Check baselines
296
332
id : check-baselines
@@ -309,6 +345,8 @@ jobs:
309
345
git diff --staged > fix_baselines.patch
310
346
exit 1
311
347
fi
348
+ env :
349
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
312
350
313
351
- name : Upload baseline diff artifact
314
352
if : ${{ failure() && steps.check-baselines.conclusion == 'failure' }}
0 commit comments