Files
gitmost/packages/git-sync/test/fixtures/sample-doc.json
claude code agent 227 24b903aaf3 build(git-sync): land the @docmost/git-sync package into develop, code-only (#326 step 1 / PR-A)
The git-sync converter + engine source lived only on the #119 branch; develop
had just the dead compiled build/. Bring the whole package (src + ~700 tests)
onto develop under CI, with NO consumer wired — git-sync stays fully inert in
develop (nothing in apps/server imports it), so runtime behavior is unchanged.
This unblocks #293 (extract the shared converter package from the landed source)
and lets #119's functionality land LAST, already writing the canonical format
(per the #326 landing order).

- packages/git-sync: src (lib converter + engine) + test corpus + configs.
- Remove develop's dead committed packages/git-sync/build/; gitignore it
  (built in CI/Docker via pnpm build, never committed — no src/build drift).
- pnpm-lock.yaml: add the @docmost/git-sync importer (a missing workspace
  package in the lock is a CI blocker). `pnpm install --frozen-lockfile` passes.
- NO server integration / loader / Dockerfile runtime changes (those come with
  #119 at step 6).

Verified: tsc clean; vitest 711 passed | 1 expected-fail, 0 failures, 0 type
errors; pnpm --frozen-lockfile EXIT 0; apps/server has no git-sync import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 06:21:41 +03:00

152 lines
3.9 KiB
JSON

{
"type": "doc",
"content": [
{
"type": "heading",
"attrs": { "level": 1, "id": "h-1" },
"content": [{ "type": "text", "text": "Round-trip sample" }]
},
{
"type": "paragraph",
"attrs": { "id": "p-1" },
"content": [
{ "type": "text", "text": "This paragraph has " },
{ "type": "text", "marks": [{ "type": "bold" }], "text": "bold" },
{ "type": "text", "text": ", " },
{ "type": "text", "marks": [{ "type": "italic" }], "text": "italic" },
{ "type": "text", "text": " and a " },
{
"type": "text",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://example.com"
}
}
],
"text": "link"
},
{ "type": "text", "text": "." }
]
},
{
"type": "paragraph",
"attrs": { "id": "p-2" },
"content": [
{ "type": "text", "text": "Here is a " },
{
"type": "text",
"marks": [
{ "type": "comment", "attrs": { "commentId": "cmt-abc123", "resolved": false } }
],
"text": "commented span"
},
{ "type": "text", "text": " that must survive the round-trip." }
]
},
{
"type": "bulletList",
"attrs": { "id": "ul-1" },
"content": [
{
"type": "listItem",
"attrs": { "id": "li-1" },
"content": [
{
"type": "paragraph",
"attrs": { "id": "p-3" },
"content": [{ "type": "text", "text": "First bullet" }]
}
]
},
{
"type": "listItem",
"attrs": { "id": "li-2" },
"content": [
{
"type": "paragraph",
"attrs": { "id": "p-4" },
"content": [{ "type": "text", "text": "Second bullet" }]
}
]
}
]
},
{
"type": "table",
"attrs": { "id": "tbl-1" },
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"attrs": { "colspan": 1, "rowspan": 1 },
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "Name" }]
}
]
},
{
"type": "tableHeader",
"attrs": { "colspan": 1, "rowspan": 1 },
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "Value" }]
}
]
}
]
},
{
"type": "tableRow",
"content": [
{
"type": "tableCell",
"attrs": { "colspan": 1, "rowspan": 1 },
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "alpha" }]
}
]
},
{
"type": "tableCell",
"attrs": { "colspan": 1, "rowspan": 1 },
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "1" }]
}
]
}
]
}
]
},
{
"type": "callout",
"attrs": { "type": "info", "id": "callout-1" },
"content": [
{
"type": "paragraph",
"attrs": { "id": "p-5" },
"content": [{ "type": "text", "text": "This is an info callout." }]
}
]
},
{
"type": "codeBlock",
"attrs": { "language": "js", "id": "code-1" },
"content": [
{ "type": "text", "text": "const a = 1;\nconsole.log(a);\n" }
]
}
]
}