Skip to content

Adopt Docusaurus Faster so the docs site survives the 3.10 bump - #139

Merged
xinaesthete merged 2 commits into
mainfrom
claude/docusaurus-dependency-error-846221
Aug 11, 2026
Merged

Adopt Docusaurus Faster so the docs site survives the 3.10 bump#139
xinaesthete merged 2 commits into
mainfrom
claude/docusaurus-dependency-error-846221

Conversation

@xinaesthete

@xinaesthete xinaesthete commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Supersedes #135.

The problem

#135 is a straight bump of the five @docusaurus/* packages from 3.9.1 to 3.10.2. Merging it as-is breaks the docs site outright — docusaurus start and docusaurus build both abort before doing any work:

[ERROR] Error: To enable Docusaurus Faster options, your site must add the
@docusaurus/faster package as a dependency.

Docusaurus 3.10 added a new future flag, v4.fasterByDefault. This site uses the future: { v4: true } shorthand, and that shorthand expands to every v4 flag — so it now turns on fasterByDefault, which in turn enables all future.faster.* options (Rspack bundler, SWC, Lightning CSS). Those live in a separate @docusaurus/faster package. @docusaurus/bundler's getCurrentBundler() reads siteConfig.future.faster.rspackBundler, hits importRspack(), and throws.

The fix

Take the forward option — actually adopt Faster — rather than opting back out with an explicit future.v4: { fasterByDefault: false, ... }. It's what v4 will do anyway, and it works cleanly here.

  • Bump the five @docusaurus/* packages to 3.10.2 (the content of Bump the docs-stack group with 5 updates #135)
  • Add @docusaurus/faster 3.10.2 as a docs dependency
  • '@swc/core': false in allowBuilds — Faster pulls in SWC, whose postinstall only probes the native binding before falling back to @swc/wasm. The platform-specific optional dep installs on its own, so this matches the existing biome/core-js entries.
  • A comment on the v4: true flag recording why @docusaurus/faster is now a hard dependency, so the coupling isn't a surprise next time

Verification

Everything below was run against Rspack 1.7.12:

  • docusaurus build succeeds from a clean .docusaurus/build
  • Dev server starts and compiles
  • Demo page checked under both the dev server and the served production build: the remote Visium HD store loads, the hires image layer's chunks fetch and decode through the codec workers (channel contrast limits populate from real pixel data), parquet-wasm loads, zero local asset failures, zero console errors
  • The custom disableDevSplitChunks plugin's optimization.splitChunks: false is fine on Rspack
  • @swc/core-linux-x64-gnu and @rspack/binding-linux-x64-gnu are both in the lockfile, so the --frozen-lockfile install in .github/workflows/docs.yml resolves on CI runners

Notes

The build emits one warning — Critical dependency: the request of a dependency is an expression, from web-worker's Node shim during SSR. It's the classic bundler warning, non-fatal, and not introduced by Faster.

Unrelated and pre-existing, so left alone here: pnpm --filter docs typecheck fails with sh: tsc: command not found, because the script calls tsc while the workspace catalog maps typescript to @typescript/typescript6 (bin tsc6). Nothing in CI runs it, which is why it went unnoticed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Enabled faster default behavior for the documentation site.
    • Added compatibility guidance for the updated documentation tooling.
  • Maintenance

    • Updated documentation tooling to version 3.10.2.
    • Added support for the faster documentation build package.
    • Improved installation compatibility with optional native bindings and a WebAssembly fallback.

Docusaurus 3.10 added the `future.v4.fasterByDefault` flag, and the
`future: { v4: true }` shorthand this site uses now expands to *every*
v4 flag — including that one, which in turn enables all `future.faster.*`
options (Rspack, SWC, Lightning CSS). Those ship in a separate package,
so on 3.10.2 both `docusaurus start` and `docusaurus build` abort with:

  Error: To enable Docusaurus Faster options, your site must add the
  @docusaurus/faster package as a dependency.

Take the forward option rather than opting back out with an explicit
`future.v4: { fasterByDefault: false, ... }` — Faster is what v4 does
anyway, and it works cleanly here.

- bump the five @docusaurus/* packages to 3.10.2 (supersedes #135)
- add @docusaurus/faster as a docs dependency
- skip @swc/core's postinstall: Faster pulls in SWC, and that script only
  probes the native binding before falling back to @swc/wasm. The
  platform-specific optional dep installs on its own, so this matches the
  existing biome/core-js entries.

Verified on Rspack 1.7.12: clean production build, dev server, and the
demo page under both — remote Visium HD store loads, the hires image
layer decodes through the codec workers, parquet-wasm loads, no local
asset failures and no console errors. The linux-x64-gnu bindings for
both @swc/core and @rspack are in the lockfile, so the CI
--frozen-lockfile install resolves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@xinaesthete, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5bc60a8a-a198-4c2b-9db0-1f2296282b2f

📥 Commits

Reviewing files that changed from the base of the PR and between 960d6be and 6c9d591.

📒 Files selected for processing (1)
  • pnpm-workspace.yaml
📝 Walkthrough

Walkthrough

The documentation workspace upgrades Docusaurus to 3.10.2, adds @docusaurus/faster, documents the future.v4 requirement, and allows @swc/core without running its postinstall build.

Changes

Docusaurus upgrade

Layer / File(s) Summary
Docusaurus dependencies and build configuration
docs/package.json, docs/docusaurus.config.ts, pnpm-workspace.yaml
Docusaurus packages now use version 3.10.2. @docusaurus/faster is added. The future.v4 configuration documents the faster defaults and required dependency. pnpm allows @swc/core without its postinstall script.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes adopting Docusaurus Faster to support the Docusaurus 3.10.2 upgrade.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/docusaurus-dependency-error-846221

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm-workspace.yaml`:
- Around line 7-10: Enable the `@swc/core` lifecycle script by changing its
allowBuilds entry from false to true in the workspace configuration, ensuring
postinstall.js can validate the native binding and install `@swc/wasm` when
needed. Do not retain the current script-skipping setting unless an equivalent
fallback is implemented and tested.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e7dc68e-17bb-4bc8-8cd0-439a01b4a4e3

📥 Commits

Reviewing files that changed from the base of the PR and between 140e8e4 and 960d6be.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • docs/docusaurus.config.ts
  • docs/package.json
  • pnpm-workspace.yaml

Comment thread pnpm-workspace.yaml Outdated
Comment-only. Answers the review question rather than changing behaviour:
the script is a no-op on a healthy install, all 12 platform bindings are
lockfile-tracked, and its @swc/wasm fallback shells out to npm and writes
outside the lockfile so --frozen-lockfile CI could never reproduce it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@xinaesthete
xinaesthete merged commit 0a03129 into main Aug 11, 2026
6 checks passed
@xinaesthete
xinaesthete deleted the claude/docusaurus-dependency-error-846221 branch August 11, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant