diff --git a/docs/npm_translate_lock.md b/docs/npm_translate_lock.md index 6373fcd7e..ad81ee774 100644 --- a/docs/npm_translate_lock.md +++ b/docs/npm_translate_lock.md @@ -69,7 +69,7 @@ npm_translate_lock(<a href="#npm_translate_lock-name">name</a>, <a href="#npm_tr <a href="#npm_translate_lock-external_repository_action_cache">external_repository_action_cache</a>, <a href="#npm_translate_lock-link_workspace">link_workspace</a>, <a href="#npm_translate_lock-pnpm_version">pnpm_version</a>, <a href="#npm_translate_lock-use_pnpm">use_pnpm</a>, <a href="#npm_translate_lock-register_copy_directory_toolchains">register_copy_directory_toolchains</a>, <a href="#npm_translate_lock-register_copy_to_directory_toolchains">register_copy_to_directory_toolchains</a>, <a href="#npm_translate_lock-register_yq_toolchains">register_yq_toolchains</a>, <a href="#npm_translate_lock-register_tar_toolchains">register_tar_toolchains</a>, <a href="#npm_translate_lock-npm_package_target_name">npm_package_target_name</a>, - <a href="#npm_translate_lock-use_starlark_yaml_parser">use_starlark_yaml_parser</a>, <a href="#npm_translate_lock-package_json">package_json</a>, <a href="#npm_translate_lock-warn_on_unqualified_tarball_url">warn_on_unqualified_tarball_url</a>, <a href="#npm_translate_lock-kwargs">kwargs</a>) + <a href="#npm_translate_lock-use_starlark_yaml_parser">use_starlark_yaml_parser</a>, <a href="#npm_translate_lock-package_json">package_json</a>, <a href="#npm_translate_lock-kwargs">kwargs</a>) </pre> Repository macro to generate starlark code from a lock file. @@ -140,7 +140,6 @@ For more about how to use npm_translate_lock, read [pnpm and rules_js](/docs/pnp | <a id="npm_translate_lock-npm_package_target_name"></a>npm_package_target_name | The name of linked <code>npm_package</code> targets. When <code>npm_package</code> targets are linked as pnpm workspace packages, the name of the target must align with this value.<br><br>The <code>{dirname}</code> placeholder is replaced with the directory name of the target.<br><br>By default the directory name of the target is used.<br><br>Default: <code>{dirname}</code> | <code>"{dirname}"</code> | | <a id="npm_translate_lock-use_starlark_yaml_parser"></a>use_starlark_yaml_parser | Opt-out of using <code>yq</code> to parse the pnpm-lock file which was added in https://github.com/aspect-build/rules_js/pull/1458 and use the legacy starlark yaml parser instead.<br><br>This opt-out is a return safety in cases where yq is not able to parse the pnpm generated yaml file. For example, this has been observed to happen due to a line such as the following in the pnpm generated lock file:<br><br><pre><code> resolution: {tarball: https://gitpkg.vercel.app/blockprotocol/blockprotocol/packages/%40blockprotocol/type-system-web?6526c0e} </code></pre><br><br>where the <code>?</code> character in the <code>tarball</code> value causes <code>yq</code> to fail with:<br><br><pre><code> $ yq pnpm-lock.yaml -o=json Error: bad file 'pnpm-lock.yaml': yaml: line 7129: did not find expected ',' or '}' </code></pre><br><br>If the tarball value is quoted or escaped then yq would accept it but as of this writing, the latest version of pnpm (8.14.3) does not quote or escape such a value and the latest version of yq (4.40.5) does not handle it as is.<br><br>Possibly related to https://github.com/pnpm/pnpm/issues/5414. | <code>False</code> | | <a id="npm_translate_lock-package_json"></a>package_json | Deprecated.<br><br>Add all <code>package.json</code> files that are part of the workspace to <code>data</code> instead. | <code>None</code> | -| <a id="npm_translate_lock-warn_on_unqualified_tarball_url"></a>warn_on_unqualified_tarball_url | Deprecated. Will be removed in next major release. | <code>None</code> | | <a id="npm_translate_lock-kwargs"></a>kwargs | Internal use only | none | diff --git a/npm/private/npm_translate_lock.bzl b/npm/private/npm_translate_lock.bzl index 769b2cb97..1ed201d52 100644 --- a/npm/private/npm_translate_lock.bzl +++ b/npm/private/npm_translate_lock.bzl @@ -194,9 +194,6 @@ def npm_translate_lock( use_starlark_yaml_parser = False, # TODO(2.0): remove package_json package_json = None, - # TODO(2.0): remove warn_on_unqualified_tarball_url - # buildifier: disable=unused-variable - warn_on_unqualified_tarball_url = None, **kwargs): """Repository macro to generate starlark code from a lock file. @@ -527,8 +524,6 @@ def npm_translate_lock( Add all `package.json` files that are part of the workspace to `data` instead. - warn_on_unqualified_tarball_url: Deprecated. Will be removed in next major release. - npm_package_target_name: The name of linked `npm_package` targets. When `npm_package` targets are linked as pnpm workspace packages, the name of the target must align with this value.