[Bugfix #1154] vscode:prepublish: build all workspace deps via topological filter#1155
Merged
Conversation
… topological filter
amrmelsayed
added a commit
that referenced
this pull request
Jul 8, 2026
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
Fresh clones failed
pnpm --filter codev-vscode run check-typeswithTS2307: Cannot find module '@cluesmith/codev-artifact-canvas'becausevscode:prepublishonly built two of the extension's threeworkspace:*dependencies. This switches the script to pnpm's topological filter form so all workspace deps build, now and for any dep added later.Fixes #1154
Root Cause
packages/vscode/package.json'svscode:prepublishlisted--filtertargets by hand:It missed
@cluesmith/codev-artifact-canvas, aworkspace:*dependency genuinely imported by the markdown-preview webview (src/markdown-preview/webview/main.ts:34-35). Without itsdist/*.d.tsemitted first, the webview tsc pass incheck-typescannot resolve the import.Reproduction confirmed in a clean worktree: after building only core + types (the old filter set),
check-typesstill fails with exactly the artifact-canvas TS2307.Fix
Use the future-proof flavor recommended in the issue: the topological filter selects all workspace dependencies of
codev-vscodetransitively.Verified the filter selects exactly
{artifact-canvas, types, core}on the current tree. This also converges with the filter form the codev-ide bundling script already uses.Test Plan
packages/{core,types,artifact-canvas}/dist, ran the new dep build, thencheck-types— both tsc passes succeed (previously failed with TS2307).packages/vscode/src/__tests__/prepublish-workspace-deps.test.ts: passes with the topological filter form; if the script ever reverts to an explicit--filterlist, it asserts the list covers everyworkspace:*dep. Verified red without the fix, green with it.pnpm lintand full vitest suite (51 files, 580 tests) pass; porch phase checks (build + tests) pass.