Skip to content

chore(deps): migrate to VitePress 2 and Vite 8.2 - #829

Merged
ilyabo merged 3 commits into
mainfrom
agent/migrate-vitepress-2
Aug 4, 2026
Merged

ilyabo merged 3 commits into
mainfrom
agent/migrate-vitepress-2

Conversation

@ilyabo

@ilyabo ilyabo commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

  • Migrated the documentation site to the VitePress 2 prerelease (2.0.0-alpha.19) and updated vitepress-plugin-llms.
  • Aligned every direct Vite dependency in apps, examples, and generated scaffolds on Vite 8.2.0 with @vitejs/plugin-react 5.2.0.
  • Removed the legacy Vite 6 override, refreshed PostCSS, regenerated the pnpm lockfile, and raised the Node.js floor to 22.12.
  • Updated Vite config imports and path handling for Vite 8's native config loader.

Why

This replaces the two split Renovate updates with one coherent migration, avoids mixed Vite versions in the lockfile, and lets VitePress use Vite 8 directly.

Supersedes #826 and #827.

Impact and compatibility

  • VitePress 2 is still an alpha release, so its version is pinned exactly.
  • vitepress-plugin-mermaid currently declares a VitePress 1 peer range. It nevertheless builds successfully with VitePress 2, and browser QA confirmed all three Mermaid diagrams on the persistence page render as SVGs without console errors.
  • The repository now requires Node.js >=22.12, matching Vite 8's engine requirement.

Checks

  • pnpm install --frozen-lockfile --ignore-scripts
  • pnpm sort-package-json:check
  • pnpm build — 48/48 workspace builds
  • pnpm docs:build — TypeDoc and VitePress production build
  • pnpm build:apps — 39/39 app tasks
  • Vite example builds excluding the unrelated code-editor failure and Next.js network-dependent examples — 71/71 tasks
  • Pre-push: Knip, typecheck (53/53), circular dependency check, and tests (26/26)
  • Browser QA: homepage rendered, Mermaid 3/3, no console errors

Known unrelated validation limitations

  • code-editor-example currently fails on existing QualifiedTableName.toArray TypeScript errors.
  • The two Next.js examples cannot fetch Google Fonts in the sandbox; all Vite-based examples were built separately.

Summary by CodeRabbit

  • New Features
    • Added Mermaid diagram rendering to documentation pages, including dark-mode support, responsive layouts, and readable error fallbacks.
  • Chores
    • Updated Vite and React plugin tooling across the CLI and examples.
    • Updated documentation tooling and improved compatibility with modern Node.js environments.
    • Raised the minimum supported Node.js version to 22.12.
    • Updated PostCSS and workspace package overrides.
    • Improved development and build compatibility through ESM module resolution updates.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5074f3fc-2567-41d7-9629-c490eb5476ac

📥 Commits

Reviewing files that changed from the base of the PR and between b6dfd5e and 4ccf6a8.

⛔ Files ignored due to path filters (2)
  • examples/app-builder/app-scaffolds/scaffolds.generated.json is excluded by !**/*.generated.*
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • docs/.vitepress/config.ts
  • docs/.vitepress/theme/MermaidDiagram.vue
  • docs/.vitepress/theme/index.ts
  • docs/.vitepress/theme/style.css
  • examples/app-builder/plugins/scaffolds.ts
  • knip.json
  • package.json
💤 Files with no reviewable changes (2)
  • examples/app-builder/plugins/scaffolds.ts
  • knip.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

📝 Walkthrough

Walkthrough

Vite and the React Vite plugin were upgraded across applications and examples. VitePress now renders Mermaid fences through a custom Vue component. ESM-compatible imports and path resolution were added. Workspace overrides and Node.js requirements were updated.

Changes

Tooling and documentation migration

Layer / File(s) Summary
Dependency and workspace upgrades
package.json, pnpm-workspace.yaml, apps/*/package.json, examples/*/package.json
Vite and @vitejs/plugin-react versions were updated across applications and examples. VitePress, PostCSS, and the minimum Node.js version were also updated.
ESM and scaffold resolution
apps/sqlrooms-cli-ui/plugins/scaffolds.ts, apps/sqlrooms-cli-ui/vite.config.ts, examples/app-builder/plugins/*, examples/app-builder/vite.config.ts, docs/.vitepress/gen-api-sidebar.ts
Local imports now include .ts extensions. Scaffold scripts use import.meta.dirname. The app-builder plugin no longer runs only during serve.
VitePress Mermaid rendering
docs/.vitepress/config.ts, docs/.vitepress/theme/*, knip.json
Mermaid fences now render through MermaidDiagram. The component loads Mermaid asynchronously, queues renders, handles theme changes and stale renders, and displays errors with source fallback. Mermaid styling and workspace cleanup were added.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 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 summarizes the main changes: migration to VitePress 2 and alignment with Vite 8.2.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 agent/migrate-vitepress-2

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@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 `@package.json`:
- Around line 102-104: Update the vitepress-plugin-mermaid dependency in
package.json to a release whose declared peer dependency supports vitepress
2.0.0-alpha.19, and refresh the lockfile accordingly while preserving the
existing VitePress version.
🪄 Autofix (Beta)

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: 5d1891e3-40d7-4ecf-ba5b-05a631ac61ad

📥 Commits

Reviewing files that changed from the base of the PR and between a40968f and b6dfd5e.

⛔ Files ignored due to path filters (2)
  • apps/sqlrooms-cli-ui/app-scaffolds/scaffolds.generated.json is excluded by !**/*.generated.*
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (40)
  • apps/sqlrooms-cli-ui/app-scaffolds/get-started/package.json
  • apps/sqlrooms-cli-ui/package.json
  • apps/sqlrooms-cli-ui/plugins/scaffolds.ts
  • apps/sqlrooms-cli-ui/vite.config.ts
  • docs/.vitepress/config.ts
  • docs/.vitepress/gen-api-sidebar.ts
  • examples/ai-agent/package.json
  • examples/ai-core/package.json
  • examples/ai-rag/package.json
  • examples/ai-subagents/package.json
  • examples/ai/package.json
  • examples/app-builder/app-scaffolds/get-started/package.json
  • examples/app-builder/package.json
  • examples/app-builder/plugins/generateScaffolds.ts
  • examples/app-builder/plugins/scaffolds.ts
  • examples/app-builder/vite.config.ts
  • examples/canvas-sync/package.json
  • examples/canvas/package.json
  • examples/code-editor/package.json
  • examples/color-scales/package.json
  • examples/cosmos-embedding/package.json
  • examples/cosmos/package.json
  • examples/deckgl-discuss/package.json
  • examples/deckgl-mosaic/package.json
  • examples/deckgl/package.json
  • examples/get-started/package.json
  • examples/kepler/package.json
  • examples/layout/package.json
  • examples/minimal/package.json
  • examples/mosaic/package.json
  • examples/multi-room/package.json
  • examples/notebook/package.json
  • examples/pivot/package.json
  • examples/query-motherduck/package.json
  • examples/query-pwa/package.json
  • examples/query-websocket/package.json
  • examples/query/package.json
  • examples/sync/package.json
  • package.json
  • pnpm-workspace.yaml

Comment thread package.json Outdated
Comment on lines 102 to 104
"vitepress": "2.0.0-alpha.19",
"vitepress-plugin-llms": "^1.13.4",
"vitepress-plugin-mermaid": "^2.0.17"

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

curl -fsSL https://registry.npmjs.org/vitepress-plugin-mermaid/2.0.17 |
  jq '{peerDependencies, peerDependenciesMeta}'

rg -n 'vitepress-plugin-mermaid|vitepress@' pnpm-lock.yaml

Repository: sqlrooms/sqlrooms

Length of output: 975


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
import json, urllib.request
urls = [
    "https://registry.npmjs.org/vitepress-plugin-mermaid/2.0.17",
    "https://registry.npmjs.org/vitepress-plugin-mermaid/latest",
    "https://registry.npmjs.org/vitepress-plugin-mermaid",
]
for url in urls:
    print(f"\n## {url}")
    try:
        with urllib.request.urlopen(url, timeout=20) as r:
            data = json.load(r)
        if url.endswith("/latest") or not url.endswith("/"):
            version = data.get("version")
            deps = data.get("peerDependencies")
            print("version", version)
            print("peerDependencies", deps)
        else:
            latest = data.get("dist-tags", {}).get("latest")
            versions = data.get("versions", {})
            for v in [latest, "2.0.18", "2.1.0"]:
                if v in versions:
                    d = versions[v]
                    print("version", v)
                    print("peerDependencies", d.get("peerDependencies"))
    except Exception as e:
        print("ERROR", type(e).__name__, e)
PY

Repository: sqlrooms/sqlrooms

Length of output: 787


🌐 Web query:

npm vitepress-plugin-mermaid 2.0.17 peerDependencies vitepress

💡 Result:

For version 2.0.17 of the vitepress-plugin-mermaid package, the defined peerDependency for VitePress is ^1.0.0 || ^1.0.0-alpha [1][2][3]. While this configuration explicitly targets VitePress 1.x, users often report that the plugin continues to function correctly when used with VitePress 2.x [4]. If you encounter dependency resolution errors when installing in a VitePress 2.x project, it is standard practice to bypass the restriction using flags such as --force or --legacy-peer-deps with npm [4].

Citations:


Use a VitePress-2-compatible vitepress-plugin-mermaid release.

[email protected] declares vitepress: "^1.0.0 || ^1.0.0-alpha", while this manifest installs [email protected]. The lockfile can satisfy this request now, but the dependency contract does not cover VitePress 2.

🤖 Prompt for 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.

In `@package.json` around lines 102 - 104, Update the vitepress-plugin-mermaid
dependency in package.json to a release whose declared peer dependency supports
vitepress 2.0.0-alpha.19, and refresh the lockfile accordingly while preserving
the existing VitePress version.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6dfd5e74a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"@vitejs/plugin-react": "^4.3.0",
"vite": "^7.3.2"
"@vitejs/plugin-react": "^5.2.0",
"vite": "^8.2.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Regenerate the app-builder scaffold manifest

This version bump only changes the source scaffold, but the app-builder UI imports app-scaffolds/scaffolds.generated.json and its Vite plugin is apply: 'serve', so production builds do not regenerate that manifest. The checked-in manifest still embeds @vitejs/plugin-react ^4.3.0 and vite ^5.4.0, so users opening the built app-builder continue to get the old Vite scaffold despite this migration. Please regenerate and commit the manifest, or make generation run for builds too.

Useful? React with 👍 / 👎.

Comment thread package.json
"typescript-language-server": "^5.1.3",
"vitepress": "^1.6.4",
"vitepress-plugin-llms": "^1.8.0",
"vitepress": "2.0.0-alpha.19",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a VitePress 2-compatible Mermaid integration

This moves the docs build to VitePress 2, but the existing withMermaid integration in docs/.vitepress/config.ts still comes from [email protected], whose lockfile peer range is only vitepress: ^1.0.0 || ^1.0.0-alpha; docs/persistence.md has Mermaid fences that rely on that plugin. In docs builds/previews after this upgrade, those diagrams are now on an unsupported/incompatible plugin path and can fail or render as raw code, so please update or replace the Mermaid integration as part of the VitePress 2 migration.

Useful? React with 👍 / 👎.

@ilyabo
ilyabo merged commit 097bce7 into main Aug 4, 2026
6 checks passed
@ilyabo
ilyabo deleted the agent/migrate-vitepress-2 branch August 4, 2026 12:22
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