4
4
# found in the LICENSE file at https://angular.dev/license
5
5
6
6
load ("@npm//@bazel/jasmine:index.bzl" , "jasmine_node_test" )
7
- load ("//tools:defaults.bzl" , "pkg_npm" )
8
- load ("//tools:interop.bzl" , "ts_project" )
7
+ load ("//tools:defaults2.bzl" , "npm_package" , "ts_project" )
9
8
load ("//tools:ts_json_schema.bzl" , "ts_json_schema" )
10
9
11
10
licenses (["notice" ])
@@ -36,6 +35,27 @@ ALL_SCHEMA_TARGETS = [
36
35
for (src , name ) in ALL_SCHEMA_TARGETS
37
36
]
38
37
38
+ RUNTIME_ASSETS = [
39
+ "collection.json" ,
40
+ "migrations/migration-collection.json" ,
41
+ "package.json" ,
42
+ "utility/latest-versions/package.json" ,
43
+ ] + glob (
44
+ include = [
45
+ "*/schema.json" ,
46
+ "*/files/**/*" ,
47
+ "*/other-files/**/*" ,
48
+ "*/implements-files/**/*" ,
49
+ "*/type-files/**/*" ,
50
+ "*/functional-files/**/*" ,
51
+ "*/class-files/**/*" ,
52
+ ],
53
+ exclude = [
54
+ # NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
55
+ "node_modules/**" ,
56
+ ],
57
+ )
58
+
39
59
ts_project (
40
60
name = "angular" ,
41
61
srcs = glob (
@@ -58,26 +78,7 @@ ts_project(
58
78
"//packages/schematics/angular:" + src .replace (".json" , ".ts" )
59
79
for (src , _ ) in ALL_SCHEMA_TARGETS
60
80
],
61
- data = [
62
- "collection.json" ,
63
- "migrations/migration-collection.json" ,
64
- "package.json" ,
65
- "utility/latest-versions/package.json" ,
66
- ] + glob (
67
- include = [
68
- "*/schema.json" ,
69
- "*/files/**/*" ,
70
- "*/other-files/**/*" ,
71
- "*/implements-files/**/*" ,
72
- "*/type-files/**/*" ,
73
- "*/functional-files/**/*" ,
74
- "*/class-files/**/*" ,
75
- ],
76
- exclude = [
77
- # NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
78
- "node_modules/**" ,
79
- ],
80
- ),
81
+ data = RUNTIME_ASSETS ,
81
82
module_name = "@schematics/angular" ,
82
83
deps = [
83
84
"//:root_modules/@inquirer/prompts" ,
@@ -138,19 +139,22 @@ genrule(
138
139
cmd = "cp $(execpath //:LICENSE) $@" ,
139
140
)
140
141
141
- pkg_npm (
142
- name = "npm_package " ,
142
+ npm_package (
143
+ name = "pkg " ,
143
144
pkg_deps = [
144
145
"//packages/angular_devkit/schematics:package.json" ,
145
146
"//packages/angular_devkit/core:package.json" ,
146
147
],
148
+ stamp_files = [
149
+ "utility/latest-versions.js" ,
150
+ ],
147
151
tags = ["release-package" ],
148
- deps = [
152
+ deps = RUNTIME_ASSETS + [
149
153
":README.md" ,
150
- ":angular " ,
154
+ ":angular_rjs " ,
151
155
":license" ,
152
- ":migrations/migration-collection.json" ,
153
- ":utility/latest-versions/package.json" ,
154
156
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript:LICENSE" ,
157
+ # Force typescript library to be included.
158
+ "//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript:lib/typescript.js" ,
155
159
],
156
160
)
0 commit comments