Skip to content

chore: upgrade comark-content to v0.5.1 - #2621

Merged
atinux merged 3 commits into
mainfrom
content-v4
Nov 8, 2026
Merged

atinux merged 3 commits into
mainfrom
content-v4

Conversation

@atinux

@atinux atinux commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Written by an AI agent on behalf of @atinux.

Upgrades comark-content from 0.4.3 to 0.5.1, the version the upcoming Nuxt Content v4 module depends on. 0.5 removed the comark-content/sources/github source, so nuxt.com's GitHub-backed content instances (site, docs, cli, examples, module docs) now read GitHub through the generic forge source.

This branch started as an exploration of moving nuxt.com onto the Nuxt Content v4 module (nuxt/content-v4-temp#37). The module can't serve nuxt.com yet: every instance reads a repository at the commit its branch points to, and vercel.json skips deploys for content-only pushes, so even site can't ship with the build. That attempt is reverted in this branch, and its findings (six gaps in the module) are on nuxt/content-v4-temp#37. What's left here is only the dependency upgrade.

What changed

  • package.json: comark-content ^0.4.3 → ^0.5.1, and forges ^0.3.2 as a new direct dependency.
  • utils/factory.ts: github({ repo, branch, path, token, ttl }) becomes forge({ provider: github({ auth }), repo, ref, path }), with github from forges/github. The token is passed as forge auth when one is configured.
  • server/utils/content/instances.ts: the source option type comes from comark-content/sources/forge instead of sources/github.
  • pnpm-workspace.yaml: the comark override comment no longer names comark-content, which accepts comark 0.9 since 0.5.

No app, page, webhook, snapshot, search or l10n code changes.

Evidence

Check Result
pnpm install --frozen-lockfile ✓ pnpm why comark → 1 version (0.9.0); pnpm why comark-content → 1 version (0.5.1)
pnpm lint, pnpm test:types ✓ exit 0
pnpm vitest run --project unit / --project nuxt ✓ 738 / 58 tests passed
pnpm build ✓ exit 0. The snapshot module resolved every ref and parsed from GitHub through forge: site snapshot 350a1a4: 1823 kB, plus examples, docs:4.x, cli:4.x and 6 module docs
GitHub CI on 48ea65a ✓ lint, typecheck, unit, bundle-size, CodeQL, Vercel

The built server (node .output/server/index.mjs, with a GitHub token) returned 200 for /docs/4.x/getting-started/introduction, /blog/v4, /raw/blog/v4.md, /deploy/vercel, /docs/4.x/api/commands/dev, /llms.txt, /api/navigation/4.x and /fr/docs/4.x/getting-started/introduction, and the blog post renders normally.

Worth checking before merging

  • The old github source cached each read for 24 hours (ttl); forge has no equivalent option. Reads go through withRef(sha), so they're for immutable commits, and parsed results still go through each instance's cache driver, but GitHub API usage under production traffic hasn't been watched on Vercel. Worth a look at the Vercel preview's logs, or after deploying.
  • The branch history contains the reverted v4 attempt; squash-merging keeps main's history to this one change.

ELI5

nuxt.com reads its docs and blog from GitHub through a library called comark-content. This updates that library to its newest version, which reads GitHub in a slightly different way. The site works the same.

Exploration: `@nuxt/content` v4 owns nuxt.com's own content (`site`),
defined in `server/content.ts` with `createNuxtContent()`. It serves it
under `/__nuxt_content`, snapshots it at build and generates its types;
the app reads it through the native `content` client and renders
documents with `<ContentRenderer>`. No v3 compatibility layer.

The docs, cli, examples and module docs instances stay on comark-content:
the module serves one surface under a fixed base path, so it can't hold an
instance per commit (`withRef`) nor several instances sharing a name.

- Bump comark-content to 0.5.1 (the module's), moving from the removed
  `github` source to `forge` + `forges/github`
- `site` leaves the push webhook and `modules/snapshot`: it ships with
  the deployment its push triggers
- Patch nuxt-agent-discovery to accept `@nuxt/content` v4

Amp-Thread-ID: https://ampcode.com/threads/T-01a1b537-979e-7255-b1d1-f4d6b0f37278
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nuxt Ready Ready Preview Nov 7, 2026 7:23pm UTC

Request Review

@socket-security

socket-security Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedforges@​0.3.2871009593100
Updatedcomark-content@​0.4.3 ⏵ 0.5.189 +12100100 +194 +2100

View full report

A push that only touches `content/` skips the Vercel deploy (`ignoreCommand`), so `site` must keep
reading GitHub at the commit `main` points to and stay in the push webhook. The Nuxt Content v4 module
can't serve per-commit instances yet, so it no longer owns `site`.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1b537-979e-7255-b1d1-f4d6b0f37278
Co-authored-by: Amp <amp@ampcode.com>
@atinux atinux changed the title feat: migrate to Nuxt Content v4 (native API) chore: upgrade comark-content to 0.5 (Nuxt Content v4 exploration) Nov 7, 2026
@atinux atinux changed the title chore: upgrade comark-content to 0.5 (Nuxt Content v4 exploration) chore: upgrade comark-content to v0.5.1 Nov 8, 2026
@atinux
atinux marked this pull request as ready for review November 8, 2026 06:57
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The project upgrades comark-content and adds forges. The content source type and factory configuration change from the GitHub source to the forge source with a GitHub provider. The factory passes the configured branch as ref and sets token authentication only when ctx.token is present. Local-directory and override-path selection remain unchanged.

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

Merge Risk: Minimal · up to 48ea6

The dependency and source migration is mergeable on the available evidence; production GitHub API usage remains worth monitoring.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title "chore: upgrade comark-content to v0.5.1" matches the main change. The PR upgrades comark-content from ^0.4.3 to ^0.5.1 in package.json, and the related source and factory changes follow fro…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Description check Passed The description states the purpose of the change: upgrading comark-content from 0.4.3 to 0.5.1 and adding forges as a direct dependency. It names the affected files (package.json, utils/factory.ts, se…
Full details: Title check

Explanation

The title "chore: upgrade comark-content to v0.5.1" matches the main change. The PR upgrades comark-content from ^0.4.3 to ^0.5.1 in package.json, and the related source and factory changes follow from that upgrade. The title is short, specific, and names the primary change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (2 skipped: 2 unsupported.)

Full details: Description check

Explanation

The description states the purpose of the change: upgrading comark-content from 0.4.3 to 0.5.1 and adding forges as a direct dependency. It names the affected files (package.json, utils/factory.ts, server/utils/content/instances.ts, pnpm-workspace.yaml) and explains the move from the removed GitHub source to the forge source. It also lists verification steps and a reverted v4 attempt. The description is related to the changeset and is detailed, so the check passes.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ab74aff3-3b2c-439c-aae7-952a0e72f86b
Commits

Reviewing files that changed from the base of the PR and between c536f06 and 48ea65a.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 4

  • package.json
  • pnpm-workspace.yaml
  • server/utils/content/instances.ts
  • utils/factory.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@atinux
atinux merged commit aa857f3 into main Nov 8, 2026
16 checks passed
@atinux
atinux deleted the content-v4 branch November 8, 2026 07:06

This branch was successfully deployed

1 active deployment
Preview — 48ea65a1 Deployed Nov 7, 2026 by vercel[bot]
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