diff --git a/docs/Concatjs.html b/docs/Concatjs.html index 14310da9b7..8125218dc3 100755 --- a/docs/Concatjs.html +++ b/docs/Concatjs.html @@ -357,14 +357,14 @@
Defaults to @npm//@bazel/devserver:devserver
Defaults to @npm//@bazel/concatjs/devserver:devserver
(Label): Go based devserver executable for the host platform. Defaults to precompiled go binary setup by @bazel/typescript npm package
-Defaults to @npm//@bazel/devserver:devserver_darwin_amd64
Defaults to @npm//@bazel/concatjs/devserver:devserver_darwin_amd64
(Label): Internal use only
-Defaults to @npm//@bazel/bin:rollup-worker
Defaults to @npm//@bazel/rollup/bin:rollup-worker
(Label): An executable target that runs Terser
-Defaults to @npm//@bazel/bin:terser
Defaults to @npm//@bazel/terser/bin:terser
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
- sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
- urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
+ sha256 = "dd4dc46066e2ce034cba0c81aa3e862b27e8e8d95871f567359f7a534cccb666",
+ urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.1.0/rules_nodejs-3.1.0.tar.gz"],
)
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
diff --git a/packages/terser/index.js b/packages/terser/index.js
index efe0e85991..f6db869e72 100644
--- a/packages/terser/index.js
+++ b/packages/terser/index.js
@@ -165,8 +165,12 @@ function main() {
// If necessary, get the new `terser` binary, added for >=4.3.0
terserBinary = terserBinary || require.resolve('terser/bin/terser');
} catch (e) {
- // If necessary, get the old `uglifyjs` binary from <4.3.0
- terserBinary = terserBinary || require.resolve('terser/bin/uglifyjs');
+ try {
+ // If necessary, get the old `uglifyjs` binary from <4.3.0
+ terserBinary = terserBinary || require.resolve('terser/bin/uglifyjs');
+ } catch (e) {
+ throw new Error('terser binary not found. Maybe you need to set the terser_bin attribute?')
+ }
}
// choose a default concurrency of the number of cores -1 but at least 1.
@@ -194,4 +198,4 @@ exports.directoryArgs = directoryArgs;
if (require.main === module) {
main();
-}
\ No newline at end of file
+}
diff --git a/tools/stardoc/post-process-docs.js b/tools/stardoc/post-process-docs.js
index d1120c220d..47afa5f6b1 100644
--- a/tools/stardoc/post-process-docs.js
+++ b/tools/stardoc/post-process-docs.js
@@ -7,11 +7,10 @@ const content = readFileSync(md, {encoding: 'utf8'});
// @npm is not the required name, but it seems to be the common case
// this reflects the similar transformation made when publishing the packages to npm
// via pkg_npm defined in //tools:defaults.bzl
-const out = content
- .replace(/(?:@.*)*?\/\/packages\/([^:"\s]*)/g, (str, pkg) => {
- const parts = pkg.split('/');
- return `@npm//@bazel/${parts[parts.length - 1]}`;
- });
+const out = content.replace(/(?:@.*)*?\/\/packages\/([^/:"\s]*)/g, (str, pkg) => {
+ const parts = pkg.split('/');
+ return `@npm//@bazel/${parts[parts.length - 1]}`;
+});
// stamp the frontmatter into the post processed stardoc HTML
const frontmatter = [