Skip to content

Commit

Permalink
chore: deprecate unused npm_translate_lock warn_on_unqualified_tarbal…
Browse files Browse the repository at this point in the history
…l_url param (#505)
  • Loading branch information
gregmagolan authored Oct 8, 2022
1 parent 8381380 commit 92bc063
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ npm_translate_lock(
"[email protected]": ["examples/npm_deps"],
},
verify_node_modules_ignored = "//:.bazelignore",
warn_on_unqualified_tarball_url = False,
)

load("@npm//:repositories.bzl", "npm_repositories")
Expand Down
2 changes: 1 addition & 1 deletion docs/npm_import.md

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

2 changes: 1 addition & 1 deletion js/private/js_run_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def js_run_binary(
# by the users BUILD file (e.g. for "typescript_bin.tsc(outs = [])" we'd wish to say
# "try using tsc_binary instead")
# buildifier: disable=print
print("""\
print("""
WARNING: {name} is not configured to produce outputs.
If this is a generated bin from package_json.bzl, consider using the *_binary or *_test variant instead.
Expand Down
7 changes: 4 additions & 3 deletions npm/npm_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def npm_translate_lock(
bins = {},
lifecycle_hooks_no_sandbox = True,
verify_node_modules_ignored = None,
warn_on_unqualified_tarball_url = True,
# TODO(2.0): remove warn_on_unqualified_tarball_url
# buildifier: disable=unused-variable
warn_on_unqualified_tarball_url = None,
link_workspace = None,
pnpm_version = LATEST_PNPM_VERSION):
"""Repository rule to generate npm_import rules from pnpm lock file or from a package.json and yarn/npm lock file.
Expand Down Expand Up @@ -301,7 +303,7 @@ def npm_translate_lock(
See https://github.com/bazelbuild/bazel/issues/8106
warn_on_unqualified_tarball_url: Warn if an unqualified tarball url is encountered
warn_on_unqualified_tarball_url: Deprecated. Will be removed in next major release.
link_workspace: The workspace name where links will be created for the packages in this lock file.
Expand Down Expand Up @@ -360,7 +362,6 @@ def npm_translate_lock(
bins = bins_string_list_dict,
lifecycle_hooks_no_sandbox = lifecycle_hooks_no_sandbox,
verify_node_modules_ignored = verify_node_modules_ignored,
warn_on_unqualified_tarball_url = warn_on_unqualified_tarball_url,
link_workspace = link_workspace,
)

Expand Down
4 changes: 2 additions & 2 deletions npm/private/npm_translate_lock.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ _ATTRS = {
"bins": attr.string_list_dict(),
"lifecycle_hooks_no_sandbox": attr.bool(default = True),
"verify_node_modules_ignored": attr.label(),
"warn_on_unqualified_tarball_url": attr.bool(default = True),
"link_workspace": attr.string(),
}

Expand Down Expand Up @@ -195,7 +194,8 @@ def get_npm_auth(npmrc, npmrc_path, environ):
if token in environ.keys() and environ[token]:
token = environ[token]
else:
print("""\
# buildifier: disable=print
print("""
WARNING: Issue while reading "{npmrc}". Failed to replace env in config: ${{{token}}}
""".format(
npmrc = npmrc_path,
Expand Down

0 comments on commit 92bc063

Please sign in to comment.