Repository navigation
refactor: remove unused document re-exports and types - #51
Merged
Merged
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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.
Change
Removes exports of
src/lib/workspace/documentsthat nothing imports. No user-visible change.documents/schema.ts: the re-export ofDocumentDefinitionSchema. Its two consumers (project/index.ts,project/schema.ts) use the original inproject/schema.ts.documents/index.ts: the re-export ofreadRenderedDocument. The module still imports and calls it internally;RenderedDocumentSchemastays re-exported because it is imported elsewhere.documents/index.ts: the typesDocumentReference,DocumentContentandDocumentDiagnostic, plus the three schema imports only they used. The schemas themselves stay indocuments/schema.ts, whereRenderedDocumentSchemais composed from them.Nothing depends on them:
git grep -wfor each name oversrc,tests,examplesandscriptsfinds no use outside the declarations removed here (the three types matched only their own definition).knipreports each as an unused export or unused exported type.tsc --noEmitpasses withnoUnusedLocals, so no import was left dangling.Evidence
Run locally on Node 26.3.1 with this removal applied together with the two other dead-code removals proposed alongside it (unused
createBrowserWorkspace, unused.diagram-slotstyles):npm run check— passed (prettier, architecture check,tsc --noEmit, Vitest, Node script tests).npm run build— passed.Browser suites were not run locally: only type-level and re-export declarations changed.
Compatibility
No source/model/view, saved-format, dependency or engine-profile effect. Rendered-document validation is unchanged.
🟢 Devin Review found nothing to fix · View findings