Skip to content

chore(types): flip root types to public facade (SD-3212)#3392

Merged
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/SD-3212-c-root-types-flip
May 19, 2026
Merged

chore(types): flip root types to public facade (SD-3212)#3392
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/SD-3212-c-root-types-flip

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Summary

Final SD-3212 PR C: flips the root TypeScript contract to the path-as-contract public facade.

Changes only packages/superdoc/package.json:

  • top-level types now points at ./dist/superdoc/src/public/index.d.ts
  • exports["."].types.import now points at ./dist/superdoc/src/public/index.d.ts
  • exports["."].types.require now points at ./dist/superdoc/src/public/index.d.cts

Runtime fields are intentionally unchanged:

  • source still points at ./src/index.js
  • import still points at ./dist/superdoc.es.js
  • require still points at ./dist/superdoc.cjs

No ./super-editor changes; SD-3181 remains deferred.

Why this is safe now

PR B (#3389) re-curated src/public/index.ts to 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
    • facade verifier: root ./index = 200 exports
    • audit-declarations: no private @superdoc/* leaks
    • check-export-coverage: green
  • node tests/consumer-typecheck/typecheck-matrix.mjs
    • 57/57 scenarios pass
  • node tests/consumer-typecheck/snapshot-superdoc-root-exports.mjs --check
    • root exports match snapshot
  • node tests/consumer-typecheck/check-root-classification-closure.mjs
    • 0 closure violations
  • node tests/consumer-typecheck/package-shape-gate.mjs
    • packed manifest + publint pass
    • ATTW hit the known internal crash and was skipped by the existing tolerated path

After this lands, SD-3213 gate consolidation is unblocked.

@caio-pizzol caio-pizzol requested a review from a team as a code owner May 19, 2026 17:54
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 19, 2026

SD-3212

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol merged commit 01e14f5 into main May 19, 2026
71 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-3212-c-root-types-flip branch May 19, 2026 18:15
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.
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in superdoc-cli v0.12.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in superdoc-sdk v1.11.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.7.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in superdoc v1.35.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in @superdoc-dev/react v1.6.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in vscode-ext v2.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants