Skip to content

refactor(create-void): delegate scaffolding to void init - #894

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

yuikisaito wants to merge 21 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
  • Instead of pre-installing the Void CLI, create-void temporarily executes the same version of void init via dlx to delegate scaffolding.
  • Centralize pnpm workspace root detection and allowBuilds updates into void init (already implemented on the void init side).
  • Forward create-void --no-install to void init to skip project dependency installation.
  • Test standalone and workspace scaffolding for correct lockfile placement.

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?

@cpojer

cpojer commented Nov 22, 2026

Copy link
Copy Markdown
Member

We can clean it up. Ideally void init does most of the work, and create-void just delegates to it when possible.

@yuikisaito
yuikisaito marked this pull request as ready for review November 22, 2026 13:20
@yuikisaito yuikisaito changed the title fix: support pnpm workspaces and --no-install refactor(create-void): delegate scaffolding to void init Nov 22, 2026
@Brooooooklyn
Brooooooklyn requested review from Brooooooklyn and removed request for Brooooooklyn November 23, 2026 14:23
@Brooooooklyn

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T12:57:28.012265Z 1d59fae Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d59fae2b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/create-void/src/main.ts Resolved
Comment thread packages/void/src/cli/init.ts Resolved
@yuikisaito yuikisaito changed the title refactor(create-void): delegate scaffolding to void init refactor(create-void): delegate scaffolding to void init Nov 26, 2026
@cpojer

cpojer commented Nov 26, 2026

Copy link
Copy Markdown
Member

Thanks! There is an sisue when creating a Vite+ starter with npm create void which used to create a package-lock.json but with this PR it creates a pnpm-lock.yaml and then npm ci fails. Can you fix that?

@yuikisaito

Copy link
Copy Markdown
Author

@cpojer Thanks for catching that! I'll push a fix later this evening (JST).

@yuikisaito

Copy link
Copy Markdown
Author

@cpojer This should be fixed in fe860c4 — create-void now passes --package-manager through to void init when scaffolding Vite+ starters.

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few more issues:

  • vp create void finishes successfully, but the implicit --no-install skips migration generation, making the qlite starter’s home page returns an error.
  • vp dlx and vp exec both set VP_USER_AGENT but neither run a vp install that vp create does.
  • If an existing project already has devEngines.packageManager with npm, void init will overwrite it to pnpm while keeping npm's version which breaks package manager commands.

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

3 participants