blob: f22e397b3eadb52ed5787457a06c17ea35832a82 [file] [log] [blame]
Sean Condon98b6ddb2019-12-24 08:07:40 +00001diff --git a/node_modules/@angular/bazel/src/ng_package/ng_package.bzl b/node_modules/@angular/bazel/src/ng_package/ng_package.bzl
Sean Condona3ad7792020-01-04 19:26:34 +00002index 55bd685..3666382 100755
Sean Condon98b6ddb2019-12-24 08:07:40 +00003--- a/node_modules/@angular/bazel/src/ng_package/ng_package.bzl
4+++ b/node_modules/@angular/bazel/src/ng_package/ng_package.bzl
5@@ -15,9 +15,9 @@ specification of this format at https://goo.gl/jB3GVv
6
7 load("@build_bazel_rules_nodejs//:providers.bzl", "JSEcmaScriptModuleInfo", "JSNamedModuleInfo", "NpmPackageInfo", "node_modules_aspect")
8 load(
9- "@build_bazel_rules_nodejs//internal/npm_package:npm_package.bzl",
10- "NPM_PACKAGE_ATTRS",
11- "NPM_PACKAGE_OUTPUTS",
12+ "@build_bazel_rules_nodejs//internal/pkg_npm:pkg_npm.bzl",
13+ "PKG_NPM_ATTRS",
14+ "PKG_NPM_OUTPUTS",
15 "create_package",
16 )
17 load("//src:external.bzl", "FLAT_DTS_FILE_SUFFIX")
18@@ -619,7 +619,7 @@ def _ng_package_impl(ctx):
19 if JSNamedModuleInfo in dep:
20 devfiles = depset(transitive = [devfiles, dep[JSNamedModuleInfo].sources])
21
22- # Re-use the create_package function from the nodejs npm_package rule.
23+ # Re-use the create_package function from the nodejs pkg_npm rule.
24 package_dir = create_package(
25 ctx,
26 devfiles.to_list(),
27@@ -631,7 +631,7 @@ def _ng_package_impl(ctx):
28
29 _NG_PACKAGE_DEPS_ASPECTS = [esm5_outputs_aspect, ng_package_module_mappings_aspect, node_modules_aspect]
30
31-_NG_PACKAGE_ATTRS = dict(NPM_PACKAGE_ATTRS, **{
32+_NG_PACKAGE_ATTRS = dict(PKG_NPM_ATTRS, **{
33 "srcs": attr.label_list(
34 doc = """JavaScript source files from the workspace.
35 These can use ES2015 syntax and ES Modules (import/export)""",
36@@ -807,12 +807,12 @@ def _ng_package_outputs(name, entry_point, entry_point_name):
37 "umd": "%s.umd.js" % basename,
38 "umd_min": "%s.umd.min.js" % basename,
39 }
40- for key in NPM_PACKAGE_OUTPUTS:
41- # NPM_PACKAGE_OUTPUTS is a "normal" dict-valued outputs so it looks like
42+ for key in PKG_NPM_OUTPUTS:
43+ # PKG_NPM_OUTPUTS is a "normal" dict-valued outputs so it looks like
44 # "pack": "%{name}.pack",
45 # But this is a function-valued outputs.
46 # Bazel won't replace the %{name} token so we have to do it.
47- outputs[key] = NPM_PACKAGE_OUTPUTS[key].replace("%{name}", name)
48+ outputs[key] = PKG_NPM_OUTPUTS[key].replace("%{name}", name)
49 return outputs
50
51 ng_package = rule(