@@ -47,22 +47,29 @@ jobs:
47
47
with :
48
48
node-version : ${{ matrix.node-version }}
49
49
check-latest : true
50
+
50
51
- run : |
51
- echo "NODE_OPTIONS =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_ENV "
52
+ echo "value =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_OUTPUT "
52
53
name: Enable require(ESM) and process.getBuiltin polyfill
54
+ id: node-options
55
+
53
56
- run : npm ci
54
57
55
58
- name : Tests
56
59
id : test
57
60
# run tests, but lint separately
58
61
run : npm run test -- --no-lint --bundle=${{ matrix.bundle }}
62
+ env :
63
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
59
64
60
65
- name : Print baseline diff on failure
61
66
if : ${{ failure() && steps.test.conclusion == 'failure' }}
62
67
run : |
63
68
npx hereby baseline-accept
64
69
git add tests/baselines/reference
65
70
git diff --staged --exit-code
71
+ env :
72
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
66
73
67
74
lint :
68
75
runs-on : ubuntu-latest
@@ -142,8 +149,9 @@ jobs:
142
149
check-latest : true
143
150
144
151
- run : |
145
- echo "NODE_OPTIONS =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_ENV "
152
+ echo "value =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_OUTPUT "
146
153
name: Enable require(ESM) and process.getBuiltin polyfill
154
+ id: node-options
147
155
148
156
- run : |
149
157
npm --version
@@ -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
@@ -247,19 +261,26 @@ jobs:
247
261
check-latest : true
248
262
249
263
- run : |
250
- echo "NODE_OPTIONS =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_ENV "
264
+ echo "value =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_OUTPUT "
251
265
name: Enable require(ESM) and process.getBuiltin polyfill
266
+ id: node-options
252
267
253
268
- run : npm ci
254
269
255
270
- name : Build tsc
256
271
run : npx hereby tsc
272
+ env :
273
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
257
274
258
275
- name : Clean
259
276
run : npx hereby clean-src
277
+ env :
278
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
260
279
261
280
- name : Self build
262
281
run : npx hereby build-src --built
282
+ env :
283
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
263
284
264
285
baselines :
265
286
runs-on : ubuntu-latest
@@ -272,8 +293,9 @@ jobs:
272
293
check-latest : true
273
294
274
295
- run : |
275
- echo "NODE_OPTIONS =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_ENV "
296
+ echo "value =--experimental-require-module --require $PWD/patchProcessGetBuiltin.cjs" >> "$GITHUB_OUTPUT "
276
297
name: Enable require(ESM) and process.getBuiltin polyfill
298
+ id: node-options
277
299
278
300
- run : npm ci
279
301
@@ -282,11 +304,15 @@ jobs:
282
304
283
305
- name : Run tests
284
306
run : npm test &> /dev/null || exit 0
307
+ env :
308
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
285
309
286
310
- name : Accept baselines
287
311
run : |
288
312
npx hereby baseline-accept
289
313
git add tests/baselines/reference
314
+ env :
315
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
290
316
291
317
- name : Check baselines
292
318
id : check-baselines
@@ -305,6 +331,8 @@ jobs:
305
331
git diff --staged > fix_baselines.patch
306
332
exit 1
307
333
fi
334
+ env :
335
+ NODE_OPTIONS : ${{ steps.node-options.outputs.value }}
308
336
309
337
- name : Upload baseline diff artifact
310
338
if : ${{ failure() && steps.check-baselines.conclusion == 'failure' }}
0 commit comments