build: update to rules_nodejs 1.5.0 (#36307)

### New stuff

* The `ts_project` rule is a simple wrapper around the TypeScript compiler, `tsc`. This is an alternative to `ts_library` but not a replacement. Read more about the trade-offs at https://bazelbuild.github.io/rules_nodejs/TypeScript#alternatives or read the [API docs](https://bazelbuild.github.io/rules_nodejs/TypeScript#ts_project)
* `pkg_npm` can now be used as a dependency within your repo as well as for publishing to npm. It provides a `LinkablePackageInfo` which is our internal API to pass package name/path to downstream compilations, essentially providing the "Lerna" feature.
* There is experimental support for Bazel's "worker mode" in `rollup_bundle`, which essentially puts Rollup in watch mode. Add the `supports_workers = True` attribute to opt-in.
* Better support for [pre-defined label variables](https://docs.bazel.build/versions/master/be/make-variables.html#predefined_label_variables) like `$(rootpath)` and `$(execpath)` - we no longer recommend using `$(location)` at all.

See release notes https://github.com/bazelbuild/rules_nodejs/releases/tag/1.5.0 for more info.

PR Close #36307
This commit is contained in:
Greg Magolan 2020-03-29 13:22:56 -07:00 committed by Alex Rickabaugh
parent a383116b43
commit 5b6ced5599
8 changed files with 77 additions and 77 deletions

View File

@ -8,8 +8,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 = "2eca5b934dee47b5ff304f502ae187c40ec4e33e12bcbce872a2eeb786e23269",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.4.1/rules_nodejs-1.4.1.tar.gz"],
sha256 = "d0c4bb8b902c1658f42eb5563809c70a06e46015d64057d25560b0eb4bdc9007",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.5.0/rules_nodejs-1.5.0.tar.gz"],
)
# Check the rules_nodejs version and download npm dependencies
@ -17,7 +17,7 @@ http_archive(
# assert on that.
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
check_rules_nodejs_version(minimum_version_string = "1.4.1")
check_rules_nodejs_version(minimum_version_string = "1.5.0")
# Setup the Node.js toolchain
node_repositories(

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 = "2eca5b934dee47b5ff304f502ae187c40ec4e33e12bcbce872a2eeb786e23269",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.4.1/rules_nodejs-1.4.1.tar.gz"],
sha256 = "d0c4bb8b902c1658f42eb5563809c70a06e46015d64057d25560b0eb4bdc9007",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.5.0/rules_nodejs-1.5.0.tar.gz"],
)
# Fetch sass rules for compiling sass files

View File

@ -23,11 +23,11 @@
"@angular/compiler": "file:../../dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@bazel/bazelisk": "file:../../node_modules/@bazel/bazelisk",
"@bazel/karma": "1.4.1",
"@bazel/protractor": "1.4.1",
"@bazel/rollup": "1.4.1",
"@bazel/terser": "1.4.1",
"@bazel/typescript": "1.4.1",
"@bazel/karma": "1.5.0",
"@bazel/protractor": "1.5.0",
"@bazel/rollup": "1.5.0",
"@bazel/terser": "1.5.0",
"@bazel/typescript": "1.5.0",
"@types/jasmine": "2.8.8",
"http-server": "0.12.0",
"karma": "4.4.1",

View File

@ -3,10 +3,10 @@
"@angular/animations@file:../../dist/packages-dist/animations":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@angular/bazel@file:../../dist/packages-dist/bazel":
version "9.1.0-next.4"
version "9.1.0-rc.0"
dependencies:
"@microsoft/api-extractor" "^7.3.9"
shelljs "0.8.2"
@ -22,10 +22,10 @@
parse5 "^5.0.0"
"@angular/common@file:../../dist/packages-dist/common":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli":
version "9.1.0-next.4"
version "9.1.0-rc.0"
dependencies:
canonical-path "1.0.0"
chokidar "^3.0.0"
@ -41,13 +41,13 @@
yargs "15.3.0"
"@angular/compiler@file:../../dist/packages-dist/compiler":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@angular/core@file:../../dist/packages-dist/core":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@angular/forms@file:../../dist/packages-dist/forms":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@angular/material@8.0.1":
version "8.0.1"
@ -57,43 +57,43 @@
tslib "^1.7.1"
"@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@angular/platform-browser@file:../../dist/packages-dist/platform-browser":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@angular/router@file:../../dist/packages-dist/router":
version "9.1.0-next.4"
version "9.1.0-rc.0"
"@bazel/bazelisk@file:../../node_modules/@bazel/bazelisk":
version "1.3.0"
"@bazel/karma@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.4.1.tgz#12106dfd50ffd8ce98a35a0000badcb9d730c5c4"
integrity sha512-6VecxKGyMam1kA4mGX1GHPgustw8hdyR6v9LTvPWJQ7P5drZbvXUTMz+MLEzbElWdB2KDMljkJRlspbCXuTWew==
"@bazel/karma@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.5.0.tgz#75ea27c3c2a8a7fadbb5c5ab644c3acd3bc22702"
integrity sha512-j5S2Xya4Rr7vK0DzTaZ8FKDHBydtTNldwlx+rihjKJgbEBt76wQM7ucXD6aSA23lC+JM/dPRSKkpIIGeWf2JdQ==
dependencies:
tmp "0.1.0"
"@bazel/protractor@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.4.1.tgz#fb668429ddc7d1d725d9ce9cf16a29e0e39ab2e0"
integrity sha512-AkgKdd+6cv6tSmCyop11jgfkpCGWsmykgBOAUftBPK2qtn5iHDSpI2xrZUQQv1/F9vhFFvy+09sIslGWP/TyEA==
"@bazel/protractor@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.5.0.tgz#ac92442bf38f5cd718812e4cca41ba2e5ebf1fa5"
integrity sha512-nUwOOUjNGJUU18JiE3sPOBzIul0jvGApEEikntKTLLwQ7w7/1TnOdXDWvHXrXRW3nwit6flWIzEUoFtWgwtCeg==
"@bazel/rollup@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.4.1.tgz#395fbd2611867a54be154ecff1239fcde261371b"
integrity sha512-CU0D+xPQbspuVsKhv2sP0kWhIuEQo8eYjhQXP9BXVZ02uc+YCOkW/5JHIhF946QYljp++W6mcVUGFdBYcrVZow==
"@bazel/rollup@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.5.0.tgz#d0933d167e682470b90f8149eecf4c5bd7511369"
integrity sha512-/FEJfNi9dbbH8oQbf7LHyd0uhGSB0CQQhOpz8d4b2WLnYLhK0NZhoNF4afFjju5kQkrbrOfKaho64BfVxvNppA==
"@bazel/terser@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.4.1.tgz#af4d63c768e72d57674a4514857fea5d9984378d"
integrity sha512-JGhv22d2IOGePE0VwmF6c88GOP3Ij621qtLoI7ZVLDRTElSRAknqj09qX6Zni2DkjT2c/+Ldm2qE8P6hOCXpEg==
"@bazel/terser@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.5.0.tgz#141e1492043231001da3f3ef67b575dd9c2df0be"
integrity sha512-ajT2roE+tiW+xm2YOSfUG55MaUHv0hHYlQneNV1GI3lZoowWPbToOaZiuVza90ulHFHP7lDXn/5MC4UF5/piOQ==
"@bazel/typescript@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.4.1.tgz#1c718ce6de694e1bb90f894fa6320a0cadd90850"
integrity sha512-+R/cZcQpuvGfxqc9s/qu/LBWGNV93iSPTt/mvXq6hfH+sABmrrC/E0+WxapuQaaPdKqR3zSdDIIBV70FUMozsg==
"@bazel/typescript@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.5.0.tgz#d69324c08e7dbfe10b21a6fcb7b4d66c71c8d171"
integrity sha512-Vi8n1p35EhxGC22TEnmnVPlyakrALyH2ccVN5J6YeZXE1oWlSMSqQEhXKTjqUfQ3FT76nW1K91AdH4TG3me5nQ==
dependencies:
protobufjs "6.8.8"
semver "5.6.0"

View File

@ -51,12 +51,12 @@
"@babel/template": "^7.8.6",
"@babel/traverse": "^7.8.6",
"@babel/types": "^7.8.6",
"@bazel/jasmine": "1.4.1",
"@bazel/karma": "1.4.1",
"@bazel/protractor": "1.4.1",
"@bazel/rollup": "1.4.1",
"@bazel/terser": "1.4.1",
"@bazel/typescript": "1.4.1",
"@bazel/jasmine": "1.5.0",
"@bazel/karma": "1.5.0",
"@bazel/protractor": "1.5.0",
"@bazel/rollup": "1.5.0",
"@bazel/terser": "1.5.0",
"@bazel/typescript": "1.5.0",
"@microsoft/api-extractor": "^7.3.9",
"@schematics/angular": "9.0.3",
"@types/angular": "^1.6.47",

View File

@ -15,8 +15,8 @@ workspace(
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
RULES_NODEJS_VERSION = "1.4.1"
RULES_NODEJS_SHA256 = "2eca5b934dee47b5ff304f502ae187c40ec4e33e12bcbce872a2eeb786e23269"
RULES_NODEJS_VERSION = "1.5.0"
RULES_NODEJS_SHA256 = "d0c4bb8b902c1658f42eb5563809c70a06e46015d64057d25560b0eb4bdc9007"
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = RULES_NODEJS_SHA256,

View File

@ -40,11 +40,11 @@ function addDevDependenciesToPackageJson(options: Schema) {
['@angular/bazel', angularCore.version],
['@bazel/bazel', '2.1.0'],
['@bazel/ibazel', '0.12.3'],
['@bazel/karma', '1.4.1'],
['@bazel/protractor', '1.4.1'],
['@bazel/rollup', '1.4.1'],
['@bazel/terser', '1.4.1'],
['@bazel/typescript', '1.4.1'],
['@bazel/karma', '1.5.0'],
['@bazel/protractor', '1.5.0'],
['@bazel/rollup', '1.5.0'],
['@bazel/terser', '1.5.0'],
['@bazel/typescript', '1.5.0'],
['history-server', '1.3.1'],
['html-insert-assets', '0.5.0'],
['karma', '4.4.1'],

View File

@ -1079,42 +1079,42 @@
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.12.3.tgz#c8c82647f920cd529c7793c50e087e1a754a5973"
integrity sha512-dyx62Uo5kogrxFmqFNpGvbavfr8yjmuQlOyZczOuA60piULwlUsO7Oh3/1OUWKDSXaMMqHhFQfpdl+z0HjI6TQ==
"@bazel/jasmine@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-1.4.1.tgz#eb70ad8099eb82505ee5841981fe4f3b7c8c47d0"
integrity sha512-fslF86VzSoQ5ir2aQScKbROqlVdoS0A4zeSslngIwbfhgrXZVbErXtuS43O5FgGCF+1zEfeTgXAgtwtjNdjs6Q==
"@bazel/jasmine@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-1.5.0.tgz#be980cb8e9f82a87036e27f86278bd7a54d74c43"
integrity sha512-r06GTWKxZYs6msPTbIJ+vcHLQke6wMULo3p4w3ecDybRzKq54syjSzlmejIm9wJ8OHrVyRRSvHgvygxCGJfhTA==
dependencies:
jasmine "~3.5.0"
jasmine-core "~3.5.0"
jasmine-reporters "~2.3.2"
v8-coverage "1.0.9"
"@bazel/karma@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.4.1.tgz#12106dfd50ffd8ce98a35a0000badcb9d730c5c4"
integrity sha512-6VecxKGyMam1kA4mGX1GHPgustw8hdyR6v9LTvPWJQ7P5drZbvXUTMz+MLEzbElWdB2KDMljkJRlspbCXuTWew==
"@bazel/karma@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.5.0.tgz#75ea27c3c2a8a7fadbb5c5ab644c3acd3bc22702"
integrity sha512-j5S2Xya4Rr7vK0DzTaZ8FKDHBydtTNldwlx+rihjKJgbEBt76wQM7ucXD6aSA23lC+JM/dPRSKkpIIGeWf2JdQ==
dependencies:
tmp "0.1.0"
"@bazel/protractor@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.4.1.tgz#fb668429ddc7d1d725d9ce9cf16a29e0e39ab2e0"
integrity sha512-AkgKdd+6cv6tSmCyop11jgfkpCGWsmykgBOAUftBPK2qtn5iHDSpI2xrZUQQv1/F9vhFFvy+09sIslGWP/TyEA==
"@bazel/protractor@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.5.0.tgz#ac92442bf38f5cd718812e4cca41ba2e5ebf1fa5"
integrity sha512-nUwOOUjNGJUU18JiE3sPOBzIul0jvGApEEikntKTLLwQ7w7/1TnOdXDWvHXrXRW3nwit6flWIzEUoFtWgwtCeg==
"@bazel/rollup@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.4.1.tgz#395fbd2611867a54be154ecff1239fcde261371b"
integrity sha512-CU0D+xPQbspuVsKhv2sP0kWhIuEQo8eYjhQXP9BXVZ02uc+YCOkW/5JHIhF946QYljp++W6mcVUGFdBYcrVZow==
"@bazel/rollup@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.5.0.tgz#d0933d167e682470b90f8149eecf4c5bd7511369"
integrity sha512-/FEJfNi9dbbH8oQbf7LHyd0uhGSB0CQQhOpz8d4b2WLnYLhK0NZhoNF4afFjju5kQkrbrOfKaho64BfVxvNppA==
"@bazel/terser@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.4.1.tgz#af4d63c768e72d57674a4514857fea5d9984378d"
integrity sha512-JGhv22d2IOGePE0VwmF6c88GOP3Ij621qtLoI7ZVLDRTElSRAknqj09qX6Zni2DkjT2c/+Ldm2qE8P6hOCXpEg==
"@bazel/terser@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.5.0.tgz#141e1492043231001da3f3ef67b575dd9c2df0be"
integrity sha512-ajT2roE+tiW+xm2YOSfUG55MaUHv0hHYlQneNV1GI3lZoowWPbToOaZiuVza90ulHFHP7lDXn/5MC4UF5/piOQ==
"@bazel/typescript@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.4.1.tgz#1c718ce6de694e1bb90f894fa6320a0cadd90850"
integrity sha512-+R/cZcQpuvGfxqc9s/qu/LBWGNV93iSPTt/mvXq6hfH+sABmrrC/E0+WxapuQaaPdKqR3zSdDIIBV70FUMozsg==
"@bazel/typescript@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.5.0.tgz#d69324c08e7dbfe10b21a6fcb7b4d66c71c8d171"
integrity sha512-Vi8n1p35EhxGC22TEnmnVPlyakrALyH2ccVN5J6YeZXE1oWlSMSqQEhXKTjqUfQ3FT76nW1K91AdH4TG3me5nQ==
dependencies:
protobufjs "6.8.8"
semver "5.6.0"