-
Notifications
You must be signed in to change notification settings - Fork 575
aspect_rules_js@2.7.0 #6237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Wyverald
merged 5 commits into
bazelbuild:main
from
aspect-build:aspect_rules_js-v2.7.0
Oct 22, 2025
Merged
aspect_rules_js@2.7.0 #6237
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
82dcb5a
aspect_rules_js@2.7.0
alexeagle 5d1c1fa
homepage shouldn't be required
alexeagle 33f14db
Update metadata.schema.json
alexeagle f190ebf
Add homepage URL to metadata.json
alexeagle 7439d87
Remove 'rolling' from bazel matrix in presubmit.yml
jbedard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,285 @@ | ||
| "aspect-build/rules_js" | ||
|
|
||
| module( | ||
| name = "aspect_rules_js", | ||
| bazel_compatibility = [">=6.0.0"], | ||
| compatibility_level = 1, | ||
| version = "2.7.0", | ||
| ) | ||
|
|
||
| # Lower-bounds (minimum) versions for direct runtime dependencies. | ||
| # Do not bump these unless rules_js requires a newer version to function. | ||
| bazel_dep(name = "aspect_bazel_lib", version = "2.14.0") | ||
| bazel_dep(name = "aspect_tools_telemetry", version = "0.2.8") | ||
| bazel_dep(name = "bazel_features", version = "1.9.0") | ||
| bazel_dep(name = "bazel_skylib", version = "1.5.0") | ||
| bazel_dep(name = "platforms", version = "0.0.5") | ||
| bazel_dep(name = "rules_nodejs", version = "6.3.0") | ||
|
|
||
| tel = use_extension("@aspect_tools_telemetry//:extension.bzl", "telemetry") | ||
| use_repo(tel, "aspect_tools_telemetry_report") | ||
|
|
||
| node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") | ||
| use_repo(node, "nodejs_toolchains") | ||
| use_repo(node, "nodejs_darwin_amd64") | ||
| use_repo(node, "nodejs_darwin_arm64") | ||
| use_repo(node, "nodejs_linux_amd64") | ||
| use_repo(node, "nodejs_linux_arm64") | ||
| use_repo(node, "nodejs_linux_ppc64le") | ||
| use_repo(node, "nodejs_linux_s390x") | ||
| use_repo(node, "nodejs_windows_amd64") | ||
|
|
||
| pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") | ||
| pnpm.pnpm( | ||
| name = "pnpm", | ||
| pnpm_version = "8.6.7", | ||
| pnpm_version_integrity = "sha512-vRIWpD/L4phf9Bk2o/O2TDR8fFoJnpYrp2TKqTIZF/qZ2/rgL3qKXzHofHgbXsinwMoSEigz28sqk3pQ+yMEQQ==", | ||
| ) | ||
| use_repo(pnpm, "pnpm", "pnpm__links") | ||
|
|
||
| bazel_lib_toolchains = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains") | ||
| bazel_lib_toolchains.tar() | ||
| use_repo(bazel_lib_toolchains, "coreutils_toolchains") | ||
| use_repo(bazel_lib_toolchains, "yq_darwin_amd64") | ||
| use_repo(bazel_lib_toolchains, "yq_darwin_arm64") | ||
| use_repo(bazel_lib_toolchains, "yq_linux_amd64") | ||
| use_repo(bazel_lib_toolchains, "yq_linux_arm64") | ||
| use_repo(bazel_lib_toolchains, "yq_linux_ppc64le") | ||
| use_repo(bazel_lib_toolchains, "yq_linux_s390x") | ||
| use_repo(bazel_lib_toolchains, "yq_windows_amd64") | ||
| use_repo(bazel_lib_toolchains, "bsd_tar_toolchains") | ||
|
|
||
| ####### Dev dependencies ######## | ||
|
|
||
| bazel_dep(name = "bazelrc-preset.bzl", version = "1.3.0", dev_dependency = True) | ||
| bazel_dep(name = "aspect_rules_lint", version = "1.1.0", dev_dependency = True) | ||
| bazel_dep(name = "buildifier_prebuilt", version = "8.0.1", dev_dependency = True) | ||
| bazel_dep(name = "rules_shell", version = "0.6.1", dev_dependency = True) | ||
|
|
||
| # Overrides of non-dev deps for local testing using recent versions | ||
| archive_override( | ||
| module_name = "rules_nodejs", | ||
| integrity = "sha256-OY23vNcf28WAxvjReCrpn1JQeRFypf/jHS+dgTjzOC4=", | ||
| strip_prefix = "rules_nodejs-7cbb1fb5378fb4739e4d9698a14abd9eada900f0", | ||
| urls = [ | ||
| "https://github.com/bazel-contrib/rules_nodejs/archive/7cbb1fb5378fb4739e4d9698a14abd9eada900f0.tar.gz", | ||
| ], | ||
| ) | ||
|
|
||
| host = use_extension( | ||
| "@aspect_bazel_lib//lib:extensions.bzl", | ||
| "host", | ||
| dev_dependency = True, | ||
| ) | ||
| host.host() | ||
| use_repo(host, "aspect_bazel_lib_host") | ||
|
|
||
| node_dev = use_extension( | ||
| "@rules_nodejs//nodejs:extensions.bzl", | ||
| "node", | ||
| dev_dependency = True, | ||
| ) | ||
| use_repo(node_dev, "node16_linux_amd64") | ||
| use_repo(node_dev, "node16_darwin_arm64") | ||
| use_repo(node_dev, "node16_darwin_amd64") | ||
| use_repo(node_dev, "node16_linux_arm64") | ||
| use_repo(node_dev, "node16_linux_s390x") | ||
| use_repo(node_dev, "node16_linux_ppc64le") | ||
| use_repo(node_dev, "node16_windows_amd64") | ||
| use_repo(node_dev, "node18_linux_amd64") | ||
| use_repo(node_dev, "node18_darwin_arm64") | ||
| use_repo(node_dev, "node18_darwin_amd64") | ||
| use_repo(node_dev, "node18_linux_arm64") | ||
| use_repo(node_dev, "node18_linux_s390x") | ||
| use_repo(node_dev, "node18_linux_ppc64le") | ||
| use_repo(node_dev, "node18_windows_amd64") | ||
| use_repo(node_dev, "node20_linux_amd64") | ||
| use_repo(node_dev, "node20_darwin_arm64") | ||
| use_repo(node_dev, "node20_darwin_amd64") | ||
| use_repo(node_dev, "node20_linux_arm64") | ||
| use_repo(node_dev, "node20_linux_s390x") | ||
| use_repo(node_dev, "node20_linux_ppc64le") | ||
| use_repo(node_dev, "node20_windows_amd64") | ||
| use_repo(node_dev, "node22_linux_amd64") | ||
| use_repo(node_dev, "node22_darwin_arm64") | ||
| use_repo(node_dev, "node22_darwin_amd64") | ||
| use_repo(node_dev, "node22_linux_arm64") | ||
| use_repo(node_dev, "node22_linux_s390x") | ||
| use_repo(node_dev, "node22_linux_ppc64le") | ||
| use_repo(node_dev, "node22_windows_amd64") | ||
| use_repo(node_dev, "node24_linux_amd64") | ||
| use_repo(node_dev, "node24_darwin_arm64") | ||
| use_repo(node_dev, "node24_darwin_amd64") | ||
| use_repo(node_dev, "node24_linux_arm64") | ||
| use_repo(node_dev, "node24_linux_s390x") | ||
| use_repo(node_dev, "node24_linux_ppc64le") | ||
| use_repo(node_dev, "node24_windows_amd64") | ||
| node_dev.toolchain(node_version = "18.20.4") | ||
| node_dev.toolchain( | ||
| name = "node16", | ||
| node_version = "16.20.0", | ||
| ) | ||
| node_dev.toolchain( | ||
| name = "node18", | ||
| node_version = "18.20.4", | ||
| ) | ||
| node_dev.toolchain( | ||
| name = "node20", | ||
| node_version = "20.17.0", | ||
| ) | ||
| node_dev.toolchain( | ||
| name = "node22", | ||
| node_version = "22.20.0", | ||
| ) | ||
| node_dev.toolchain( | ||
| name = "node24", | ||
| node_version = "24.9.0", | ||
| ) | ||
|
|
||
| ############################################ | ||
| # npm dependencies used by examples | ||
|
|
||
| npm = use_extension( | ||
| "@aspect_rules_js//npm:extensions.bzl", | ||
| "npm", | ||
| dev_dependency = True, | ||
| ) | ||
| npm.npm_translate_lock( | ||
| name = "npm", | ||
| bins = { | ||
| # derived from "bin" attribute in node_modules/typescript/package.json | ||
| "typescript": [ | ||
| "tsc=./bin/tsc", | ||
| "tsserver=./bin/tsserver", | ||
| ], | ||
| }, | ||
| custom_postinstalls = { | ||
| "@aspect-test/c": "echo moo > cow.txt", | ||
| "@aspect-test/c@2.0.2": "echo mooo >> cow.txt", | ||
| "pngjs": "chmod -R a+X *", # fixes malformed tarball content file permissions in this package after extraction (see https://github.com/aspect-build/rules_js/issues/1637 for more details) | ||
| }, | ||
| data = [ | ||
| "//:examples/npm_deps/patches/meaning-of-life@1.0.0-pnpm.patch", | ||
| "//:package.json", | ||
| "//:pnpm-workspace.yaml", | ||
| "//examples/js_binary:package.json", | ||
| "//examples/js_lib_pkg/a:package.json", | ||
| "//examples/js_lib_pkg/b:package.json", | ||
| "//examples/linked_consumer:package.json", | ||
| "//examples/linked_empty_node_modules:package.json", | ||
| "//examples/linked_lib:package.json", | ||
| "//examples/linked_pkg:package.json", | ||
| "//examples/macro:package.json", | ||
| "//examples/nextjs:package.json", | ||
| "//examples/npm_deps:package.json", | ||
| "//examples/npm_package/libs/lib_a:package.json", | ||
| "//examples/npm_package/packages/pkg_a:package.json", | ||
| "//examples/npm_package/packages/pkg_b:package.json", | ||
| "//examples/npm_package/packages/pkg_d:package.json", | ||
| "//examples/npm_package/packages/pkg_e:package.json", | ||
| "//examples/runfiles:package.json", | ||
| "//examples/stack_traces:package.json", | ||
| "//examples/webpack_cli:package.json", | ||
| "//js/private/coverage/bundle:package.json", | ||
| "//js/private/devserver/src:package.json", | ||
| "//js/private/test/image:package.json", | ||
| "//js/private/test/js_run_devserver:package.json", | ||
| "//js/private/worker/src:package.json", | ||
| "//npm/private/test:package.json", | ||
| "//npm/private/test:vendored/lodash-4.17.21.tgz", | ||
| "//npm/private/test/npm_package:package.json", | ||
| "//npm/private/test/npm_package_publish:package.json", | ||
| "//npm/private/test/vendored/is-odd:package.json", | ||
| "//npm/private/test/vendored/semver-max:package.json", | ||
| ], | ||
| generate_bzl_library_targets = True, | ||
| lifecycle_hooks = { | ||
| # We fetch @kubernetes/client-node from source and it has a `prepare` lifecycle hook that needs to be run | ||
| # which runs the `build` package.json script: https://github.com/kubernetes-client/javascript/blob/fc681991e61c6808dd26012a2331f83671a11218/package.json#L28. | ||
| # Here we run run build so we just run `tsc` instead of `npm run build` which ends up just running `tsc`. | ||
| "@kubernetes/client-node": ["build"], | ||
| # 'install' hook fails as it assumes the following path to `node-pre-gyp`: ./node_modules/.bin/node-pre-gyp | ||
| # https://github.com/stultuss/protoc-gen-grpc-ts/blob/53d52a9d0e1fe3cbe930dec5581eca89b3dde807/package.json#L28 | ||
| "protoc-gen-grpc@2.0.3": [], | ||
| }, | ||
| lifecycle_hooks_execution_requirements = { | ||
| "*": [ | ||
| "no-sandbox", | ||
| ], | ||
| # If @kubernetes/client-node is not sandboxed, will fail with | ||
| # ``` | ||
| # src/azure_auth.ts(97,43): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | ||
| # src/azure_auth.ts(98,34): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | ||
| # src/gcp_auth.ts(93,43): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | ||
| # src/gcp_auth.ts(94,34): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | ||
| # ``` | ||
| # since a `jsonpath-plus@7.2.0` that is newer then the transitive dep `jsonpath-plus@0.19.0` is found outside of the sandbox that | ||
| # includes typings that don't match the 0.19.0 "any" usage. | ||
| "@kubernetes/client-node": [], | ||
| "@figma/nodegit": [ | ||
| "no-sandbox", | ||
| "requires-network", | ||
| ], | ||
| "esbuild": [ | ||
| "no-sandbox", | ||
| "requires-network", | ||
| ], | ||
| "segfault-handler": [ | ||
| "no-sandbox", | ||
| "requires-network", | ||
| ], | ||
| "puppeteer": [ | ||
| "no-remote", | ||
| "no-sandbox", | ||
| "requires-network", | ||
| ], | ||
| }, | ||
| npmrc = "//:.npmrc", | ||
| package_visibility = { | ||
| "unused": ["//visibility:private"], | ||
| "@mycorp/pkg-a": ["//examples:__subpackages__"], | ||
| }, | ||
| pnpm_lock = "//:pnpm-lock.yaml", | ||
| public_hoist_packages = { | ||
| # Instructs the linker to hoist the ms@2.1.3 npm package to `node_modules/ms` in the `examples/npm_deps` package. | ||
| # Similar to adding `public-hoist-pattern[]=ms` in .npmrc but with control over which version to hoist and where | ||
| # to hoist it. This hoisted package can be referenced by the label `//examples/npm_deps:node_modules/ms` same as | ||
| # other direct dependencies in the `examples/npm_deps/package.json`. | ||
| "ms@2.1.3": ["examples/npm_deps"], | ||
| }, | ||
| update_pnpm_lock = True, | ||
| verify_node_modules_ignored = "//:.bazelignore", | ||
| verify_patches = "//examples/npm_deps/patches:patches", | ||
| ) | ||
|
|
||
| # Configure package exclusions using tag class | ||
| npm.npm_exclude_package_contents( | ||
| package = "chalk", | ||
| patterns = ["**/README*"], | ||
| ) | ||
| use_repo( | ||
| npm, | ||
| "npm", | ||
| "npm__fsevents__2.3.2__links", | ||
| "npm__rollup__2.70.2", | ||
| "npm__rollup__2.70.2__links", | ||
| "npm__unused__0.2.2__links", | ||
| "npm__webpack-bundle-analyzer__4.5.0_bufferutil_4.0.8", | ||
| ) | ||
|
|
||
| # As an example, manually import a package using explicit coordinates. | ||
| # Just a demonstration of the syntax de-sugaring. | ||
| npm.npm_import( | ||
| name = "acorn__8.4.0", | ||
| bins = {"acorn": "./bin/acorn"}, | ||
| integrity = "sha512-ULr0LDaEqQrMFGyQ3bhJkLsbtrQ8QibAseGZeaSUiT/6zb9IvIkomWHJIvgvwad+hinRAgsI51JcWk2yvwyL+w==", | ||
| package = "acorn", | ||
| # Root package where to link the package store | ||
| root_package = "", | ||
| version = "8.4.0", | ||
| ) | ||
| use_repo( | ||
| npm, | ||
| "acorn__8.4.0", | ||
| "acorn__8.4.0__links", | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "mediaType": "application/vnd.build.bazel.registry.attestation+json;version=1.0.0", | ||
| "attestations": { | ||
| "source.json": { | ||
| "url": "https://github.com/aspect-build/rules_js/releases/download/v2.7.0/source.json.intoto.jsonl", | ||
| "integrity": "sha256-oivjTduO/5ooZh4WJFaOad5PNcFqjZRhYVi+3hMEK90=" | ||
| }, | ||
| "MODULE.bazel": { | ||
| "url": "https://github.com/aspect-build/rules_js/releases/download/v2.7.0/MODULE.bazel.intoto.jsonl", | ||
| "integrity": "sha256-xno5JC1MBm26iN75zguMlnU4mAN2jDFjwZzVHMolySI=" | ||
| }, | ||
| "rules_js-v2.7.0.tar.gz": { | ||
| "url": "https://github.com/aspect-build/rules_js/releases/download/v2.7.0/rules_js-v2.7.0.tar.gz.intoto.jsonl", | ||
| "integrity": "sha256-G9YsBlzfKMA+efga6K6gEQjU1oTtEW3ZD9sSbF5z9RQ=" | ||
| } | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
modules/aspect_rules_js/2.7.0/patches/module_dot_bazel_version.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| =================================================================== | ||
| --- a/MODULE.bazel | ||
| +++ b/MODULE.bazel | ||
| @@ -3,8 +3,9 @@ | ||
| module( | ||
| name = "aspect_rules_js", | ||
| bazel_compatibility = [">=6.0.0"], | ||
| compatibility_level = 1, | ||
| + version = "2.7.0", | ||
| ) | ||
|
|
||
| # Lower-bounds (minimum) versions for direct runtime dependencies. | ||
| # Do not bump these unless rules_js requires a newer version to function. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| bcr_test_module: | ||
| module_path: 'e2e/bzlmod' | ||
| matrix: | ||
| bazel: ['rolling', '8.x', '7.x', '6.x'] | ||
| platform: ['debian10', 'macos', 'ubuntu2004', 'windows'] | ||
| tasks: | ||
| run_tests: | ||
| name: 'Run test module' | ||
| bazel: ${{ bazel }} | ||
| platform: ${{ platform }} | ||
| test_targets: | ||
| - '//...' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "integrity": "sha256-ndUNO6yy/h1KchCYmBtwKQ/prFbTYleR9JDSq5TyysY=", | ||
| "strip_prefix": "rules_js-2.7.0", | ||
| "url": "https://github.com/aspect-build/rules_js/releases/download/v2.7.0/rules_js-v2.7.0.tar.gz", | ||
| "patches": { | ||
| "module_dot_bazel_version.patch": "sha256-3hzQC2y9jYeC0QNEDjGr50a7n4wRB35YHa9YQ16C9Eo=" | ||
| }, | ||
| "patch_strip": 1 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
homepagefield should not be removed. The Bazel Central Registry is an append-only repository, and existing files should not be modified except to add a new version.1 Please restore this field.Style Guide References
Footnotes
The BCR is add-only. Pull requests should not mutate existing module versions or non-module files when adding a new version. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The metadata file is not immutable, only versioned files are