feat(vitepress): add @i18n-micro/vitepress package - #247
Conversation
Runtime dictionaries for VitePress MD/themes via defineI18nTheme + withI18nMicro, path sync, page locales, and serializable i18nRouting. Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
|
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. |
There was a problem hiding this comment.
All reported issues were addressed across 41 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
Map VP locale keys vs i18n codes, keep disk roots with routeMessages, harden load/glob, re-chain enhanceApp, CI lint. Co-authored-by: Cursor <cursoragent@cursor.com>
Cast virtual imports past Astro ambient clash; loosen test router setters; cast dts plugin for duplicate Vite types. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 20 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Per-app plugin install, stricter glob unwrap, routeName 2-arg, skip full-inline disk watch; I18nLink active ignores hash. Co-authored-by: Cursor <cursoragent@cursor.com>
check: versions requires dependents republish when vue pins change. Co-authored-by: Cursor <cursoragent@cursor.com>
New packages have no baseline; first publish already pins workspace deps — cascade must not demand an extra bump. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 12 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
vue setRoutingStrategy targets last-installed app; calling it again from app1 after app2 install clobbers app2's adapter. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Requires human review: The core implementation of the new @i18n-micro/vitepress package is not visible in the truncated diffs; the change introduces complex virtual modules, router adapters, and theme integration that require human review.
Re-trigger cubic
Keep main news unchanged (no vitepress news entry). Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
@i18n-micro/vitepressfor runtime i18n in VitePress docs (JSON dictionaries,$t/<I18nT>/<I18nLink>, path sync with built-inlocales).withI18nMicrofrom/config+defineI18nTheme(DefaultTheme)— no manualimport.meta.glob; virtual modules load root + optionalpages/**dictionaries.vitepress-i18ntheme chrome; serializablecreateI18nRoutingFromAdapterfor the default globe menu.Test plan
pnpm --filter @i18n-micro/vitepress testpnpm --filter @i18n-micro/vitepress build && pnpm --filter @i18n-micro/vitepress check:packagepnpm --filter @i18n-micro/vitepress playground:build$t/ page-scopedpageNote/<I18nLink>on/guide/demoand/fr/guide/demoMade with Cursor
Summary by cubic
Introduce
@i18n-micro/vitepress, a VitePress integration for runtime i18n with JSON dictionaries,$t/components in markdown, and locale-aware routing synced with VitePresslocales. AddswithI18nMicro(config) anddefineI18nTheme(theme) to remove glob boilerplate and unify the navbar globe with a serializablei18nRouting.New Features
@i18n-micro/vitepresswithwithI18nMicro(Node) that injectsvirtual:i18n-micro/configandvirtual:i18n-micro/messages(root + optionalpages/**).defineI18nTheme(DefaultTheme)installs@i18n-micro/vuewith$t,<I18nT>,<I18nLink>,<I18nSwitcher>; initial locale derives from the current path.createVitePressRouterAdapterandcreateI18nRoutingFromAdapterimplement prefix-except-default routing, supportlocaleKeyToCode(VitePress keys vs i18n codes), and produce a serializablethemeConfig.i18nRouting.messagesFromGlob, Node loadersloadMessages/loadTranslationBuckets; docs and a playground included.Bug Fixes
root,fr) to i18n codes while keeping VP keys in URLs; built-in globe and<I18nSwitcher>resolve paths the same way.router.onAfterRouteChange, and no routing strategy reset on re-enhance.routeMessagesare provided; only unwrap real Vite module namespaces; stricter JSON loading; skip disk watchers when both maps are inline.<I18nLink>active state ignores hash; query/hash preserved on locale switches.virtual:i18n-micro/*imports, relax test router setters, dual DTS outputs; version tooling skips cascading bumps for brand-new packages.@i18n-micro/vitepress@1.0.1after bumping@i18n-micro/vueto1.3.11.Written for commit 941d981. Summary will update on new commits.