| # Copyright 2017 The Bazel Authors. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| load("@bazel_skylib//:bzl_library.bzl", "bzl_library") | |
| load("@build_bazel_rules_nodejs//:index.bzl", "generated_file_test") | |
| package(default_visibility = ["//visibility:public"]) | |
| exports_files([ | |
| "node_patches.cjs", | |
| "require_patch.cjs", | |
| ]) | |
| bzl_library( | |
| name = "bzl", | |
| srcs = glob(["*.bzl"]), | |
| visibility = ["//visibility:public"], | |
| deps = [ | |
| "//internal/npm_install:bzl", | |
| "//third_party/github.com/bazelbuild/bazel-skylib:bzl", | |
| "@bazel_skylib//lib:types", | |
| "@bazel_skylib//lib:versions", | |
| "@rules_nodejs//nodejs:bzl", | |
| ], | |
| ) | |
| exports_files([ | |
| "node.bzl", # Exported to be consumed for generating stardoc. | |
| "node_repositories.bzl", # Exported to be consumed for generating stardoc. | |
| "launcher.sh", | |
| ]) | |
| filegroup( | |
| name = "package_contents", | |
| srcs = glob([ | |
| "*.bzl", | |
| "*.cjs", | |
| "*.sh", | |
| ]) + [ | |
| "BUILD.bazel", | |
| ], | |
| visibility = ["//:__pkg__"], | |
| ) | |
| # BEGIN-INTERNAL | |
| # To update node_patches.js run: | |
| # bazel run //internal/node:checked_in_node_patches.update | |
| generated_file_test( | |
| name = "checked_in_node_patches", | |
| src = "node_patches.cjs", | |
| generated = "//packages/node-patches:bundle", | |
| # For some reason rollup produces different, non-matching output with --config=no-runfiles | |
| tags = ["fix-windows"], | |
| ) | |
| # END-INTERNAL |