@@ -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 : ' lts/* '
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
coverage :
73
75
runs-on :
@@ -83,11 +85,20 @@ jobs:
83
85
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
84
86
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
85
87
with :
86
- node-version : ' lts/*'
88
+ node-version : ' 23-nightly'
89
+ check-latest : true
90
+
91
+ - run : |
92
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
93
+ name: Enable require(ESM)
94
+ id: node-options
95
+
87
96
- run : npm ci
88
97
89
98
- name : Run tests with coverage
90
99
run : npm test -- --no-lint --coverage
100
+ env :
101
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
91
102
92
103
- name : Upload coverage artifact
93
104
uses : actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
@@ -108,7 +119,8 @@ jobs:
108
119
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
109
120
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
110
121
with :
111
- node-version : ' lts/*'
122
+ node-version : ' 23-nightly'
123
+ check-latest : true
112
124
- run : npm ci
113
125
114
126
- name : Linter
@@ -134,7 +146,8 @@ jobs:
134
146
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
135
147
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
136
148
with :
137
- node-version : ' lts/*'
149
+ node-version : ' 23-nightly'
150
+ check-latest : true
138
151
- run : npm ci
139
152
140
153
- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
@@ -154,7 +167,8 @@ jobs:
154
167
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
155
168
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
156
169
with :
157
- node-version : ' lts/*'
170
+ node-version : ' 23-nightly'
171
+ check-latest : true
158
172
- run : npm ci
159
173
160
174
- name : Installing browsers
@@ -170,7 +184,8 @@ jobs:
170
184
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
171
185
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
172
186
with :
173
- node-version : ' lts/*'
187
+ node-version : ' 23-nightly'
188
+ check-latest : true
174
189
- run : npm ci
175
190
176
191
- name : Build src
@@ -184,7 +199,14 @@ jobs:
184
199
185
200
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
186
201
with :
187
- node-version : ' lts/*'
202
+ node-version : ' 23-nightly'
203
+ check-latest : true
204
+
205
+ - run : |
206
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
207
+ name: Enable require(ESM)
208
+ id: node-options
209
+
188
210
- run : |
189
211
npm --version
190
212
# corepack enable npm
@@ -194,12 +216,16 @@ jobs:
194
216
- run : npm ci
195
217
196
218
- run : npx hereby lkg
219
+ env :
220
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
197
221
- run : |
198
222
node ./scripts/addPackageJsonGitHead.mjs package.json
199
223
npm pack
200
224
mv typescript*.tgz typescript.tgz
201
225
echo "package=$PWD/typescript.tgz" >> "$GITHUB_OUTPUT"
202
226
id: pack
227
+ env:
228
+ NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
203
229
204
230
- name : Smoke test
205
231
run : |
@@ -215,6 +241,8 @@ jobs:
215
241
216
242
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript
217
243
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript/lib/tsserverlibrary
244
+ env :
245
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
218
246
219
247
package-size :
220
248
runs-on : ubuntu-latest
@@ -232,7 +260,8 @@ jobs:
232
260
233
261
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
234
262
with :
235
- node-version : ' lts/*'
263
+ node-version : ' 23-nightly'
264
+ check-latest : true
236
265
- run : |
237
266
npm --version
238
267
# corepack enable npm
@@ -265,7 +294,8 @@ jobs:
265
294
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
266
295
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
267
296
with :
268
- node-version : ' lts/*'
297
+ node-version : 23-nightly
298
+ check-latest : true
269
299
- run : npm ci
270
300
271
301
- name : Build scripts
@@ -281,17 +311,30 @@ jobs:
281
311
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
282
312
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
283
313
with :
284
- node-version : ' lts/*'
314
+ node-version : 23-nightly
315
+ check-latest : true
316
+
317
+ - run : |
318
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
319
+ name: Enable require(ESM)
320
+ id: node-options
321
+
285
322
- run : npm ci
286
323
287
324
- name : Build tsc
288
325
run : npx hereby tsc
326
+ env :
327
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
289
328
290
329
- name : Clean
291
330
run : npx hereby clean-src
331
+ env :
332
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
292
333
293
334
- name : Self build
294
335
run : npx hereby build-src --built
336
+ env :
337
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
295
338
296
339
baselines :
297
340
runs-on : ubuntu-latest
@@ -300,19 +343,30 @@ jobs:
300
343
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
301
344
- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
302
345
with :
303
- node-version : ' lts/*'
346
+ node-version : 23-nightly
347
+ check-latest : true
348
+
349
+ - run : |
350
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
351
+ name: Enable require(ESM)
352
+ id: node-options
353
+
304
354
- run : npm ci
305
355
306
356
- name : Remove all baselines
307
357
run : rm -rf tests/baselines/reference
308
358
309
359
- name : Run tests
310
360
run : npm test &> /dev/null || exit 0
361
+ env :
362
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
311
363
312
364
- name : Accept baselines
313
365
run : |
314
366
npx hereby baseline-accept
315
367
git add tests/baselines/reference
368
+ env :
369
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
316
370
317
371
- name : Check baselines
318
372
id : check-baselines
@@ -331,6 +385,8 @@ jobs:
331
385
git diff --staged > fix_baselines.patch
332
386
exit 1
333
387
fi
388
+ env :
389
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
334
390
335
391
- name : Upload baseline diff artifact
336
392
if : ${{ failure() && steps.check-baselines.conclusion == 'failure' }}
0 commit comments