Skip to content

Commit 037745e

Browse files
devversiondgp1130
authored andcommitted
build: avoid use of ts-node wrapper script as it breaks child process forking
`ts-node` spawns a custom node launcher script and has a brotli-base64 encoded configuration that will point to the user-provided entry-point. This breaks child process forking as we wouldn't be able to specify our custom build worker and basically `ng-dev` would run inside `ng-dev` again. (cherry picked from commit 83b51ec)
1 parent ff6d81a commit 037745e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"build:bazel": "node ./bin/devkit-admin build-bazel",
2525
"build-tsc": "tsc -p tsconfig.json",
2626
"lint": "eslint --cache --max-warnings=0 \"**/*.ts\"",
27-
"ng-dev": "ts-node --esm --project .ng-dev/tsconfig.json node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs",
27+
"ng-dev": "cross-env TS_NODE_PROJECT=$PWD/.ng-dev/tsconfig.json TS_NODE_TRANSPILE_ONLY=1 node --no-warnings --loader ts-node/esm node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs",
2828
"templates": "node ./bin/devkit-admin templates",
2929
"validate": "node ./bin/devkit-admin validate",
3030
"postinstall": "yarn webdriver-update && yarn husky install",
@@ -135,6 +135,7 @@
135135
"chokidar": "^3.5.2",
136136
"copy-webpack-plugin": "10.2.4",
137137
"critters": "0.0.16",
138+
"cross-env": "^7.0.3",
138139
"css-loader": "6.7.1",
139140
"debug": "^4.1.1",
140141
"esbuild": "0.14.38",

yarn.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4385,14 +4385,21 @@ [email protected]:
43854385
postcss "^8.3.7"
43864386
pretty-bytes "^5.3.0"
43874387

4388+
cross-env@^7.0.3:
4389+
version "7.0.3"
4390+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
4391+
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
4392+
dependencies:
4393+
cross-spawn "^7.0.1"
4394+
43884395
43894396
version "3.1.5"
43904397
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
43914398
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
43924399
dependencies:
43934400
node-fetch "2.6.7"
43944401

4395-
cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
4402+
cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
43964403
version "7.0.3"
43974404
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
43984405
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==

0 commit comments

Comments
 (0)