-
-
Notifications
You must be signed in to change notification settings - Fork 122
fix(npm): replace npm_translate_lock(replace_packages) with replace_package module extension #1886
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
base: main
Are you sure you want to change the base?
Conversation
@@ -26,13 +26,22 @@ def _npm_extension_impl(module_ctx): | |||
fail("A minimum version of Bazel 6 required to use rules_js") | |||
|
|||
for mod in module_ctx.modules: | |||
replace_packages = {} |
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.
Should this be computed outside the module_ctx.modules
loop?
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.
probably, since module extensions have a global view over the build, in theory you could have a translate lock from module A and a replacement coming from module B.
1ee7f68
to
e06bb0a
Compare
@@ -26,13 +26,22 @@ def _npm_extension_impl(module_ctx): | |||
fail("A minimum version of Bazel 6 required to use rules_js") | |||
|
|||
for mod in module_ctx.modules: | |||
replace_packages = {} |
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.
probably, since module extensions have a global view over the build, in theory you could have a translate lock from module A and a replacement coming from module B.
|
e06bb0a
to
30fdb9a
Compare
8d7ad3d
to
c7112b5
Compare
591b1b9
to
f847434
Compare
7582f4a
to
9a24802
Compare
9a24802
to
c1aaaa0
Compare
A replacement of the
npm_translate_lock(replace_packages)
API for bzlmod to ensure labels are passed from the user module instead of strings.Changes are visible to end-users: no
Test plan