build: update to latest bazel rules (#22558)

PR Close #22558
This commit is contained in:
Alex Eagle 2018-03-02 10:10:59 -08:00
parent 0451fd93df
commit ba8df8a3f1
6 changed files with 20 additions and 28 deletions

View File

@ -2,13 +2,13 @@ workspace(name = "angular")
# Using a pre-release snapshot to pick up a commit that makes all nodejs_binary
# programs produce source-mapped stack traces and uglify sourcemaps.
RULES_NODEJS_VERSION = "4303cbef12e5e252ad66cc35cff1123e3a44ee83"
RULES_NODEJS_VERSION = "f3fc23b7e1f32984a3e5d0c7eabe3baa127fb32a"
http_archive(
name = "build_bazel_rules_nodejs",
url = "https://github.com/bazelbuild/rules_nodejs/archive/%s.zip" % RULES_NODEJS_VERSION,
strip_prefix = "rules_nodejs-%s" % RULES_NODEJS_VERSION,
sha256 = "fccb9a7122f339d89c9994dc0fea33c737dd76e66281d0da0cb841da5f1edec7",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.5.0.zip",
strip_prefix = "rules_nodejs-0.5.0",
sha256 = "06aabb253c3867d51724386ac5622a0a238bbd82e2c70ce1d09ee3ceac4c31d6",
)
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
@ -16,13 +16,11 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi
check_bazel_version("0.9.0")
node_repositories(package_json = ["//:package.json"])
RULES_TYPESCRIPT_VERSION = "d3cc5cd72d89aee0e4c2553ae1b99c707ecbef4e"
http_archive(
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/%s.zip" % RULES_TYPESCRIPT_VERSION,
strip_prefix = "rules_typescript-%s" % RULES_TYPESCRIPT_VERSION,
sha256 = "a233fcca41c3e59f639ac71c396edb30e9e9716cf8ed5fb20b51ff8910d5d895",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.11.0.zip",
strip_prefix = "rules_typescript-0.11.0",
sha256 = "ce7bac7b5287d5162fcbe4f7c14ff507ae7d506ceb44626ad09f6b7e27d3260b",
)
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")

View File

@ -1,26 +1,20 @@
workspace(name = "bazel_integration_test")
# Using a pre-release snapshot to pick up a commit that makes all nodejs_binary
# programs produce source-mapped stack traces and uglify sourcemaps.
RULES_NODEJS_VERSION = "4303cbef12e5e252ad66cc35cff1123e3a44ee83"
http_archive(
name = "build_bazel_rules_nodejs",
url = "https://github.com/bazelbuild/rules_nodejs/archive/%s.zip" % RULES_NODEJS_VERSION,
strip_prefix = "rules_nodejs-%s" % RULES_NODEJS_VERSION,
sha256 = "fccb9a7122f339d89c9994dc0fea33c737dd76e66281d0da0cb841da5f1edec7",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.5.0.zip",
strip_prefix = "rules_nodejs-0.5.0",
sha256 = "06aabb253c3867d51724386ac5622a0a238bbd82e2c70ce1d09ee3ceac4c31d6",
)
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")
node_repositories(package_json = ["//:package.json"])
RULES_TYPESCRIPT_VERSION = "d3cc5cd72d89aee0e4c2553ae1b99c707ecbef4e"
http_archive(
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/%s.zip" % RULES_TYPESCRIPT_VERSION,
strip_prefix = "rules_typescript-%s" % RULES_TYPESCRIPT_VERSION,
sha256 = "a233fcca41c3e59f639ac71c396edb30e9e9716cf8ed5fb20b51ff8910d5d895",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.11.0.zip",
strip_prefix = "rules_typescript-0.11.0",
sha256 = "ce7bac7b5287d5162fcbe4f7c14ff507ae7d506ceb44626ad09f6b7e27d3260b",
)
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")

View File

@ -113,7 +113,7 @@ esm5_outputs_aspect = aspect(
# For some reason, having the compiler output as an input to the action above
# is not sufficient.
"_tsc_wrapped": attr.label(
default = Label("@build_bazel_rules_typescript//internal/tsc_wrapped:tsc_wrapped_bin"),
default = Label("@build_bazel_rules_typescript//internal:tsc_wrapped_bin"),
executable = True,
cfg = "host",
),

View File

@ -16,7 +16,7 @@ ts_library(
# Users will get this dependency from node_modules.
"//packages/compiler-cli",
# END-INTERNAL
"@build_bazel_rules_typescript//internal/tsc_wrapped",
"@build_bazel_rules_typescript//internal:tsc_wrapped",
],
)

View File

@ -243,7 +243,7 @@ export class Driver implements Debuggable, UpdateSource {
}
private async handlePush(data: any): Promise<void> {
this.broadcast({
await this.broadcast({
type: 'PUSH',
data,
});
@ -254,7 +254,7 @@ export class Driver implements Debuggable, UpdateSource {
let options: {[key: string]: string | undefined} = {};
NOTIFICATION_OPTION_NAMES.filter(name => desc.hasOwnProperty(name))
.forEach(name => options[name] = desc[name]);
this.scope.registration.showNotification(desc['title'] !, options);
await this.scope.registration.showNotification(desc['title'] !, options);
}
private async reportStatus(client: Client, promise: Promise<void>, nonce: number): Promise<void> {
@ -614,7 +614,7 @@ export class Driver implements Debuggable, UpdateSource {
if (!res.ok) {
if (res.status === 404) {
await this.deleteAllCaches();
this.scope.registration.unregister();
await this.scope.registration.unregister();
}
throw new Error('Manifest fetch failed!');
}
@ -707,7 +707,7 @@ export class Driver implements Debuggable, UpdateSource {
// Firstly, check if the manifest version is correct.
if (manifest.configVersion !== SUPPORTED_CONFIG_VERSION) {
await this.deleteAllCaches();
this.scope.registration.unregister();
await this.scope.registration.unregister();
throw new Error(
`Invalid config version: expected ${SUPPORTED_CONFIG_VERSION}, got ${manifest.configVersion}.`);
}

View File

@ -527,7 +527,7 @@ const manifestUpdateHash = sha1(JSON.stringify(manifestUpdate));
expect(await driver.checkForUpdate()).toEqual(true);
serverUpdate.assertSawRequestFor('/quux.txt');
serverUpdate.clearRequests();
driver.updateClient(await scope.clients.get('default'));
await driver.updateClient(await scope.clients.get('default'));
expect(await makeRequest(scope, '/quux.txt')).toEqual('this is quux v2');
serverUpdate.assertNoOtherRequests();
});