Skip to content

fix: support pnpm workspaces and --no-install - #894

Draft
yuikisaito wants to merge 7 commits into
voidzero-dev:mainfrom
yuikisaito:issue-888
Draft

yuikisaito wants to merge 7 commits into
voidzero-dev:mainfrom
yuikisaito:issue-888

Conversation

@yuikisaito

@yuikisaito yuikisaito commented Nov 21, 2026 •

Copy link
Copy Markdown

Summary

Fixes an issue where running create-void inside an existing pnpm monorepo unconditionally created a nested pnpm-workspace.yaml in the target subdirectory, causing pnpm install to treat the subdirectory as an isolated workspace root.

When pnpm is detected, create-void now locates the enclosing workspace root and merges Void's required allowBuilds entries into the root pnpm-workspace.yaml while preserving existing workspace settings, comments, and build approvals.

Remaining Tasks

  • Detect enclosing pnpm workspace root and merge allowBuilds into root pnpm-workspace.yaml
  • Add --no-install flag to skip running local package installation

Related Issues

Fixes #888

@yuikisaito yuikisaito changed the title fix(create-void): merge pnpm build policy into workspace config fix: support pnpm workspaces and --no-install Nov 21, 2026
@yuikisaito
yuikisaito marked this pull request as ready for review November 21, 2026 11:54
@yuikisaito
yuikisaito requested a review from a team as a code owner November 21, 2026 11:54
@yuikisaito
yuikisaito marked this pull request as draft November 21, 2026 16:36
@yuikisaito

Copy link
Copy Markdown
Author

@cpojer

While implementing #888, I noticed some overlap with void init. Before moving this out of draft, I'd like to get your thoughts on reorganizing responsibilities between create-void and void init to avoid duplication:

  1. Delegate allowBuilds and installation to void init: Currently, this PR duplicates void init's logic for finding the pnpm workspace root and updating allowBuilds in pnpm-workspace.yaml. Instead, create-void could invoke the matching version of void init directly (e.g., via dlx) to handle workspace configuration and standalone installs, while create-void only runs a final workspace-root install when scaffolding inside an existing monorepo.
  2. Eliminate redundant installs: Right now, create-void runs pnpm install once to bootstrap the CLI, void init runs install after scaffolding, and create-void runs it again. Running the CLI via dlx first would remove the initial bootstrap install and keep dependency installation in one place.

Would you prefer to include this cleanup in this PR, or keep the current scope?

This branch has not been deployed

No deployments
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.

Prevent the generation of a nested pnpm-workspace.yaml and local pnpm install when running create-void inside an existing monorepo

1 participant