chore(types): flip root types to public facade (SD-3212)#3392
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
caio-pizzol
added a commit
that referenced
this pull request
May 19, 2026
… (SD-3213a) After the SD-3212 PR C root types flip, the canonical root contract is `packages/superdoc/src/public/index.ts` (locked by superdoc-root-exports.json, classified by superdoc-root-classification.json, closure-gated by check-root-classification-closure.mjs, structure-verified by verify-public-facade-emit.cjs). The pre-flip source-sync gate (SD-2860, check-public-types.mjs) pointed at the legacy `packages/superdoc/src/index.js` JSDoc typedef block as the source of truth for the public-type assertion list. That source is no longer canonical after the flip; keeping the sync check would teach contributors to update the wrong file. Changes: - Remove tests/consumer-typecheck/check-public-types.mjs. - Remove the check-public-types invocation from typecheck-matrix.mjs (along with the --skip-public-types-check flag, which had no other use). - Remove check:types and check:types:write from tests/consumer-typecheck/package.json. - Update all-public-types.ts header: it is now a STATIC FIXTURE, not a generated artifact. New root exports get a manual import + assertion line. SD-2842 scenarios still exercise the file to catch any-collapses. - Update deep-type-audit.README.md gate inventory to list the current canonical gates (root snapshot, facade verifier, closure gate, deep audit) instead of the retired source-sync gate. Verified locally: - pnpm --filter superdoc build:es: green. - typecheck-matrix.mjs: 57/57 pass. - snapshot-superdoc-root-exports.mjs --check: matches. - check-root-classification-closure.mjs: 0 violations. This is PR A of the SD-3213 gate consolidation track. Stacked on SD-3212 PR C (#3392); merge after PR C.
Contributor
|
🎉 This PR is included in superdoc-cli v0.12.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.11.0 |
Contributor
|
🎉 This PR is included in @superdoc-dev/mcp v0.7.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc v1.35.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in @superdoc-dev/react v1.6.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in vscode-ext v2.7.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final SD-3212 PR C: flips the root TypeScript contract to the path-as-contract public facade.
Changes only
packages/superdoc/package.json:typesnow points at./dist/superdoc/src/public/index.d.tsexports["."].types.importnow points at./dist/superdoc/src/public/index.d.tsexports["."].types.requirenow points at./dist/superdoc/src/public/index.d.ctsRuntime fields are intentionally unchanged:
sourcestill points at./src/index.jsimportstill points at./dist/superdoc.es.jsrequirestill points at./dist/superdoc.cjsNo
./super-editorchanges; SD-3181 remains deferred.Why this is safe now
PR B (#3389) re-curated
src/public/index.tsto mirror the full 200-name root contract. This PR only moves TypeScript resolution from the historical broad root declaration to the curated public facade declaration.Verification
pnpm --filter superdoc build:es./index= 200 exports@superdoc/*leaksnode tests/consumer-typecheck/typecheck-matrix.mjsnode tests/consumer-typecheck/snapshot-superdoc-root-exports.mjs --checknode tests/consumer-typecheck/check-root-classification-closure.mjsnode tests/consumer-typecheck/package-shape-gate.mjsAfter this lands, SD-3213 gate consolidation is unblocked.