Skip to content
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

refactor: remove pnpm_version from npm_translate_lock bzlmod extension #1576

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions npm/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ LATEST_PNPM_VERSION = _LATEST_PNPM_VERSION
def _npm_extension_impl(module_ctx):
for mod in module_ctx.modules:
for attr in mod.tags.npm_translate_lock:
# TODO(2.0): remove pnpm_version from bzlmod API
if attr.pnpm_version:
fail("npm_translate_lock paramater 'pnpm_version' is not supported with bzlmod, use `use_pnpm` instead, received value: '{}'")

npm_translate_lock(
name = attr.name,
bins = attr.bins,
Expand Down Expand Up @@ -63,7 +59,6 @@ def _npm_extension_impl(module_ctx):
verify_patches = attr.verify_patches,
yarn_lock = attr.yarn_lock,
bzlmod = True,
pnpm_version = None,
)

for attr in mod.tags.npm_translate_lock:
Expand Down Expand Up @@ -225,11 +220,6 @@ def _npm_translate_lock_attrs():
attrs["name"] = attr.string()
attrs["lifecycle_hooks_exclude"] = attr.string_list(default = [])
attrs["lifecycle_hooks_no_sandbox"] = attr.bool(default = True)

# Note, pnpm_version can't be a tuple here, so we can't accept the integrity hash.
# This is okay since you can just call the pnpm module extension below first.
# TODO(2.0): drop pnpm_version from this module extension
attrs["pnpm_version"] = attr.string(mandatory = False)
attrs["run_lifecycle_hooks"] = attr.bool(default = True)

# Args defaulted differently by the macro
Expand Down