Fix @build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto target in npm @bazel/typescript generated bazel workspace

Closes #404

PiperOrigin-RevId: 232380639
diff --git a/README.md b/README.md
index e334a93..09dbcf5 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,8 @@
 {
   ...
   "devDependencies": {
-    "@bazel/typescript": "0.23.0",
-    "@bazel/karma": "0.23.0",
+    "@bazel/typescript": "0.23.1",
+    "@bazel/karma": "0.23.1",
     ...
   },
   ...
diff --git a/WORKSPACE b/WORKSPACE
index 2b64456..9427127 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -77,7 +77,7 @@
 # Test that check_rules_typescript_version works as expected
 load("//:defs.bzl", "check_rules_typescript_version")
 
-check_rules_typescript_version(version_string = "0.23.0")
+check_rules_typescript_version(version_string = "0.23.1")
 
 # Dependencies for generating documentation
 load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
diff --git a/internal/e2e/npm_packages/typescript_2.7/BUILD.bazel b/internal/e2e/npm_packages/typescript_2.7/BUILD.bazel
index db3403d..e7cccf4 100644
--- a/internal/e2e/npm_packages/typescript_2.7/BUILD.bazel
+++ b/internal/e2e/npm_packages/typescript_2.7/BUILD.bazel
@@ -34,6 +34,10 @@
 
 jasmine_node_test(
     name = "test",
+    data = [
+        # Verify that worker_protocol.proto can be referenced as a target in the generated npm bazel workspace
+        "@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
+    ],
     deps = [
         ":test_lib",
         "@npm//jasmine",
diff --git a/internal/e2e/npm_packages/typescript_2.8/BUILD.bazel b/internal/e2e/npm_packages/typescript_2.8/BUILD.bazel
index db3403d..e7cccf4 100644
--- a/internal/e2e/npm_packages/typescript_2.8/BUILD.bazel
+++ b/internal/e2e/npm_packages/typescript_2.8/BUILD.bazel
@@ -34,6 +34,10 @@
 
 jasmine_node_test(
     name = "test",
+    data = [
+        # Verify that worker_protocol.proto can be referenced as a target in the generated npm bazel workspace
+        "@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
+    ],
     deps = [
         ":test_lib",
         "@npm//jasmine",
diff --git a/internal/e2e/npm_packages/typescript_2.9/BUILD.bazel b/internal/e2e/npm_packages/typescript_2.9/BUILD.bazel
index db3403d..e7cccf4 100644
--- a/internal/e2e/npm_packages/typescript_2.9/BUILD.bazel
+++ b/internal/e2e/npm_packages/typescript_2.9/BUILD.bazel
@@ -34,6 +34,10 @@
 
 jasmine_node_test(
     name = "test",
+    data = [
+        # Verify that worker_protocol.proto can be referenced as a target in the generated npm bazel workspace
+        "@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
+    ],
     deps = [
         ":test_lib",
         "@npm//jasmine",
diff --git a/internal/e2e/npm_packages/typescript_3.0/BUILD.bazel b/internal/e2e/npm_packages/typescript_3.0/BUILD.bazel
index db3403d..e7cccf4 100644
--- a/internal/e2e/npm_packages/typescript_3.0/BUILD.bazel
+++ b/internal/e2e/npm_packages/typescript_3.0/BUILD.bazel
@@ -34,6 +34,10 @@
 
 jasmine_node_test(
     name = "test",
+    data = [
+        # Verify that worker_protocol.proto can be referenced as a target in the generated npm bazel workspace
+        "@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
+    ],
     deps = [
         ":test_lib",
         "@npm//jasmine",
diff --git a/internal/e2e/npm_packages/typescript_3.1/BUILD.bazel b/internal/e2e/npm_packages/typescript_3.1/BUILD.bazel
index db3403d..e7cccf4 100644
--- a/internal/e2e/npm_packages/typescript_3.1/BUILD.bazel
+++ b/internal/e2e/npm_packages/typescript_3.1/BUILD.bazel
@@ -34,6 +34,10 @@
 
 jasmine_node_test(
     name = "test",
+    data = [
+        # Verify that worker_protocol.proto can be referenced as a target in the generated npm bazel workspace
+        "@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
+    ],
     deps = [
         ":test_lib",
         "@npm//jasmine",
diff --git a/on-version.js b/on-version.js
index 18dee81..87e3d8e 100644
--- a/on-version.js
+++ b/on-version.js
@@ -29,7 +29,7 @@
 const version = require('./package.json').version;
 shell.sed('-i', '\"@bazel/typescript\": \"[0-9\.]*\"', `"@bazel/typescript": "${version}"`, 'README.md');
 shell.sed('-i', '\"@bazel/karma\": \"[0-9\.]*\"', `"@bazel/karma": "${version}"`, 'README.md');
-shell.sed('-i', 'VERSION \= \"[0-9\.]*\"', `VERSION = "${version}"`, 'version.bzl');
+shell.sed('-i', '^VERSION \= \"[0-9\.]*\"', `VERSION = "${version}"`, 'version.bzl');
 shell.sed('-i', 'check_rules_typescript_version\\\(version_string \= \"[0-9\.]*\"', `check_rules_typescript_version(version_string = "${version}"`, 'WORKSPACE');
 
 // Following instructions in version.bzl, we should update the minimal compatibility version whenever
diff --git a/package.json b/package.json
index 15f4a39..e570a07 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
     "description": "TypeScript rules for Bazel",
     "homepage": "https://github.com/bazelbuild/rules_typescript",
     "license": "Apache-2.0",
-    "version": "0.23.0",
+    "version": "0.23.1",
     "keywords": [
         "typescript",
         "bazel"
diff --git a/third_party/github.com/bazelbuild/bazel/src/main/protobuf/BUILD.bazel b/third_party/github.com/bazelbuild/bazel/src/main/protobuf/BUILD.bazel
index 38af0d0..24a43bf 100644
--- a/third_party/github.com/bazelbuild/bazel/src/main/protobuf/BUILD.bazel
+++ b/third_party/github.com/bazelbuild/bazel/src/main/protobuf/BUILD.bazel
@@ -1,13 +1,18 @@
+# BEGIN-DEV-ONLY
+# Parts of this BUILD file only necessary when building within the bazelbuild/rules_typescript repo.
+# The generated `@bazel/typescript` npm package contains a trimmed BUILD file using # DEV-ONLY fences.
 load("@io_bazel_rules_go//go:def.bzl", "go_library")
 load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
 
 package(default_visibility = ["//:__pkg__"])
 
 licenses(["notice"])  # Apache 2.0
+# END-DEV-ONLY
 
 # Export the raw proto file so protobufjs can be used reflectively without codegen
 exports_files(["worker_protocol.proto"])
 
+# BEGIN-DEV-ONLY
 proto_library(
     name = "blaze_worker_proto",
     srcs = ["worker_protocol.proto"],
@@ -31,6 +36,8 @@
 filegroup(
     name = "npm_package_assets",
     srcs = [
+        "BUILD.bazel",
         "worker_protocol.proto",
     ],
 )
+# END-DEV-ONLY
diff --git a/version.bzl b/version.bzl
index ec462f9..3d4590c 100644
--- a/version.bzl
+++ b/version.bzl
@@ -17,7 +17,7 @@
 
 load("@build_bazel_rules_nodejs//internal/common:check_version.bzl", "check_version")
 
-VERSION = "0.23.0"
+VERSION = "0.23.1"
 
 # This version is the minimum version that is API compatible with this version
 # of rules_typescript. This version should be updated to equal VERSION for