From 8efe69027498eed9f7c43868f9d46be9a6651691 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Tue, 2 Apr 2024 19:50:38 -0400 Subject: [PATCH] refactor: remove pnpm_version from npm_translate_lock bzlmod extension (#1576) --- npm/extensions.bzl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/npm/extensions.bzl b/npm/extensions.bzl index 6f18063d6..dce281607 100644 --- a/npm/extensions.bzl +++ b/npm/extensions.bzl @@ -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. @@ -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): @@ -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