-
Notifications
You must be signed in to change notification settings - Fork 11.9k
build: migrate @angular-devkit/architect
to npm_package
#29312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
711bbcb
to
29b6e8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Migrates the `@angular-devkit/architect` package to the `rules_js` npm package rule, consuming the direct `rules_ts` output JS files. Notably, substitution is FAR different than what it used to be with `rules_nodejs`, so we needed some extra work to leverage `make_template` for substitutions in `package.json` files. **Keep in mind** that for now, this does not apply to any other files; so we only substitute in the `package.json`, but not in e.g. `.js` files as before. We will follow-up on this. The other jq merging/filtering for snapshot or tar references in `package.json` files is kept as is, and is temporarily duplicated. This is acceptable as the migration should be pretty smooth and quick.
29b6e8f
to
2c63962
Compare
Include JSON files
67ea36f
to
fee3b95
Compare
tools/defaults2.bzl
Outdated
out = "substituted_with_snapshot_repos/package.json", | ||
) | ||
|
||
expand_template( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is newly added. The rest above is the same like before.
tools/defaults2.bzl
Outdated
stamp_substitutions = get_npm_package_substitutions_for_rjs(), | ||
) | ||
|
||
_npm_package( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly the same as before too. Just that copy_files_to_directory
is now _npm_package
.
@@ -0,0 +1,8 @@ | |||
load("//tools:interop.bzl", _ts_project = "ts_project") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: maybe a more meaningful filename? (defaults-interop
) etc..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we'll rename that in a follow-up. Probably bazel/ts_project_interop.bzl
The changes were merged into the following branches: main, 19.1.x |
Proof that this change didn't affect npm output: angular/angular-devkit-architect-builds@83afe99 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Migrates the
@angular-devkit/architect
package to therules_js
npm package rule, consuming the directrules_ts
output JS files.Notably, substitution is FAR different than what it used to be with
rules_nodejs
, so we needed some extra work to leveragemake_template
for substitutions inpackage.json
files. Keep in mind that for now, this does not apply to any other files; so we only substitute in thepackage.json
, but not in e.g..js
files as before. We will follow-up on this.The other jq merging/filtering for snapshot or tar references in
package.json
files is kept as is, and is temporarily duplicated. This is acceptable as the migration should be pretty smooth and quick.