Update to rules_nodejs 0.32.0
@npm//node_modules/foobar:foobar.js labels changed to @npm//:node_modules/foobar/foobar.js with fix for bazelbuild/rules_nodejs#802
See #458
PiperOrigin-RevId: 254046674
diff --git a/internal/BUILD.bazel b/internal/BUILD.bazel
index 973561d..6e10a60 100644
--- a/internal/BUILD.bazel
+++ b/internal/BUILD.bazel
@@ -36,7 +36,7 @@
"@npm//source-map-support",
"@npm//typescript",
],
- entry_point = "@npm//node_modules/typescript:lib/tsc.js",
+ entry_point = "@npm//:node_modules/typescript/lib/tsc.js",
visibility = ["//internal:__subpackages__"],
)
diff --git a/package.bzl b/package.bzl
index e75064b..be23e71 100644
--- a/package.bzl
+++ b/package.bzl
@@ -30,12 +30,8 @@
_maybe(
http_archive,
name = "build_bazel_rules_nodejs",
- # This file just copy-pasted from output of `git diff`
- patches = ["//:rules_nodejs_pr756.patch"],
- # According to docs, this is needed for patches generated by git
- patch_args = ["-p1"],
- sha256 = "e04a82a72146bfbca2d0575947daa60fda1878c8d3a3afe868a8ec39a6b968bb",
- urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.31.1/rules_nodejs-0.31.1.tar.gz"],
+ sha256 = "06cb04f4f745e37d542ec6883a2896029715a591c0e44c5d250a268d3752f865",
+ urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.32.0/rules_nodejs-0.32.0.tar.gz"],
)
# For protocol buffers
diff --git a/package.json b/package.json
index c176455..42bdbd7 100644
--- a/package.json
+++ b/package.json
@@ -6,8 +6,8 @@
"@bazel/bazel": "^0.26.0",
"@bazel/buildifier": "^0.20.0",
"@bazel/ibazel": "^0.2.0",
- "@bazel/jasmine": "^0.31.1",
- "@bazel/typescript": "^0.31.1",
+ "@bazel/jasmine": "^0.32.0",
+ "@bazel/typescript": "^0.32.0",
"@types/jasmine": "^2.8.2",
"@types/long": "^4.0.0",
"@types/node": "7.0.18",
diff --git a/rules_nodejs_pr756.patch b/rules_nodejs_pr756.patch
deleted file mode 100644
index 9db35b3..0000000
--- a/rules_nodejs_pr756.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/internal/npm_install/node_module_library.bzl
-+++ b/internal/npm_install/node_module_library.bzl
-@@ -29,14 +29,20 @@ def _node_module_library_impl(ctx):
- # use in rules such as ts_devserver
- scripts = depset(ctx.files.scripts)
-
-- # declarations are a subset of sources that are decleration files
-- declarations = depset([f for f in ctx.files.srcs if f.path.endswith(".d.ts")])
-+ # declarations are a subset of sources that are declaration files
-+
-+ declarations = depset([
-+ f
-+ for f in ctx.files.srcs
-+ if f.path.endswith(".d.ts") and
-+ # exclude eg. external/npm/node_modules/protobufjs/node_modules/@types/node/index.d.ts
-+ # these would be duplicates of the typings provided directly in another dependency
-+ len(f.path.split("/node_modules/")) < 3
-+ ])
-+
-+ # transitive_declarations are all .d.ts files in srcs plus those in direct & transitive dependencies
-+ transitive_declarations = depset(transitive = [declarations])
-
-- # transitive_declarations are all direct & transitive decleration files
-- transitive_declarations = depset()
-- for src in ctx.attr.srcs:
-- if hasattr(src, "typescript"):
-- transitive_declarations = depset(transitive = [transitive_declarations, src.typescript.transitive_declarations])
- for dep in ctx.attr.deps:
- if hasattr(dep, "typescript"):
- transitive_declarations = depset(transitive = [transitive_declarations, dep.typescript.transitive_declarations])
diff --git a/yarn.lock b/yarn.lock
index b987092..f14d230 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -49,19 +49,19 @@
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.2.0.tgz#c119aef4344a789cef5e792caaee52264123e71c"
integrity sha1-wRmu9DRKeJzvXnksqu5SJkEj5xw=
-"@bazel/jasmine@^0.31.1":
- version "0.31.1"
- resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.31.1.tgz#da3de10760fe1e29e9fc748fabc4fcf604f4356a"
- integrity sha512-heKo8qzm6DTm8eOlfL69RJJi1GLI9vJDSmBGYgol18K7oXz6JrspGWUL9/TlCYbRUUCt22kqX7f3R+QlD0KrCg==
+"@bazel/jasmine@^0.32.0":
+ version "0.32.0"
+ resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.32.0.tgz#afbb3b7cb3aeabd55324962dec3253841ed617ee"
+ integrity sha512-yzXqa9lP+su6lqqFJbhcdvHOCgfgIm6zMt8i1doZU8O/RkefAWj2nv+8gY8dPGMMByB6herV/5QAowB88d6ZAA==
dependencies:
jasmine "~3.3.1"
jasmine-core "~3.3.0"
v8-coverage "1.0.9"
-"@bazel/typescript@^0.31.1":
- version "0.31.1"
- resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.31.1.tgz#2ccf9997d97903c51e73f82e29433fe444b8d672"
- integrity sha512-jUTJjwdc4JSDMt4kIj74gGtctu8xe0YZPJuPxOIS4TdrWcn+dG9Fy7Z8bJLXhePheig1JLY7NBP6BGwrtggzPQ==
+"@bazel/typescript@^0.32.0":
+ version "0.32.0"
+ resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.32.0.tgz#648be4c63302cac95552c74d17c708adbcc4c366"
+ integrity sha512-D2wlWanIDiagj50GetmbIeXN73XSG3E5eIhlDNL1atHe4ZPo7rODJGfI1Yme9xD71nbDL7WjwH15wYOfeoWNhA==
dependencies:
protobufjs "6.8.8"
semver "5.6.0"