Skip to content

Commit 71b811b

Browse files
committed
build: simplify bazel dependencies
1 parent 1eb633d commit 71b811b

File tree

14 files changed

+116
-75
lines changed

14 files changed

+116
-75
lines changed

WORKSPACE

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,63 @@
11
workspace(name = "angular_devkit")
22

3-
BAZEL_SKYLIB_VERSION = "0.3.1"
3+
# We get Buildifier from here.
44
http_archive(
5-
name = "bazel_skylib",
6-
url = "https://github.com/bazelbuild/bazel-skylib/archive/%s.zip" % BAZEL_SKYLIB_VERSION,
7-
strip_prefix = "bazel-skylib-%s" % BAZEL_SKYLIB_VERSION,
8-
sha256 = "95518adafc9a2b656667bbf517a952e54ce7f350779d0dd95133db4eb5c27fb1",
5+
name = "com_github_bazelbuild_buildtools",
6+
url = "https://github.com/bazelbuild/buildtools/archive/0.15.0.zip",
7+
strip_prefix = "buildtools-0.15.0",
8+
sha256 = "76d1837a86fa6ef5b4a07438f8489f00bfa1b841e5643b618e01232ba884b1fe",
99
)
1010

11-
RULES_NODEJS_VERSION = "caae26b8cfc29838969e0614ebcb551a0e39ba26"
11+
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
12+
buildifier_dependencies()
13+
14+
# The Go toolchain is used for Buildifier.
15+
# rules_typescript_dependencies() also tries to load it but we add it explicitely so we
16+
# don't have hidden dependencies.
17+
# This also means we need to load it before rules_typescript_dependencies().
18+
http_archive(
19+
name = "io_bazel_rules_go",
20+
url = "https://github.com/bazelbuild/rules_go/archive/0.14.0.zip",
21+
strip_prefix = "rules_go-0.14.0",
22+
sha256 = "9bd7c2743f014e4e112b671098ba1da6aec036fe07093b10ca39a9f81ec5cc33",
23+
)
24+
25+
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
26+
go_rules_dependencies()
27+
go_register_toolchains()
28+
29+
# Load the NodeJS rules, check minimum Bazel version, and define the local node_modules.
1230
http_archive(
1331
name = "build_bazel_rules_nodejs",
14-
url = "https://github.com/bazelbuild/rules_nodejs/archive/%s.zip" % RULES_NODEJS_VERSION,
15-
strip_prefix = "rules_nodejs-%s" % RULES_NODEJS_VERSION,
16-
sha256 = "8b6978d03f58e9ce8e3c0034afd879d621f9387f693f5a8e1888241b0538a61f",
32+
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.11.5.zip",
33+
strip_prefix = "rules_nodejs-0.11.5",
34+
sha256 = "985bf908faa72cc4638c356a99d19ccac223e5dcd8dae695e3157e5c00f53489",
1735
)
1836

19-
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
37+
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
38+
rules_nodejs_dependencies()
2039

40+
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
2141
check_bazel_version("0.15.0")
22-
2342
node_repositories(package_json = ["//:package.json"])
2443

2544
local_repository(
2645
name = "rxjs",
2746
path = "node_modules/rxjs/src",
2847
)
2948

30-
RULES_WEBTESTING_VERSION = "0.2.1"
31-
http_archive(
32-
name = "io_bazel_rules_webtesting",
33-
url = "https://github.com/bazelbuild/rules_webtesting/archive/%s.zip" % RULES_WEBTESTING_VERSION,
34-
strip_prefix = "rules_webtesting-%s" % RULES_WEBTESTING_VERSION,
35-
sha256 = "7d490aadff9b5262e5251fa69427ab2ffd1548422467cb9f9e1d110e2c36f0fa",
36-
)
37-
38-
RULES_TYPESCRIPT_VERSION = "0.15.3"
49+
# Load the TypeScript rules, its dependencies, and setup the workspace.
3950
http_archive(
4051
name = "build_bazel_rules_typescript",
41-
url = "https://github.com/bazelbuild/rules_typescript/archive/%s.zip" % RULES_TYPESCRIPT_VERSION,
42-
strip_prefix = "rules_typescript-%s" % RULES_TYPESCRIPT_VERSION,
43-
sha256 = "a2b26ac3fc13036011196063db1bf7f1eae81334449201dc28087ebfa3708c99",
52+
url = "https://github.com/bazelbuild/rules_typescript/archive/0.16.1.zip",
53+
strip_prefix = "rules_typescript-0.16.1",
54+
sha256 = "5b2b0bc63cfcffe7bf97cad2dad3b26a73362f806de66207051f66c87956a995",
4455
)
4556

46-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
57+
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
58+
rules_typescript_dependencies()
4759

60+
load("@build_bazel_rules_typescript//:defs.bzl", "check_rules_typescript_version",
61+
"ts_setup_workspace")
62+
check_rules_typescript_version("0.16.1")
4863
ts_setup_workspace()
49-
50-
# We get tools like Buildifier from here
51-
BAZEL_BUILDTOOLS_VERSION = "0.15.0"
52-
http_archive(
53-
name = "com_github_bazelbuild_buildtools",
54-
url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION,
55-
strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION,
56-
sha256 = "76d1837a86fa6ef5b4a07438f8489f00bfa1b841e5643b618e01232ba884b1fe",
57-
)
58-
59-
# The Go toolchain is used for Buildifier and some TypeScript tooling.
60-
# We need to use this commit to include Windows path fixes.
61-
RULES_GO_VERSION = "0.14.0"
62-
http_archive(
63-
name = "io_bazel_rules_go",
64-
url = "https://github.com/bazelbuild/rules_go/archive/%s.zip" % RULES_GO_VERSION,
65-
strip_prefix = "rules_go-%s" % RULES_GO_VERSION,
66-
sha256 = "9bd7c2743f014e4e112b671098ba1da6aec036fe07093b10ca39a9f81ec5cc33",
67-
)
68-
69-
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
70-
71-
go_rules_dependencies()
72-
73-
go_register_toolchains()

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"typescript": "~2.9.2"
6565
},
6666
"devDependencies": {
67+
"@bazel/typescript": "0.16.1",
6768
"@ngtools/json-schema": "^1.1.0",
6869
"@types/copy-webpack-plugin": "^4.4.1",
6970
"@types/express": "^4.16.0",

packages/angular/cli/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

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

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

packages/angular/pwa/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

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

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

packages/angular_devkit/architect/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

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

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

packages/angular_devkit/architect_cli/BUILD

Lines changed: 1 addition & 1 deletion
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("//tools:defaults.bzl", "ts_library")
7+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
88

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

packages/angular_devkit/build_optimizer/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

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

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

packages/angular_devkit/core/BUILD

Lines changed: 1 addition & 1 deletion
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("//tools:defaults.bzl", "ts_library")
7+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
88
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
99

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

packages/angular_devkit/schematics/BUILD

Lines changed: 1 addition & 1 deletion
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("//tools:defaults.bzl", "ts_library")
7+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
88
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
99

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

packages/angular_devkit/schematics_cli/BUILD

Lines changed: 1 addition & 1 deletion
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("//tools:defaults.bzl", "ts_library")
7+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
88

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

packages/schematics/angular/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

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

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

packages/schematics/update/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

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

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

tools/defaults.bzl

Lines changed: 0 additions & 10 deletions
This file was deleted.

yarn.lock

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@
8787
dependencies:
8888
tslib "^1.9.0"
8989

90+
"@bazel/typescript@0.16.1":
91+
version "0.16.1"
92+
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.16.1.tgz#5a5d145a17898bfadae8268cf942815424119412"
93+
dependencies:
94+
protobufjs "5.0.0"
95+
tsickle "0.32.1"
96+
tsutils "2.20.0"
97+
9098
"@ngtools/json-schema@^1.1.0":
9199
version "1.1.0"
92100
resolved "https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.1.0.tgz#c3a0c544d62392acc2813a42c8a0dc6f58f86922"
@@ -686,6 +694,13 @@ asap@^2.0.0, asap@~2.0.3:
686694
version "2.0.6"
687695
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
688696

697+
ascli@~1:
698+
version "1.0.1"
699+
resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc"
700+
dependencies:
701+
colour "~0.7.1"
702+
optjs "~3.2.2"
703+
689704
asn1.js@^4.0.0:
690705
version "4.10.1"
691706
resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0"
@@ -1165,6 +1180,12 @@ builtins@^1.0.3:
11651180
version "1.0.3"
11661181
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
11671182

1183+
bytebuffer@~5:
1184+
version "5.0.1"
1185+
resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd"
1186+
dependencies:
1187+
long "~3"
1188+
11681189
bytes@3.0.0:
11691190
version "3.0.0"
11701191
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
@@ -1243,7 +1264,7 @@ camelcase@^1.0.2:
12431264
version "1.2.1"
12441265
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
12451266

1246-
camelcase@^2.0.0:
1267+
camelcase@^2.0.0, camelcase@^2.0.1:
12471268
version "2.1.1"
12481269
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
12491270

@@ -1388,7 +1409,7 @@ cliui@^2.1.0:
13881409
right-align "^0.1.1"
13891410
wordwrap "0.0.2"
13901411

1391-
cliui@^3.2.0:
1412+
cliui@^3.0.3, cliui@^3.2.0:
13921413
version "3.2.0"
13931414
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
13941415
dependencies:
@@ -1496,6 +1517,10 @@ colorspace@1.1.x:
14961517
color "3.0.x"
14971518
text-hex "1.0.x"
14981519

1520+
colour@~0.7.1:
1521+
version "0.7.1"
1522+
resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778"
1523+
14991524
combine-lists@^1.0.0:
15001525
version "1.0.1"
15011526
resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6"
@@ -3055,7 +3080,7 @@ glob@7.0.x:
30553080
once "^1.3.0"
30563081
path-is-absolute "^1.0.0"
30573082

3058-
glob@^5.0.15:
3083+
glob@^5.0.10, glob@^5.0.15:
30593084
version "5.0.15"
30603085
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
30613086
dependencies:
@@ -4475,7 +4500,7 @@ long@4.0.0:
44754500
version "4.0.0"
44764501
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
44774502

4478-
long@^3.2.0:
4503+
long@^3.2.0, long@~3:
44794504
version "3.2.0"
44804505
resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
44814506

@@ -5261,6 +5286,10 @@ optionator@^0.8.1:
52615286
type-check "~0.3.2"
52625287
wordwrap "~1.0.0"
52635288

5289+
optjs@~3.2.2:
5290+
version "3.2.2"
5291+
resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee"
5292+
52645293
original@>=0.0.5:
52655294
version "1.0.1"
52665295
resolved "https://registry.yarnpkg.com/original/-/original-1.0.1.tgz#b0a53ff42ba997a8c9cd1fb5daaeb42b9d693190"
@@ -5655,6 +5684,15 @@ promise@^7.1.1:
56555684
dependencies:
56565685
asap "~2.0.3"
56575686

5687+
protobufjs@5.0.0:
5688+
version "5.0.0"
5689+
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
5690+
dependencies:
5691+
ascli "~1"
5692+
bytebuffer "~5"
5693+
glob "^5.0.10"
5694+
yargs "^3.10.0"
5695+
56585696
protractor@~5.4.0:
56595697
version "5.4.0"
56605698
resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.0.tgz#e71c9c1f5cf6c5e9bdbcdb71e7f31b17ffd2878f"
@@ -7137,7 +7175,7 @@ ts-node@^5.0.0:
71377175
source-map-support "^0.5.3"
71387176
yn "^2.0.0"
71397177

7140-
tsickle@>=0.27.3, tsickle@^0.32.1:
7178+
tsickle@0.32.1, tsickle@>=0.27.3, tsickle@^0.32.1:
71417179
version "0.32.1"
71427180
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5"
71437181
dependencies:
@@ -7178,6 +7216,12 @@ tslint@^5.11.0:
71787216
tslib "^1.8.0"
71797217
tsutils "^2.27.2"
71807218

7219+
tsutils@2.20.0:
7220+
version "2.20.0"
7221+
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.20.0.tgz#303394064bc80be8ee04e10b8609ae852e9312d3"
7222+
dependencies:
7223+
tslib "^1.8.1"
7224+
71817225
tsutils@^2.27.2:
71827226
version "2.29.0"
71837227
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
@@ -7679,6 +7723,10 @@ window-size@0.1.0:
76797723
version "0.1.0"
76807724
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
76817725

7726+
window-size@^0.1.4:
7727+
version "0.1.4"
7728+
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876"
7729+
76827730
winston-transport@^4.2.0:
76837731
version "4.2.0"
76847732
resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.2.0.tgz#a20be89edf2ea2ca39ba25f3e50344d73e6520e5"
@@ -7778,7 +7826,7 @@ xxhashjs@^0.2.1:
77787826
dependencies:
77797827
cuint "^0.2.2"
77807828

7781-
y18n@^3.2.1:
7829+
y18n@^3.2.0, y18n@^3.2.1:
77827830
version "3.2.1"
77837831
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
77847832

@@ -7829,6 +7877,18 @@ yargs@11.0.0:
78297877
y18n "^3.2.1"
78307878
yargs-parser "^9.0.2"
78317879

7880+
yargs@^3.10.0:
7881+
version "3.32.0"
7882+
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995"
7883+
dependencies:
7884+
camelcase "^2.0.1"
7885+
cliui "^3.0.3"
7886+
decamelize "^1.1.1"
7887+
os-locale "^1.4.0"
7888+
string-width "^1.0.1"
7889+
window-size "^0.1.4"
7890+
y18n "^3.2.0"
7891+
78327892
yargs@^7.0.0:
78337893
version "7.1.0"
78347894
resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"

0 commit comments

Comments
 (0)