Skip to content

Commit

Permalink
refactor: remove deprecated lifecycle_hooks_no_sandbox from npm_import (
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Apr 23, 2024
1 parent 417c163 commit b597869
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
4 changes: 1 addition & 3 deletions docs/npm_import.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion npm/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def _npm_import_bzlmod(i):
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,
Expand Down
10 changes: 0 additions & 10 deletions npm/private/npm_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,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.
Expand Down Expand Up @@ -1170,10 +1168,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
"""

Expand Down Expand Up @@ -1216,10 +1210,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)

Expand Down

0 comments on commit b597869

Please sign in to comment.