build(bazel): update to nodejs rules 0.27.6 (#29375)

PR Close #29375
This commit is contained in:
Greg Magolan 2019-03-18 14:50:52 -07:00 committed by Matias Niemelä
parent 7c4afb0da7
commit ea0e832e5f
9 changed files with 30 additions and 41 deletions

View File

@ -15,8 +15,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "251a023b6c5c5c97db1bfe24652dc19dad05f4da68f8e1821d92d911fa3f4ef4",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.4/rules_nodejs-0.27.4.tar.gz"],
sha256 = "35511e7e9aa7d6fcfd429200a6e9b40733ebdd40ab1420935079798e9903c904",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.6/rules_nodejs-0.27.6.tar.gz"],
)
# Check the bazel version and download npm dependencies

View File

@ -5,8 +5,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "251a023b6c5c5c97db1bfe24652dc19dad05f4da68f8e1821d92d911fa3f4ef4",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.4/rules_nodejs-0.27.4.tar.gz"],
sha256 = "35511e7e9aa7d6fcfd429200a6e9b40733ebdd40ab1420935079798e9903c904",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.6/rules_nodejs-0.27.6.tar.gz"],
)
# Fetch sass rules for compiling sass files

View File

@ -18,7 +18,7 @@
"@angular/bazel": "packages-dist:bazel",
"@angular/compiler": "packages-dist:compiler",
"@angular/compiler-cli": "packages-dist:compiler-cli",
"@bazel/karma": "0.27.4",
"@bazel/karma": "0.27.6",
"@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1",
"protractor": "5.1.2",

View File

@ -36,9 +36,9 @@
"@angular-devkit/core": "^7.3.2",
"@angular-devkit/schematics": "^7.3.2",
"@angular/bazel": "file:./tools/npm/@angular_bazel",
"@bazel/jasmine": "0.27.4",
"@bazel/karma": "0.27.4",
"@bazel/typescript": "0.27.4",
"@bazel/jasmine": "0.27.6",
"@bazel/karma": "0.27.6",
"@bazel/typescript": "0.27.6",
"@microsoft/api-extractor": "^7.0.21",
"@schematics/angular": "^7.3.5",
"@types/angular": "^1.6.47",

View File

@ -22,7 +22,7 @@
"@angular-devkit/architect": "^0.13.4",
"@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.3.0-rc.0",
"@bazel/typescript": "^0.27.4",
"@bazel/typescript": "^0.27.6",
"@microsoft/api-extractor": "^7.0.21",
"@schematics/angular": "^7.3.5",
"@types/node": "6.0.84",

View File

@ -12,18 +12,20 @@ workspace(name = "project")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
RULES_NODEJS_VERSION = "0.27.4"
RULES_NODEJS_VERSION = "0.27.6"
RULES_NODEJS_SHA256 = "35511e7e9aa7d6fcfd429200a6e9b40733ebdd40ab1420935079798e9903c904"
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "251a023b6c5c5c97db1bfe24652dc19dad05f4da68f8e1821d92d911fa3f4ef4",
sha256 = RULES_NODEJS_SHA256,
url = "https://github.com/bazelbuild/rules_nodejs/releases/download/%s/rules_nodejs-%s.tar.gz" % (RULES_NODEJS_VERSION, RULES_NODEJS_VERSION),
)
# Rules for compiling sass
RULES_SASS_VERSION = "1.17.2"
RULES_SASS_SHA256 = "e5316ee8a09d1cbb732d3938b400836bf94dba91a27476e9e27706c4c0edae1f"
http_archive(
name = "io_bazel_rules_sass",
sha256 = "e5316ee8a09d1cbb732d3938b400836bf94dba91a27476e9e27706c4c0edae1f",
sha256 = RULES_SASS_SHA256,
url = "https://github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
strip_prefix = "rules_sass-%s" % RULES_SASS_VERSION,
)

View File

@ -49,7 +49,7 @@ function addDevDependenciesToPackageJson(options: Schema) {
'@angular/bazel': angularCoreVersion,
'@bazel/bazel': '^0.23.0',
'@bazel/ibazel': '^0.9.0',
'@bazel/karma': '^0.27.4',
'@bazel/karma': '^0.27.6',
};
const recorder = host.beginUpdate(packageJson);

View File

@ -15,22 +15,9 @@ import 'zone.js/dist/fake-async-test.js';
import 'zone.js/dist/task-tracking.js';
import 'reflect-metadata/Reflect';
// We must first initialize jasmine-core before calling
// requiring `zone.js/dist/jasmine-patch.js` which patches
// jasmine ENV with code which understands ProxyZone.
// jasmine_node_test under Bazel will check if `jasmineCore.boot(jasmineCore)`
// has been called and re-use the env if it has.
// See https://github.com/bazelbuild/rules_nodejs/pull/539
let jasmineCore: any = null;
try {
// Under Bazel we want to use the jasmine-core version that is
// a transive dep of @bazel/typescript. Attempt to require under
// its nested node_modules incase it was not hoisted.
jasmineCore = require('@bazel/jasmine/node_modules/jasmine-core');
} catch (_) {
jasmineCore = require('jasmine-core');
}
jasmineCore.boot(jasmineCore);
// Initialize jasmine with @bazel/jasmine boot() function. This will initialize
// global.jasmine so that it can be patched by zone.js jasmine-patch.js.
require('@bazel/jasmine').boot();
import 'zone.js/dist/jasmine-patch.js';
(global as any).isNode = true;

View File

@ -127,17 +127,17 @@
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.9.0.tgz#fd60023acd36313d304cc2f8c2e181b88b5445cd"
integrity sha512-E31cefDcdJsx/oii6p/gqKZXSVw0kEg1O73DD2McFcSvnf/p1GYWcQtVgdRQmlviBEytJkJgdX8rtThitRvcow==
"@bazel/jasmine@0.27.4":
version "0.27.4"
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.27.4.tgz#1b6548def3d35ed14799681cab27a01d776d2835"
integrity sha512-rFNZTFYWVSYqK5CqfBtbC7TL2FofIEYfM5Q8gWol8Lc6ChLjI5574jtmqWyJDMjRskKmJUDz4m5gaiE+BoKHeA==
"@bazel/jasmine@0.27.6":
version "0.27.6"
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.27.6.tgz#421f9f050df4cb6031574880b987a242bcd05b1a"
integrity sha512-Kk6vAWOCtuzEoCH3lJNmwUJUHaQWGjZLWDK2nkrJmP/364nXULdDgPC53d0anztrRQ5jy3K8SZj15Bzt5kEC3A==
dependencies:
jasmine "~3.3.1"
"@bazel/karma@0.27.4":
version "0.27.4"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.27.4.tgz#06c36515740f9d2cbcacb2783dd2f9b5c50ed386"
integrity sha512-6dIKxsktWaLMj1G7rV/6GCi4O6z75t57O+alD+WVThsKdqGdQ9PH6qRcw7VnUo+J9d6GA5Kr922b6XAE8m1q2g==
"@bazel/karma@0.27.6":
version "0.27.6"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.27.6.tgz#1a9877231b1cde33fe606a7537aa56dbf18bf529"
integrity sha512-24DwyZuily2vAbS8w64dxvUBv1ugK6AN4LEZUurAtjyYDjuaN5G7hdD6p+qDR+BFO4z19tUeGWR9wfJSaFIj+g==
dependencies:
jasmine-core "2.8.0"
karma "^4.0.0"
@ -151,10 +151,10 @@
semver "5.6.0"
tmp "0.0.33"
"@bazel/typescript@0.27.4":
version "0.27.4"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.27.4.tgz#412e438338675aeab34dcf5e57ed5e0705e8fed4"
integrity sha512-DvonqvUyiwgADRUMO4hpJlk/24LbBjPsNevPyHDKF3x2hH0IGH0NQ0MrulNHCY7xkg7vfMF4lLaHoCnuXhrVzA==
"@bazel/typescript@0.27.6":
version "0.27.6"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.27.6.tgz#9f426053390a2c2d0eddcd9dd9328cfee4be55b6"
integrity sha512-Ha/Dvr43wWXyljEduYIoR/9Zaqgwq+h9llOiVfOpm3JF2S5X5xHJFI/7zUi1kpFc1FAqz43eVrI13OWa8Br+Eg==
dependencies:
protobufjs "5.0.3"
semver "5.6.0"