Skip to content

Commit

Permalink
More load visibility restrictions.
Browse files Browse the repository at this point in the history
Refs #67.
  • Loading branch information
dgp1130 committed Feb 19, 2023
1 parent f91b5a7 commit 346e745
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/label.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Utilities related to Bazel labels."""

visibility("public")

def absolute(
target,
repository_name = native.repository_name,
Expand Down
2 changes: 2 additions & 0 deletions common/label_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ load("@bazel_skylib//lib:partial.bzl", "partial")
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
load(":label.bzl", "absolute", "file_path_of", "rel_path")

visibility("private")

def _mock_self_repository_name():
return "@"

Expand Down
2 changes: 2 additions & 0 deletions common/paths.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Utilities based around file paths."""

visibility("public")

def is_js_file(src):
"""Returns whether or not the given src path is a JavaScript file."""
return src.endswith(".js") or src.endswith(".mjs") or src.endswith(".cjs")
2 changes: 2 additions & 0 deletions common/paths_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ load("@bazel_skylib//lib:partial.bzl", "partial")
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
load(":paths.bzl", "is_js_file")

visibility("private")

def _is_js_file_impl(ctx):
env = unittest.begin(ctx)

Expand Down
2 changes: 2 additions & 0 deletions packages/rules_prerender/css/tests/group/group_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ load("//packages/rules_prerender/css:css_group.bzl", "css_group")
load("//packages/rules_prerender/css:css_library.bzl", "css_library")
load("//packages/rules_prerender/css:css_providers.bzl", "CssImportMapInfo")

visibility("private")

def _css_group_test_impl(ctx):
env = analysistest.begin(ctx)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ load("//packages/rules_prerender/css:css_binaries.bzl", "css_binaries")
load("//packages/rules_prerender/css:css_library.bzl", "css_library")
load("//packages/rules_prerender/css:css_providers.bzl", "CssImportMapInfo")

visibility("private")

def _import_map_test_impl(ctx):
env = analysistest.begin(ctx)

Expand Down

0 comments on commit 346e745

Please sign in to comment.