Skip to content

Commit 7e91830

Browse files
authored
build: avoid use of ts-node wrapper script as it breaks child process forking (#1703)
`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.
1 parent 4ff7a30 commit 7e91830

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
],
201201
"main": "./dist/client/extension",
202202
"scripts": {
203-
"ng-dev": "ts-node --esm --project .ng-dev/tsconfig.json node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs",
203+
"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",
204204
"compile": "tsc -b server/banner.tsconfig.json && tsc -b && node esbuild.js",
205205
"compile:test": "tsc -b test.tsconfig.json",
206206
"compile:integration": "tsc -b integration && yarn --cwd integration/project build",
@@ -229,11 +229,12 @@
229229
"@types/node": "14.18.16",
230230
"@types/vscode": "1.67.0",
231231
"clang-format": "1.8.0",
232+
"cross-env": "^7.0.3",
232233
"esbuild": "0.14.39",
233234
"jasmine": "3.99.0",
234235
"prettier": "2.6.2",
235-
"tslint": "6.1.3",
236236
"ts-node": "^10.8.1",
237+
"tslint": "6.1.3",
237238
"tslint-eslint-rules": "5.4.0",
238239
"vsce": "1.100.1",
239240
"vscode-languageserver-protocol": "3.16.0",

yarn.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3090,7 +3090,14 @@ [email protected]:
30903090
postcss "^8.3.7"
30913091
pretty-bytes "^5.3.0"
30923092

3093-
cross-spawn@^7.0.3:
3093+
cross-env@^7.0.3:
3094+
version "7.0.3"
3095+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
3096+
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
3097+
dependencies:
3098+
cross-spawn "^7.0.1"
3099+
3100+
cross-spawn@^7.0.1, cross-spawn@^7.0.3:
30943101
version "7.0.3"
30953102
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
30963103
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==

0 commit comments

Comments
 (0)