Skip to content

fix(types): gate public surface without skipLibCheck#3114

Merged
caio-pizzol merged 3 commits intomainfrom
caio-pizzol/SD-2892-skip-lib-check-false
May 4, 2026
Merged

fix(types): gate public surface without skipLibCheck#3114
caio-pizzol merged 3 commits intomainfrom
caio-pizzol/SD-2892-skip-lib-check-false

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol commented May 4, 2026

Summary

  • add required packed-consumer typecheck gates for the full public fixture set with skipLibCheck: false under bundler, node16, and nodenext
  • fix the declaration issues exposed by that gate: NodeNext-safe relative declaration specifiers, Vue SFC declaration resolution, EventEmitter import typing, and incomplete JSDoc-generated declarations
  • publish the public type dependencies needed by strict consumers: @types/mdast for markdown helper declarations and @types/ws for @hocuspocus/provider peer declarations

Notes

vue is published as ^3.5.0 instead of catalog: because catalog references cannot survive npm packaging and exact patch installs can duplicate Vue global macro declarations in consumer projects. Future Vue catalog bumps should be mirrored here intentionally.

@types/ws is a dependency rather than an optional peer because the strict public-surface matrix resolves @hocuspocus/provider declarations even before a consumer uses collaboration at runtime. Installing the small type package keeps skipLibCheck: false consumers green without adding another peer prompt.

Verification

  • node tests/consumer-typecheck/typecheck-matrix.mjs -> 44 passed, 0 failed, 0 warnings
  • pnpm --filter superdoc check:jsdoc
  • pnpm run type-check
  • pnpm --filter superdoc run pack:es
  • minimal tarball consumer app in /tmp/sd-2892-minimal-app:
    • ./node_modules/.bin/tsc -p tsconfig.json --noEmit (NodeNext, skipLibCheck: false)
    • ./node_modules/.bin/tsc -p tsconfig.node16.json --noEmit (Node16, skipLibCheck: false)
    • ./node_modules/.bin/tsc -p tsconfig.bundler.json --noEmit (Bundler, skipLibCheck: false)
  • git diff --check

SD-2892: add packed-tarball consumer typecheck scenarios that compile the full public fixture set with skipLibCheck=false under bundler, node16, and nodenext.

Fix the declaration issues exposed by that gate: publish the public mdast/ws type dependencies, emit NodeNext-safe relative declaration specifiers, keep Vue SFC declarations resolvable, and tighten JSDoc-generated declarations.

Vue is published as ^3.5.0 because catalog: cannot survive npm packaging and exact patch installs duplicate Vue global macro declarations in consumers. @types/ws stays a dependency because @hocuspocus/provider peer declarations require it under skipLibCheck=false; @types/mdast is directly referenced by public markdown helper declarations.
@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@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 marked this pull request as ready for review May 4, 2026 16:45
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 4, 2026 16:45
caio-pizzol and others added 2 commits May 4, 2026 14:02
…SD-2892)

JSDoc tightening in 56dac0d inadvertently required options.id on
markInsertion/markDeletion (the runtime treats it as optional) and
required options.tr/options.map on addMarkStep (which never destructures
them). Mark id optional with bracket syntax and drop the unused tr/map
declarations so the emitted public d.ts matches the runtime contract.
@caio-pizzol caio-pizzol merged commit 03a7b48 into main May 4, 2026
73 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-2892-skip-lib-check-false branch May 4, 2026 19:00
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.40

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.84

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in @superdoc-dev/react v1.2.0-next.82

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc v1.30.0-next.41

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc-cli v0.8.0-next.58

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc-sdk v1.8.0-next.43

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