@@ -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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
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
90
92
- uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
91
93
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
92
94
with :
93
- node-version : ' * '
95
+ node-version : ' 23-nightly '
94
96
check-latest : true
95
97
- run : npm ci
96
98
@@ -111,7 +113,7 @@ jobs:
111
113
- uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
112
114
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
113
115
with :
114
- node-version : ' * '
116
+ node-version : ' 23-nightly '
115
117
check-latest : true
116
118
- run : npm ci
117
119
@@ -128,7 +130,7 @@ jobs:
128
130
- uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
129
131
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
130
132
with :
131
- node-version : ' * '
133
+ node-version : ' 23-nightly '
132
134
check-latest : true
133
135
- run : npm ci
134
136
@@ -143,8 +145,14 @@ jobs:
143
145
144
146
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
145
147
with :
146
- node-version : ' * '
148
+ node-version : ' 23-nightly '
147
149
check-latest : true
150
+
151
+ - run : |
152
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
153
+ name: Enable require(ESM)
154
+ id: node-options
155
+
148
156
- run : |
149
157
npm --version
150
158
# corepack enable npm
@@ -154,12 +162,16 @@ jobs:
154
162
- run : npm ci
155
163
156
164
- run : npx hereby lkg
165
+ env :
166
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
157
167
- run : |
158
168
node ./scripts/addPackageJsonGitHead.mjs package.json
159
169
npm pack
160
170
mv typescript*.tgz typescript.tgz
161
171
echo "package=$PWD/typescript.tgz" >> "$GITHUB_OUTPUT"
162
172
id: pack
173
+ env:
174
+ NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
163
175
164
176
- name : Smoke test
165
177
run : |
@@ -175,6 +187,8 @@ jobs:
175
187
176
188
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript
177
189
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript/lib/tsserverlibrary
190
+ env :
191
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
178
192
179
193
package-size :
180
194
runs-on : ubuntu-latest
@@ -192,7 +206,7 @@ jobs:
192
206
193
207
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
194
208
with :
195
- node-version : ' * '
209
+ node-version : ' 23-nightly '
196
210
check-latest : true
197
211
- run : |
198
212
npm --version
@@ -226,7 +240,7 @@ jobs:
226
240
- uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
227
241
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
228
242
with :
229
- node-version : ' * '
243
+ node-version : 23-nightly
230
244
check-latest : true
231
245
- run : npm ci
232
246
@@ -243,18 +257,30 @@ jobs:
243
257
- uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
244
258
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
245
259
with :
246
- node-version : ' * '
260
+ node-version : 23-nightly
247
261
check-latest : true
262
+
263
+ - run : |
264
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
265
+ name: Enable require(ESM)
266
+ id: node-options
267
+
248
268
- run : npm ci
249
269
250
270
- name : Build tsc
251
271
run : npx hereby tsc
272
+ env :
273
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
252
274
253
275
- name : Clean
254
276
run : npx hereby clean-src
277
+ env :
278
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
255
279
256
280
- name : Self build
257
281
run : npx hereby build-src --built
282
+ env :
283
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
258
284
259
285
baselines :
260
286
runs-on : ubuntu-latest
@@ -263,20 +289,30 @@ jobs:
263
289
- uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
264
290
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
265
291
with :
266
- node-version : ' * '
292
+ node-version : 23-nightly
267
293
check-latest : true
294
+
295
+ - run : |
296
+ echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
297
+ name: Enable require(ESM)
298
+ id: node-options
299
+
268
300
- run : npm ci
269
301
270
302
- name : Remove all baselines
271
303
run : rm -rf tests/baselines/reference
272
304
273
305
- name : Run tests
274
306
run : npm test &> /dev/null || exit 0
307
+ env :
308
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
275
309
276
310
- name : Accept baselines
277
311
run : |
278
312
npx hereby baseline-accept
279
313
git add tests/baselines/reference
314
+ env :
315
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
280
316
281
317
- name : Check baselines
282
318
id : check-baselines
@@ -295,6 +331,8 @@ jobs:
295
331
git diff --staged > fix_baselines.patch
296
332
exit 1
297
333
fi
334
+ env :
335
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
298
336
299
337
- name : Upload baseline diff artifact
300
338
if : ${{ failure() && steps.check-baselines.conclusion == 'failure' }}
0 commit comments