|
| 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. |
0 commit comments