Skip to content

Commit 4e262f9

Browse files
alexeaglehansl
authored andcommitted
build: Update to latest bazel rules
1 parent 64b83e2 commit 4e262f9

File tree

20 files changed

+210
-1100
lines changed

20 files changed

+210
-1100
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
# If you change the cache key prefix, also sync the restore_cache fallback to match.
1616
# Keep the static part of the cache key as prefix to enable correct fallbacks.
1717
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
18-
var_1: &docker_image angular/ngcontainer:0.7.0
19-
var_2: &cache_key angular_devkit-0.7.0-{{ checksum "yarn.lock" }}
18+
var_1: &docker_image angular/ngcontainer:0.10.0
19+
var_2: &cache_key angular_devkit-0.10.0-{{ checksum "yarn.lock" }}
2020
var_3: &node_8_docker_image angular/ngcontainer:0.3.3
2121

2222
# Settings common to each job

WORKSPACE

+36-45
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,32 @@
11
workspace(name = "angular_cli")
22

3+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
34
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
45

5-
# This is required by Angular Workspace
66
http_archive(
7-
name = "bazel_skylib",
8-
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.5.0.zip",
9-
strip_prefix = "bazel-skylib-0.5.0",
10-
sha256 = "ca4e3b8e4da9266c3a9101c8f4704fe2e20eb5625b2a6a7d2d7d45e3dd4efffd",
7+
name = "build_bazel_rules_nodejs",
8+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.26.0/rules_nodejs-0.26.0.tar.gz"],
9+
sha256 = "5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c",
1110
)
1211

13-
# We get Buildifier from here.
14-
http_archive(
15-
name = "com_github_bazelbuild_buildtools",
16-
url = "https://github.com/bazelbuild/buildtools/archive/0.15.0.zip",
17-
strip_prefix = "buildtools-0.15.0",
18-
sha256 = "76d1837a86fa6ef5b4a07438f8489f00bfa1b841e5643b618e01232ba884b1fe",
19-
)
20-
21-
# Load the TypeScript rules, its dependencies, and setup the workspace.
22-
http_archive(
23-
name = "build_bazel_rules_typescript",
24-
url = "https://github.com/bazelbuild/rules_typescript/archive/0.22.1.zip",
25-
strip_prefix = "rules_typescript-0.22.1",
26-
sha256 = "351abe89b291a3b3d6af38d9d04c6270f5d2ed8781e2fda25bc65fd12db25e66",
27-
)
28-
29-
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
30-
# build_bazel_rules_nodejs is loaded transitively through rules_typescript_dependencies.
31-
rules_typescript_dependencies()
32-
33-
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
34-
buildifier_dependencies()
35-
36-
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
37-
go_rules_dependencies()
38-
go_register_toolchains()
39-
4012
# TS API Guardian resides in Angular
4113
http_archive(
4214
name = "angular",
43-
url = "https://github.com/angular/angular/archive/7.2.0.zip",
44-
strip_prefix = "angular-7.2.0",
45-
sha256 = "8a4915a524f3fed17424da4b77cd7a943fbbddba44275f06671493339713914b",
15+
sha256 = "5a5a56c93e454b6fb3d470e2f49f6c47db85d25765fca0f26276c71c2263be38",
16+
strip_prefix = "angular-7.2.7",
17+
url = "https://github.com/angular/angular/archive/7.2.7.zip",
4618
)
4719

48-
load("@angular//:index.bzl", "ng_setup_workspace")
49-
ng_setup_workspace()
20+
# We use protocol buffers for the Build Event Protocol
21+
git_repository(
22+
name = "com_google_protobuf",
23+
remote = "https://github.com/protocolbuffers/protobuf",
24+
commit = "b6375e03aa80274dae89410efdf46346413b2247",
25+
)
5026

51-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
52-
ts_setup_workspace()
27+
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
28+
29+
protobuf_deps()
5330

5431
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
5532
# 0.18.0 is needed for .bazelignore
@@ -92,9 +69,23 @@ yarn_install(
9269
],
9370
)
9471

95-
http_archive(
96-
name = "rxjs",
97-
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
98-
strip_prefix = "package/src",
99-
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
100-
)
72+
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
73+
install_bazel_dependencies()
74+
75+
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
76+
77+
ts_setup_workspace()
78+
79+
# Load karma dependencies
80+
load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies")
81+
82+
rules_karma_dependencies()
83+
84+
# Setup the rules_webtesting toolchain
85+
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
86+
87+
web_test_repositories()
88+
89+
load("@angular//:index.bzl", "ng_setup_workspace")
90+
91+
ng_setup_workspace()

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
"devDependencies": {
7878
"@angular/compiler": "^8.0.0-beta.0",
7979
"@angular/compiler-cli": "^8.0.0-beta.0",
80-
"@bazel/karma": "^0.22.1",
81-
"@bazel/typescript": "0.22.1",
80+
"@bazel/karma": "~0.26.0",
81+
"@bazel/typescript": "~0.26.0",
8282
"@ngtools/json-schema": "^1.1.0",
8383
"@types/copy-webpack-plugin": "^4.4.1",
8484
"@types/express": "^4.16.0",

packages/angular/cli/BUILD

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
licenses(["notice"]) # MIT
77

8-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
8+
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
99
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1010

1111
package(default_visibility = ["//visibility:public"])
@@ -33,6 +33,7 @@ ts_library(
3333
"@npm//@types/node",
3434
"@npm//@types/inquirer",
3535
"@npm//@types/semver",
36+
"@npm//rxjs",
3637
],
3738
)
3839

packages/angular/pwa/BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
licenses(["notice"]) # MIT
77

8-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
8+
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
99
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1010

1111
package(default_visibility = ["//visibility:public"])
@@ -29,7 +29,7 @@ ts_library(
2929
":pwa_schema",
3030
"//packages/angular_devkit/core",
3131
"//packages/angular_devkit/schematics",
32-
"@rxjs",
32+
"@npm//rxjs",
3333
"@npm//@types/node",
3434
],
3535
)

packages/angular_devkit/architect/BUILD

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
licenses(["notice"]) # MIT
77

8-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
8+
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
99
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
1010
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1111

@@ -43,8 +43,8 @@ ts_library(
4343
deps = [
4444
"//packages/angular_devkit/core",
4545
"//packages/angular_devkit/core:node",
46-
"@rxjs",
47-
"@rxjs//operators",
46+
"@npm//rxjs",
47+
4848
"@npm//@types/node",
4949
":architect",
5050
":builder_builders_schema",
@@ -69,8 +69,8 @@ ts_library(
6969
deps = [
7070
"//packages/angular_devkit/core",
7171
"//packages/angular_devkit/core:node",
72-
"@rxjs",
73-
"@rxjs//operators",
72+
"@npm//rxjs",
73+
7474
"@npm//@types/node",
7575
":builder_input_schema",
7676
":builder_output_schema",
@@ -93,8 +93,8 @@ ts_library(
9393
":architect",
9494
"//packages/angular_devkit/core",
9595
"//packages/angular_devkit/core:node",
96-
"@rxjs",
97-
"@rxjs//operators",
96+
"@npm//rxjs",
97+
9898
"@npm//@types/node",
9999
],
100100
)

packages/angular_devkit/architect_cli/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# found in the LICENSE file at https://angular.io/license
55
package(default_visibility = ["//visibility:public"])
66

7-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
7+
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
88

99
licenses(["notice"]) # MIT
1010

@@ -19,8 +19,8 @@ ts_library(
1919
"//packages/angular_devkit/architect:node",
2020
"//packages/angular_devkit/core",
2121
"//packages/angular_devkit/core:node",
22-
"@rxjs",
23-
"@rxjs//operators",
22+
"@npm//rxjs",
23+
2424
"@npm//@types/node",
2525
"@npm//@types/minimist",
2626
"@npm//@types/progress",

packages/angular_devkit/benchmark/BUILD

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
licenses(["notice"]) # MIT
77

8-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
8+
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
99
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package")
1010

1111
package(default_visibility = ["//visibility:public"])
@@ -25,8 +25,8 @@ ts_library(
2525
deps = [
2626
"//packages/angular_devkit/core",
2727
"//packages/angular_devkit/core:node",
28-
"@rxjs",
29-
"@rxjs//operators",
28+
"@npm//rxjs",
29+
3030
"@npm//@types/node",
3131
"@npm//@types/minimist",
3232
],
@@ -49,8 +49,8 @@ ts_library(
4949
":benchmark",
5050
"//packages/angular_devkit/core",
5151
"//packages/angular_devkit/core:node",
52-
"@rxjs",
53-
"@rxjs//operators",
52+
"@npm//rxjs",
53+
5454
"@npm//@types/node",
5555
"@npm//@types/jasmine",
5656
],

packages/angular_devkit/build_optimizer/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
licenses(["notice"]) # MIT
77

8-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
8+
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
99
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package")
1010

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

packages/angular_devkit/core/BUILD

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# found in the LICENSE file at https://angular.io/license
55
package(default_visibility = ["//visibility:public"])
66

7-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
7+
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
88
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package")
99

1010
licenses(["notice"]) # MIT License
@@ -28,8 +28,8 @@ ts_library(
2828
module_root = "src/index.d.ts",
2929
# strict_checks = False,
3030
deps = [
31-
"@rxjs",
32-
"@rxjs//operators",
31+
"@npm//rxjs",
32+
3333
"@npm//@types/node",
3434
"@npm//@types/source-map",
3535
"@npm//ajv",
@@ -51,8 +51,8 @@ ts_library(
5151
deps = [
5252
":core",
5353
":node",
54-
"@rxjs",
55-
"@rxjs//operators",
54+
"@npm//rxjs",
55+
5656
"@npm//@types/node",
5757
"@npm//@types/jasmine",
5858
],
@@ -94,8 +94,8 @@ ts_library(
9494
module_root = "node/index.d.ts",
9595
deps = [
9696
":core",
97-
"@rxjs",
98-
"@rxjs//operators",
97+
"@npm//rxjs",
98+
9999
"@npm//@types/node",
100100
],
101101
)
@@ -112,8 +112,8 @@ ts_library(
112112
":core",
113113
":node",
114114
"//tests/angular_devkit/core/node/jobs:jobs_test_lib",
115-
"@rxjs",
116-
"@rxjs//operators",
115+
"@npm//rxjs",
116+
117117
"@npm//@types/node",
118118
"@npm//@types/jasmine",
119119
],
@@ -154,8 +154,8 @@ ts_library(
154154
deps = [
155155
":core",
156156
":node",
157-
"@rxjs",
158-
"@rxjs//operators",
157+
"@npm//rxjs",
158+
159159
"@npm//@types/node",
160160
"@npm//@types/jasmine",
161161
],

0 commit comments

Comments
 (0)