diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 23cfe49e1..05f74f566 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -66,14 +66,3 @@ EOF awk 'f;/--SNIP--/{f=1}' e2e/workspace/WORKSPACE echo "\`\`\`" - -cat <name, verify_node_modules_ignored, verify_patches, quiet, external_repository_action_cache, link_workspace, pnpm_version, use_pnpm, register_copy_directory_toolchains, register_copy_to_directory_toolchains, - register_yq_toolchains, register_tar_toolchains, npm_package_target_name, - use_starlark_yaml_parser, kwargs) + register_coreutils_toolchains, register_yq_toolchains, register_tar_toolchains, + npm_package_target_name, use_starlark_yaml_parser, kwargs) Repository macro to generate starlark code from a lock file. @@ -135,6 +135,7 @@ For more about how to use npm_translate_lock, read [pnpm and rules_js](/docs/pnp | use_pnpm | label of the pnpm extension to use.

Can be left unspecified and the rules_js default pnpm extension (with the LATEST_PNPM_VERSION) will be used.

Use pnpm_version for non-bzlmod. | None | | 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 | +| register_coreutils_toolchains | if True, @aspect_bazel_lib//lib:repositories.bzl register_coreutils_toolchains() is called if the toolchain is not already registered | True | | register_yq_toolchains | if True, @aspect_bazel_lib//lib:repositories.bzl register_yq_toolchains() is called if the toolchain is not already registered | True | | register_tar_toolchains | if True, @aspect_bazel_lib//lib:repositories.bzl register_tar_toolchains() is called if the toolchain is not already registered | True | | 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.

The {dirname} placeholder is replaced with the directory name of the target.

By default the directory name of the target is used.

Default: {dirname} | "{dirname}" | diff --git a/e2e/pnpm_workspace/WORKSPACE b/e2e/pnpm_workspace/WORKSPACE index 90b27fab5..dd33ea19d 100644 --- a/e2e/pnpm_workspace/WORKSPACE +++ b/e2e/pnpm_workspace/WORKSPACE @@ -12,12 +12,10 @@ http_archive( url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.6.1/bazel-lib-v2.6.1.tar.gz", ) -load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_coreutils_toolchains") +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") aspect_bazel_lib_dependencies() -register_coreutils_toolchains() - load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies") rules_js_dependencies() diff --git a/e2e/pnpm_workspace_deps/WORKSPACE b/e2e/pnpm_workspace_deps/WORKSPACE index 73c5b8d78..aaeb000e7 100644 --- a/e2e/pnpm_workspace_deps/WORKSPACE +++ b/e2e/pnpm_workspace_deps/WORKSPACE @@ -12,12 +12,10 @@ http_archive( url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.6.1/bazel-lib-v2.6.1.tar.gz", ) -load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_coreutils_toolchains") +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") aspect_bazel_lib_dependencies() -register_coreutils_toolchains() - load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies") rules_js_dependencies() diff --git a/npm/extensions.bzl b/npm/extensions.bzl index 8644664c6..060b97d78 100644 --- a/npm/extensions.bzl +++ b/npm/extensions.bzl @@ -65,6 +65,7 @@ def _npm_translate_lock_bzlmod(attr): quiet = attr.quiet, register_copy_directory_toolchains = False, # this registration is handled elsewhere with bzlmod register_copy_to_directory_toolchains = False, # this registration is handled elsewhere with bzlmod + register_coreutils_toolchains = False, # this registration is handled elsewhere with bzlmod register_yq_toolchains = False, # this registration is handled elsewhere with bzlmod register_tar_toolchains = False, # this registration is handled elsewhere with bzlmod replace_packages = attr.replace_packages, diff --git a/npm/private/npm_translate_lock.bzl b/npm/private/npm_translate_lock.bzl index 5dab4f2a0..be112d978 100644 --- a/npm/private/npm_translate_lock.bzl +++ b/npm/private/npm_translate_lock.bzl @@ -26,7 +26,14 @@ Advanced users may want to directly fetch a package from npm rather than start f """ load("@bazel_skylib//lib:paths.bzl", "paths") -load("@aspect_bazel_lib//lib:repositories.bzl", _register_copy_directory_toolchains = "register_copy_directory_toolchains", _register_copy_to_directory_toolchains = "register_copy_to_directory_toolchains", _register_tar_toolchains = "register_tar_toolchains", _register_yq_toolchains = "register_yq_toolchains") +load( + "@aspect_bazel_lib//lib:repositories.bzl", + _register_copy_directory_toolchains = "register_copy_directory_toolchains", + _register_copy_to_directory_toolchains = "register_copy_to_directory_toolchains", + _register_coreutils_toolchains = "register_coreutils_toolchains", + _register_tar_toolchains = "register_tar_toolchains", + _register_yq_toolchains = "register_yq_toolchains", +) load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file") load(":list_sources.bzl", "list_sources") load(":npm_translate_lock_generate.bzl", "generate_repository_files") @@ -188,6 +195,7 @@ def npm_translate_lock( use_pnpm = None, register_copy_directory_toolchains = True, register_copy_to_directory_toolchains = True, + register_coreutils_toolchains = True, register_yq_toolchains = True, register_tar_toolchains = True, npm_package_target_name = "{dirname}", @@ -514,6 +522,8 @@ def npm_translate_lock( 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 + register_coreutils_toolchains: if True, `@aspect_bazel_lib//lib:repositories.bzl` `register_coreutils_toolchains()` is called if the toolchain is not already registered + register_yq_toolchains: if True, `@aspect_bazel_lib//lib:repositories.bzl` `register_yq_toolchains()` is called if the toolchain is not already registered register_tar_toolchains: if True, `@aspect_bazel_lib//lib:repositories.bzl` `register_tar_toolchains()` is called if the toolchain is not already registered @@ -560,6 +570,8 @@ def npm_translate_lock( _register_copy_directory_toolchains() if register_copy_to_directory_toolchains and not native.existing_rule("copy_to_directory_toolchains"): _register_copy_to_directory_toolchains() + if register_coreutils_toolchains and not native.existing_rule("register_coreutils_toolchains"): + _register_coreutils_toolchains() if register_yq_toolchains and not native.existing_rule("yq_toolchains"): _register_yq_toolchains() if register_tar_toolchains and not native.existing_rule("tar_toolchains"):