Skip to content

[Bugfix #1154] vscode:prepublish: build all workspace deps via topological filter#1155

Merged
amrmelsayed merged 10 commits into
mainfrom
builder/bugfix-1154
Jul 8, 2026
Merged

[Bugfix #1154] vscode:prepublish: build all workspace deps via topological filter#1155
amrmelsayed merged 10 commits into
mainfrom
builder/bugfix-1154

Conversation

@amrmelsayed

Copy link
Copy Markdown
Collaborator

Summary

Fresh clones failed pnpm --filter codev-vscode run check-types with TS2307: Cannot find module '@cluesmith/codev-artifact-canvas' because vscode:prepublish only built two of the extension's three workspace:* 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's vscode:prepublish listed --filter targets by hand:

pnpm --filter @cluesmith/codev-core --filter @cluesmith/codev-types build && pnpm package

It missed @cluesmith/codev-artifact-canvas, a workspace:* dependency genuinely imported by the markdown-preview webview (src/markdown-preview/webview/main.ts:34-35). Without its dist/*.d.ts emitted first, the webview tsc pass in check-types cannot resolve the import.

Reproduction confirmed in a clean worktree: after building only core + types (the old filter set), check-types still 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-vscode transitively.

pnpm --filter 'codev-vscode^...' build && pnpm package

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

  • Manual repro: removed packages/{core,types,artifact-canvas}/dist, ran the new dep build, then check-types — both tsc passes succeed (previously failed with TS2307).
  • Regression test packages/vscode/src/__tests__/prepublish-workspace-deps.test.ts: passes with the topological filter form; if the script ever reverts to an explicit --filter list, it asserts the list covers every workspace:* dep. Verified red without the fix, green with it.
  • pnpm lint and full vitest suite (51 files, 580 tests) pass; porch phase checks (build + tests) pass.

@amrmelsayed amrmelsayed merged commit bf1525f into main Jul 8, 2026
6 checks passed
@amrmelsayed amrmelsayed deleted the builder/bugfix-1154 branch July 8, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vscode: prepublish filter misses @cluesmith/codev-artifact-canvas — fresh clone fails check-types

1 participant