Repository navigation
chore: upgrade comark-content to v0.6.0 - #2635
Conversation
0.6.0 keeps `$` in content paths instead of spelling it out, so `$fetch.md` moves from `/api/utils/dollarfetch` to `/api/utils/$fetch` (and 2.x `$nuxt.md` from `dollarnuxt` to `$nuxt`). Redirect the old docs and raw Markdown URLs with a 301 and point internal links at the new paths. Amp-Thread-ID: https://ampcode.com/threads/T-01a1cab2-3a25-7105-aff2-5e2968caf515
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
nuxt.com previewThis pull request is closed: its preview is no longer available. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Cached manifests from v0.5 still hold `dollarfetch` paths at the same commit, so a deploy would serve them until the cache expires. Amp-Thread-ID: https://ampcode.com/threads/T-01a1cab2-3a25-7105-aff2-5e2968caf515
Bundle sizeClient 1.31 MB
Largest changes in the server
Brotli sizes. Changes under 100 B are left out of the tables. Initial page load counts the JavaScript and CSS a route loads before it renders. Measured by nuxt-bundle-analyzer for |
comark-content 0.6.0 (comarkdown/comark-content#151) stops transliterating and slugifying path segments:
$stays$instead of becomingdollar. On nuxt.com that moves the$fetchpage in every docs version, and the 2.x$nuxtpage. Without redirects, the old URLs (linked from search engines, blog posts, and the nuxt/nuxt docs themselves) would 404.What changed
comark-content^0.5.1→^0.6.0. The lockfile is updated, and pnpm added0.6.0tominimumReleaseAgeExclude, next to 0.5.1.routeRules:/docs/2.x/api/internals/dollarnuxt→/docs/2.x/api/internals/$nuxt/docs/{3,4,5}.x/api/utils/dollarfetch→/docs/{3,4,5}.x/api/utils/$fetch/raw/docs/{3,4}.x/api/utils/dollarfetch.md→…/$fetch.md. The oldllms.txtlisted these raw URLs. 2.x and 5.x have no rule because the site doesn't serve raw Markdown for those versions; every/raw/docs/2.x/…and/raw/docs/5.x/…URL already returns 404.CONTENT_PARSER_VERSIONgoes fromv10tov11. The Vercel Runtime Cache key is the parser version, the instance and the commit sha, so without the bump a deploy reuses manifests that 0.5.1 built at the same commit. The first preview of this PR showed it:/docs/3.x/api/utils/$fetchreturned 404 and the 3.x navigation still listeddollarfetch, while the new 301 already sentdollarfetchto$fetch./docs/*/api/utilsindex redirects,content/blog/14.nuxt-on-the-edge.md, the l10nuse-fetch.mdfixture, and the$nuxtlink test intest/unit/docs.spec.tsnow use the new paths.Evidence
Which paths changed. I listed every content file's generated path in all 15 instances (site, examples, docs 2.x–5.x, cli 3.x–5.x, six module docs) on 0.5.1 and on 0.6.0. The sources were local clones of each instance's branch, and the two lists were compared file by file. These are the only differences:
Before (nuxt.com production today):
After (
pnpm buildon this branch, served withnode .output/server/index.mjs):Client side, in a browser on that build:
$fetchsidebar link loads the page, and the link is marked active.dollarfetchlink in a page body redirects in the browser to/docs/4.x/api/utils/$fetch.$fetchlistsDocs > API > Utils > $fetch(href="/docs/4.x/api/utils/$fetch"), and clicking it opens the page.Generated indexes:
/api/navigation/{2,3,4}.x,sitemap.xml,sitemap.mdandllms.txtlist only the new paths.llms-full.txtstill has olddollarfetchURLs. They come from links inside the nuxt/nuxt docs (see below).Checks:
pnpm vitest run: 77 files, 797 tests passed, includingredirect.spec.tsanddocs.spec.ts.pnpm lintandpnpm test:typesare clean.BASE_URL=<local build> pnpm test:browser: 12 passed, 3 skipped (the same skips as on main).pnpm build: succeeds, and every instance snapshot is written.On the Vercel preview of
dab7108(the branch alias, behind Vercel Authentication):Details
/nuxt-brand-assets.zip, so there is no prerendered$fetchpage to check./docs/api/utils/dollarfetchnow takes two hops, the existing 302 to the current version and then the new 301. I didn't add a direct rule because the other moved pages don't have one either./docs/api/utils/dollarfetch(use-fetch.md,data-fetching.md,server-engine.md, …). They keep working through the redirect, but should be changed to$fetchupstream.ELI5
The library that turns doc file names into web addresses stopped renaming
$to "dollar". So the$fetchpage now lives at/api/utils/$fetchinstead of/api/utils/dollarfetch. Every old address now permanently forwards to the new one, so existing links and bookmarks keep working.