First iteration of rules_nodejs cleanups#29531
Merged
alan-agius4 merged 7 commits intoangular:mainfrom Jan 30, 2025
Merged
Conversation
clydin
approved these changes
Jan 29, 2025
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.
alan-agius4
reviewed
Jan 30, 2025
| @@ -1,5 +1,5 @@ | |||
| load("@aspect_rules_js//js:defs.bzl", "js_library") | |||
alan-agius4
reviewed
Jan 30, 2025
| @@ -1,5 +1,9 @@ | |||
| load("@aspect_bazel_lib//lib:copy_to_bin.bzl", _copy_to_bin = "copy_to_bin") | |||
Collaborator
There was a problem hiding this comment.
NIT: as a followup we can probably rename this now.
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits