diff --git a/js/BUILD.bazel b/js/BUILD.bazel index 930d91ca65..2bd38d15d6 100644 --- a/js/BUILD.bazel +++ b/js/BUILD.bazel @@ -1,8 +1,8 @@ "Public API" +load("@aspect_bazel_lib//lib:utils.bzl", "is_bazel_7_or_greater") load("@bazel_features//:features.bzl", "bazel_features") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("//js/private:is_bazel_7_or_greater.bzl", "is_bazel_7_or_greater") exports_files( glob(["*.bzl"]), diff --git a/js/private/BUILD.bazel b/js/private/BUILD.bazel index 5b8bddc84d..2844995707 100644 --- a/js/private/BUILD.bazel +++ b/js/private/BUILD.bazel @@ -1,10 +1,10 @@ "Internal implementation details" load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin") +load("@aspect_bazel_lib//lib:utils.bzl", "is_bazel_7_or_greater") load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("//js:defs.bzl", "js_binary") -load("//js/private:is_bazel_7_or_greater.bzl", "is_bazel_7_or_greater") exports_files( glob(["*.bzl"]), diff --git a/js/private/is_bazel_7_or_greater.bzl b/js/private/is_bazel_7_or_greater.bzl deleted file mode 100644 index 0a9b740fd7..0000000000 --- a/js/private/is_bazel_7_or_greater.bzl +++ /dev/null @@ -1,7 +0,0 @@ -"is_bazel_7_or_greater" - -def is_bazel_7_or_greater(): - # Vendored in from https://github.com/aspect-build/bazel-lib/blob/adad7889c925c4f22a2f84568268f0a62e7c2fb0/lib/private/utils.bzl#L208 - # so that rules_js remains compatible with aspect_bazel_lib >= 2.0.0 and < 2.2.0. - # TODO(2.0): remove this and switch to the upstream function and bump minimum aspect_bazel_lib version to 2.2.0 - return "apple_binary" not in dir(native) and "cc_host_toolchain_alias" not in dir(native) diff --git a/npm/private/BUILD.bazel b/npm/private/BUILD.bazel index ba4e774a40..f1b64d9e46 100644 --- a/npm/private/BUILD.bazel +++ b/npm/private/BUILD.bazel @@ -1,12 +1,10 @@ "Internal implementation details" load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains") +load("@aspect_bazel_lib//lib:utils.bzl", "is_bazel_7_or_greater") load("@aspect_rules_js//js:defs.bzl", "js_library") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -# buildifier: disable=bzl-visibility -load("//js/private:is_bazel_7_or_greater.bzl", "is_bazel_7_or_greater") - js_library( name = "npm_publish_mjs", srcs = ["npm_publish.mjs"],