fix(build): ship + CI-build @docmost/prosemirror-markdown; refresh AGENTS.md (#333 conformance)
Two infra blockers from the #326-steps-2-5 conformance check — the converter/canon are correct, but the new shared package wasn't wired into Docker/CI. BLOCKER 1 (prod): the Docker installer stage copied mcp/build + editor-ext but NOT packages/prosemirror-markdown. mcp now depends on it (workspace:*) and EAGER-imports it at runtime — the in-app ai-chat DocmostClient loads build/index.js -> lib/markdown-converter.js — so the shipped image would resolve a broken workspace symlink and every ai-chat tool would die with ERR_MODULE_NOT_FOUND. Now the installer COPYs packages/prosemirror-markdown/build + package.json before the prod install. (git-sync has no runtime consumer yet — revisit at step 6 with #119.) BLOCKER 2 (CI red): test.yml/develop.yml build only @docmost/editor-ext before `pnpm -r test`. That is plain pnpm, which does NOT honour nx `dependsOn: ^build`, so the package's (gitignored) build/ never appears and its consumers fail: mcp `pretest: tsc` -> TS2307 Cannot find module '@docmost/prosemirror-markdown', git-sync vitest typecheck the same. The green local runs only happened because the coder+reviewer had a full install+build. Added a `pnpm --filter @docmost/prosemirror-markdown build` step before `pnpm -r test` (mirrors the editor-ext step); verified the build is clean (tsc exit 0). Docs (remark 3): AGENTS.md:203 and :285 still told contributors to keep mcp's own vendored schema mirror "in sync manually" — that copy was deleted by this PR. Updated both: the converter + schema mirror now live in the SINGLE package @docmost/prosemirror-markdown (consumed by mcp + git-sync, do NOT reintroduce a per-package copy); editor-ext is the upstream schema source; the serializer-contract test guards the boundary. Added the package to the workspace table. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,14 @@ jobs:
|
||||
- name: Build editor-ext
|
||||
run: pnpm --filter @docmost/editor-ext build
|
||||
|
||||
# @docmost/prosemirror-markdown is the shared converter (#293/#326); its
|
||||
# build/ is gitignored, and plain `pnpm -r test` does NOT honour nx
|
||||
# `dependsOn: ^build`, so its consumers (mcp `pretest: tsc`, git-sync vitest
|
||||
# typecheck) fail with TS2307 Cannot find module '@docmost/prosemirror-markdown'
|
||||
# unless it is built first. Build it before the recursive test run.
|
||||
- name: Build prosemirror-markdown
|
||||
run: pnpm --filter @docmost/prosemirror-markdown build
|
||||
|
||||
- name: Run unit tests
|
||||
run: pnpm -r test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user