Skip to content

Commit

Permalink
refactor: remove pnpm_version from npm_translate_lock bzlmod extension (
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Apr 6, 2024
1 parent a0a0a52 commit 8362cda
Showing 1 changed file with 0 additions and 10 deletions.
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 @@ -227,11 +222,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

0 comments on commit 8362cda

Please sign in to comment.