vitepress 2 - #2777
Conversation
✅ Deploy Preview for vue-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe installation guides now use optional chaining for CDN package-version lookups. Documentation tooling dependencies were upgraded, the VitePress Vite override was removed, and Twoslash language preloading was configured. ChangesDocumentation updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2777 +/- ##
==========================================
+ Coverage 85.56% 85.58% +0.02%
==========================================
Files 74 74
Lines 5846 5843 -3
Branches 1851 1850 -1
==========================================
- Hits 5002 5001 -1
+ Misses 744 743 -1
+ Partials 100 99 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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 `@packages/docs/package.json`:
- Line 19: Update the VitePress 2 configuration by replacing
themeConfig.outlineTitle with themeConfig.outline.label and renaming
markdown.attrs.leftDelimiter/rightDelimiter to left/right. Then validate the
changes with pnpm --filter `@vue/router-docs` docs:build.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1f2faad7-0a74-45b3-a1a1-38f9d8a456b5
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
packages/docs/installation.mdpackages/docs/package.jsonpackages/docs/zh/installation.mdpnpm-workspace.yaml
💤 Files with no reviewable changes (1)
- pnpm-workspace.yaml
| "typedoc-vitepress-theme": "^1.1.3", | ||
| "vitepress": "1.6.4", | ||
| "vitepress-plugin-group-icons": "^1.7.5", | ||
| "vitepress": "2.0.0-alpha.19", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n \
'lastUpdatedText|outlineTitle|lazyLoading|cjkFriendly|markdown\.attrs\.disable|markdown\.emoji\.defs|useData\(\)\.hash' \
packages/docs/.vitepress packages/docsRepository: vuejs/router
Length of output: 217
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- docs package scripts ---'
cat packages/docs/package.json
printf '%s\n' '--- VitePress configuration files ---'
find packages/docs/.vitepress -maxdepth 3 -type f -print | sort
printf '%s\n' '--- affected identifiers with context ---'
rg -n -C 3 \
'lastUpdatedText|outlineTitle|lazyLoading|cjkFriendly|markdown\.attrs\.disable|markdown\.emoji\.defs|useData\(\)\.hash' \
packages/docs/.vitepress packages/docs
printf '%s\n' '--- repository typecheck/build scripts ---'
rg -n -C 2 \
'"(typecheck|type-check|build|docs|lint)"\s*:|vitepress|vue-tsc|tsc' \
package.json packages/*/package.json pnpm-workspace.yaml 2>/dev/null || trueRepository: vuejs/router
Length of output: 9163
🌐 Web query:
VitePress 2.0.0-alpha.19 CHANGELOG.md outlineTitle breaking changes
💡 Result:
The outlineTitle configuration option was deprecated and replaced well before the VitePress 2.0.0-alpha.19 release [1]. The outlineTitle property, which was previously used to customize the title displayed above the outline links, was replaced by the themeConfig.outline.label property in 2023 [1]. This change was part of a broader consolidation where themeConfig.outline became an object capable of holding both the heading levels and the label (title) [2][1]. There are no specific breaking changes related to outlineTitle in the VitePress 2.0.0-alpha.19 changelog, as the deprecation occurred earlier in the project's history [1]. If you are migrating to VitePress 2.0 and still using outlineTitle, you should update your configuration to use the outline object: // Before themeConfig: { outlineTitle: 'On this page' } // After themeConfig: { outline: { label: 'On this page' } } You can refer to the official VitePress Default Theme Config documentation for the current structure of the outline configuration [2].
Citations:
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- Chinese theme configuration ---'
cat -n packages/docs/.vitepress/config/zh.ts | sed -n '1,55p'
printf '%s\n' '--- Shared and English theme configuration ---'
cat -n packages/docs/.vitepress/config/shared.ts | sed -n '1,120p'
cat -n packages/docs/.vitepress/config/en.ts | sed -n '1,70p'
printf '%s\n' '--- VitePress alpha.19 changelog references ---'
curl -fsSL https://raw.githubusercontent.com/vuejs/vitepress/v2.0.0-alpha.19/CHANGELOG.md |
rg -n -C 3 'outlineTitle|themeConfig|markdown|Breaking|breaking' | head -200
printf '%s\n' '--- VitePress default-theme config references ---'
curl -fsSL https://raw.githubusercontent.com/vuejs/vitepress/v2.0.0-alpha.19/src/node/config.ts |
rg -n -C 3 'outlineTitle|outline|label' | head -120Repository: vuejs/router
Length of output: 35524
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
root = Path("packages/docs/.vitepress")
patterns = {
"themeConfig.outlineTitle": ("outlineTitle",),
"themeConfig.lastUpdatedText": ("lastUpdatedText",),
"markdown.attrs.disable": ("disable",),
"markdown.attrs.leftDelimiter": ("leftDelimiter",),
"markdown.attrs.rightDelimiter": ("rightDelimiter",),
"markdown.cjkFriendly": ("cjkFriendly",),
"markdown.image.lazyLoading": ("lazyLoading",),
"markdown.codeCopyButtonTitle": ("codeCopyButtonTitle",),
"markdown.emoji.defs": ("defs",),
"useData().hash": ("useData().hash",),
}
for label, needles in patterns.items():
matches = []
for path in sorted(root.rglob("*")):
if path.is_file():
text = path.read_text(errors="replace").splitlines()
for number, line in enumerate(text, 1):
if any(needle in line for needle in needles):
matches.append(f"{path}:{number}:{line.strip()}")
if matches:
print(f"[{label}]")
print("\n".join(matches))
PY
printf '%s\n' '--- delimiter syntax usage in documentation ---'
rg -n -C 2 '%\{' packages/docs --glob '!packages/docs/.vitepress/config/shared.ts' || true
printf '%s\n' '--- all markdown.attrs configuration ---'
rg -n -A 12 -B 3 'markdown:\s*\{|attrs:\s*\{' packages/docs/.vitepressRepository: vuejs/router
Length of output: 3186
Update the VitePress 2 configuration before merging.
- Replace
themeConfig.outlineTitlewiththemeConfig.outline.label. - Rename
markdown.attrs.leftDelimiterandmarkdown.attrs.rightDelimitertoleftandright.
The docs package has no typecheck script. Runpnpm --filter@vue/router-docsdocs:buildafter these changes.
🤖 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 `@packages/docs/package.json` at line 19, Update the VitePress 2 configuration
by replacing themeConfig.outlineTitle with themeConfig.outline.label and
renaming markdown.attrs.leftDelimiter/rightDelimiter to left/right. Then
validate the changes with pnpm --filter `@vue/router-docs` docs:build.

Close #2746
Summary by CodeRabbit