Cleanup in e2e tests

Closes #305

PiperOrigin-RevId: 217607986
diff --git a/internal/e2e/default_tsconfig_test.js b/internal/e2e/default_tsconfig_test.js
index 30bad59..40fb642 100644
--- a/internal/e2e/default_tsconfig_test.js
+++ b/internal/e2e/default_tsconfig_test.js
@@ -22,44 +22,12 @@
 
 const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'wksp'));
 const WORKSPACE_BOILERPLATE = `
-http_archive(
-    name = "build_bazel_rules_nodejs",
-    # TODO: switch back to release tag before next rules_typescript release
-    urls = ["https://github.com/bazelbuild/rules_nodejs/archive/f56561116dadb3ce7b9e065b8d091c72c976eac8.zip"],
-    strip_prefix = "rules_nodejs-f56561116dadb3ce7b9e065b8d091c72c976eac8",
-)
-http_archive(
-    name = "bazel_skylib",
-    urls = ["https://github.com/bazelbuild/bazel-skylib/archive/0.3.1.zip"],
-    strip_prefix = "bazel-skylib-0.3.1",
-    sha256 = "95518adafc9a2b656667bbf517a952e54ce7f350779d0dd95133db4eb5c27fb1",
-)
-http_archive(
-    name = "io_bazel_skydoc",
-    urls = ["https://github.com/bazelbuild/skydoc/archive/0ef7695c9d70084946a3e99b89ad5a99ede79580.zip"],
-    strip_prefix = "skydoc-0ef7695c9d70084946a3e99b89ad5a99ede79580",
-    sha256 = "491f9e142b870b18a0ec8eb3d66636eeceabe5f0c73025706c86f91a1a2acb4d",
-)
-http_archive(
-    name = "io_bazel_rules_webtesting",
-    urls = ["https://github.com/bazelbuild/rules_webtesting/archive/0.2.1.zip"],
-    strip_prefix = "rules_webtesting-0.2.1",
-    sha256 = "7d490aadff9b5262e5251fa69427ab2ffd1548422467cb9f9e1d110e2c36f0fa",
-)
-http_archive(
-    name = "io_bazel_rules_go",
-    urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.13.0/rules_go-0.13.0.tar.gz"],
-    sha256 = "ba79c532ac400cefd1859cbc8a9829346aa69e3b99482cd5a54432092cbc3933",
-)
-http_archive(
-    name = "bazel_gazelle",
-    urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.13.0/bazel-gazelle-0.13.0.tar.gz"],
-    sha256 = "bc653d3e058964a5a26dcad02b6c72d7d63e6bb88d94704990b908a1445b8758",
-)
 local_repository(
     name = "build_bazel_rules_typescript",
     path = "${process.cwd()}",
 )
+load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
+rules_typescript_dependencies()
 load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
 node_repositories()
 yarn_install(
diff --git a/internal/e2e/package_karma/yarn.lock b/internal/e2e/package_karma/yarn.lock
index e02c99f..f62050f 100644
--- a/internal/e2e/package_karma/yarn.lock
+++ b/internal/e2e/package_karma/yarn.lock
@@ -3,7 +3,7 @@
 
 
 "@bazel/karma@file:../build_bazel_rules_typescript/bazel-bin/internal/karma/npm_package":
-  version "0.18.0-2-ga9643ab"
+  version "0.20.3"
   dependencies:
     jasmine-core "2.8.0"
     karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
diff --git a/internal/e2e/package_typescript_2.7/yarn.lock b/internal/e2e/package_typescript_2.7/yarn.lock
index ec8757c..cc8c6f0 100644
--- a/internal/e2e/package_typescript_2.7/yarn.lock
+++ b/internal/e2e/package_typescript_2.7/yarn.lock
@@ -3,9 +3,9 @@
 
 
 "@bazel/typescript@file:../build_bazel_rules_typescript/bazel-bin/internal/npm_package":
-  version "0.19.0-1-gd71a0e7"
+  version "0.20.3-1-g3eb0c59"
   dependencies:
-    protobufjs "5.0.0"
+    protobufjs "5.0.3"
     source-map-support "0.5.9"
     tsickle "0.28.0"
     tsutils "2.27.2"
@@ -86,17 +86,7 @@
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
 
-glob@^5.0.10:
-  version "5.0.15"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "2 || 3"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@^7.0.6:
+glob@^7.0.5, glob@^7.0.6:
   version "7.1.3"
   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
   dependencies:
@@ -150,7 +140,7 @@
   version "3.2.0"
   resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
 
-"minimatch@2 || 3", minimatch@^3.0.4:
+minimatch@^3.0.4:
   version "3.0.4"
   resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
   dependencies:
@@ -194,13 +184,13 @@
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
 
-protobufjs@5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
+protobufjs@5.0.3:
+  version "5.0.3"
+  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
   dependencies:
     ascli "~1"
     bytebuffer "~5"
-    glob "^5.0.10"
+    glob "^7.0.5"
     yargs "^3.10.0"
 
 source-map-support@0.5.9, source-map-support@^0.5.0:
diff --git a/internal/e2e/package_typescript_2.8/yarn.lock b/internal/e2e/package_typescript_2.8/yarn.lock
index 15d9a42..6ca59ba 100644
--- a/internal/e2e/package_typescript_2.8/yarn.lock
+++ b/internal/e2e/package_typescript_2.8/yarn.lock
@@ -3,9 +3,9 @@
 
 
 "@bazel/typescript@file:../build_bazel_rules_typescript/bazel-bin/internal/npm_package":
-  version "0.19.0-1-gd71a0e7"
+  version "0.20.3-1-g3eb0c59"
   dependencies:
-    protobufjs "5.0.0"
+    protobufjs "5.0.3"
     source-map-support "0.5.9"
     tsickle "0.28.0"
     tsutils "2.27.2"
@@ -86,17 +86,7 @@
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
 
-glob@^5.0.10:
-  version "5.0.15"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "2 || 3"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@^7.0.6:
+glob@^7.0.5, glob@^7.0.6:
   version "7.1.3"
   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
   dependencies:
@@ -150,7 +140,7 @@
   version "3.2.0"
   resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
 
-"minimatch@2 || 3", minimatch@^3.0.4:
+minimatch@^3.0.4:
   version "3.0.4"
   resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
   dependencies:
@@ -194,13 +184,13 @@
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
 
-protobufjs@5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
+protobufjs@5.0.3:
+  version "5.0.3"
+  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
   dependencies:
     ascli "~1"
     bytebuffer "~5"
-    glob "^5.0.10"
+    glob "^7.0.5"
     yargs "^3.10.0"
 
 source-map-support@0.5.9, source-map-support@^0.5.0:
diff --git a/internal/e2e/package_typescript_2.9/yarn.lock b/internal/e2e/package_typescript_2.9/yarn.lock
index 338ab9a..0dc9962 100644
--- a/internal/e2e/package_typescript_2.9/yarn.lock
+++ b/internal/e2e/package_typescript_2.9/yarn.lock
@@ -3,9 +3,9 @@
 
 
 "@bazel/typescript@file:../build_bazel_rules_typescript/bazel-bin/internal/npm_package":
-  version "0.19.0-1-gd71a0e7"
+  version "0.20.3-1-g3eb0c59"
   dependencies:
-    protobufjs "5.0.0"
+    protobufjs "5.0.3"
     source-map-support "0.5.9"
     tsickle "0.28.0"
     tsutils "2.27.2"
@@ -86,17 +86,7 @@
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
 
-glob@^5.0.10:
-  version "5.0.15"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "2 || 3"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@^7.0.6:
+glob@^7.0.5, glob@^7.0.6:
   version "7.1.3"
   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
   dependencies:
@@ -150,7 +140,7 @@
   version "3.2.0"
   resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
 
-"minimatch@2 || 3", minimatch@^3.0.4:
+minimatch@^3.0.4:
   version "3.0.4"
   resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
   dependencies:
@@ -194,13 +184,13 @@
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
 
-protobufjs@5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
+protobufjs@5.0.3:
+  version "5.0.3"
+  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
   dependencies:
     ascli "~1"
     bytebuffer "~5"
-    glob "^5.0.10"
+    glob "^7.0.5"
     yargs "^3.10.0"
 
 source-map-support@0.5.9, source-map-support@^0.5.0:
diff --git a/internal/e2e/package_typescript_3.0/yarn.lock b/internal/e2e/package_typescript_3.0/yarn.lock
index ccc3a2c..0e03eca 100644
--- a/internal/e2e/package_typescript_3.0/yarn.lock
+++ b/internal/e2e/package_typescript_3.0/yarn.lock
@@ -3,9 +3,9 @@
 
 
 "@bazel/typescript@file:../build_bazel_rules_typescript/bazel-bin/internal/npm_package":
-  version "0.19.0-1-gd71a0e7"
+  version "0.20.3-1-g3eb0c59"
   dependencies:
-    protobufjs "5.0.0"
+    protobufjs "5.0.3"
     source-map-support "0.5.9"
     tsickle "0.28.0"
     tsutils "2.27.2"
@@ -86,17 +86,7 @@
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
 
-glob@^5.0.10:
-  version "5.0.15"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "2 || 3"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@^7.0.6:
+glob@^7.0.5, glob@^7.0.6:
   version "7.1.3"
   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
   dependencies:
@@ -150,7 +140,7 @@
   version "3.2.0"
   resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
 
-"minimatch@2 || 3", minimatch@^3.0.4:
+minimatch@^3.0.4:
   version "3.0.4"
   resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
   dependencies:
@@ -194,13 +184,13 @@
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
 
-protobufjs@5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
+protobufjs@5.0.3:
+  version "5.0.3"
+  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
   dependencies:
     ascli "~1"
     bytebuffer "~5"
-    glob "^5.0.10"
+    glob "^7.0.5"
     yargs "^3.10.0"
 
 source-map-support@0.5.9, source-map-support@^0.5.0:
diff --git a/internal/e2e/package_typescript_karma/yarn.lock b/internal/e2e/package_typescript_karma/yarn.lock
index 87ea4bf..d35f28b 100644
--- a/internal/e2e/package_typescript_karma/yarn.lock
+++ b/internal/e2e/package_typescript_karma/yarn.lock
@@ -3,7 +3,7 @@
 
 
 "@bazel/karma@file:../build_bazel_rules_typescript/bazel-bin/internal/karma/npm_package":
-  version "0.19.0-1-gd71a0e7"
+  version "0.20.3"
   dependencies:
     jasmine-core "2.8.0"
     karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
@@ -17,9 +17,9 @@
     tmp "0.0.33"
 
 "@bazel/typescript@file:../build_bazel_rules_typescript/bazel-bin/internal/npm_package":
-  version "0.19.0-1-gd71a0e7"
+  version "0.20.3"
   dependencies:
-    protobufjs "5.0.0"
+    protobufjs "5.0.3"
     source-map-support "0.5.9"
     tsickle "0.28.0"
     tsutils "2.27.2"
@@ -1143,16 +1143,6 @@
   dependencies:
     is-glob "^2.0.0"
 
-glob@^5.0.10:
-  version "5.0.15"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "2 || 3"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
 glob@^7.0.0, glob@^7.0.5, glob@^7.1.1:
   version "7.1.3"
   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
@@ -1873,7 +1863,7 @@
   version "1.6.0"
   resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
 
-"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4:
+minimatch@^3.0.2, minimatch@^3.0.4:
   version "3.0.4"
   resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
   dependencies:
@@ -2270,13 +2260,13 @@
   dependencies:
     with-callback "^1.0.2"
 
-protobufjs@5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
+protobufjs@5.0.3:
+  version "5.0.3"
+  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
   dependencies:
     ascli "~1"
     bytebuffer "~5"
-    glob "^5.0.10"
+    glob "^7.0.5"
     yargs "^3.10.0"
 
 proxy-agent@~3.0.0: