Skip to content

Commit 2e23a33

Browse files
committed
Merge branch 'nodejs16' of https://github.com/john19696/CyberChef into nodejs16
2 parents bca296e + 2dbd647 commit 2e23a33

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/dubnium
1+
lts/gallium

Gruntfile.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPl
66
const glob = require("glob");
77
const path = require("path");
88

9+
const nodeFlags = "--experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-warnings --no-deprecation";
10+
911
/**
1012
* Grunt configuration for building the app in various formats.
1113
*
@@ -349,23 +351,23 @@ module.exports = function (grunt) {
349351
command: "git gc --prune=now --aggressive"
350352
},
351353
sitemap: {
352-
command: "node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation src/web/static/sitemap.mjs > build/prod/sitemap.xml",
354+
command: `node ${nodeFlags} src/web/static/sitemap.mjs > build/prod/sitemap.xml`,
353355
sync: true
354356
},
355357
generateConfig: {
356358
command: chainCommands([
357359
"echo '\n--- Regenerating config files. ---'",
358360
"echo [] > src/core/config/OperationConfig.json",
359-
"node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation src/core/config/scripts/generateOpsIndex.mjs",
360-
"node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation src/core/config/scripts/generateConfig.mjs",
361+
`node ${nodeFlags} src/core/config/scripts/generateOpsIndex.mjs`,
362+
`node ${nodeFlags} src/core/config/scripts/generateConfig.mjs`,
361363
"echo '--- Config scripts finished. ---\n'"
362364
]),
363365
sync: true
364366
},
365367
generateNodeIndex: {
366368
command: chainCommands([
367369
"echo '\n--- Regenerating node index ---'",
368-
"node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation src/node/config/scripts/generateNodeIndex.mjs",
370+
`node ${nodeFlags} src/node/config/scripts/generateNodeIndex.mjs`,
369371
"echo '--- Node index generated. ---\n'"
370372
]),
371373
sync: true
@@ -393,21 +395,21 @@ module.exports = function (grunt) {
393395
testCJSNodeConsumer: {
394396
command: chainCommands([
395397
`cd ${nodeConsumerTestPath}`,
396-
"node --no-warnings cjs-consumer.js",
398+
`node ${nodeFlags} cjs-consumer.js`,
397399
]),
398400
stdout: false,
399401
},
400402
testESMNodeConsumer: {
401403
command: chainCommands([
402404
`cd ${nodeConsumerTestPath}`,
403-
"node --no-warnings --experimental-modules --experimental-json-modules esm-consumer.mjs",
405+
`node ${nodeFlags} esm-consumer.mjs`,
404406
]),
405407
stdout: false,
406408
},
407409
testESMDeepImportNodeConsumer: {
408410
command: chainCommands([
409411
`cd ${nodeConsumerTestPath}`,
410-
"node --no-warnings --experimental-modules --experimental-json-modules esm-deep-import-consumer.mjs",
412+
`node ${nodeFlags} esm-deep-import-consumer.mjs`,
411413
]),
412414
stdout: false,
413415
},

0 commit comments

Comments
 (0)