diff --git a/BUILD.bazel b/BUILD.bazel index 42564e09..100f9473 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -5,7 +5,7 @@ load("@bazel_skylib//lib:dicts.bzl", "dicts") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@rules_prerender_npm//:defs.bzl", "npm_link_all_packages") load("//tools/publish:defs.bzl", "npm_publish") -load("//tools/stamping:stamp_package.bzl", "stamp_package") +load("//tools/stamping:defs.bzl", "stamp_package") load("//tools/typescript:defs.bzl", "types_only") load("//:index.bzl", "link_prerender_component", "prerender_component") diff --git a/packages/declarative_shadow_dom/BUILD.bazel b/packages/declarative_shadow_dom/BUILD.bazel index eb286275..b111bc2d 100644 --- a/packages/declarative_shadow_dom/BUILD.bazel +++ b/packages/declarative_shadow_dom/BUILD.bazel @@ -10,7 +10,7 @@ load( load("//tools/jasmine:defs.bzl", "jasmine_node_test") load("//tools/typescript:defs.bzl", "ts_project") load("//tools/publish:defs.bzl", "npm_publish") -load("//tools/stamping:stamp_package.bzl", "stamp_package") +load("//tools/stamping:defs.bzl", "stamp_package") prerender_component_publish_files( name = "declarative_shadow_dom_publish_files", diff --git a/tools/stamping/BUILD.bazel b/tools/stamping/BUILD.bazel index ff9b16e7..baa9b78e 100644 --- a/tools/stamping/BUILD.bazel +++ b/tools/stamping/BUILD.bazel @@ -4,6 +4,12 @@ load(":stamp_package.bzl", "stamp_package") exports_files(["stamp.jq"], visibility = ["//visibility:public"]) +bzl_library( + name = "defs", + srcs = ["defs.bzl"], + deps = [":stamp_package"], +) + bzl_library( name = "stamp_package", srcs = ["stamp_package.bzl"], diff --git a/tools/stamping/defs.bzl b/tools/stamping/defs.bzl new file mode 100644 index 00000000..14b1b5e7 --- /dev/null +++ b/tools/stamping/defs.bzl @@ -0,0 +1,5 @@ +load(":stamp_package.bzl", _stamp_package = "stamp_package") + +visibility("public") + +stamp_package = _stamp_package diff --git a/tools/stamping/stamp_package.bzl b/tools/stamping/stamp_package.bzl index db6a36c6..7816f746 100644 --- a/tools/stamping/stamp_package.bzl +++ b/tools/stamping/stamp_package.bzl @@ -1,6 +1,8 @@ load("@aspect_bazel_lib//lib:jq.bzl", "jq") load("@bazel_skylib//rules:write_file.bzl", "write_file") +visibility("private") + def stamp_package( name, package = "package.json",