Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit fa24bc6

Browse files
devversionalan-agius4
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 c5b6b34)
1 parent e459a18 commit fa24bc6

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
@@ -23,7 +23,7 @@
2323
},
2424
"scripts": {
2525
"lint": "eslint --cache --max-warnings=0 \"**/*.ts\"",
26-
"ng-dev": "ts-node --esm --project .ng-dev/tsconfig.json node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs",
26+
"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",
2727
"build": "npm run bazel:build",
2828
"bazel:build": "bazel build //modules/...",
2929
"test": "bazel test //modules/...",
@@ -71,6 +71,7 @@
7171
"@typescript-eslint/parser": "5.23.0",
7272
"browser-sync": "^2.26.7",
7373
"critters": "0.0.16",
74+
"cross-env": "^7.0.3",
7475
"domino": "^2.1.2",
7576
"esbuild": "^0.14.0",
7677
"eslint": "8.15.0",

yarn.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4117,14 +4117,21 @@ [email protected]:
41174117
postcss "^8.3.7"
41184118
pretty-bytes "^5.3.0"
41194119

4120+
cross-env@^7.0.3:
4121+
version "7.0.3"
4122+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
4123+
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
4124+
dependencies:
4125+
cross-spawn "^7.0.1"
4126+
41204127
41214128
version "3.1.5"
41224129
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
41234130
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
41244131
dependencies:
41254132
node-fetch "2.6.7"
41264133

4127-
cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
4134+
cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
41284135
version "7.0.3"
41294136
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
41304137
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==

0 commit comments

Comments
 (0)