Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 83b51ec

Browse files
devversiondgp1130
authored andcommittedJun 23, 2022
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.
1 parent 8431b3f commit 83b51ec

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
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": "11.0.0",
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.42",

‎yarn.lock

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177

178178
"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#262cb3bb487e8dddb3c404f4f2c8b34a9a1f14c2":
179179
version "0.0.0-860ebf16b8617ce999394c2c70a8af307bb0ddc2"
180-
uid "262cb3bb487e8dddb3c404f4f2c8b34a9a1f14c2"
181180
resolved "https://github.com/angular/dev-infra-private-builds.git#262cb3bb487e8dddb3c404f4f2c8b34a9a1f14c2"
182181
dependencies:
183182
"@angular-devkit/build-angular" "14.1.0-next.1"
@@ -3809,14 +3808,21 @@ critters@0.0.16:
38093808
postcss "^8.3.7"
38103809
pretty-bytes "^5.3.0"
38113810

3811+
cross-env@^7.0.3:
3812+
version "7.0.3"
3813+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
3814+
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
3815+
dependencies:
3816+
cross-spawn "^7.0.1"
3817+
38123818
cross-fetch@3.1.5:
38133819
version "3.1.5"
38143820
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
38153821
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
38163822
dependencies:
38173823
node-fetch "2.6.7"
38183824

3819-
cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
3825+
cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
38203826
version "7.0.3"
38213827
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
38223828
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==

0 commit comments

Comments
 (0)
Please sign in to comment.