Skip to content

Commit df8e928

Browse files
authored
Updates the rule to use ctx.executable instead of manually finding the entrypoint in ctx.files. This allows the rules_nodejs version to be updated. (#60)
1 parent 7c8ce2d commit df8e928

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ http_archive(
1515

1616
http_archive(
1717
name = "build_bazel_rules_nodejs",
18-
sha256 = "e1a0d6eb40ec89f61a13a028e7113aa3630247253bcb1406281b627e44395145",
18+
sha256 = "c97bf38546c220fa250ff2cc052c1a9eac977c662c1fc23eda797b0ce8e70a43",
1919
urls = [
20-
"https://github.com/bazelbuild/rules_nodejs/releases/download/1.0.1/rules_nodejs-1.0.1.tar.gz",
20+
"https://github.com/bazelbuild/rules_nodejs/releases/download/1.1.0/rules_nodejs-1.1.0.tar.gz",
2121
],
2222
)
2323

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@types/google-protobuf": "3.7.2",
1717
"@types/jasmine": "3.5.0",
1818
"clang-format": "1.3.0",
19-
"husky": "4.0.9",
19+
"husky": "4.0.10",
2020
"karma": "4.4.1",
2121
"karma-chrome-launcher": "3.1.0",
2222
"karma-firefox-launcher": "1.3.0",

src/typescript_proto_library.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def _get_input_proto_names(target):
4949
return " ".join(proto_inputs)
5050

5151
def _build_protoc_command(target, ctx):
52-
protoc_command = "%s" % (ctx.file._protoc.path)
52+
protoc_command = "%s" % (ctx.executable._protoc.path)
5353

54-
protoc_command += " --plugin=protoc-gen-ts=%s" % (ctx.files._ts_protoc_gen[1].path)
54+
protoc_command += " --plugin=protoc-gen-ts=%s" % (ctx.executable._ts_protoc_gen.path)
5555

5656
protoc_output_dir = ctx.var["BINDIR"]
5757
protoc_command += " --ts_out=service=grpc-web:%s" % (protoc_output_dir)
@@ -78,7 +78,7 @@ def _create_post_process_command(target, ctx, js_outputs, js_outputs_es6):
7878
] if p])
7979
file_name = output.basename[:-len(output.extension) - 1]
8080

81-
convert_command = ctx.files._change_import_style[1].path
81+
convert_command = ctx.executable._change_import_style.path
8282
convert_command += " --workspace_name {}".format(ctx.workspace_name)
8383
convert_command += " --input_base_path {}".format(file_path)
8484
convert_command += " --output_module_name {}".format(file_name)

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,10 +913,10 @@ http-proxy@^1.13.0:
913913
follow-redirects "^1.0.0"
914914
requires-port "^1.0.0"
915915

916-
917-
version "4.0.9"
918-
resolved "https://registry.yarnpkg.com/husky/-/husky-4.0.9.tgz#ded9e4f957dd8358649330da84906b6bf2e367e9"
919-
integrity sha512-zaH0INH9MZBH8smr6nPdzv7pjchOZPN/AKdhkuV4zut9SyF0+pUy1ZCBzhz2uPe7Cp75YzD92ewU2ytIZ0GjUQ==
916+
917+
version "4.0.10"
918+
resolved "https://registry.yarnpkg.com/husky/-/husky-4.0.10.tgz#659b52c404d3163b943a73f6c1d454708c0226d8"
919+
integrity sha512-Ptm4k2DqOwxeK/kzu5RaJmNRoGvESrgDXObFcZ8aJZcyXyMBHhM2FqZj6zYKdetadmP3wCwxEHCBuB9xGlRp8A==
920920
dependencies:
921921
chalk "^3.0.0"
922922
ci-info "^2.0.0"

0 commit comments

Comments
 (0)