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 May 7, 2024
1 parent 0626425 commit 89a21e3
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_bzlmod(attr)

# We cannot read the pnpm_lock file before it has been bootstrapped.
Expand Down Expand Up @@ -80,7 +76,6 @@ def _npm_translate_lock_bzlmod(attr):
verify_patches = attr.verify_patches,
yarn_lock = attr.yarn_lock,
bzlmod = True,
pnpm_version = None,
)

def _npm_lock_imports_bzlmod(module_ctx, attr):
Expand Down Expand Up @@ -233,11 +228,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 89a21e3

Please sign in to comment.