Remove publishing-related bits from rules_typescript

We only publish @bazel/typescript from the rules_nodejs repo now

Closes #431

PiperOrigin-RevId: 235598697
diff --git a/.bazelrc b/.bazelrc
index 41e47fa..adf60bc 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -4,8 +4,6 @@
 # Enable debugging tests with --config=debug
 test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
 
-build --workspace_status_command=./tools/bazel_stamp_vars.sh
-
 # Turn off legacy external runfiles
 run --nolegacy_external_runfiles
 test --nolegacy_external_runfiles
diff --git a/BUILD.bazel b/BUILD.bazel
index b2b79b6..ace9f17 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -21,7 +21,6 @@
 load("@bazel_gazelle//:def.bzl", "gazelle")
 load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
 load("@build_bazel_rules_nodejs//internal/js_library:js_library.bzl", "js_library")
-load("//:version.bzl", "COMPAT_VERSION")
 
 # ts_library defaults to this label in the top-level package.
 # Point to where the file actually lives.
@@ -55,46 +54,6 @@
     visibility = ["//visibility:public"],
 )
 
-genrule(
-    name = "generate_BUILD",
-    srcs = [],
-    outs = ["BUILD"],
-    cmd = "echo \"#marker that this is a bazel package\" > $@",
-)
-
-npm_package(
-    name = "npm_package",
-    srcs = [
-        "LICENSE",
-        "README.md",
-        "defs.bzl",
-        "package.bzl",
-        "package.json",
-        "version.bzl",
-        "//devserver:npm_package_assets",
-        "//internal:npm_package_assets",
-        "//third_party/github.com/bazelbuild/bazel/src/main/protobuf:npm_package_assets",
-        "//ts_auto_deps:npm_package_assets",
-    ],
-    replacements = {
-        "(#|\/\/)\\s+BEGIN-DEV-ONLY[\\w\W]+?(#|\/\/)\\s+END-DEV-ONLY": "",
-        # Do a simple replacement needed to make the local development differ
-        # from how our release is used.
-        "//devserver:devserver_bin": "//devserver",
-        "0.0.0-COMPAT_VERSION": COMPAT_VERSION,
-    },
-    deps = [
-        ":generate_BUILD",
-        "//devserver:devserver-darwin",
-        "//devserver:devserver-linux",
-        "//devserver:devserver-windows",
-        "//internal:generated_BUILD",
-        "//internal:tsc_wrapped",
-        "//ts_auto_deps:ts_auto_deps-darwin",
-        "//ts_auto_deps:ts_auto_deps-linux",
-        "//ts_auto_deps:ts_auto_deps-windows",
-    ],
-)
 
 # This package is included in the npm_bazel_typescript package in rules_nodejs/packages/typescript
 npm_package(
diff --git a/DEVELOPING.md b/DEVELOPING.md
index c5b36dd..fcfbee8 100644
--- a/DEVELOPING.md
+++ b/DEVELOPING.md
@@ -48,23 +48,3 @@
 
 Note, with this workflow the downstream version of `@npm//typescript` will be used to compile the `ts_library` targets in `npm_bazel_typescript`.
 An example of this can be found under `internal/e2e/typescript_3.1`.
-
-## Releasing
-
-Start from a clean checkout at master/HEAD. Check if there are any breaking
-changes since the last tag - if so, this will be a minor, if not, it's a patch.
-(This may not sound like semver - but since our major version is a zero, the
-rule is that minors are breaking changes and patches are new features).
-
-1. Re-generate the API docs: `yarn skydoc`
-1. May be necessary if Go code has changed though probably it was already necessary to run this to keep CI green: `bazel run :gazelle`
-1. If we depend on a newer rules_nodejs, update the `check_rules_nodejs_version` in `ts_repositories.bzl`
-1. `git commit -a -m 'Update docs for release'`
-1. `npm config set tag-version-prefix ''`
-1. `npm version minor -m 'rel: %s'` (replace `minor` with `patch` if no breaking changes)
-1. Build npm packages and publish them: `TMP=$(mktemp -d -t bazel-release.XXXXXXX); bazel --output_base=$TMP run //:npm_package.publish && ( cd internal/karma && bazel --output_base=$TMP run //:npm_package.publish )`
-1. `git push upstream && git push upstream --tags` (assumes you named the bazelbuild fork as "upstream")
-1. (Temporary): submit a google3 CL to update the versions in package.bzl and package.json
-
-[releases]: https://github.com/bazelbuild/rules_typescript/releases
-
diff --git a/internal/BUILD.bazel b/internal/BUILD.bazel
index e9baf8e..698cef0 100644
--- a/internal/BUILD.bazel
+++ b/internal/BUILD.bazel
@@ -128,17 +128,9 @@
 filegroup(
     name = "npm_package_assets",
     srcs = [
-        "build_defs.bzl",
         "common/compilation.bzl",
         "common/json_marshal.bzl",
         "common/module_mappings.bzl",
         "common/tsconfig.bzl",
-        "defaults.bzl",
-        "ts_config.bzl",
-        "ts_repositories.bzl",
-        "tsc_wrapped/package.json",
-        "tsc_wrapped/yarn.lock",
-        "//internal/devserver:npm_package_assets",
-        "//internal/protobufjs:npm_package_assets",
     ],
 )
diff --git a/on-version.js b/on-version.js
deleted file mode 100644
index 87e3d8e..0000000
--- a/on-version.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @license
- * Copyright 2017 The Bazel Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * @fileoverview This script updates the version in package.bzl to match
- * the version in package.json. It is automatically called during the
- * `npm version` step of the release process (see Releasing in README.me)
- * by the "version" script in package.json.
- */
-'use strict';
-
-// Called from "version" npm script when running `npm version`
-// during release process. This script updates the version
-// in package.bzl to match that of package.json.
-const shell = require('shelljs');
-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', '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
-// we have new features or breaking changes. So we assume that a patch number of 0 implies this.
-if (version.endsWith('.0')) {
-    shell.sed('-i', 'COMPAT_VERSION \= \"[0-9\.]*\"', `COMPAT_VERSION = "${version}"`, 'version.bzl')
-}
diff --git a/package.json b/package.json
index 5240c5f..b4834d1 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,6 @@
         "skydoc": "bazel build //docs && unzip -o -d docs/api bazel-bin/docs/docs-skydoc.zip",
         "bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=args-order,attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unsorted-dict-items,unused-variable",
         "bazel:lint": "yarn bazel:format --lint=warn",
-        "bazel:lint-fix": "yarn bazel:format --lint=fix",
-        "version": "node ./on-version.js && git stage README.md version.bzl WORKSPACE"
+        "bazel:lint-fix": "yarn bazel:format --lint=fix"
     }
 }
diff --git a/tools/bazel_stamp_vars.sh b/tools/bazel_stamp_vars.sh
deleted file mode 100755
index 1540d2d..0000000
--- a/tools/bazel_stamp_vars.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env bash
-echo BUILD_SCM_VERSION $(git describe --abbrev=7 --tags HEAD)