Skip to content

Expose bun workspace packages as individual build targets#1654

Draft
jagonalez wants to merge 1 commit intofeat/pnpm-workspace-build-targetsfrom
feat/bun-workspace-build-targets
Draft

Expose bun workspace packages as individual build targets#1654
jagonalez wants to merge 1 commit intofeat/pnpm-workspace-build-targetsfrom
feat/bun-workspace-build-targets

Conversation

@jagonalez
Copy link
Contributor

Summary

  • Extends workspace build target support to bun projects
  • Adds resolveBunWorkspacePaths to map package names (build targets) to bun lockfile workspace keys (uses "" for root, relative paths for members)
  • Updates buildGraph in BunLock.hs to accept an optional workspace filter, scoping analysis to selected workspace members
  • Adds unit tests for workspace path resolution and lockfile filtering
  • With this PR, all Node.js project types (yarn, npm, pnpm, bun) support workspace build targets, so the scoping logic in mkProject can be simplified in a follow-up

Test plan

  • resolveBunWorkspacePaths tests: maps root to "", workspace members to relative paths, returns Nothing for ProjectWithoutTargets
  • buildGraph filtering tests: root-only filter excludes workspace deps, workspace-only filter excludes root deps
  • All 71 Node tests and 47 Bun tests pass
  • cabal build succeeds with no warnings
  • Manual test with a real bun workspace project

🤖 Generated with Claude Code

- Wire FoundTargets through getDeps → analyzeBunLock → BunLock.analyze
- Add resolveBunWorkspacePaths to map package names to bun workspace
  keys (uses "" for root instead of "." like pnpm)
- Filter workspaces in buildGraph when targets are selected
- Add Bun case to mkProject's build target scoping
- Unit tests for workspace filtering and path resolution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jagonalez jagonalez requested a review from a team as a code owner February 25, 2026 20:05
@jagonalez jagonalez requested review from Conor-FOSSA and removed request for a team February 25, 2026 20:05
@zlav zlav requested review from tjugdev and removed request for Conor-FOSSA February 25, 2026 20:14
@jagonalez
Copy link
Contributor Author

sorry @tjugdev I was in a rush to do something and didn't mean to create a non draft pr here

@jagonalez jagonalez marked this pull request as draft February 25, 2026 20:24
@zlav zlav requested review from zlav and removed request for tjugdev and zlav March 6, 2026 17:59
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.

1 participant