Skip to content

build: update to nodejs v16 and update rules_nodejs to v4 stable #23485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
# To validate changes, use an online parser, eg.
# http://yaml-online-parser.appspot.com/

var_1: &docker_image circleci/node:14.16.1
var_2: &docker-firefox-image circleci/node:14.16.1-browsers
var_1: &docker_image circleci/node:16.6.0
var_2: &docker-firefox-image circleci/node:16.6.0-browsers

# **Note**: When updating the beginning of the cache key, also update the cache key to match
# the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
# Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache.
var_3: &cache_key v8-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
var_3: &cache_key v9-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
# We want to invalidate the cache if the postinstall patches change. In order to apply new
# patches, a clean version of the node modules is needed. Additionally, we invalidate the cache
# if the Bazel version changes. We do this because otherwise the `bazelisk` cache folder will
# contain all previously used versions and ultimately cause the cache restoring to be slower.
var_4: &cache_fallback_key v8-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-
var_4: &cache_fallback_key v9-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-

# Settings common to each job
var_5: &job_defaults
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.1
16.6.0
8 changes: 4 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Add NodeJS rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "5c40083120eadec50a3497084f99bc75a85400ea727e82e0b2f422720573130f",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0-beta.0/rules_nodejs-4.0.0-beta.0.tar.gz"],
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
)

# Add sass rules
Expand Down Expand Up @@ -45,7 +45,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version", "node_repos
check_bazel_version("4.0.0")

node_repositories(
node_version = "14.16.1",
node_version = "16.6.0",
package_json = ["//:package.json"],
)

Expand Down Expand Up @@ -97,6 +97,6 @@ load(

_dev_infra_browser_repositories()

load("@npm//@bazel/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")

esbuild_repositories()
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "MIT",
"engines": {
"node": ">=14.0.0 <16.0.0",
"node": ">=14.0.0 <17.0.0",
"yarn": ">= 1.0.0",
"npm": "Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/"
},
Expand Down Expand Up @@ -85,15 +85,15 @@
"@babel/traverse": "^7.13.0",
"@bazel/bazelisk": "1.9.0",
"@bazel/buildifier": "4.0.1",
"@bazel/concatjs": "4.0.0-beta.0",
"@bazel/esbuild": "4.0.0-beta.0",
"@bazel/concatjs": "4.0.0",
"@bazel/esbuild": "4.0.0",
"@bazel/ibazel": "0.15.10",
"@bazel/jasmine": "4.0.0-beta.0",
"@bazel/protractor": "4.0.0-beta.0",
"@bazel/rollup": "4.0.0-beta.0",
"@bazel/runfiles": "4.0.0-beta.0",
"@bazel/terser": "4.0.0-beta.0",
"@bazel/typescript": "4.0.0-beta.0",
"@bazel/jasmine": "4.0.0",
"@bazel/protractor": "4.0.0",
"@bazel/rollup": "4.0.0",
"@bazel/runfiles": "4.0.0",
"@bazel/terser": "4.0.0",
"@bazel/typescript": "4.0.0",
"@firebase/app-types": "^0.6.1",
"@material/animation": "13.0.0-canary.0a9069300.0",
"@material/auto-init": "13.0.0-canary.0a9069300.0",
Expand Down
4 changes: 2 additions & 2 deletions src/cdk/testing/private/e2e/asserts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function expectLocation(element: FinderResult, {x, y}: Point) {
* Asserts that one element is aligned with another.
*/
export async function expectAlignedWith(element: FinderResult, otherElement: FinderResult) {
await getElement(otherElement).getLocation().then((location: Point) => {
expectLocation(getElement(element), location);
await getElement(otherElement).getLocation().then(async (location: Point) => {
await expectLocation(getElement(element), location);
Copy link
Member Author

@devversion devversion Aug 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason there was a missing await here that caused e2e tests to fail. Not sure if it was flaky because it happened constantly on this PR, but the missing await definitely is reasonable for flakiness..

});
}
2 changes: 1 addition & 1 deletion src/material-date-fns-adapter/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ng_package", "ng_test_library", "ng_web_test_suite")
load(":esbuild-amd.bzl", "esbuild_amd")
load("//tools/esbuild:index.bzl", "esbuild_amd")

package(default_visibility = ["//visibility:public"])

Expand Down
40 changes: 0 additions & 40 deletions src/material-date-fns-adapter/esbuild-amd.bzl

This file was deleted.

1 change: 1 addition & 0 deletions tools/esbuild/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exports_files(["esbuild-amd-config.mjs"])
5 changes: 5 additions & 0 deletions tools/esbuild/esbuild-amd-config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
globalName: "__exports",
banner: {js: 'define("TMPL_MODULE_NAME", [], function() {'},
footer: {js: 'return __exports;})'},
};
42 changes: 42 additions & 0 deletions tools/esbuild/index.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
load("@npm//@bazel/esbuild:index.bzl", "esbuild_config", _esbuild = "esbuild")
load("@npm//@angular/dev-infra-private/bazel:expand_template.bzl", "expand_template")

def esbuild(**kwargs):
_esbuild(**kwargs)

"""Generates an AMD bundle for the specified entry-point with the given AMD module name."""

def esbuild_amd(name, entry_point, module_name, testonly, deps):
expand_template(
name = "%s_config" % name,
testonly = testonly,
template = "//tools/esbuild:esbuild-amd-config.mjs",
output_name = "%s_config.mjs" % name,
substitutions = {
"TMPL_MODULE_NAME": module_name,
},
)

esbuild_config(
name = "%s_config_lib" % name,
testonly = testonly,
config_file = "%s_config" % name,
)

_esbuild(
name = "%s_bundle" % name,
testonly = testonly,
deps = deps,
minify = True,
sourcemap = "inline",
platform = "browser",
target = "es2015",
entry_point = entry_point,
config = "%s_config_lib" % name,
)

native.filegroup(
name = name,
testonly = testonly,
srcs = ["%s_bundle" % name],
)
64 changes: 32 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -543,19 +543,19 @@
resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-4.0.1.tgz#52cfbad5cbb86e9183a29dde2370cd465730ea0d"
integrity sha512-BTmtvJbeeEVrqRApI1gr5hvPgYcHLpdGJ5EXNXEWO692ztMPSj5fB/dH0xUlaW45jn6LimYx8ymqTMhj3538og==

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-4.0.0-beta.0.tgz#f1dddefe2cefc543ec61f06c5bc28c908bfb4569"
integrity sha512-azGMcLwOIEEbTHm0ORCsSMZ5yBIQaRWlWMN3b7M5uD6C646EaiM7b2wx8CkOJlyZrZOLEajjvePvN7lqkPM1Cg==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-4.0.0.tgz#fae04e7adb560f7666a71d8552bb424bb53b7d45"
integrity sha512-Ua+8Myq1RJjffASRHUzqFu05Zs5qU5Auzc+aiyq8V9opP5WTT4HR5lymmJrT/S1brhhM/1GZfbMZbYaddgyeVw==
dependencies:
protobufjs "6.8.8"
source-map-support "0.5.9"
tsutils "2.27.2"

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/esbuild/-/esbuild-4.0.0-beta.0.tgz#ff75447b18bc0d56b376d7e44095d9ca9b904583"
integrity sha512-4AxL8IhyeyeTH0fr1XFfdd1ls/AnsiEu1oBXxoplb0ar88pRrdl0UjCUgLylWj75uIcQsqu/l3Xv7qOfDSXWsQ==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/esbuild/-/esbuild-4.0.0.tgz#daa8286d72a9e6522f6f2c514aed9716a331aa25"
integrity sha512-SrdJexg+PNjdsTDp0voPS0SlU/yovbwrH+ObtFShHQ2X52u9mqvU2Cm7If48pWobkGK4rl7vDbzIHYWVKdGXlw==

"@bazel/[email protected]":
version "4.0.0-rc.1"
Expand All @@ -567,10 +567,10 @@
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.15.10.tgz#cf0cff1aec6d8e7bb23e1fc618d09fbd39b7a13f"
integrity sha512-0v+OwCQ6fsGFa50r6MXWbUkSGuWOoZ22K4pMSdtWiL5LKFIE4kfmMmtQS+M7/ICNwk2EIYob+NRreyi/DGUz5A==

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-4.0.0-beta.0.tgz#575e9cd88932b19c54447fba43cbd62e14ff3022"
integrity sha512-VYEAaHCi8ot0aSMKbIio6usJZqvINd7LzrrGoChGAGwMgGEpTfMGdprwdlrQPKD6/GbLkVtkCcsViG92ynXhdQ==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-4.0.0.tgz#2e95f1b3458e0d69f16e0c820fe4631a43942a90"
integrity sha512-vi1n+vbLwKki7aa8kXDG709nxRXAmLEvqbijSpm8d3rrW4f68Ad5xKyT2gezO84OeysUHU3cDZViXWwFcoHRng==
dependencies:
c8 "~7.5.0"
jasmine-reporters "~2.4.0"
Expand All @@ -583,40 +583,40 @@
c8 "~7.5.0"
jasmine-reporters "~2.4.0"

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-4.0.0-beta.0.tgz#fcabfd5c32005fcb93b80f83bcf99058bcf07d4f"
integrity sha512-cIlqzPEXu3zFhFR+5Vqo5D/qLkOEY/gZ1xc74/V/CVAlbkCZsWJ18gDE1bhca9t1Mj41igDqwlvXUndxdQjNtw==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-4.0.0.tgz#f29ae81c22790596bfd8212952a8e370406d094f"
integrity sha512-YiSU2IYdiW7HoVC3gAZJs9M0CiH9qluAvA9YLfvM3pM7rI1OmXYCm3hojgOLIRslbThcpfAcmQKjeUfdQPX5bA==

"@bazel/[email protected]":
version "4.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-4.0.0-rc.1.tgz#1c7ae5366423ab02f2b5a30352b98cd1729837a5"
integrity sha512-qF9QPn/qTbU2yD+1liv5HwfD/2dkmDq7Mrb4OI1TI6Q74XY+k0wplDWh0GZFTQtHTOxzAOzivGCZBC8/9eSxLw==

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-4.0.0-beta.0.tgz#ec4bc88f401bd555d43c55c34183cda4f004ae96"
integrity sha512-CAl5+iNuVgFA52zOFmoQvY9LpjEf/hPiw/PRPXR0JrXy83xk+Nxnrv7UKvP4Jmux+K24uDf+ZOIr62rGzMHVhA==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-4.0.0.tgz#909cfa9bd0243fd78657711b3aa644b8432ba636"
integrity sha512-OcL7QtNk2nyN/v7fnih0VQ0pIDwSxdGkyZvt/m1SwODx/eJpBceam0yboLoer/sYEZPhv7YFyCTk9n2X64TZ5g==

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-4.0.0-beta.0.tgz#e62679d80cf9fcd84996e5f3ae4bedc33ed1a993"
integrity sha512-pFdanyvI0wf2WtdQXUmcTZw7OJ83uj2bxF3rOskx45wewBRAlQZkm2q2A6WEffSfdf2WaBlk5u/x2kqK2nyG7w==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-4.0.0.tgz#3d649d93710364515402b873add73947aaa702e8"
integrity sha512-1V0E1ooSw7DARfOBkr24O5GOpqODDd7RuJ2Xb+JljjdpUdJTIaVeqELBpSHAiYzqVJYWAn61sD5JP1CPCllixA==

"@bazel/[email protected]":
version "4.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-4.0.0-rc.1.tgz#aaf97d633ba813db2c0bfa5bc126f50118d82066"
integrity sha512-0RGbEe4hBpafbLSIIBYGFPRLZ7FRJ+S6PjdVfRkpZlNpe6T1QXxgdg6M5/ETQXNVqfdUhMLdNFZ1heMk4uXhzg==

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-4.0.0-beta.0.tgz#2ca1c59e1e109e2f3b0c561b534730a035844a26"
integrity sha512-qGDLsmg2ekEojDHrTEiPJd0bdqbCPT2/YImsZhg1swpLEFnFCLCUNVnESt62Wd6bKonzvQeFo8zpKaCK326e4g==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-4.0.0.tgz#9ef0c4635ba0191965f0b6c26eb0cc348c8c1f5e"
integrity sha512-sktDTfEBFD6LIv+g7W0l9nt5pih7N7aQVA09lv09rbTWD/JGX1LSSjG2p16af297XMxCP6GoHyVaxOVXS3IPYA==

"@bazel/[email protected]-beta.0":
version "4.0.0-beta.0"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-4.0.0-beta.0.tgz#daf2fb0d0bdcd3df331d4320463b1a4beca6031c"
integrity sha512-dfI3QLQ5bLyK3BIrrwxuH9cLbMHuku0UZH7nwjHjXwQX70O0MSGN6yXx2Vrqatj2iw/UfHX/akPuhGlNqrDFRw==
"@bazel/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-4.0.0.tgz#71a6f0f5e340c6b8516b21fbc0f0853e74055d0c"
integrity sha512-+Le9q+5IR9gEnSH8sXyxDB5dD6NJx2kbm6AL+cijYVat2MczpGV4sI1mu0mdLzYsEX5Tjt5iHkaNb7sFESjnYA==
dependencies:
protobufjs "6.8.8"
semver "5.6.0"
Expand Down