Skip to content

Commit fb98ab7

Browse files
devversionmmalerba
authored andcommitted
build: use angular 7.0.0 w/ bazel (#13793)
* Switches away from the temporary `angular/angular:bazel` branch and uses a version of Angular that is based on `master` and comes after `v7.0.0`.
1 parent 77451d4 commit fb98ab7

File tree

4 files changed

+40
-41
lines changed

4 files changed

+40
-41
lines changed

WORKSPACE

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ workspace(name = "angular_material")
33
# Add NodeJS rules (explicitly used for sass bundle rules)
44
http_archive(
55
name = "build_bazel_rules_nodejs",
6-
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.0.zip",
7-
strip_prefix = "rules_nodejs-0.15.0",
8-
sha256 = "5f5b6464ca20aa63d278caaf4736f0381eb838800d7375132057a48f09d0b837",
6+
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.3.zip",
7+
strip_prefix = "rules_nodejs-0.15.3",
8+
sha256 = "05afbbc13b0b7d5056e412d66c98853978bd46a94bc8e7b71c7fba4349b77eef",
99
)
1010

1111
# Add TypeScript rules
1212
http_archive(
1313
name = "build_bazel_rules_typescript",
14-
url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.2.zip",
15-
strip_prefix = "rules_typescript-0.20.2",
16-
sha256 = "2879fbd7168ba5d17db22bc2f585c0d1d3a82dd5e6f8af118e8b2f74d290024e",
14+
url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip",
15+
strip_prefix = "rules_typescript-0.20.3",
16+
sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3",
1717
)
1818

1919
# Fetch transient dependencies of the TypeScript bazel rules.
@@ -34,12 +34,13 @@ sass_repositories()
3434
# Add Angular source and Bazel rules.
3535
http_archive(
3636
name = "angular",
37-
# Temporarily locked down to the angular/angular:bazel branch. This branch includes necessary
38-
# commits that make building from source possible.
39-
# TODO(devversion): switch to release archive if workaround can be removed
40-
url = "https://github.com/angular/angular/archive/08e4489cf5a93a352954f1639da5e92112993753.zip",
41-
strip_prefix = "angular-08e4489cf5a93a352954f1639da5e92112993753",
42-
sha256 = "a59c85426048cc95f51937d0c26f4d1143b7bef730152b68ac4b79d1438e746b",
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",
4344
)
4445

4546
# Add RxJS as repository because those are needed in order to build Angular from source.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"@angular/platform-server": "^7.0.0",
5454
"@angular/router": "^7.0.0",
5555
"@angular/upgrade": "^7.0.0",
56-
"@bazel/ibazel": "0.3.1",
57-
"@bazel/karma": "0.20.2",
58-
"@bazel/typescript": "0.20.2",
56+
"@bazel/ibazel": "0.6.0",
57+
"@bazel/karma": "0.20.3",
58+
"@bazel/typescript": "0.20.3",
5959
"@firebase/app-types": "^0.3.2",
6060
"@google-cloud/storage": "^1.1.1",
6161
"@octokit/rest": "^15.9.4",

tools/defaults.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ 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+
1117
def _getDefaultTsConfig(testonly):
1218
if testonly:
1319
return DEFAULT_TSCONFIG_TEST
@@ -42,6 +48,8 @@ def ng_module(deps = [], tsconfig = None, testonly = False, **kwargs):
4248
deps = local_deps,
4349
tsconfig = tsconfig,
4450
testonly = testonly,
51+
compiler = _SOURCE_NG_MODULE_COMPILER,
52+
ng_xi18n = _SOURCE_NG_MODULE_XI18N,
4553
**kwargs
4654
)
4755

yarn.lock

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,15 @@
240240
lodash "^4.17.10"
241241
to-fast-properties "^2.0.0"
242242

243-
"@bazel/ibazel@0.3.1":
244-
version "0.3.1"
245-
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.3.1.tgz#5f02f208f138e581bbdb1534d5c013d7a0ac9799"
246-
integrity sha1-XwLyCPE45YG72xU01cAT16Csl5k=
243+
"@bazel/ibazel@0.6.0":
244+
version "0.6.0"
245+
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.6.0.tgz#b88a6b85e0d7d8adae9aeeba44763044658f1bab"
246+
integrity sha512-6MG/zWWZ98hpZ+MdRS2wdyrX0LWor3Sq4hs0SkhWVSLArzv7Hp4f/NvPs5w4qqBimBFCoRpu42wHl75cqVm/3g==
247247

248-
"@bazel/[email protected].2":
249-
version "0.20.2"
250-
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.2.tgz#69b440e320eadce2b4c7de922f87c5fc539b6586"
251-
integrity sha512-WQHPpAuu9jNqZ7J2tYkAJaccC9oQh5IjD0wJDnBq0iLxusLQkxJOPw5TmemHYVEMlkuj5+1w7UN8YeS0YRgAeg==
248+
"@bazel/[email protected].3":
249+
version "0.20.3"
250+
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.3.tgz#a63bb82b4887ae8c0d01f3028c6fa4764470851d"
251+
integrity sha512-IgWfTpK9XLEI977DS2kHIEO1QfFTEOBxeNDDjHtd1onmzyMCLROphTOBZ/g42ybUIWyJhS9DK4U3bLSMQE0Bng==
252252
dependencies:
253253
jasmine-core "2.8.0"
254254
karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
@@ -261,12 +261,12 @@
261261
requirejs "2.3.5"
262262
tmp "0.0.33"
263263

264-
"@bazel/[email protected].2":
265-
version "0.20.2"
266-
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.2.tgz#7e31e2fe23458536e4917bf5ee130d55704c54f5"
267-
integrity sha512-S54LqrCT3WpYdYgpOYEgtwdGX2kJfliSNombmmWmR3ZXYdXwU10PYhWR7s4k9eyakknitAt1RxPEvIHEHCucqQ==
264+
"@bazel/[email protected].3":
265+
version "0.20.3"
266+
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.3.tgz#51dcc369c2af0d7f2311d6e692d07776492060f4"
267+
integrity sha512-BZmfzaNkgS++53CGEUk5p9FXOG+k8FNWCDbxzYljoIGP60aIkw4UgRQ24ReBwhCMg6M6KW609yje7AvDZkA6bg==
268268
dependencies:
269-
protobufjs "5.0.0"
269+
protobufjs "5.0.3"
270270
source-map-support "0.5.9"
271271
tsickle "0.28.0"
272272
tsutils "2.27.2"
@@ -4746,7 +4746,7 @@ glob@^4.3.1:
47464746
minimatch "^2.0.1"
47474747
once "^1.3.0"
47484748

4749-
glob@^5.0.10, glob@^5.0.15:
4749+
glob@^5.0.15:
47504750
version "5.0.15"
47514751
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
47524752
integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=
@@ -6763,7 +6763,7 @@ karma@^3.0.0:
67636763
tmp "0.0.33"
67646764
useragent "2.2.1"
67656765

6766-
karma@alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a:
6766+
"karma@github:alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a":
67676767
version "1.7.1"
67686768
resolved "https://codeload.github.com/alexeagle/karma/tar.gz/fa1a84ac881485b5657cb669e9b4e5da77b79f0a"
67696769
dependencies:
@@ -9127,17 +9127,7 @@ [email protected]:
91279127
utile "0.3.x"
91289128
winston "2.1.x"
91299129

9130-
9131-
version "5.0.0"
9132-
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
9133-
integrity sha1-QiMGMjPqlqwGPKK1VANSBNtST6E=
9134-
dependencies:
9135-
ascli "~1"
9136-
bytebuffer "~5"
9137-
glob "^5.0.10"
9138-
yargs "^3.10.0"
9139-
9140-
protobufjs@^5.0.3:
9130+
[email protected], protobufjs@^5.0.3:
91419131
version "5.0.3"
91429132
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
91439133
integrity sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==

0 commit comments

Comments
 (0)