Skip to content

Commit 842c316

Browse files
caugnerfiji-flo
andauthored
fix(scripts): specify loader via NODE_OPTIONS (#10865)
* fix(scripts): specify loader via NODE_OPTIONS * Add `cross-env` support This reverts commit 095642e. --------- Co-authored-by: Florian Dieminger <[email protected]>
1 parent ee7f9d5 commit 842c316

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"yari-tool": "tool/cli.js"
1414
},
1515
"scripts": {
16-
"ai-help-macros": "ts-node scripts/ai-help-macros.ts",
16+
"ai-help-macros": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node scripts/ai-help-macros.ts",
1717
"analyze": "source-map-explorer 'client/build/static/js/*.js'",
1818
"analyze:css": "source-map-explorer 'client/build/static/css/*.css'",
1919
"build": "cross-env NODE_ENV=production NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node build/cli.ts",
20-
"build:blog": "cross-env NODE_ENV=production ts-node build/build-blog.ts",
20+
"build:blog": "cross-env NODE_ENV=production NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node build/build-blog.ts",
2121
"build:client": "cd client && cross-env NODE_ENV=production BABEL_ENV=production INLINE_RUNTIME_CHUNK=false node scripts/build.js",
22-
"build:curriculum": "cross-env NODE_ENV=production ts-node build/build-curriculum.ts",
22+
"build:curriculum": "cross-env NODE_ENV=production NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node build/build-curriculum.ts",
2323
"build:dist": "tsc -p tsconfig.dist.json",
2424
"build:glean": "cd client && cross-env VIRTUAL_ENV=venv glean translate src/telemetry/metrics.yaml src/telemetry/pings.yaml -f typescript -o src/telemetry/generated",
2525
"build:prepare": "yarn build:client && yarn build:ssr && yarn tool optimize-client-build && yarn tool google-analytics-code && yarn tool popularities && yarn tool spas && yarn tool gather-git-history && yarn tool build-robots-txt",
@@ -29,19 +29,19 @@
2929
"check:tsc": "find . -name 'tsconfig.json' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -P 2 -0 sh -c 'cd `dirname $0` && echo \"🔄 $(pwd)\" && npx tsc --noEmit && echo \"☑️ $(pwd)\" || exit 255'",
3030
"dev": "yarn build:prepare && nf -j Procfile.dev start",
3131
"eslint": "eslint .",
32-
"filecheck": "ts-node filecheck/cli.ts",
32+
"filecheck": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node filecheck/cli.ts",
3333
"install:all": "find . -mindepth 2 -name 'yarn.lock' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -0 sh -cx 'yarn --cwd $(dirname $0) install'",
3434
"install:all:npm": "find . -mindepth 2 -name 'package-lock.json' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -0 sh -cx 'npm --prefix $(dirname $0) install'",
3535
"jest": "node --experimental-vm-modules --expose-gc ./node_modules/.bin/jest --logHeapUsage",
36-
"m2h": "ts-node markdown/m2h/cli.ts",
36+
"m2h": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node markdown/m2h/cli.ts",
3737
"prepack": "yarn build:dist",
3838
"prepare": "(husky || true) && yarn install:all && yarn install:all:npm",
3939
"prettier-check": "prettier --check .",
4040
"prettier-format": "prettier --write .",
4141
"start": "(test -f client/build/index.html || yarn build:client) && (test -f ssr/dist/main.js || yarn build:ssr) && (test -f popularities.json || yarn tool popularities) && (test -d client/build/en-us/_spas || yarn tool spas) && nf -j Procfile.start start",
4242
"start:client": "cd client && cross-env NODE_ENV=development BABEL_ENV=development BROWSER=none PORT=3000 node scripts/start.js",
4343
"start:server": "node-dev --experimental-loader ts-node/esm server/index.ts",
44-
"start:static-server": "ts-node server/static.ts",
44+
"start:static-server": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning --loader ts-node/esm' node server/static.ts",
4545
"style-dictionary": "style-dictionary build -c sd-config.js",
4646
"stylelint": "stylelint \"**/*.scss\"",
4747
"test": "yarn prettier-check && yarn test:client && yarn test:kumascript && yarn test:libs && yarn test:content && yarn test:testing",

0 commit comments

Comments
 (0)