v0.14.0
Pre-releaseThe rollup_bundle
rule is renamed to just rollup
. This has been planned for a while to do before 1.0 and included in this release to go along with other breaking changes. rollup_repositories
repository rule is removed and a new node_modules
attribute is now required for rollup
. This changes are BREAKING for all users.
The //path/to:node_modules
tree target must be passed to the rollup
rule via the node_modules
attribute. For example,
rollup(
name = "bundle",
node_modules = "//:node_modules",
...
)
You'll need rollup
linked in the node_modules tree provided.
This change has the added benefits of not requiring users to keep the terser version used in their package.json
in sync with their WORKSPACE and not requiring any changes to rules_rollup
to support new releases of rollup.
This change is in the spirit of the changes in rules_webpack v0.11.0, rules_jasmine v0.4.0 and rules_terser v0.14.0 and will also be rolled out to rules_jest in the near future so the patterns on the downstream rules_js rulesets we maintain are aligned both for maintainers and for users.
WORKSPACE snippet
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_rollup",
sha256 = "3777f196b7ced25241a6ccdc41551de6bd0817630cce1924919b9e9816676e43",
strip_prefix = "rules_rollup-0.14.0",
url = "https://github.com/aspect-build/rules_rollup/releases/download/v0.14.0/rules_rollup-v0.14.0.tar.gz",
)
######################
# rules_rollup setup #
######################
load("@aspect_rules_rollup//rollup:dependencies.bzl", "rules_rollup_dependencies")
# Fetches the rules_rollup dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
rules_rollup_dependencies()
# Fetch and register a node toolchain, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node",
node_version = DEFAULT_NODE_VERSION,
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
What's Changed
- chore: update to aspect_bazel_lib 1.27.2 by @gregmagolan in #73
- chore: update to Aspect CLI 5.2.0-rc0 by @gregmagolan in #74
- chore: update to Aspect CLI 5.2.1 by @gregmagolan in #75
- chore: update transitive deps by @gregmagolan in #76
- refactor: remove vendored rollup versions, user must provider their own rollup from their node_modules by @gregmagolan in #77
Full Changelog: v0.13.1...v0.14.0