fix(types): relocate D1 layout declarations (SD-2893)#3133
Merged
caio-pizzol merged 2 commits intomainfrom May 5, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ack (SD-2893) vite.config.js: pm-adapter is included file-by-file because a full src/**/* glob pulls @superdoc/style-engine and other internal packages into the declaration graph, defeating the SD-2893 shim drain. ensure-types.cjs: bare @superdoc/pm-adapter specifiers would rewrite to a non-existent dist path. The audit gate's RELOCATED_PACKAGES list rejects any unrewritten bare specifier at build time, so this is a build failure rather than a silent consumer break.
Contributor
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.44 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in vscode-ext v2.3.0-next.88 |
Contributor
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.86 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-cli v0.8.0-next.62 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc v1.30.0-next.45 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.47 |
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
@superdoc/dom-contractdeclarations into the publishedsuperdocdist and guard them in the declaration auditconverter-context.js,sections/types.js) without publishing the full pm-adapter declaration treeConverterContextimports in presentation-editor code to the pm-adapter type subpath so emitted declarations do not force consumers through the broad pm-adapter barrelNotes
This is the D1 slice of the SD-2830 / SD-2893 shim drain. It removes these entries from
_internal-shims.d.ts:@superdoc/dom-contract@superdoc/pm-adapter@superdoc/pm-adapter/sections/types.jsThe shim list now remains at 6 known modules:
@superdoc/common@superdoc/common/components/BasicUpload.vue@superdoc/common/list-marker-utils@superdoc/composables/useUiFontFamily.js@superdoc/layout-engine@superdoc/style-engine/ooxmlI intentionally did not include all of
pm-adapter/src/**/*; that pulled additional internal-only packages (@superdoc/style-engine,@superdoc/word-layout,@superdoc/common/list-numbering) into the emitted declaration graph and kept the shim count at 9. The PR keeps pm-adapter relocation to the two public-referenced type files.Verification
pnpm --filter superdoc run build:esnode tests/consumer-typecheck/typecheck-matrix.mjs->47 passed, 0 failed, 0 warningspnpm run type-checkpnpm --filter @superdoc/super-editor test src/editors/v1/core/presentation-editor/tests/FootnotesBuilder.test.tsgit diff --check