fix(types): drain @superdoc/style-engine/ooxml shim (SD-2893)#3153
Merged
caio-pizzol merged 2 commits intomainfrom May 5, 2026
Merged
fix(types): drain @superdoc/style-engine/ooxml shim (SD-2893)#3153caio-pizzol merged 2 commits intomainfrom
caio-pizzol merged 2 commits intomainfrom
Conversation
BasicUpload was re-exported through `superdoc/super-editor` and `superdoc` despite being marked `@internal` at the export site (packages/super-editor/src/editors/v1/index.js:103). It is not documented in any README, AGENTS guide, or example. The two dev components that use it (SuperdocDev.vue, DeveloperPlayground.vue) import it directly from `@superdoc/common/components/BasicUpload.vue`, not via the public re-export. Drop the re-export rather than relocating the .vue file. The upload widget is dev-tooling, not a public API. The bare `@superdoc/common/components/BasicUpload.vue` shim entry goes away because no public d.ts file references it anymore. Also removes the BasicUpload assertion from the consumer-typecheck customer-scenario fixture so the matrix stays green; the fixture was the only place the public re-export was exercised. Shim count: 3 to 2. Remaining: @superdoc/common (5 dist refs, catch-all bin), @superdoc/style-engine/ooxml (10 dist refs). Verified: build:es clean (8 guarded packages, 2 shim modules), consumer matrix 47/0/0, runtime smoke 4/4 with BasicUpload explicitly asserted absent from main and super-editor entries.
The /ooxml subpath of style-engine is the only part publicly reachable today (10 dist d.ts references across pm-adapter, diffing, super-converter, parts adapters, and plan-engine). Approach mirrors the pm-adapter narrow-scope pattern from #3144: - Include only the ooxml subtree plus its sibling cascade.ts dependency in vite-plugin-dts. A full src/**/* glob would pull the broader project graph through @superdoc/contracts project references and re-expand the shim list. - Add an exact relocation rule for @superdoc/style-engine/ooxml. - Guard the bare @superdoc/style-engine root in both RELOCATION_GUARD_PACKAGES and UNSHIMMED_PRIVATE_SPECIFIERS so a future bare-barrel leak fails audit Rule 1 instead of producing a broken relative path or an ambient any shim. Also removes a misleading JSDoc @example block from cascade.ts. The example showed `import from '@superdoc/style-engine/cascade'` which is not a valid public import (cascade is not in the package's exports field), and the bare specifier inside the @example was being captured by the workspace-import scanner. Shim count: 2 to 1. Only @superdoc/common remains. Verified: build:es clean (9 guarded packages, 1 shim module), consumer matrix 47/0/0, runtime smoke 4/4, dist has the 6 expected declaration files, negative tests confirm the /ooxml subpath rewrites to a real target file and a bare @superdoc/style-engine specifier is preserved unchanged for audit Rule 1 to catch.
Contributor
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.51 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in vscode-ext v2.3.0-next.95 |
Contributor
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.93 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.53 |
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.
Stacked on #3151. Drains the fifth shim entry (
@superdoc/style-engine/ooxml), bringing the count to 1. Only@superdoc/commonremains.The
/ooxmlsubpath is the only part of style-engine publicly reachable - 10 dist d.ts references across pm-adapter, the diffing extension, super-converter, parts adapters, and plan-engine. The bare@superdoc/style-engineis internal-only.Approach mirrors the pm-adapter narrow-scope pattern from #3144:
ooxml/**subtree plus its siblingcascade.tsdependency invite.config.js/tsconfig.json. A fullsrc/**/*glob pulls the broader project graph through@superdoc/contractsproject references and re-expands the shim list (verified during probe).@superdoc/style-engine/ooxml.@superdoc/style-engineroot in bothRELOCATION_GUARD_PACKAGESandUNSHIMMED_PRIVATE_SPECIFIERSso a future bare-barrel leak fails audit Rule 1 instead of producing a broken relative path.Also removes a misleading JSDoc
@exampleblock fromcascade.ts. The example showedimport from '@superdoc/style-engine/cascade', butcascadeis not in the package'sexportsfield. Same false-positive class as theuseUiFontFamilycleanup in #3140 - the bare specifier inside the@examplewas being captured by the workspace-import scanner.Verified:
pnpm --filter superdoc build:esclean (audit OK, 9 guarded packages, 1 shim module)cascade.d.ts,ooxml/{index,types,numbering-types,styles-types,table-style-selection}.d.tsimport('@superdoc/style-engine/ooxml')rewrites to a real target file in dist;import('@superdoc/style-engine')(bare) is preserved unchanged and audit Rule 1 fails with exit 1After this lands, only
@superdoc/common(5 dist refs, catch-all bin) remains. That's the hardest of the original 9 shims and needs per-type analysis (Comment, CommentJSON, CommentContent, CommentThreadingProfile - each gets an inline-vs-relocate-vs-remove decision).