Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove deprecated lifecycle_hooks_no_sandbox from npm_import #1573

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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,
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 @@ -914,8 +914,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 @@ -1164,10 +1162,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 @@ -1210,10 +1204,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