From ec7b17d51578e976dac66cd534373431ed30a6f4 Mon Sep 17 00:00:00 2001 From: Kapunahele Wong Date: Fri, 13 Mar 2026 20:41:20 -0700 Subject: [PATCH 1/2] chore: fix broken and redirecting links in docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update all outdated links in README.md and docs/ that pointed to old /rules/ and /rulesets/ URL patterns or HTTP redirects: - docs.aspect.build/rules/* and /rulesets/* → new /bazel/ path structure - docs.aspect.build/workflows → aspect-workflows/get-started/overview - docs.aspect.build/rules → docs.aspect.build/ - github.com/bazelbuild/rules_nodejs → github.com/bazel-contrib/rules_nodejs - http://typescriptlang.org → https://www.typescriptlang.org - https://cypress.io → https://www.cypress.io - jq rule link removed (rule no longer exists in bazel_lib) - rules_jest troubleshooting link removed (page no longer exists) Co-Authored-By: Claude Sonnet 4.6 --- README.md | 12 ++++++------ docs/troubleshooting.md | 2 +- .../v101/snapshots/is-odd-v0_resolved.json | 2 +- .../v101/snapshots/is-odd_resolved.json | 2 +- .../v101/snapshots/lodash_resolved.json | 2 +- .../v90/snapshots/is-odd-v0_resolved.json | 2 +- .../v90/snapshots/is-odd_resolved.json | 2 +- .../v90/snapshots/lodash_resolved.json | 2 +- js/private/js_binary.bzl | 2 +- js/private/js_helpers.bzl | 2 +- js/private/js_run_binary.bzl | 4 ++-- js/private/js_run_devserver.bzl | 2 +- .../test/js_run_devserver/js_run_devserver_test.bzl | 2 +- npm/private/npm_package.bzl | 6 +++--- npm/private/npm_translate_lock_generate.bzl | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 42a92423c9..0d9cf70d36 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ The fastest way to try this in an empty project is to click the green "Use this rules_js is just a part Aspect's monorepo developer platform: -- [Aspect Workflows](https://docs.aspect.build/workflows) delivers on Bazel's promises of speed and cost-savings. +- [Aspect Workflows](https://docs.aspect.build/aspect-workflows/get-started/overview) delivers on Bazel's promises of speed and cost-savings. It provides Continuous Integration and Delivery, including Remote Cache and Remote Build Execution (RBE). Best of all, it includes all the expertise that you expect from the team at Aspect! - _Need help?_ - Best-effort community support is available on the #javascript channel on [Bazel Slack](https://slack.bazel.build/) - Commercial support as a Slack Connect channel is offered by https://aspect.build/services. -- See [Aspect's Bazel rules](https://docs.aspect.build/rules), especially those built for rules_js: - - [rules_ts](https://github.com/aspect-build/rules_ts) - Bazel rules for [TypeScript](http://typescriptlang.org) +- See Aspect's [Bazel Rules](https://docs.aspect.build/bazel), especially those built for rules_js: + - [rules_ts](https://docs.aspect.build/bazel/javascript/typescript) - Bazel rules for [TypeScript](https://www.typescriptlang.org) - [rules_swc](https://github.com/aspect-build/rules_swc) - Bazel rules for [swc](https://swc.rs) - [rules_jest](https://github.com/aspect-build/rules_jest) - Bazel rules to run tests using [Jest](https://jestjs.io) - [rules_esbuild](https://github.com/aspect-build/rules_esbuild) - Bazel rules for [esbuild](https://esbuild.github.io) JS bundler @@ -33,7 +33,7 @@ rules_js is just a part Aspect's monorepo developer platform: - [rules_rollup](https://github.com/aspect-build/rules_rollup) - Bazel rules for [Rollup](https://rollupjs.org) - a JavaScript bundler - [rules_jasmine](https://github.com/aspect-build/rules_jasmine) - Bazel rules to run tests using [Jasmine](https://jasmine.github.io/) - [rules_terser](https://github.com/aspect-build/rules_terser) - Bazel rules for [Terser](https://terser.org) - a JavaScript minifier - - [rules_cypress](https://github.com/aspect-build/rules_cypress) - Bazel rules to run tests using [Cypress](https://cypress.io) + - [rules_cypress](https://github.com/aspect-build/rules_cypress) - Bazel rules to run tests using [Cypress](https://www.cypress.io) - [rules_lint](https://github.com/aspect-build/rules_lint) includes [eslint support](https://registry.bazel.build/docs/aspect_rules_lint#lint-eslint-bzl). ## Known issues @@ -70,10 +70,10 @@ Larger examples can be found in our [bazel-examples](https://github.com/aspect-b ## Relationship to rules_nodejs rules_js is an alternative to the `build_bazel_rules_nodejs` Bazel module and -accompanying npm packages hosted in https://github.com/bazelbuild/rules_nodejs, +accompanying npm packages hosted in https://github.com/bazel-contrib/rules_nodejs, which is now unmaintained. All users are recommended to use rules_js instead. -rules_js replaces some parts of [bazelbuild/rules_nodejs](http://github.com/bazelbuild/rules_nodejs) and re-uses other parts: +rules_js replaces some parts of [bazelbuild/rules_nodejs](https://github.com/bazel-contrib/rules_nodejs) and re-uses other parts: | Layer | Legacy | Modern | | ------------------------------- | ----------------------------- | ----------------------- | diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d10d1c5cc7..363ede502e 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -199,4 +199,4 @@ npm.npm_exclude_package_contents( #### Jest -See [rules_jest](https://github.com/aspect-build/rules_jest) specific [troubleshooting](https://docs.aspect.build/rulesets/aspect_rules_jest/docs/troubleshooting#performance). +See [rules_jest](https://github.com/aspect-build/rules_jest) for troubleshooting. diff --git a/e2e/pnpm_lockfiles/v101/snapshots/is-odd-v0_resolved.json b/e2e/pnpm_lockfiles/v101/snapshots/is-odd-v0_resolved.json index d39e89cb3c..95aed623aa 100644 --- a/e2e/pnpm_lockfiles/v101/snapshots/is-odd-v0_resolved.json +++ b/e2e/pnpm_lockfiles/v101/snapshots/is-odd-v0_resolved.json @@ -1 +1 @@ -{"$schema":"https://docs.aspect.build/rules/aspect_rules_js/docs/npm_translate_lock","integrity":"sha512-3RKAybrJxq3zCUC+TJ5Ao0sBsbacAT3OBeNVcCbsQsHUC70qWK2R4JsIvax4OTjeGWnB8FumAWATUtS1jd+KYw==","version":"0.1.0"} \ No newline at end of file +{"$schema":"https://docs.aspect.build/bazel/javascript/aspect_rules_js/npm_extensions#tag-npm_translate_lock","integrity":"sha512-3RKAybrJxq3zCUC+TJ5Ao0sBsbacAT3OBeNVcCbsQsHUC70qWK2R4JsIvax4OTjeGWnB8FumAWATUtS1jd+KYw==","version":"0.1.0"} \ No newline at end of file diff --git a/e2e/pnpm_lockfiles/v101/snapshots/is-odd_resolved.json b/e2e/pnpm_lockfiles/v101/snapshots/is-odd_resolved.json index 4458f3c658..77c99e4934 100644 --- a/e2e/pnpm_lockfiles/v101/snapshots/is-odd_resolved.json +++ b/e2e/pnpm_lockfiles/v101/snapshots/is-odd_resolved.json @@ -1 +1 @@ -{"$schema":"https://docs.aspect.build/rules/aspect_rules_js/docs/npm_translate_lock","integrity":"sha512-CQpnWPrDwmP1+SMHXZhtLtJv90yiyVfluGsX5iNCVkrhQtU3TQHsUWPG9wkdk9Lgd5yNpAg9jQEo90CBaXgWMA==","version":"3.0.1"} \ No newline at end of file +{"$schema":"https://docs.aspect.build/bazel/javascript/aspect_rules_js/npm_extensions#tag-npm_translate_lock","integrity":"sha512-CQpnWPrDwmP1+SMHXZhtLtJv90yiyVfluGsX5iNCVkrhQtU3TQHsUWPG9wkdk9Lgd5yNpAg9jQEo90CBaXgWMA==","version":"3.0.1"} \ No newline at end of file diff --git a/e2e/pnpm_lockfiles/v101/snapshots/lodash_resolved.json b/e2e/pnpm_lockfiles/v101/snapshots/lodash_resolved.json index 09720d05aa..94c4d49b8d 100644 --- a/e2e/pnpm_lockfiles/v101/snapshots/lodash_resolved.json +++ b/e2e/pnpm_lockfiles/v101/snapshots/lodash_resolved.json @@ -1 +1 @@ -{"$schema":"https://docs.aspect.build/rules/aspect_rules_js/docs/npm_translate_lock","integrity":"sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==","version":"file:../vendored/lodash-4.17.21.tgz"} \ No newline at end of file +{"$schema":"https://docs.aspect.build/bazel/javascript/aspect_rules_js/npm_extensions#tag-npm_translate_lock","integrity":"sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==","version":"file:../vendored/lodash-4.17.21.tgz"} \ No newline at end of file diff --git a/e2e/pnpm_lockfiles/v90/snapshots/is-odd-v0_resolved.json b/e2e/pnpm_lockfiles/v90/snapshots/is-odd-v0_resolved.json index d39e89cb3c..95aed623aa 100644 --- a/e2e/pnpm_lockfiles/v90/snapshots/is-odd-v0_resolved.json +++ b/e2e/pnpm_lockfiles/v90/snapshots/is-odd-v0_resolved.json @@ -1 +1 @@ -{"$schema":"https://docs.aspect.build/rules/aspect_rules_js/docs/npm_translate_lock","integrity":"sha512-3RKAybrJxq3zCUC+TJ5Ao0sBsbacAT3OBeNVcCbsQsHUC70qWK2R4JsIvax4OTjeGWnB8FumAWATUtS1jd+KYw==","version":"0.1.0"} \ No newline at end of file +{"$schema":"https://docs.aspect.build/bazel/javascript/aspect_rules_js/npm_extensions#tag-npm_translate_lock","integrity":"sha512-3RKAybrJxq3zCUC+TJ5Ao0sBsbacAT3OBeNVcCbsQsHUC70qWK2R4JsIvax4OTjeGWnB8FumAWATUtS1jd+KYw==","version":"0.1.0"} \ No newline at end of file diff --git a/e2e/pnpm_lockfiles/v90/snapshots/is-odd_resolved.json b/e2e/pnpm_lockfiles/v90/snapshots/is-odd_resolved.json index 3526ac5049..9a142adc1a 100644 --- a/e2e/pnpm_lockfiles/v90/snapshots/is-odd_resolved.json +++ b/e2e/pnpm_lockfiles/v90/snapshots/is-odd_resolved.json @@ -1 +1 @@ -{"$schema":"https://docs.aspect.build/rules/aspect_rules_js/docs/npm_translate_lock","integrity":"sha512-CQpnWPrDwmP1+SMHXZhtLtJyiyVfluGsX5iNCVkrhQtU3TQHsUWPG9wkdk9Lgd5yNpAg9jQEo90CBaXgWMA==","version":"3.0.1"} \ No newline at end of file +{"$schema":"https://docs.aspect.build/bazel/javascript/aspect_rules_js/npm_extensions#tag-npm_translate_lock","integrity":"sha512-CQpnWPrDwmP1+SMHXZhtLtJyiyVfluGsX5iNCVkrhQtU3TQHsUWPG9wkdk9Lgd5yNpAg9jQEo90CBaXgWMA==","version":"3.0.1"} \ No newline at end of file diff --git a/e2e/pnpm_lockfiles/v90/snapshots/lodash_resolved.json b/e2e/pnpm_lockfiles/v90/snapshots/lodash_resolved.json index 09720d05aa..94c4d49b8d 100644 --- a/e2e/pnpm_lockfiles/v90/snapshots/lodash_resolved.json +++ b/e2e/pnpm_lockfiles/v90/snapshots/lodash_resolved.json @@ -1 +1 @@ -{"$schema":"https://docs.aspect.build/rules/aspect_rules_js/docs/npm_translate_lock","integrity":"sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==","version":"file:../vendored/lodash-4.17.21.tgz"} \ No newline at end of file +{"$schema":"https://docs.aspect.build/bazel/javascript/aspect_rules_js/npm_extensions#tag-npm_translate_lock","integrity":"sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==","version":"file:../vendored/lodash-4.17.21.tgz"} \ No newline at end of file diff --git a/js/private/js_binary.bzl b/js/private/js_binary.bzl index 2c67f7219b..4e68feadbb 100644 --- a/js/private/js_binary.bzl +++ b/js/private/js_binary.bzl @@ -54,7 +54,7 @@ The following environment variables are made available to the Node.js runtime ba The following environment variables are made available to the Node.js runtime based the runtime environment: * JS_BINARY__NODE_BINARY: the Node.js binary path run by the `js_binary` target -* JS_BINARY__NPM_BINARY: the npm binary path; this is available when [`include_npm`](https://docs.aspect.build/rules/aspect_rules_js/docs/js_binary#include_npm) is `True` on the `js_binary` target +* JS_BINARY__NPM_BINARY: the npm binary path; this is available when `include_npm` is `True` on the `js_binary` target * JS_BINARY__NODE_WRAPPER: the Node.js wrapper script used to run Node.js which is available as `node` on the `PATH` at runtime * JS_BINARY__RUNFILES: the absolute path to the Bazel runfiles directory * JS_BINARY__EXECROOT: the absolute path to the root of the execution root for the action; if in the sandbox, this path absolute path to the root of the execution root within the sandbox diff --git a/js/private/js_helpers.bzl b/js/private/js_helpers.bzl index 31838519c5..3613839b86 100644 --- a/js/private/js_helpers.bzl +++ b/js/private/js_helpers.bzl @@ -83,7 +83,7 @@ Expected to find source file {file_basename} in '{this_package}', but instead it All source and data files that are not in the Bazel output tree must be in the same package as the target so that they can be copied to the output tree in an action. -See https://docs.aspect.build/rules/aspect_rules_js/docs/#javascript for more context on why this is required. +See https://docs.aspect.build/bazel/javascript/rules_js for more context on why this is required. Either move {file_basename} to '{this_package}', or add a 'js_library' target in {file_basename}'s package and add that target to the deps of {this_target}: diff --git a/js/private/js_run_binary.bzl b/js/private/js_run_binary.bzl index 701ef482f1..414068b6ee 100644 --- a/js/private/js_run_binary.bzl +++ b/js/private/js_run_binary.bzl @@ -241,9 +241,9 @@ def js_run_binary( # Friendly fail if user has specified invalid parameters if "data" in kwargs.keys(): - fail("Use srcs instead of data in js_run_binary: https://docs.aspect.build/rules/aspect_rules_js/docs/js_run_binary#srcs") + fail("Use srcs instead of data in js_run_binary: https://docs.aspect.build/bazel/javascript/aspect_rules_js/js_defs#function-js_run_binary") if "deps" in kwargs.keys(): - fail("Use srcs instead of deps in js_run_binary: https://docs.aspect.build/rules/aspect_rules_js/docs/js_run_binary#srcs") + fail("Use srcs instead of deps in js_run_binary: https://docs.aspect.build/bazel/javascript/aspect_rules_js/js_defs#function-js_run_binary") extra_srcs = [] diff --git a/js/private/js_run_devserver.bzl b/js/private/js_run_devserver.bzl index 42142365a1..f8624417c8 100644 --- a/js/private/js_run_devserver.bzl +++ b/js/private/js_run_devserver.bzl @@ -262,7 +262,7 @@ def js_run_devserver( `entry_point` is set implicitly by `js_run_devserver` and cannot be overridden. - See https://docs.aspect.build/rules/aspect_rules_js/docs/js_binary + See https://docs.aspect.build/bazel/javascript/aspect_rules_js/js_defs """ if kwargs.get("entry_point", None): fail("`entry_point` is set implicitly by `js_run_devserver` and cannot be overridden.") diff --git a/js/private/test/js_run_devserver/js_run_devserver_test.bzl b/js/private/test/js_run_devserver/js_run_devserver_test.bzl index 0741cb9832..2b5fc17741 100644 --- a/js/private/test/js_run_devserver/js_run_devserver_test.bzl +++ b/js/private/test/js_run_devserver/js_run_devserver_test.bzl @@ -27,7 +27,7 @@ def js_run_devserver_test( **kwargs: All other args for `js_run_devserver`. - See https://docs.aspect.build/rules/aspect_rules_js/docs/js_run_devserver + See https://docs.aspect.build/bazel/javascript/aspect_rules_js/js_defs """ js_run_devserver( name, diff --git a/npm/private/npm_package.bzl b/npm/private/npm_package.bzl index ae808574c7..923990bd3a 100644 --- a/npm/private/npm_package.bzl +++ b/npm/private/npm_package.bzl @@ -178,7 +178,7 @@ def npm_package( for more information on supported globbing patterns. `npm_package` makes use of `copy_to_directory` - (https://docs.aspect.build/rules/bazel_lib/docs/copy_to_directory) under the hood, + (https://docs.aspect.build/bazel/utility/bazel_lib/lib_copy_to_directory) under the hood, adopting its API and its copy action using composition. However, unlike `copy_to_directory`, `npm_package` includes direct and transitive sources and types files from `JsInfo` providers in srcs by default. The behavior of including sources and types from `JsInfo` can be configured @@ -474,12 +474,12 @@ def stamped_package_json(name, stamp_var, **kwargs): In unstamped builds (typically those without `--stamp`) the version will be set to `0.0.0`. This ensures that actions which use the package.json file can get cache hits. - For more information on stamping, read https://docs.aspect.build/rules/bazel_lib/docs/stamping. + For more information on stamping, read https://docs.aspect.build/bazel/utility/bazel_lib/lib_stamping. Args: name: name of the resulting `jq` target, must be "package" stamp_var: a key from the bazel-out/stable-status.txt or bazel-out/volatile-status.txt files - **kwargs: additional attributes passed to the jq rule, see https://docs.aspect.build/rules/bazel_lib/docs/jq + **kwargs: additional attributes passed to the jq rule """ if name != "package": fail("""stamped_package_json should always be named "package" so that the default output is named "package.json". diff --git a/npm/private/npm_translate_lock_generate.bzl b/npm/private/npm_translate_lock_generate.bzl index 1dd02af4df..fc884925af 100644 --- a/npm/private/npm_translate_lock_generate.bzl +++ b/npm/private/npm_translate_lock_generate.bzl @@ -315,7 +315,7 @@ Valid pnpm workspace projects: {} final_rctx_files[resolved_json_file_path] = json.encode({ # Allow consumers to auto-detect this filetype - "$schema": "https://docs.aspect.build/rules/aspect_rules_js/docs/npm_translate_lock", + "$schema": "https://docs.aspect.build/bazel/javascript/aspect_rules_js/npm_extensions#tag-npm_translate_lock", "version": _import.version, "integrity": _import.integrity, }) From 72019efc20966715a6a03356cdba33cca2d02e72 Mon Sep 17 00:00:00 2001 From: Kapunahele Wong Date: Mon, 16 Mar 2026 17:36:23 -0700 Subject: [PATCH 2/2] add URL fragment --- js/private/test/js_run_devserver/js_run_devserver_test.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/private/test/js_run_devserver/js_run_devserver_test.bzl b/js/private/test/js_run_devserver/js_run_devserver_test.bzl index 2b5fc17741..bb87def42d 100644 --- a/js/private/test/js_run_devserver/js_run_devserver_test.bzl +++ b/js/private/test/js_run_devserver/js_run_devserver_test.bzl @@ -27,7 +27,7 @@ def js_run_devserver_test( **kwargs: All other args for `js_run_devserver`. - See https://docs.aspect.build/bazel/javascript/aspect_rules_js/js_defs + See https://docs.aspect.build/bazel/javascript/aspect_rules_js/js_defs#function-js_run_devserver """ js_run_devserver( name,