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
This commit is contained in:
Greg Magolan
2019-11-26 17:34:12 -08:00
committed by Miško Hevery
parent 2cc954d5a5
commit bbce2ad7d4
4 changed files with 34 additions and 47 deletions

View File

@ -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",
)