Skip to content

Commit 7e7fe32

Browse files
committed
build: avoid use of yarn ts-node to avoid nested yarn execution (#25111)
We can directly use `ts-node` to avoid printing errors twice when the nested execution fails. e.g. ``` Not enough non-option arguments: got 0, need at least 1 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` (cherry picked from commit a7b0bfb)
1 parent aa6c751 commit 7e7fe32

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"scripts": {
1717
"postinstall": "node tools/postinstall/apply-patches.js",
18-
"ng-dev": "yarn ts-node --esm --project .ng-dev/tsconfig.json node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs",
18+
"ng-dev": "ts-node --esm --project .ng-dev/tsconfig.json node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs",
1919
"build": "ts-node --esm --project scripts/tsconfig.json ./scripts/build-packages-dist-main.mts",
2020
"build-docs-content": "ts-node --esm --project scripts/tsconfig.json ./scripts/build-docs-content-main.mts",
2121
"build-and-check-release-output": "ts-node --esm --project scripts/tsconfig.json scripts/build-and-check-release-output.mts",

tools/defaults.bzl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ def ng_package(name, srcs = [], deps = [], externals = PKG_EXTERNALS, readme_md
198198
# two mappings for `@angular/cdk` and the linker will complain. For a better development
199199
# experience, we want the mapping to resolve to the direct outputs of the `ts_library`
200200
# instead of requiring tests and other targets to assemble the NPM package first.
201-
# TODO(devversion): consider removing this if `rules_nodejs` allows for duplicate
202-
# linker mappings where transitive-determined mappings are skipped on conflicts.
203-
# https://github.com/bazelbuild/rules_nodejs/issues/2810.
204201
package_name = None,
205202
validate = False,
206203
readme_md = readme_md,
@@ -233,9 +230,6 @@ def pkg_npm(name, visibility = None, **kwargs):
233230
# two mappings for `@angular/cdk` and the linker will complain. For a better development
234231
# experience, we want the mapping to resolve to the direct outputs of the `ts_library`
235232
# instead of requiring tests and other targets to assemble the NPM package first.
236-
# TODO(devversion): consider removing this if `rules_nodejs` allows for duplicate
237-
# linker mappings where transitive-determined mappings are skipped on conflicts.
238-
# https://github.com/bazelbuild/rules_nodejs/issues/2810.
239233
package_name = None,
240234
validate = False,
241235
substitutions = npmPackageSubstitutions,

0 commit comments

Comments
 (0)