Avatar for the rolldown user
rolldown
rolldown
BlogDocsChangelog

Performance History

Latest Results

feat(error): link pure annotation docs in invalid annotation diagnostic
Kyujenius:feat/warn-invalid-pure-annotations
32 minutes ago
chore(deps): update napi (#9385) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [napi](https://redirect.github.com/napi-rs/napi-rs) | workspace.dependencies | minor | `3.8.6` → `3.9.0` | | [napi-build](https://redirect.github.com/napi-rs/napi-rs) | workspace.dependencies | patch | `2.3.1` → `2.3.2` | | [napi-derive](https://redirect.github.com/napi-rs/napi-rs) | workspace.dependencies | patch | `3.5.5` → `3.5.6` | --- ### Release Notes <details> <summary>napi-rs/napi-rs (napi)</summary> ### [`v3.9.0`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-v3.9.0) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-v3.8.6...napi-v3.9.0) ##### Added - *(napi)* add `ThreadsafeFunction::call_async_catch` to handle errors in callback functions ([#&#8203;3291](https://redirect.github.com/napi-rs/napi-rs/pull/3291)) ##### Fixed - *(deps)* update rust crate ctor to v1 ([#&#8203;3276](https://redirect.github.com/napi-rs/napi-rs/pull/3276)) - *(deps)* update rust crate ctor to 0.13.0 ([#&#8203;3275](https://redirect.github.com/napi-rs/napi-rs/pull/3275)) - *(deps)* update rust crate ctor to 0.12.0 ([#&#8203;3271](https://redirect.github.com/napi-rs/napi-rs/pull/3271)) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rolldown/rolldown). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNzMuNiIsInVwZGF0ZWRJblZlciI6IjQzLjE3My42IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
main
1 hour ago
chore(deps): update napi
renovate/napi
2 hours ago
feat(experimental/lazy-barrel): advice on oversized barrel modules (#9236) ## Summary Adds a build-time advisory when the experimental `lazyBarrel` flag is enabled and a barrel module exceeds **5000 re-exports** (think large icon packs like `lucide-react` or `@mui/icons-material`). Eagerly resolving every re-export in such a barrel is a known bottleneck, so rolldown now points users at [`@rolldown/plugin-transform-imports`](https://github.com/rolldown/plugins/tree/main/packages/transform-imports), which rewrites imports at the source so the barrel file is never loaded. Example output: ``` advice[LARGE_BARREL_MODULES]: node_modules/lucide-react/dist/esm/lucide-react.js has 1463 re-exports. Eagerly resolving every entry can significantly slow down the build. Consider using `@rolldown/plugin-transform-imports` to rewrite imports at the source level so the barrel file is never loaded. help: See https://github.com/rolldown/plugins/tree/main/packages/transform-imports for usage. ``` ## What's in this PR - **New diagnostic event `LargeBarrelModules`** (`EventKind = 46`) under `rolldown_error`, with a dedicated `BuildEvent` impl that formats the module id, re-export count, and a help link. - **`Severity::Info` variant** on `BuildDiagnostic`, rendered as `ReportKind::Advice` via ariadne (distinct from the existing `error:` / `warning:` prefixes). A `with_severity()` builder is added so the same diagnostic can be downgraded to an info-level log. - **Detection in `module_task.rs`**: after lazy-barrel info is computed, if the resolved barrel has more than 5000 import records, an `Info`-level `Log` is dispatched through `on_log` with `code = "LARGE_BARREL_MODULES"`. Gated on the new check flag so users can silence it. - **New check flag** `checks.largeBarrelModules` (default `true`), propagated through the usual codegen: Rust `EventKindSwitcher`, NAPI binding, TS `ChecksOptions`, validator, JSON schema, and CLI `--checks.large-barrel-modules`. ## How to opt out ```js export default { experimental: { lazyBarrel: true }, checks: { largeBarrelModules: false }, } ``` Or from the CLI: ```sh rolldown --no-checks.large-barrel-modules ``` ## Notes on the threshold 5000 was chosen so that ordinary component or utility barrels (typically in the low hundreds) stay quiet, and only the real outliers (icon packs, mass re-export shims) trip it. The threshold is intentionally not user-configurable for now; once we have real-world feedback it can be promoted to an option. <img width="710" height="119" alt="image" src="https://github.com/user-attachments/assets/45b73c26-0294-45dc-b2d0-f25627eaed5e" />
main
3 hours ago
Merge branch 'main' into 04-27-feat_lazy-barrel_warn_on_oversized_barrel_modules
04-27-feat_lazy-barrel_warn_on_oversized_barrel_modules
4 hours ago
feat(rolldown): inline optional-chain enum access (#9379) We already implemented single file optional chaining inline in Oxc https://github.com/oxc-project/oxc/pull/21834 ## Summary Teaches the cross-module enum inliner to fold optional-chain access (`E?.x`, `E?.['x']`) to the same literal as `E.x` / `E['x']`. With that hole filled, the tree-shaker bypass added in #9229 no longer needs its `!prop.optional` guard. ## Why this is safe Enum bindings are always defined — the generated IIFE initializes them to `{}` (never null/undefined), and const enums are removed entirely after inlining. So `?.` cannot short-circuit on an enum object: `E?.x` is observationally equivalent to `E.x`. The TDZ assumption this relies on (an enum identifier reaching the finalizer is always bound to a real value) is the same one `E.x` inlining already makes — we just extend it to the optional form. ## What changed - `crates/rolldown/src/module_finalizers/mod.rs` — `try_inline_enum_access` now also matches `ChainExpression { StaticMemberExpression | ComputedMemberExpression }`. - `crates/rolldown/src/module_finalizers/impl_visit_mut.rs` — pre-match inline attempt for `ChainExpression`, done before the main `visit_expression` dispatch so `expr` can be passed to `try_inline_enum_access` without conflicting with the existing arm's mutable destructure of the inner chain. - `crates/rolldown/src/stages/link_stage/tree_shaking/include_statements.rs` — drops the `!prop.optional` guard from the enum-decl bypass. `!is_write` stays. - `crates/rolldown/tests/esbuild/ts/ts_enum_cross_module_inlining_access/` — moves the optional cases into the `inlined` group; snapshot now folds all 8 inlinable accesses to literals while keeping `e_num`/`e_str` (bare identifier references). ## Test plan - [x] `cargo test -p rolldown --test integration ts_enum_cross_module_inlining_access` - [x] `cargo test -p rolldown` (1703 passed, 0 failed) - [x] `cargo test -p rolldown --test integration enum` (24 passed) - [x] `cargo test -p rolldown --test integration chain` (25 passed) - [x] Spot-checked single-module `enum E { x = 1 }; console.log(E?.x)` via CLI — now folds to `console.log(1)` - [x] `just ued` — produced no additional snap-diff changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
main
4 hours ago
Merge branch 'main' into 04-27-feat_lazy-barrel_warn_on_oversized_barrel_modules
04-27-feat_lazy-barrel_warn_on_oversized_barrel_modules
5 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
feat: emit warnings for invalid pure annotations#9381
54 minutes ago
3240f98
Kyujenius:feat/warn-invalid-pure-annotations
CodSpeed Performance Gauge
0%
chore(deps): update napi#9385
2 hours ago
9f7db50
renovate/napi
CodSpeed Performance Gauge
0%
4 hours ago
5f3c84c
04-27-feat_lazy-barrel_warn_on_oversized_barrel_modules
© 2026 CodSpeed Technology
Home Terms Privacy Docs