Skip to content

Commit e7ef89d

Browse files
authored
ci: align release and CI triggers with package impact map (#2938)
* ci: align release and CI triggers with package impact map Test broad, release narrow. CI gates compatibility (a core change should run dependent CI to catch breakage). Release gates artifact changes (a package should only publish when its own published artifact actually changes). - Shrink release-react, release-template-builder, release-esign and their .releaserc.cjs to own-path-only. These wrappers externalize superdoc in their Vite builds, so republishing on core changes produces near-identical tarballs; consumers pick up core via peerDependencies on their own install. - Expand release-mcp trigger paths and .releaserc.cjs to cover SDK, CLI, document-api, and core. MCP depends on SDK via workspace:* and imports engine/session code directly. Current trigger only watched apps/mcp/**, causing MCP to lag SDK releases. - Strip packages/ai/** from every workflow and .releaserc.cjs include list. @superdoc-dev/ai is being deprecated; npm-side deprecation is a separate operational step. - Add .github/package-impact-map.md as the source of truth for which paths should trigger CI and release per surface. Workflow changes derive from it. * ci(react): keep release broad - superdoc is a regular dep, not peer React declares superdoc in dependencies (">=1.0.0") rather than peerDependencies, unlike template-builder and esign. That means existing consumers with pinned lockfiles won't pick up a new core version until react republishes. Shrinking release-react to own paths would strand them on old core fixes. Revert release-react to broad core paths and restore the minor-cap release rules. The impact-map rationale now distinguishes react from the peer-dep wrappers and calls out the future peer-dep migration as the prerequisite for going narrow. No breaking change to consumers; migration to peerDependencies is tracked as a separate decision. * chore(react): dual-list superdoc as dep and peer for singleton signal Add superdoc to peerDependencies while keeping it in dependencies. Preserves auto-install for every consumer regardless of package manager (no breaking change) and signals the singleton contract that template-builder and esign already express via peer-dep. This is a semantic cleanup, not a release-policy change. release-react stays broad because existing consumers still pick up core versions via the dependencies pin. Removing superdoc from dependencies would unlock release-narrow but is a breaking change tracked separately. Verified with pnpm install --frozen-lockfile — no lockfile changes. * ci: ignore packages/ai/** in ci-superdoc paths-ignore Review found ci-superdoc uses paths-ignore and did not list packages/ai/**, so an AI-only PR still triggered the full SuperDoc CI despite ai being deprecated. Add it to paths-ignore to match the impact-map claim that ai is removed from all release and CI triggers.
1 parent 5ca32b3 commit e7ef89d

21 files changed

Lines changed: 131 additions & 102 deletions

.github/package-impact-map.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Package impact map
2+
3+
Source of truth for which repo paths should trigger CI and release workflows for each published surface.
4+
5+
## Principle
6+
7+
**Test broad, release narrow.**
8+
9+
- **CI gates compatibility.** A change to SuperDoc core should run the CI of every dependent package — that's how breakage in `@superdoc-dev/react` or `@superdoc-dev/sdk` gets caught before it ships. CI paths follow *compatibility* impact.
10+
- **Release gates artifact changes.** A package should only publish a new version when its own published artifact actually changes. Release paths follow *artifact* impact.
11+
12+
These two are not the same. `template-builder` and `esign` externalize `superdoc` in their builds and declare it as a `peerDependency`, so a core change doesn't change their tarballs → CI broad, release narrow. CLI bundles core into platform binaries, so a core change does change the CLI tarball → both broad.
13+
14+
## Surfaces
15+
16+
| Surface | Purpose | Release impact | CI impact |
17+
|---|---|---|---|
18+
| `superdoc` | Main browser DOCX editor/runtime | core | core |
19+
| `@superdoc-dev/react` | React wrapper around superdoc | react + core (see note below) | react + core |
20+
| `@superdoc-dev/template-builder` | React SDT/template authoring UI | `packages/template-builder/**` only | template-builder + core |
21+
| `@superdoc-dev/esign` | React signing workflow | `packages/esign/**` only | esign + core |
22+
| `@superdoc-dev/cli` | Native Document API CLI | cli + doc-api + core | same |
23+
| `@superdoc-dev/sdk` | JS/Python SDK packaging CLI binaries | sdk + cli + doc-api + core | same |
24+
| `@superdoc-dev/mcp` | MCP server over SDK/document engine | mcp + sdk + cli + doc-api + core | same |
25+
| `superdoc-vscode-ext` | VS Code DOCX editor | vscode-ext + core | same |
26+
| `@superdoc-dev/create` | Project scaffolder | `apps/create/**` only | own changes only |
27+
| `@superdoc-dev/superdoc-yjs-collaboration` | Standalone Yjs server (no SuperDoc dep) | `packages/collaboration-yjs/**` only | own changes + collaboration examples |
28+
| `@superdoc/docs` (private) | Documentation site | N/A (not published) | docs + public API / doc generation |
29+
| demos, examples (private) | Compatibility samples | N/A (not published) | own paths + relevant upstream runtime |
30+
31+
## Path expansions
32+
33+
**core** expands to:
34+
- `packages/superdoc/**`
35+
- `packages/super-editor/**`
36+
- `packages/layout-engine/**`
37+
- `packages/word-layout/**`
38+
- `packages/preset-geometry/**`
39+
- `shared/**`
40+
- `pnpm-workspace.yaml`
41+
42+
**doc-api** is `packages/document-api/**`.
43+
44+
**cli** is `apps/cli/**`.
45+
46+
**sdk** is `packages/sdk/**`.
47+
48+
**mcp**, **vscode-ext**, **create** are their respective `apps/*/**` or `packages/*/**` paths.
49+
50+
## Why each classification
51+
52+
- **`template-builder` and `esign`** externalize `superdoc` in their Vite build (`rollupOptions.external`) and declare it as a `peerDependency`. A SuperDoc core change does not change the wrapper's published bundle — consumers receive the new core through their own `npm install`. Release-on-core is pure version noise; CI-on-core remains necessary to catch breaking API changes.
53+
- **`react`** externalizes `superdoc` in its Vite build the same way, and declares `superdoc` in **both** `dependencies` and `peerDependencies`. The `dependencies` entry preserves auto-install for every consumer (zero-break regardless of package manager); the `peerDependencies` entry signals the singleton contract and aligns the manifest with template-builder/esign. Because the `dependencies` entry still pins via lockfiles, existing consumers only pick up a new core version when react republishes, so release-on-core stays correct *today*. The unlock for release-narrow is to remove `superdoc` from `dependencies` entirely — that is a breaking change and tracked as a separate decision.
54+
- **CLI / SDK** bundle engine behavior into platform-specific native binaries (see `apps/cli/.releaserc.cjs` and `packages/sdk/.releaserc.cjs` — both use `patch-commit-filter.cjs` to expand release analysis into core paths). The published artifact genuinely changes when core changes.
55+
- **MCP** depends on SDK via `workspace:*` and imports engine/session code directly. Its current release trigger (`apps/mcp/**` only) causes it to lag SDK releases. Expand to match SDK's release paths.
56+
- **VS Code extension** packages SuperDoc into the extension VSIX. Treated like CLI/SDK.
57+
- **collaboration-yjs** has no SuperDoc dependency. It's a standalone Yjs server. Release and CI both narrow.
58+
- **create** is a scaffolder with no dependencies on SuperDoc runtime. Release and CI both narrow.
59+
- **docs, demos, examples** are not published. They get CI on changes to anything they render to catch visual or behavior regressions.
60+
61+
## Notes
62+
63+
- `packages/ai/**` has been removed from all release and CI triggers. `@superdoc-dev/ai` is being deprecated; npm-side deprecation is a separate operational step.
64+
- When SuperDoc core ships a breaking API change, `template-builder` and `esign` must be manually updated and released. Their `peerDependencies` version bump is the signal; semantic-release won't auto-trigger on upstream changes for them.
65+
- `@superdoc-dev/react` declares `superdoc` in both `dependencies` and `peerDependencies` to preserve zero-break install semantics while still signaling the singleton contract. Removing `superdoc` from `dependencies` is the unlock for release-narrow and is tracked as a separate decision.
66+
- When editing a release or CI workflow, its `paths:` filter must match the corresponding row in this map. Workflow-lint rules should enforce this.

.github/workflows/ci-behavior.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
- 'packages/superdoc/**'
1111
- 'packages/layout-engine/**'
1212
- 'packages/super-editor/**'
13-
- 'packages/ai/**'
1413
- 'packages/word-layout/**'
1514
- 'packages/preset-geometry/**'
1615
- 'tests/behavior/**'

.github/workflows/ci-superdoc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
- 'packages/sdk/**'
1717
- 'packages/template-builder/**'
1818
- 'packages/esign/**'
19+
- 'packages/ai/**'
1920
- 'evals/**'
2021
- '**/*.md'
2122
merge_group:

.github/workflows/release-cli.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on:
1414
- 'packages/superdoc/**'
1515
- 'packages/super-editor/**'
1616
- 'packages/layout-engine/**'
17-
- 'packages/ai/**'
1817
- 'packages/word-layout/**'
1918
- 'packages/preset-geometry/**'
2019
- 'shared/**'

.github/workflows/release-esign.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ on:
88
- main
99
paths:
1010
- 'packages/esign/**'
11-
- 'packages/superdoc/**'
12-
- 'packages/layout-engine/**'
13-
- 'packages/super-editor/**'
14-
- 'packages/ai/**'
15-
- 'packages/word-layout/**'
16-
- 'packages/preset-geometry/**'
17-
- 'shared/**'
1811
- 'pnpm-workspace.yaml'
1912
- '!**/*.md'
2013
workflow_dispatch:

.github/workflows/release-mcp.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ on:
77
branches:
88
- main
99
paths:
10+
# MCP depends on SDK (workspace:*) and imports engine/session code directly.
11+
# Keep in sync with apps/mcp/.releaserc.cjs include list and
12+
# .github/package-impact-map.md.
1013
- 'apps/mcp/**'
14+
- 'packages/sdk/**'
15+
- 'apps/cli/**'
16+
- 'packages/document-api/**'
17+
- 'packages/superdoc/**'
18+
- 'packages/super-editor/**'
19+
- 'packages/layout-engine/**'
20+
- 'packages/word-layout/**'
21+
- 'packages/preset-geometry/**'
22+
- 'shared/**'
1123
- 'pnpm-workspace.yaml'
1224
- '!**/*.md'
1325
workflow_dispatch:

.github/workflows/release-react.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ on:
77
branches:
88
- main
99
paths:
10+
# React declares `superdoc` in dependencies (not peerDependencies), so
11+
# existing consumers with lockfiles won't pick up a new core version
12+
# until react republishes. Keep release broad until the peer-dep
13+
# migration lands (tracked separately). See .github/package-impact-map.md.
1014
- 'packages/react/**'
1115
- 'packages/superdoc/**'
1216
- 'packages/layout-engine/**'
1317
- 'packages/super-editor/**'
14-
- 'packages/ai/**'
1518
- 'packages/word-layout/**'
1619
- 'packages/preset-geometry/**'
1720
- 'shared/**'

.github/workflows/release-sdk.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
- 'packages/superdoc/**'
1616
- 'packages/super-editor/**'
1717
- 'packages/layout-engine/**'
18-
- 'packages/ai/**'
1918
- 'packages/word-layout/**'
2019
- 'packages/preset-geometry/**'
2120
- 'shared/**'

.github/workflows/release-superdoc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- 'packages/superdoc/**'
1212
- 'packages/layout-engine/**'
1313
- 'packages/super-editor/**'
14-
- 'packages/ai/**'
1514
- 'packages/word-layout/**'
1615
- 'packages/preset-geometry/**'
1716
- 'shared/**'

.github/workflows/release-template-builder.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ on:
88
- main
99
paths:
1010
- 'packages/template-builder/**'
11-
- 'packages/superdoc/**'
12-
- 'packages/layout-engine/**'
13-
- 'packages/super-editor/**'
14-
- 'packages/ai/**'
15-
- 'packages/word-layout/**'
16-
- 'packages/preset-geometry/**'
17-
- 'shared/**'
1811
- 'pnpm-workspace.yaml'
1912
- '!**/*.md'
2013
workflow_dispatch:

0 commit comments

Comments
 (0)