From bbce2ad7d49601e483adc688cd5896d064cb0d9a Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Tue, 26 Nov 2019 17:34:12 -0800 Subject: [PATCH] build: update to nodejs rules 0.42.1 (#34073) * This brings in a fix to the `@npm//foo:foo_files` targets for https://github.com/angular/angular/pull/33927 so the a rules_nodejs patch can be removed. * It also brings a protractor_web_test fix that resolves the need for a work-around in /modules/playground/e2e_test/sourcemap/BUILD.bazel. PR Close #34073 --- WORKSPACE | 6 +-- .../playground/e2e_test/sourcemap/BUILD.bazel | 15 +----- package.json | 12 ++--- yarn.lock | 48 +++++++++---------- 4 files changed, 34 insertions(+), 47 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index cb8d456b02..3dedd60d19 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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 = "8dc1466f8563f3aa4ac7ab7aa3c96651eb7764108219f40b2d1c918e1a81c601", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.41.0/rules_nodejs-0.41.0.tar.gz"], + sha256 = "c612d6b76eaa17540e8b8c806e02701ed38891460f9ba3303f4424615437887a", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.42.1/rules_nodejs-0.42.1.tar.gz"], ) # Check the bazel version and download npm dependencies @@ -29,7 +29,7 @@ Try running `yarn bazel` instead. minimum_bazel_version = "1.1.0", ) -check_rules_nodejs_version(minimum_version_string = "0.41.0") +check_rules_nodejs_version(minimum_version_string = "0.42.1") # Setup the Node.js toolchain node_repositories( diff --git a/modules/playground/e2e_test/sourcemap/BUILD.bazel b/modules/playground/e2e_test/sourcemap/BUILD.bazel index 2ee1cb2304..943adc8d2a 100644 --- a/modules/playground/e2e_test/sourcemap/BUILD.bazel +++ b/modules/playground/e2e_test/sourcemap/BUILD.bazel @@ -1,24 +1,11 @@ load("//modules/playground/e2e_test:example_test.bzl", "example_test") -filegroup( - name = "protractor_web_test_data_workaroud", - srcs = ["//modules/playground/src/sourcemap:index.ts"], -) -# Work-around for protractor_web_test data not allowing files. -# TODO(gregmagolan): remove this work-around once this is fixed in rules_nodejs -# ``` -# ERROR: /Users/greg/google/angular-2/modules/playground/e2e_test/sourcemap/BUILD.bazel:8:1: -# in data attribute of _protractor_web_test rule //modules/playground/e2e_test/sourcemap:protractor_tests_wrapped_test: -# source file '//modules/playground/src/sourcemap:index.ts' is misplaced here (expected no files). Since this rule was -# created by the macro 'example_test', the error might have been caused by the macro implementation -# ``` - example_test( name = "sourcemap", srcs = glob(["**/*.ts"]), data = [ - ":protractor_web_test_data_workaroud", "//modules/playground/src/sourcemap", + "//modules/playground/src/sourcemap:index.ts", ], server = "//modules/playground/src/sourcemap:devserver", ) diff --git a/package.json b/package.json index 820d42e353..779b8b8a43 100644 --- a/package.json +++ b/package.json @@ -41,12 +41,12 @@ "@angular-devkit/schematics": "^9.0.0-rc.3", "@angular/bazel": "file:./tools/npm/@angular_bazel", "@babel/core": "^7.6.4", - "@bazel/jasmine": "0.41.0", - "@bazel/karma": "0.41.0", - "@bazel/protractor": "0.41.0", - "@bazel/rollup": "0.41.0", - "@bazel/terser": "0.41.0", - "@bazel/typescript": "0.41.0", + "@bazel/jasmine": "0.42.1", + "@bazel/karma": "0.42.1", + "@bazel/protractor": "0.42.1", + "@bazel/rollup": "0.42.1", + "@bazel/terser": "0.42.1", + "@bazel/typescript": "0.42.1", "@microsoft/api-extractor": "^7.3.9", "@schematics/angular": "^9.0.0-rc.3", "@types/angular": "^1.6.47", diff --git a/yarn.lock b/yarn.lock index bdf79e43eb..11f776de6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -981,41 +981,41 @@ resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.10.3.tgz#2e2b8a1d3e885946eac41db2b1aa6801fb319887" integrity sha512-v1nXbMTHVlMM4z4uWp6XiRoHAyUlYggF1SOboLLWRp0+D22kWixqArWqnozLw2mOtnxr97BdLjluWiho6A8Hjg== -"@bazel/jasmine@0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.41.0.tgz#4e9c1622b6ceacdcf12740098d8c99fc3cff6bfb" - integrity sha512-vbZaTx05Ab5ZbJ1TDHjwWvtrDYBh4miXVJBdFeSZtquLQ0FQb9iNdMTuDHkEF9aq6nqG+rnjUoQjjmDLC/uRkg== +"@bazel/jasmine@0.42.1": + version "0.42.1" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.42.1.tgz#d26b4aee19e064805d45865e8a65798cbfa4b4e7" + integrity sha512-cXIUe1AOwY/2Q+C4JO1F24V4rfmYt/h4WDC52T/ZMD13F6ZUsuLrQqL5TKgzYaRP3fWNfphAt00+9QVsIkrs/g== dependencies: jasmine "~3.4.0" jasmine-core "~3.4.0" v8-coverage "1.0.9" -"@bazel/karma@0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.41.0.tgz#1ad3b48d8b5cf1e08ed266872c18344c8bd63e94" - integrity sha512-L23VC9EUFmrMCYJAT9qPnyezM5IErCJ8URpmXfRo/7IUJ04/l4vQeiyi4iNY7+zw9lbGf2I8seGaPFJrFtxdoQ== +"@bazel/karma@0.42.1": + version "0.42.1" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.42.1.tgz#f255e3181341592064cd2d0c70d72a3f3ea0ae5f" + integrity sha512-VRu/MXc5eqqVKILJeirR3EqJFGnrFkmG1XlcuhbGL1+eo+7pY3BUhdFXdihagXZG8QPDXlHbkY7GNOghAdl6DA== dependencies: tmp "0.1.0" -"@bazel/protractor@0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-0.41.0.tgz#56075a657f236602bd762e712dd42c514baede0c" - integrity sha512-sQtAYheBOEcX32BWNyRj5VssCrMbPzEun4x9QPWnoxtBebkxeuZplRjbaoc+PFdVYys+ixwAqTkS49qlV4Ng1w== +"@bazel/protractor@0.42.1": + version "0.42.1" + resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-0.42.1.tgz#9dd2ce7181a87af298f955f29d5b6615f1c0fc7a" + integrity sha512-/8jHqqCi+1EcyZKyzduCSzWaXUjfQ5WTl464yFkYzQCDEDPcQcje5nJh9qewoxuCoFFwVY++cnGPwBu6k2yShg== -"@bazel/rollup@0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-0.41.0.tgz#8dfaccc239f3efbae1c816b0ce2aeb6069d23582" - integrity sha512-M+ybGfcxTXnAS1QiaijLEfUznNYLA0cqeGXnYHSRrOhq2U7yesfavxbBtfLSKtg32ktmlHts5te8Zg82BS4DPQ== +"@bazel/rollup@0.42.1": + version "0.42.1" + resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-0.42.1.tgz#13974423001417251d14dffb9b7e4c5fb3c65779" + integrity sha512-BxXCtZ/x9ZBr1zUTa1D4bUfb7Xq2iDZjw6iBLTafFnhIRgyiVz0YaIXDoXEXMmpqn9tsOnd5ivVWFTSDvOjV/w== -"@bazel/terser@0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-0.41.0.tgz#2a0db8985ef2a4d015c3fda16d07c6813b29062a" - integrity sha512-NNC3o4yLlVoJgPAG1/6cir+aX3lYSn5ggVzQIDQKZHbePevr8E0PA5SMjthnKp/pQVs5URfZNADdXZnROTeu0w== +"@bazel/terser@0.42.1": + version "0.42.1" + resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-0.42.1.tgz#ff74f718cad0595dd7e486cdec57efd539d7ec21" + integrity sha512-r6SZELGucqCT/OjYrCTeyxw6CVL3ex3kb4yGv4QAzJ4501N6BHHRdu7dziu6byYEDfpizjw4ccn743sLn9PqhQ== -"@bazel/typescript@0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.41.0.tgz#b767c4972cc42fd76c118f21e83e98860afdc249" - integrity sha512-i+PXf5BR7aUEA49V+D8OatHonNCDm2MhtjFwEJ7yKKLTPEm4riHWSDASNuOi4iAAe+EB8eKe1Fxh8iSjh/hm4A== +"@bazel/typescript@0.42.1": + version "0.42.1" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.42.1.tgz#afa4c2e3de7ef60777fd7cd1828d1af57d09afb0" + integrity sha512-fObLUXlI3E9ZdGjCIGzXX6VkEo3x417PZvpIUBrVI3YONhbMoqAERB2yD4Mp8waoFKKu7ePnKCmoCWEa7PSTtA== dependencies: protobufjs "6.8.8" semver "5.6.0"