Skip to content

Commit b3a0037

Browse files
gregmagolanjelbourn
authored andcommitted
build: update to Angular 7.0.1 http_archive & @angular/bazel package (#13831)
* Update to Angular & @angular/bazel 7.0.1 * Remove sha256 from io_bazel_rules_sass http_archive
1 parent a479366 commit b3a0037

File tree

7 files changed

+69
-53
lines changed

7 files changed

+69
-53
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ build --symlink_prefix=/
1212
# Performance: avoid stat'ing input files
1313
build --watchfs
1414

15+
# Turn off legacy external runfiles
16+
run --nolegacy_external_runfiles
17+
test --nolegacy_external_runfiles
18+
1519
###############################
1620
# Output control #
1721
###############################

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# To validate changes, use an online parser, eg.
88
# http://yaml-online-parser.appspot.com/
99

10-
var_1: &docker_image angular/ngcontainer:0.6.0
11-
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0
10+
var_1: &docker_image angular/ngcontainer:0.7.0
11+
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.7.0
1212

1313
# Settings common to each job
1414
var_3: &job_defaults

WORKSPACE

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,20 @@ http_archive(
55
name = "build_bazel_rules_nodejs",
66
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.3.zip",
77
strip_prefix = "rules_nodejs-0.15.3",
8-
sha256 = "05afbbc13b0b7d5056e412d66c98853978bd46a94bc8e7b71c7fba4349b77eef",
98
)
109

1110
# Add TypeScript rules
1211
http_archive(
1312
name = "build_bazel_rules_typescript",
14-
url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip",
15-
strip_prefix = "rules_typescript-0.20.3",
16-
sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3",
13+
url = "https://github.com/bazelbuild/rules_typescript/archive/8ea1a55cf5cf8be84ddfeefc0940769b80da792f.zip",
14+
strip_prefix = "rules_typescript-8ea1a55cf5cf8be84ddfeefc0940769b80da792f",
1715
)
1816

19-
# Fetch transient dependencies of the TypeScript bazel rules.
20-
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
21-
rules_typescript_dependencies()
22-
23-
# Add sass rules
24-
http_archive(
25-
name = "io_bazel_rules_sass",
26-
url = "https://github.com/bazelbuild/rules_sass/archive/1.14.1.zip",
27-
strip_prefix = "rules_sass-1.14.1",
28-
sha256 = "d8b89e47b05092a6eed3fa199f2de7cf671a4b9165d0bf38f12a0363dda928d3",
29-
)
30-
31-
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
32-
sass_repositories()
33-
3417
# Add Angular source and Bazel rules.
3518
http_archive(
3619
name = "angular",
37-
# Locked to commit "07b89902d5178afefeedeb18d316f4a1c77c6025" that has been merged after v7.0.0
38-
# has been released. This explicitly used version of angular/angular includes the latest changes
39-
# to @angular/bazel that have been merged from the `bazel` branch into `master.`
40-
# TODO(devversion): start using release archives once 7.0.1 is available w/ the Bazel changes.
41-
url = "https://github.com/angular/angular/archive/07b89902d5178afefeedeb18d316f4a1c77c6025.zip",
42-
strip_prefix = "angular-07b89902d5178afefeedeb18d316f4a1c77c6025",
43-
sha256 = "6439dcd01afa5ef3456f9f454ba546a385f7fc56bbc8b6e4ec990dbd9773ba8f",
20+
url = "https://github.com/angular/angular/archive/7.0.1.zip",
21+
strip_prefix = "angular-7.0.1",
4422
)
4523

4624
# Add RxJS as repository because those are needed in order to build Angular from source.
@@ -53,10 +31,40 @@ http_archive(
5331
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
5432
)
5533

34+
# Add sass rules
35+
http_archive(
36+
name = "io_bazel_rules_sass",
37+
url = "https://github.com/bazelbuild/rules_sass/archive/1.14.1.zip",
38+
strip_prefix = "rules_sass-1.14.1",
39+
)
40+
41+
# Since we are explitly fetching @build_bazel_rules_typescript, we should explicly
42+
# ask for its transitive deps from the version we fetched since
43+
# rules_angular_dependencies() will load transitive deps for the version
44+
# it would fetch transitively
45+
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
46+
rules_typescript_dependencies()
47+
48+
# Since we are explitly fetching @build_bazel_rules_nodejs, we should explicly
49+
# ask for its transitive deps from the version we fetched since
50+
# rules_angular_dependencies() will load transitive deps for the version
51+
# it would fetch transitively
52+
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
53+
rules_nodejs_dependencies()
54+
55+
# Fetch @angular repo transitive deps that are not already fetched above
56+
load("@angular//packages/bazel:package.bzl", "rules_angular_dependencies")
57+
rules_angular_dependencies()
58+
59+
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
60+
sass_repositories()
61+
5662
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
5763
# your npm dependencies. You must still run the package manager.
58-
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
64+
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
5965

66+
# The minimum bazel version to use with this repo is 0.18.0
67+
check_bazel_version("0.18.0")
6068
node_repositories(
6169
# For deterministic builds, specify explicit NodeJS and Yarn versions. Keep the Yarn version
6270
# in sync with the version of Travis.
@@ -76,10 +84,6 @@ yarn_install(
7684
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
7785
ts_setup_workspace()
7886

79-
# Setup Angular bazel rules
80-
load("@angular//packages/bazel:package.bzl", "rules_angular_dependencies")
81-
rules_angular_dependencies()
82-
8387
# Setup Angular workspace for building (Bazel managed node modules)
8488
load("@angular//:index.bzl", "ng_setup_workspace")
8589
ng_setup_workspace()
@@ -91,8 +95,7 @@ go_register_toolchains()
9195

9296
# Setup web testing. We need to setup a browser because the web testing rules for TypeScript need
9397
# a reference to a registered browser (ideally that's a hermetic version of a browser)
94-
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories",
95-
"web_test_repositories")
98+
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories")
9699

97100
web_test_repositories()
98101
browser_repositories(

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"zone.js": "^0.8.26"
4646
},
4747
"devDependencies": {
48+
"@angular/bazel": "7.0.1",
4849
"@angular-devkit/core": "^7.0.1",
4950
"@angular-devkit/schematics": "^7.0.1",
5051
"@angular/compiler-cli": "^7.0.0",

tools/defaults.bzl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ load("@build_bazel_rules_typescript//:defs.bzl", _ts_library = "ts_library",
88
DEFAULT_TSCONFIG_BUILD = "//src:bazel-tsconfig-build.json"
99
DEFAULT_TSCONFIG_TEST = "//src:bazel-tsconfig-test.json"
1010

11-
# By default, the Angular bazel rules assume that the `@angular/bazel` package has been
12-
# installed through NPM. Therefore it expects ngc-wrapped binaries to be available in the "@npm"
13-
# workspace. Since we build from source, the Bazel rules are not part of the NPM workspace.
14-
_SOURCE_NG_MODULE_COMPILER = "@angular//packages/bazel/src/ngc-wrapped"
15-
_SOURCE_NG_MODULE_XI18N = "@angular//packages/bazel/src/ngc-wrapped:xi18n"
16-
1711
def _getDefaultTsConfig(testonly):
1812
if testonly:
1913
return DEFAULT_TSCONFIG_TEST
@@ -48,8 +42,6 @@ def ng_module(deps = [], tsconfig = None, testonly = False, **kwargs):
4842
deps = local_deps,
4943
tsconfig = tsconfig,
5044
testonly = testonly,
51-
compiler = _SOURCE_NG_MODULE_COMPILER,
52-
ng_xi18n = _SOURCE_NG_MODULE_XI18N,
5345
**kwargs
5446
)
5547

yarn.lock

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
dependencies:
2929
tslib "^1.9.0"
3030

31+
"@angular/[email protected]":
32+
version "7.0.1"
33+
resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-7.0.1.tgz#42e1a114a20643ea53cff1bb8091e1ba08637885"
34+
integrity sha512-DEv1QiccMglqPyXqxtl3Onm4j1aIJzvWx/4Tyy6gEK/r7wOqwffkPrmQGGJC3QAhsXxXMRK0mQ3jkKoAXLbunA==
35+
dependencies:
36+
"@bazel/typescript" "^0.20.3"
37+
"@types/node" "6.0.84"
38+
shelljs "0.8.2"
39+
tsickle "0.32.1"
40+
3141
"@angular/common@^7.0.0":
3242
version "7.0.0"
3343
resolved "https://registry.yarnpkg.com/@angular/common/-/common-7.0.0.tgz#29206614d2b8dc79e5207b7dc6f9fc559e9a24f2"
@@ -261,7 +271,7 @@
261271
requirejs "2.3.5"
262272
tmp "0.0.33"
263273

264-
274+
"@bazel/[email protected]", "@bazel/typescript@^0.20.3":
265275
version "0.20.3"
266276
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.3.tgz#51dcc369c2af0d7f2311d6e692d07776492060f4"
267277
integrity sha512-BZmfzaNkgS++53CGEUk5p9FXOG+k8FNWCDbxzYljoIGP60aIkw4UgRQ24ReBwhCMg6M6KW609yje7AvDZkA6bg==
@@ -767,6 +777,11 @@
767777
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.11.4.tgz#e8bd933c3f78795d580ae41d86590bfc1f4f389d"
768778
integrity sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ==
769779

780+
781+
version "6.0.84"
782+
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.84.tgz#193ffe5a9f42864d425ffd9739d95b753c6a1eab"
783+
integrity sha512-1SvEazClhUBRNroJM3oB3xf3u2r6xGmHDGbdigqNPHvNKLl8/BtATgO9eC04ZLuovpSh0B20BF1QJxdi+qmTlg==
784+
770785
"@types/node@^6.0.46":
771786
version "6.0.118"
772787
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.118.tgz#8014a9b1dee0b72b4d7cd142563f1af21241c3a2"
@@ -10295,19 +10310,19 @@ shebang-regex@^1.0.0:
1029510310
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
1029610311
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
1029710312

10298-
shelljs@^0.7.0:
10299-
version "0.7.8"
10300-
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
10301-
integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM=
10313+
shelljs@0.8.2, shelljs@^0.8.1:
10314+
version "0.8.2"
10315+
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35"
10316+
integrity sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==
1030210317
dependencies:
1030310318
glob "^7.0.0"
1030410319
interpret "^1.0.0"
1030510320
rechoir "^0.6.2"
1030610321

10307-
shelljs@^0.8.1:
10308-
version "0.8.2"
10309-
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35"
10310-
integrity sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==
10322+
shelljs@^0.7.0:
10323+
version "0.7.8"
10324+
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
10325+
integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM=
1031110326
dependencies:
1031210327
glob "^7.0.0"
1031310328
interpret "^1.0.0"
@@ -11459,7 +11474,7 @@ [email protected]:
1145911474
source-map "^0.6.0"
1146011475
source-map-support "^0.5.0"
1146111476

11462-
tsickle@^0.32.0:
11477+
tsickle@0.32.1, tsickle@^0.32.0:
1146311478
version "0.32.1"
1146411479
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5"
1146511480
integrity sha512-JW9j+W0SaMSZGejIFZBk0AiPfnhljK3oLx5SaqxrJhjlvzFyPml5zqG1/PuScUj6yTe1muEqwk5CnDK0cOZmKw==

0 commit comments

Comments
 (0)