diff --git a/.bazeliskrc b/.bazeliskrc
index a28c887..2f6e07f 100644
--- a/.bazeliskrc
+++ b/.bazeliskrc
@@ -1,2 +1,2 @@
BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download
-USE_BAZEL_VERSION=aspect/5.7.2
+USE_BAZEL_VERSION=aspect/5.8.19
diff --git a/.bazelrc b/.bazelrc
index edbb86b..22edfd4 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -2,7 +2,7 @@
# Take care to document any settings that you expect users to apply.
# Settings that apply only to CI are in .github/workflows/ci.bazelrc
-# for rules_js
+# required for rules_js; may be able to remove this once https://github.com/aspect-build/rules_js/pull/1428 lands
build --enable_runfiles
# Load any settings specific to the current user.
diff --git a/.bazelversion b/.bazelversion
index 6c7efdc..b4258ec 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1,4 +1,4 @@
-6.3.2
+6.4.0
# The first line of this file is used by Bazelisk and Bazel to be sure
# the right version of Bazel is used to build and test this repo.
# This also defines which version is used on CI.
diff --git a/.github/workflows/buildifier.yaml b/.github/workflows/buildifier.yaml
index 5e98f78..ca92c79 100644
--- a/.github/workflows/buildifier.yaml
+++ b/.github/workflows/buildifier.yaml
@@ -15,6 +15,6 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: buildifier
run: bazel run //:buildifier.check
diff --git a/.github/workflows/ci.bazelrc b/.github/workflows/ci.bazelrc
deleted file mode 100644
index d549ad8..0000000
--- a/.github/workflows/ci.bazelrc
+++ /dev/null
@@ -1,13 +0,0 @@
-# This file contains Bazel settings to apply on CI only.
-# It is referenced with a --bazelrc option in the call to bazel in ci.yaml
-
-# Debug where options came from
-build --announce_rc
-# This directory is configured in GitHub actions to be persisted between runs.
-build --disk_cache=~/.cache/bazel
-build --repository_cache=~/.cache/bazel-repo
-# Don't rely on test logs being easily accessible from the test runner,
-# though it makes the log noisier.
-test --test_output=errors
-# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
-test --test_env=XDG_CACHE_HOME
\ No newline at end of file
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 1e9e36a..fbb9252 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -22,7 +22,7 @@ jobs:
# Prepares the 'bazelversion' axis of the test matrix
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- id: bazel_6
run: echo "bazelversion=$(head -n 1 .bazelversion)" >> $GITHUB_OUTPUT
- id: bazel_5
@@ -35,7 +35,7 @@ jobs:
# Prepares the 'os' axis of the test matrix
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- id: linux
run: echo "os=ubuntu-latest" >> $GITHUB_OUTPUT
- id: macos
@@ -89,7 +89,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
# Cache build and external artifacts so that the next ci build is incremental.
# Because github action caches cannot be updated after a build, we need to
@@ -125,6 +125,15 @@ jobs:
if: matrix.bzlmodEnabled
run: echo "bzlmod_flag=--enable_bzlmod" >> $GITHUB_OUTPUT
+ - name: Don't use Aspect CLI on Windows
+ # TODO: re-enable Aspect CLI on Windows once we have Windows releases
+ if: matrix.os == 'windows-latest'
+ working-directory: ${{ matrix.folder }}
+ run: |
+ if (Test-Path .bazeliskrc) {
+ Remove-Item .bazeliskrc -verbose
+ }
+
- name: bazel test //...
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
@@ -133,7 +142,8 @@ jobs:
run: bazel --bazelrc=${{ github.workspace }}/.github/workflows/ci.bazelrc --bazelrc=.bazelrc test ${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} //...
- name: run ./test.sh
+ # Run if there is a test.sh file in the folder.
+ if: matrix.os != 'windows-latest' && hashFiles(format('{0}/test.sh', matrix.folder)) != ''
working-directory: ${{ matrix.folder }}
- # hashFiles returns an empty string if test.sh is absent
- if: ${{ hashFiles(format('{0}/test.sh', matrix.folder)) != '' }}
+ shell: bash
run: ./test.sh
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 517c572..b9454f9 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Mount bazel caches
uses: actions/cache@v3
with:
@@ -26,7 +26,7 @@ jobs:
env:
# Bazelisk will download bazel to here
XDG_CACHE_HOME: ~/.cache/bazel-repo
- run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //...
+ run: bazel test //...
- name: Prepare release
run: .github/workflows/release_prep.sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt
- name: Release
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 014f49a..a4358e3 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -9,18 +9,18 @@ default_stages: [commit]
repos:
# Check formatting and lint for starlark code
- repo: https://github.com/keith/pre-commit-buildifier
- rev: 4.0.1.1
+ rev: 6.4.0
hooks:
- id: buildifier
- id: buildifier-lint
# Enforce that commit messages allow for later changelog generation
- repo: https://github.com/commitizen-tools/commitizen
- rev: v2.18.0
+ rev: v3.13.0
hooks:
# Requires that commitizen is already installed
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: 'v2.4.0'
+ rev: v3.1.0
hooks:
- id: prettier
diff --git a/BUILD.bazel b/BUILD.bazel
index 9005145..ec6b739 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -16,14 +16,20 @@ gazelle(
gazelle = "gazelle_bin",
)
+buildifier(
+ name = "buildifier",
+ exclude_patterns = ["./.git/*"],
+ lint_mode = "fix",
+ lint_warnings = ["-out-of-order-load"], # TODO: enable out-of-order-load
+ mode = "fix",
+)
+
buildifier(
name = "buildifier.check",
- exclude_patterns = [
- "./.git/*",
- ],
+ exclude_patterns = ["./.git/*"],
lint_mode = "warn",
+ lint_warnings = ["-out-of-order-load"], # TODO: enable out-of-order-load
mode = "diff",
- tags = ["manual"], # tag as manual so windows ci does not build it by default
)
bzl_library(
diff --git a/MODULE.bazel b/MODULE.bazel
index 250a653..4d439dc 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -6,10 +6,11 @@ module(
compatibility_level = 1,
)
-bazel_dep(name = "aspect_bazel_lib", version = "1.32.0")
-bazel_dep(name = "aspect_rules_js", version = "1.29.2")
-bazel_dep(name = "bazel_skylib", version = "1.4.1")
+bazel_dep(name = "aspect_bazel_lib", version = "1.39.1")
+bazel_dep(name = "aspect_rules_js", version = "1.34.1")
+bazel_dep(name = "bazel_skylib", version = "1.5.0")
-bazel_dep(name = "gazelle", version = "0.29.0", dev_dependency = True, repo_name = "bazel_gazelle")
-bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
-bazel_dep(name = "buildifier_prebuilt", version = "6.1.2.1", dev_dependency = True)
+bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True)
+bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
+bazel_dep(name = "gazelle", version = "0.35.0", dev_dependency = True, repo_name = "bazel_gazelle")
+bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
diff --git a/WORKSPACE b/WORKSPACE
index 22978e3..49630b2 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -17,9 +17,11 @@ load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
-load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
+load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_coreutils_toolchains")
-aspect_bazel_lib_dependencies(override_local_config_platform = True)
+aspect_bazel_lib_dependencies()
+
+register_coreutils_toolchains()
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
@@ -46,6 +48,28 @@ load("@bazel_skylib//lib:unittest.bzl", "register_unittest_toolchains")
register_unittest_toolchains()
+############################################
+# Stardoc
+load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories")
+
+stardoc_repositories()
+
+load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
+
+rules_jvm_external_deps()
+
+load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
+
+rules_jvm_external_setup()
+
+load("@io_bazel_stardoc//:deps.bzl", "stardoc_external_deps")
+
+stardoc_external_deps()
+
+load("@stardoc_maven//:defs.bzl", stardoc_pinned_maven_install = "pinned_maven_install")
+
+stardoc_pinned_maven_install()
+
############################################
# Gazelle, for generating bzl_library targets
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
diff --git a/docs/rules.md b/docs/rules.md
index 50dc0ec..1583ca1 100644
--- a/docs/rules.md
+++ b/docs/rules.md
@@ -4,7 +4,6 @@ Public API surface is re-exported here.
Users should not load files under "/internal"
-
## webpack_bundle
@@ -23,21 +22,21 @@ Runs the webpack-cli under bazel
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| name | A unique name for this target. | none |
-| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. //:node_modules
.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli | none |
-| srcs | Non-entry point JavaScript source files from the workspace.
You must not repeat file(s) passed to entry_point/entry_points. | []
|
-| args | Command line arguments to pass to Webpack.
These argument passed on the command line before arguments that are added by the rule. Run bazel
with --subcommands
to see what Webpack CLI command line was invoked.
See the [Webpack CLI docs](https://webpack.js.org/api/cli/) for a complete list of supported arguments. | []
|
-| deps | Runtime dependencies which may be loaded during compilation. | []
|
-| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | None
|
-| data | Runtime dependencies to include in binaries/tests that depend on this target.
The transitive npm dependencies, transitive sources, default outputs and runfiles of targets in the data
attribute are added to the runfiles of this target. They should appear in the '*.runfiles' area of any executable which has a runtime dependency on this target. | []
|
-| env | Environment variables of the action.
Subject to $(location)
and make variable expansion. | {}
|
-| output_dir | If True, webpack produces an output directory containing all output files. | False
|
-| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Exactly one of entry_point
to entry_points
must be specified if output_dir
is False
. | None
|
-| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Exactly one of entry_point
to entry_points
must be specified if output_dir
is False
. | {}
|
-| webpack_config | Webpack configuration file.
See https://webpack.js.org/configuration/ | None
|
-| configure_mode | Configure mode
in the generated base webpack config.
mode
is set to production
if the Bazel compilation mode is opt
otherwise it is set to development
.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| configure_devtool | Configure devtool
in the generated base webpack config.
devtool
is set to eval
if the Bazel compilation mode is fastbuild
, eval-source-map
if the Bazel compilation mode is dbg
, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| use_execroot_entry_point | Use the entry_point
script of the webpack
js_binary
that is in the execroot output tree instead of the copy that is in runfiles.
When set, runfiles are hoisted to the target platform when this is configured and included as target platform execroot inputs to the action.
Using the entry point script that is in the execroot output tree means that there will be no conflicting runfiles node_modules
in the node_modules resolution path which can confuse npm packages such as next and react that don't like being resolved in multiple node_modules trees. This more closely emulates the environment that tools such as Next.js see when they are run outside of Bazel. | True
|
-| supports_workers | Experimental! Use only with caution.
Allows you to enable the Bazel Worker strategy for this library. | False
|
+| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. `//:node_modules`.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli | none |
+| srcs | Non-entry point JavaScript source files from the workspace.
You must not repeat file(s) passed to entry_point/entry_points. | `[]` |
+| args | Command line arguments to pass to Webpack.
These argument passed on the command line before arguments that are added by the rule. Run `bazel` with `--subcommands` to see what Webpack CLI command line was invoked.
See the [Webpack CLI docs](https://webpack.js.org/api/cli/) for a complete list of supported arguments. | `[]` |
+| deps | Runtime dependencies which may be loaded during compilation. | `[]` |
+| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | `None` |
+| data | Runtime dependencies to include in binaries/tests that depend on this target.
The transitive npm dependencies, transitive sources, default outputs and runfiles of targets in the `data` attribute are added to the runfiles of this target. They should appear in the '*.runfiles' area of any executable which has a runtime dependency on this target. | `[]` |
+| env | Environment variables of the action.
Subject to `$(location)` and make variable expansion. | `{}` |
+| output_dir | If True, webpack produces an output directory containing all output files. | `False` |
+| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Exactly one of `entry_point` to `entry_points` must be specified if `output_dir` is `False`. | `None` |
+| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Exactly one of `entry_point` to `entry_points` must be specified if `output_dir` is `False`. | `{}` |
+| webpack_config | Webpack configuration file.
See https://webpack.js.org/configuration/ | `None` |
+| configure_mode | Configure `mode` in the generated base webpack config.
`mode` is set to `production` if the Bazel compilation mode is `opt` otherwise it is set to `development`.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| configure_devtool | Configure `devtool` in the generated base webpack config.
`devtool` is set to `eval` if the Bazel compilation mode is `fastbuild`, `eval-source-map` if the Bazel compilation mode is `dbg`, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| use_execroot_entry_point | Use the `entry_point` script of the `webpack` `js_binary` that is in the execroot output tree instead of the copy that is in runfiles.
When set, runfiles are hoisted to the target platform when this is configured and included as target platform execroot inputs to the action.
Using the entry point script that is in the execroot output tree means that there will be no conflicting runfiles `node_modules` in the node_modules resolution path which can confuse npm packages such as next and react that don't like being resolved in multiple node_modules trees. This more closely emulates the environment that tools such as Next.js see when they are run outside of Bazel. | `True` |
+| supports_workers | Experimental! Use only with caution.
Allows you to enable the Bazel Worker strategy for this library. | `False` |
| kwargs | Additional arguments | none |
@@ -63,17 +62,17 @@ under the hood.
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| name | A unique name for this target. | none |
-| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. //:node_modules
.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli, webpack-dev-server | none |
-| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | None
|
-| env | Environment variables of the action.
Subject to $(location)
and make variable expansion. | {}
|
-| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Only one of entry_point
to entry_points
must be specified. | None
|
-| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Only one of entry_point
to entry_points
must be specified. | {}
|
-| webpack_config | Webpack configuration file. See https://webpack.js.org/configuration/. | None
|
-| configure_mode | Configure mode
in the generated base webpack config.
mode
is set to production
if the Bazel compilation mode is opt
otherwise it is set to development
.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| configure_devtool | Configure devtool
in the generated base webpack config.
devtool
is set to eval
if the Bazel compilation mode is fastbuild
, eval-source-map
if the Bazel compilation mode is dbg
, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| args | Additional arguments to pass to webpack.
The serve
command, the webpack config file (--config
) and the mode (--mode
) are automatically set. | []
|
-| data | Bundle and runtime dependencies of the program.
Should include the webpack_bundle
rule srcs
and deps
.
The webpack config and entry_point[s] are automatically passed to data and should not be repeated. | []
|
-| mode | The mode to pass to --mode
. | "development"
|
+| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. `//:node_modules`.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli, webpack-dev-server | none |
+| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | `None` |
+| env | Environment variables of the action.
Subject to `$(location)` and make variable expansion. | `{}` |
+| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Only one of `entry_point` to `entry_points` must be specified. | `None` |
+| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Only one of `entry_point` to `entry_points` must be specified. | `{}` |
+| webpack_config | Webpack configuration file. See https://webpack.js.org/configuration/. | `None` |
+| configure_mode | Configure `mode` in the generated base webpack config.
`mode` is set to `production` if the Bazel compilation mode is `opt` otherwise it is set to `development`.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| configure_devtool | Configure `devtool` in the generated base webpack config.
`devtool` is set to `eval` if the Bazel compilation mode is `fastbuild`, `eval-source-map` if the Bazel compilation mode is `dbg`, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| args | Additional arguments to pass to webpack.
The `serve` command, the webpack config file (`--config`) and the mode (`--mode`) are automatically set. | `[]` |
+| data | Bundle and runtime dependencies of the program.
Should include the `webpack_bundle` rule `srcs` and `deps`.
The webpack config and entry_point[s] are automatically passed to data and should not be repeated. | `[]` |
+| mode | The mode to pass to `--mode`. | `"development"` |
| kwargs | Additional arguments. See [js_run_devserver](https://github.com/aspect-build/rules_js/blob/main/docs/js_run_devserver.md). | none |
diff --git a/e2e/smoke/MODULE.bazel b/e2e/smoke/MODULE.bazel
index 94a609f..466f7f9 100644
--- a/e2e/smoke/MODULE.bazel
+++ b/e2e/smoke/MODULE.bazel
@@ -1,8 +1,8 @@
"Bazel dependencies"
-bazel_dep(name = "aspect_bazel_lib", version = "1.32.0")
-bazel_dep(name = "aspect_rules_js", version = "1.33.1")
-bazel_dep(name = "bazel_skylib", version = "1.4.1")
+bazel_dep(name = "aspect_bazel_lib", version = "1.39.1")
+bazel_dep(name = "aspect_rules_js", version = "1.34.1")
+bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "aspect_rules_webpack", version = "0.0.0", dev_dependency = True)
local_path_override(
diff --git a/e2e/smoke/WORKSPACE.bazel b/e2e/smoke/WORKSPACE.bazel
index 4596f9d..30f94b0 100644
--- a/e2e/smoke/WORKSPACE.bazel
+++ b/e2e/smoke/WORKSPACE.bazel
@@ -16,6 +16,16 @@ load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependenc
rules_webpack_dependencies()
+load("@bazel_features//:deps.bzl", "bazel_features_deps")
+
+bazel_features_deps()
+
+load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_coreutils_toolchains")
+
+aspect_bazel_lib_dependencies()
+
+register_coreutils_toolchains()
+
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
diff --git a/e2e/worker/WORKSPACE b/e2e/worker/WORKSPACE
index a7be3de..dd5bf2e 100644
--- a/e2e/worker/WORKSPACE
+++ b/e2e/worker/WORKSPACE
@@ -10,6 +10,16 @@ load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependenc
rules_webpack_dependencies()
+load("@bazel_features//:deps.bzl", "bazel_features_deps")
+
+bazel_features_deps()
+
+load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_coreutils_toolchains")
+
+aspect_bazel_lib_dependencies()
+
+register_coreutils_toolchains()
+
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
diff --git a/internal_deps.bzl b/internal_deps.bzl
index 800b6ca..a0bb0fa 100644
--- a/internal_deps.bzl
+++ b/internal_deps.bzl
@@ -9,35 +9,42 @@ load("//webpack/private:maybe.bzl", http_archive = "maybe_http_archive")
def rules_webpack_internal_deps():
"Fetch repositories used for developing the rules"
+
+ # opt-in to 2.0 without forcing users to do so
+ http_archive(
+ name = "aspect_bazel_lib",
+ sha256 = "fc8bd670380eaba5314769abbe9fee21d641e3da06d9d26b8073a301f6d62332",
+ strip_prefix = "bazel-lib-2.1.0",
+ url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.1.0/bazel-lib-v2.1.0.tar.gz",
+ )
+
http_archive(
name = "io_bazel_rules_go",
- sha256 = "099a9fb96a376ccbbb7d291ed4ecbdfd42f6bc822ab77ae6f1b5cb9e914e94fa",
- urls = ["https://github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip"],
+ sha256 = "7c76d6236b28ff695aa28cf35f95de317a9472fd1fb14ac797c9bf684f09b37c",
+ urls = ["https://github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip"],
)
http_archive(
name = "bazel_gazelle",
- sha256 = "448e37e0dbf61d6fa8f00aaa12d191745e14f07c31cabfa731f0c8e8a4f41b97",
- urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.28.0/bazel-gazelle-v0.28.0.tar.gz"],
+ sha256 = "32938bda16e6700063035479063d9d24c60eda8d79fd4739563f50d331cb3209",
+ urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz"],
)
http_archive(
name = "bazel_skylib_gazelle_plugin",
- sha256 = "0a466b61f331585f06ecdbbf2480b9edf70e067a53f261e0596acd573a7d2dc3",
- urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-gazelle-plugin-1.4.1.tar.gz"],
+ sha256 = "747addf3f508186234f6232674dd7786743efb8c68619aece5fb0cac97b8f415",
+ urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-gazelle-plugin-1.5.0.tar.gz"],
)
http_archive(
name = "io_bazel_stardoc",
- sha256 = "3fd8fec4ddec3c670bd810904e2e33170bedfe12f90adf943508184be458c8bb",
- urls = ["https://github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz"],
+ sha256 = "62bd2e60216b7a6fec3ac79341aa201e0956477e7c8f6ccc286f279ad1d96432",
+ urls = ["https://github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz"],
)
http_archive(
name = "buildifier_prebuilt",
- sha256 = "e46c16180bc49487bfd0f1ffa7345364718c57334fa0b5b67cb5f27eba10f309",
- strip_prefix = "buildifier-prebuilt-6.1.0",
- urls = [
- "https://github.com/keith/buildifier-prebuilt/archive/6.1.0.tar.gz",
- ],
+ sha256 = "8ada9d88e51ebf5a1fdff37d75ed41d51f5e677cdbeafb0a22dda54747d6e07e",
+ strip_prefix = "buildifier-prebuilt-6.4.0",
+ urls = ["http://github.com/keith/buildifier-prebuilt/archive/6.4.0.tar.gz"],
)
diff --git a/webpack/dependencies.bzl b/webpack/dependencies.bzl
index 1d3293d..903b21a 100644
--- a/webpack/dependencies.bzl
+++ b/webpack/dependencies.bzl
@@ -9,26 +9,33 @@ load("//webpack/private:maybe.bzl", http_archive = "maybe_http_archive")
def rules_webpack_dependencies():
http_archive(
name = "bazel_skylib",
- sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
- urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz"],
+ sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
+ urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"],
)
http_archive(
name = "aspect_bazel_lib",
- sha256 = "e3151d87910f69cf1fc88755392d7c878034a69d6499b287bcfc00b1cf9bb415",
- strip_prefix = "bazel-lib-1.32.1",
- url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.32.1/bazel-lib-v1.32.1.tar.gz",
+ sha256 = "5e9588d8407a576771f1e0d8956f541f78610f1b6e4cca29af2a096fccfe3b24",
+ strip_prefix = "bazel-lib-1.39.1",
+ url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.39.1/bazel-lib-v1.39.1.tar.gz",
)
http_archive(
name = "aspect_rules_js",
- sha256 = "7cb2d84b7d5220194627c9a0267ae599e357350e75ea4f28f337a25ca6219b83",
- strip_prefix = "rules_js-1.29.2",
- url = "https://github.com/aspect-build/rules_js/releases/download/v1.29.2/rules_js-v1.29.2.tar.gz",
+ sha256 = "76a04ef2120ee00231d85d1ff012ede23963733339ad8db81f590791a031f643",
+ strip_prefix = "rules_js-1.34.1",
+ url = "https://github.com/aspect-build/rules_js/releases/download/v1.34.1/rules_js-v1.34.1.tar.gz",
)
http_archive(
name = "rules_nodejs",
- sha256 = "764a3b3757bb8c3c6a02ba3344731a3d71e558220adcb0cf7e43c9bba2c37ba8",
- urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.2/rules_nodejs-core-5.8.2.tar.gz"],
+ sha256 = "8fc8e300cb67b89ceebd5b8ba6896ff273c84f6099fc88d23f24e7102319d8fd",
+ urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.4/rules_nodejs-core-5.8.4.tar.gz"],
+ )
+
+ http_archive(
+ name = "bazel_features",
+ sha256 = "b8789c83c893d7ef3041d3f2795774936b27ff61701a705df52fd41d6ddbf692",
+ strip_prefix = "bazel_features-1.2.0",
+ url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.2.0/bazel_features-v1.2.0.tar.gz",
)
diff --git a/webpack/private/webpack_bundle.bzl b/webpack/private/webpack_bundle.bzl
index 01165ab..94c6291 100644
--- a/webpack/private/webpack_bundle.bzl
+++ b/webpack/private/webpack_bundle.bzl
@@ -1,6 +1,6 @@
"""Webpack bundle producing rule definition."""
-load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
+load("@aspect_bazel_lib//lib:copy_file.bzl", "COPY_FILE_TOOLCHAINS", "copy_file")
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_files_to_bin_actions")
load("@aspect_bazel_lib//lib:expand_make_vars.bzl", "expand_locations", "expand_variables")
load("@aspect_rules_js//js:defs.bzl", "js_binary")
@@ -240,6 +240,7 @@ _webpack_bundle = rule(
attrs = lib.attrs,
outputs = lib.outputs,
doc = "",
+ toolchains = COPY_FILE_TOOLCHAINS,
)
def webpack_bundle(