From 4aef88f922d0a007217f2aa46e5e2d5599c29ac0 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Tue, 2 Apr 2024 19:31:56 -0400 Subject: [PATCH] refactor: remove deprecated lifecycle_hooks_no_sandbox from npm_import (#1573) --- docs/npm_import.md | 4 +--- npm/extensions.bzl | 1 - npm/private/npm_import.bzl | 10 ---------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/docs/npm_import.md b/docs/npm_import.md index 260956f96..7617c7edf 100644 --- a/docs/npm_import.md +++ b/docs/npm_import.md @@ -29,8 +29,7 @@ npm_import(name, pa lifecycle_hooks_env, lifecycle_hooks_use_default_shell_env, integrity, url, commit, replace_package, package_visibility, patch_args, patches, custom_postinstall, npm_auth, npm_auth_basic, npm_auth_username, npm_auth_password, bins, dev, - register_copy_directory_toolchains, register_copy_to_directory_toolchains, - lifecycle_hooks_no_sandbox, kwargs) + register_copy_directory_toolchains, register_copy_to_directory_toolchains, kwargs) Import a single npm package into Bazel. @@ -164,7 +163,6 @@ Read more about the downloader config: <https://blog.aspect.dev/configuring-b | dev | Whether this npm package is a dev dependency | False | | register_copy_directory_toolchains | if True, @aspect_bazel_lib//lib:repositories.bzl register_copy_directory_toolchains() is called if the toolchain is not already registered | True | | register_copy_to_directory_toolchains | if True, @aspect_bazel_lib//lib:repositories.bzl register_copy_to_directory_toolchains() is called if the toolchain is not already registered | True | -| lifecycle_hooks_no_sandbox | If True, adds "no-sandbox" to lifecycle_hooks_execution_requirements.

Deprecated. Add "no-sandbox" to lifecycle_hooks_execution_requirements instead. | None | | kwargs | Internal use only | none | diff --git a/npm/extensions.bzl b/npm/extensions.bzl index fd1ce8fc9..fe6bb6a83 100644 --- a/npm/extensions.bzl +++ b/npm/extensions.bzl @@ -193,7 +193,6 @@ WARNING: Cannot determine home directory in order to load home `.npmrc` file in lifecycle_hooks = i.lifecycle_hooks, lifecycle_hooks_env = i.lifecycle_hooks_env, lifecycle_hooks_execution_requirements = i.lifecycle_hooks_execution_requirements, - lifecycle_hooks_no_sandbox = i.lifecycle_hooks_no_sandbox, lifecycle_hooks_use_default_shell_env = i.lifecycle_hooks_use_default_shell_env, link_packages = i.link_packages, link_workspace = i.link_workspace, diff --git a/npm/private/npm_import.bzl b/npm/private/npm_import.bzl index 7ad29fe34..4e87da8e0 100644 --- a/npm/private/npm_import.bzl +++ b/npm/private/npm_import.bzl @@ -915,8 +915,6 @@ def npm_import( dev = False, register_copy_directory_toolchains = True, register_copy_to_directory_toolchains = True, - # TODO(2.0): remove lifecycle_hooks_no_sandbox from npm_import - lifecycle_hooks_no_sandbox = None, **kwargs): """Import a single npm package into Bazel. @@ -1165,10 +1163,6 @@ def npm_import( register_copy_to_directory_toolchains: if True, `@aspect_bazel_lib//lib:repositories.bzl` `register_copy_to_directory_toolchains()` is called if the toolchain is not already registered - lifecycle_hooks_no_sandbox: If True, adds "no-sandbox" to `lifecycle_hooks_execution_requirements`. - - Deprecated. Add "no-sandbox" to `lifecycle_hooks_execution_requirements` instead. - **kwargs: Internal use only """ @@ -1211,10 +1205,6 @@ def npm_import( extract_full_archive = extract_full_archive, ) - if lifecycle_hooks_no_sandbox: - if "no-sandbox" not in lifecycle_hooks_execution_requirements: - lifecycle_hooks_execution_requirements.append("no-sandbox") - has_custom_postinstall = not (not custom_postinstall) has_lifecycle_hooks = not (not lifecycle_hooks)