Skip to content

fix(docs): resolve every comark dependency to the workspace - #561

Merged
farnabaz merged 1 commit into
mainfrom
fix/docs-single-comark
Nov 5, 2026
Merged

farnabaz merged 1 commit into
mainfrom
fix/docs-single-comark

Conversation

@farnabaz

@farnabaz farnabaz commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Since #549, the deployed docs crash on boot:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/markdown-exit/dist/index.js'
imported from /var/task/chunks/nitro/nitro.mjs

Reproduced locally with NITRO_PRESET=vercel pnpm --filter comark-docs-site build and importing .vercel/output/functions/__fallback.func/index.mjs.

Cause

Two comark copies end up in the docs server bundle:

  • the workspace comark (markdown-exit 2.1, imports markdown-exit/core)
  • the published comark@0.8.1 (markdown-exit 1.3, imports markdown-exit), pulled in by the comark-docs layer, comark-content and nuxt-agent-discovery

Nitro inlines comark (externals.inline), so both copies' bare imports resolve against the single top-level node_modules/markdown-exit in the function output. That symlink points at 2.1.0, whose trace only kept dist/core.js — so the old copy's import MarkdownExit from 'markdown-exit' fails at runtime.

Fix

Add pnpm overrides so comark, @comark/nuxt and @comark/vue always resolve to workspace:*. The docs site then ships one comark (the one it documents) and one markdown-exit.

Verification

  • pnpm why comark: every consumer (layer, comark-content, nuxt-agent-discovery) links to packages/comark
  • Vercel build output imports only markdown-exit/core; node_modules/.nitro has only markdown-exit@2.1.0
  • import('./index.mjs') on the function output loads (it threw ERR_MODULE_NOT_FOUND before)
  • pnpm typecheck and pnpm lint pass

Independent of #560.

Summary by CodeRabbit

  • Chores
    • Updated internal package resolution for the workspace. No user-facing changes.

comark-docs, comark-content and nuxt-agent-discovery depend on the published comark 0.8.1 (markdown-exit 1.3). Nitro inlines both comark copies into one server bundle, where they share a single top-level markdown-exit 2.1 that has no dist/index.js in its trace, so the deployed docs crash with ERR_MODULE_NOT_FOUND. Override comark, @comark/nuxt and @comark/vue to workspace:*.
@coldtea-pr-lens

Copy link
Copy Markdown

Note

Nothing here is code, only docs, data or images, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
comark Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-binding Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-json-render Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-nextjs Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-nuxt Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-svelte Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-sveltekit Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-twoslash Ready Ready Preview Nov 5, 2026 3:52pm UTC
comark-vue Ready Ready Preview Nov 5, 2026 3:52pm UTC

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The workspace configuration adds pnpm overrides for comark, @comark/nuxt, and @comark/vue. pnpm now resolves these dependencies to workspace packages.

Changes: Workspace package resolution

Layer / File(s) Summary
Comark package overrides
pnpm-workspace.yaml
Adds pnpm overrides that resolve comark, @comark/nuxt, and @comark/vue to workspace packages.

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

Change: Bug fix

Possibly related PRs

  • comarkdown/comark#549: Updates markdown-exit imports to markdown-exit/core, a related change addressing the reported duplicate-package import failure.

Suggested reviewers: atinux, arashsheyda

Merge Risk: Minimal · up to 1e0f4

No actionable merge-blocking risk was identified in the reviewed change.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: resolving all comark dependencies to workspace packages to fix the docs build issue.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. 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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. 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 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

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: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1a7661ed-5f1c-4e67-a39e-f65d6d3ba90b
Commits

Reviewing files that changed from the base of the PR and between c333fdc and 1e0f407.

Files ignored due to path filters: 1

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

  • pnpm-workspace.yaml

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

@pkg-pr-new

pkg-pr-new Bot commented Nov 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark

npm i https://pkg.pr.new/comark@561

@comark/angular

npm i https://pkg.pr.new/@comark/angular@561

@comark/ansi

npm i https://pkg.pr.new/@comark/ansi@561

@comark/html

npm i https://pkg.pr.new/@comark/html@561

@comark/nuxt

npm i https://pkg.pr.new/@comark/nuxt@561

@comark/react

npm i https://pkg.pr.new/@comark/react@561

@comark/svelte

npm i https://pkg.pr.new/@comark/svelte@561

@comark/vue

npm i https://pkg.pr.new/@comark/vue@561

commit: 1e0f407

@codspeed

codspeed Bot commented Nov 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 43 untouched benchmarks


Comparing fix/docs-single-comark (1e0f407) with main (c333fdc)

Open in CodSpeed

@farnabaz
farnabaz merged commit 6618859 into main Nov 5, 2026
17 checks passed
@farnabaz
farnabaz deleted the fix/docs-single-comark branch November 5, 2026 16:25
@github-actions github-actions Bot mentioned this pull request Nov 5, 2026

This branch was successfully deployed

8 active deployments
Preview – comark-nuxt — 1e0f407a Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-nextjs — 1e0f407a Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-binding — 1e0f407a Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-sveltekit — 1e0f407a Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-twoslash — 1e0f407a Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-vue — 1e0f407a Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-json-render — 1e0f407a Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-svelte — 1e0f407a Deployed Nov 5, 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