Skip to content

Conversation

devversion
Copy link
Member

See individual commits

@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Jan 29, 2025
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Jan 29, 2025
@devversion devversion requested a review from clydin January 29, 2025 16:30
Replaces usages of `rules_nodejs` `copy_to_bin` with the
`rules_js`/Aspect bazel lib equivalent.
Migrates to `rules_js` and simplifies! the `ts_json_schema` rule
Migrates the CLI schema generation to `rules_js`, also significantly
simplifying the rule boilerplate.
This is necessary so that we can delete the `pkg_npm` macro and fully
leverage the `rules_js` variant.
This file is currently no longer necessary after migrating all consumers
to their `rules_js` variants, so we can delete the file.

In follow-ups we will consider renaming `defaults2.bzl` back to this
file, or have a better name altogether.
This dependency does not provide any value for the `ts_project`
compilation, nor does it seem to be necessary; so we are cleaning up
this dependency.
Switches the beasties bundling to `rules_js`, using rollup directly from
the node modules installation.

Notably we are facing a small issue that doesn't cause any issues right
now, because rollup tries to dereference symlinks by default given
a bug: aspect-build/rules_js#1827.

This means we can't rely on the jailed resolution, but in practice it
shouldn't cause an issue at this point.
@@ -1,5 +1,5 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!!

@@ -1,5 +1,9 @@
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", _copy_to_bin = "copy_to_bin")
Copy link
Collaborator

@alan-agius4 alan-agius4 Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: as a followup we can probably rename this now.

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 30, 2025
@alan-agius4 alan-agius4 merged commit c0d20e0 into angular:main Jan 30, 2025
31 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants