Skip to content

Commit

Permalink
refactor: remove entry_point attribute from ng_package targets (#…
Browse files Browse the repository at this point in the history
…43431)

With the changes to support APF v13 in the `ng_package` rule, we have
removed the ambiguous `entry_point` attribute. The attribute suggested
that it would be used for determining the primary entry-point input
file. This was not the case as the flat module output file is consulted
for bundling et at. The attribute has been renamed to match its
purposed (renamed to `primary_bundle_name`).

We no longer need to set that attribute because the primary bundle
name is (1) not of relevance for consumers and (2) the rule already
infers the bundle name properly from the Bazel package.

PR Close #43431
  • Loading branch information
devversion authored and dylhunn committed Oct 1, 2021
1 parent 49b82ae commit e6046c9
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion integration/bazel/src/hello-world/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ ng_ts_library(

ng_package(
name = "npm_package",
entry_point = ":index.ts",
deps = [":hello-world"],
)

Expand Down
1 change: 0 additions & 1 deletion packages/animations/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ ng_package(
"//packages/animations/browser:package.json",
"//packages/animations/browser/testing:package.json",
],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ng_package(
"//packages/common/testing:package.json",
"//packages/common/upgrade:package.json",
],
entry_point = ":index.ts",
nested_packages = ["//packages/common/locales:package"],
tags = [
"release-with-framework",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ng_package(
srcs = [
"package.json",
],
entry_point = ":index.ts",
deps = [
":fake_common",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ng_package(
srcs = [
"package.json",
],
entry_point = ":index.ts",
deps = [
":fake_core",
],
Expand Down
2 changes: 0 additions & 2 deletions packages/compiler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ ng_package(
"package.json",
"//packages/compiler/testing:package.json",
],
entry_point = ":compiler.ts",
include_devmode_srcs = True,
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ ng_package(
"package.json",
"//packages/core/testing:package.json",
],
entry_point = ":index.ts",
nested_packages = [
"//packages/core/schematics:npm_package",
],
Expand Down
1 change: 0 additions & 1 deletion packages/elements/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ng_module(
ng_package(
name = "npm_package",
srcs = ["package.json"],
entry_point = ":index.ts",
nested_packages = [
"//packages/elements/schematics:npm_package",
],
Expand Down
1 change: 0 additions & 1 deletion packages/forms/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ ng_module(
ng_package(
name = "npm_package",
srcs = ["package.json"],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/localize/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ng_package(
"package.json",
"//packages/localize/init:package.json",
],
entry_point = ":index.ts",
nested_packages = [
"//packages/localize/schematics:npm_package",
"//packages/localize/src/tools:npm_package",
Expand Down
1 change: 0 additions & 1 deletion packages/misc/angular-in-memory-web-api/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ ng_module(
ng_package(
name = "npm_package",
srcs = ["package.json"],
entry_point = ":index.ts",
deps = [
":angular-in-memory-web-api",
],
Expand Down
1 change: 0 additions & 1 deletion packages/platform-browser-dynamic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ ng_package(
"package.json",
"//packages/platform-browser-dynamic/testing:package.json",
],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/platform-browser/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ng_package(
"//packages/platform-browser/animations:package.json",
"//packages/platform-browser/testing:package.json",
],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/platform-server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ ng_package(
"//packages/platform-server/init:package.json",
"//packages/platform-server/testing:package.json",
],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/router/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ ng_package(
"//packages/router/testing:package.json",
"//packages/router/upgrade:package.json",
],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/service-worker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ ng_package(
"//packages/service-worker/config",
"//packages/service-worker/config:schema.json",
],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
1 change: 0 additions & 1 deletion packages/upgrade/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ ng_package(
"//packages/upgrade/static:package.json",
"//packages/upgrade/static/testing:package.json",
],
entry_point = ":index.ts",
tags = [
"release-with-framework",
],
Expand Down
4 changes: 2 additions & 2 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "nodejs_binary", "ts_config")

package(default_visibility = ["//visibility:public"])

exports_files([
"tsconfig.json",
"jasmine-seed-generator.js",
Expand Down

0 comments on commit e6046c9

Please sign in to comment.