Skip to content

Commit 780dfb4

Browse files
authored
fix: fencing for npm packages (#946)
and other minor cleanups
1 parent 7708858 commit 780dfb4

File tree

13 files changed

+71
-21
lines changed

13 files changed

+71
-21
lines changed

internal/rollup/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ nodejs_binary(
8787
)
8888

8989
# BEGIN-INTERNAL
90-
# TODO: switch to npm_bazel_jasmine
9190
# buildozer: disable=load-on-top
9291
# buildozer: disable=out-of-order-load
9392
load("@npm_bazel_jasmine//:index.from_src.bzl", "jasmine_node_test")

packages/jasmine/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
15+
load("@build_bazel_rules_nodejs//:defs.bzl", "COMMON_REPLACEMENTS", "npm_package")
1616

1717
# Copy the license from our parent folder
1818
genrule(
@@ -40,6 +40,7 @@ npm_package(
4040
srcs = [
4141
"@npm_bazel_jasmine//:package_contents",
4242
],
43+
replacements = COMMON_REPLACEMENTS,
4344
vendor_external = [
4445
"npm_bazel_jasmine",
4546
],

packages/jasmine/src/BUILD.bazel

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Copyright 2019 The Bazel Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# BEGIN-INTERNAL
16+
# Parts of this BUILD file only necessary when building from source.
17+
# The generated `@bazel/jasmine` npm package contains a trimmed BUILD file using INTERNAL fences.
118
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
219
load("@build_bazel_rules_nodejs//internal/js_library:js_library.bzl", "js_library")
320

@@ -31,3 +48,4 @@ js_library(
3148
],
3249
module_name = "@bazel/jasmine",
3350
)
51+
# END-INTERNAL

packages/karma/src/BUILD.bazel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# BEGIN-INTERNAL
1616
# Parts of this BUILD file only necessary when building from source.
17-
# The generated `@bazel/karma` npm package contains a trimmed BUILD file using # INTERNAL fences.
17+
# The generated `@bazel/karma` npm package contains a trimmed BUILD file using INTERNAL fences.
1818
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1919
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
2020
load("@npm_bazel_typescript//:index.from_src.bzl", "ts_library")
@@ -82,4 +82,6 @@ filegroup(
8282
)
8383

8484
# END-INTERNAL
85-
exports_files(["karma.conf.js"])
85+
exports_files([
86+
"karma.conf.js",
87+
])

packages/labs/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
1+
load("@build_bazel_rules_nodejs//:defs.bzl", "COMMON_REPLACEMENTS", "npm_package")
22

33
exports_files(["tsconfig.json"])
44

@@ -14,6 +14,7 @@ npm_package(
1414
srcs = [
1515
"@npm_bazel_labs//:package_contents",
1616
],
17+
replacements = COMMON_REPLACEMENTS,
1718
vendor_external = [
1819
"npm_bazel_labs",
1920
],

packages/labs/src/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# BEGIN-INTERNAL
16+
# Parts of this BUILD file only necessary when building from source.
17+
# The generated `@bazel/labs` npm package contains a trimmed BUILD file using INTERNAL fences.
1518
package(default_visibility = ["//visibility:public"])
1619

1720
exports_files(["tsconfig.json"])
@@ -25,3 +28,4 @@ filegroup(
2528
"//webpack:package_contents",
2629
],
2730
)
31+
# END-INTERNAL

packages/labs/src/webpack/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# limitations under the License.
1414

1515
# BEGIN-INTERNAL
16+
# Parts of this BUILD file only necessary when building from source.
17+
# The generated `@bazel/labs` npm package contains a trimmed BUILD file using INTERNAL fences.
1618
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
1719
load("@npm_bazel_typescript//:index.from_src.bzl", "ts_library")
1820

packages/protractor/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
15+
load("@build_bazel_rules_nodejs//:defs.bzl", "COMMON_REPLACEMENTS", "npm_package")
1616

1717
# Copy the license from our parent folder
1818
genrule(
@@ -40,6 +40,7 @@ npm_package(
4040
srcs = [
4141
"@npm_bazel_protractor//:package_contents",
4242
],
43+
replacements = COMMON_REPLACEMENTS,
4344
vendor_external = [
4445
"npm_bazel_protractor",
4546
],

packages/stylus/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
15+
load("@build_bazel_rules_nodejs//:defs.bzl", "COMMON_REPLACEMENTS", "npm_package")
1616

1717
# Copy the license from our parent folder
1818
genrule(
@@ -40,6 +40,7 @@ npm_package(
4040
srcs = [
4141
"@npm_bazel_stylus//:package_contents",
4242
],
43+
replacements = COMMON_REPLACEMENTS,
4344
vendor_external = [
4445
"npm_bazel_stylus",
4546
],

packages/stylus/src/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# BEGIN-INTERNAL
16+
# Parts of this BUILD file only necessary when building from source.
17+
# The generated `@bazel/stylus` npm package contains a trimmed BUILD file using INTERNAL fences.
1518
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1619

1720
package(default_visibility = ["//visibility:public"])
@@ -33,3 +36,4 @@ filegroup(
3336
"package.json",
3437
],
3538
)
39+
# END-INTERNAL

0 commit comments

Comments
 (0)