Skip to content

refactor(create): run remote templates through vp dlx - #3478

Merged
fengmk2 merged 9 commits into
voidzero-dev:mainfrom
jong-kyung:refactor/create-vp-dlx
Nov 21, 2026
Merged

fengmk2 merged 9 commits into
voidzero-dev:mainfrom
jong-kyung:refactor/create-vp-dlx

Conversation

@jong-kyung

@jong-kyung jong-kyung commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Previously, vp create selected and ran the package-manager command for each remote template. Its command table duplicated the selection logic in vp_pm_cli.

Now vp create uses its current Node.js executable to run vp dlx -- <template> <args> from the same vite-plus package. vp dlx selects the package-manager command. The -- separator passes options such as --help through to the template.

Package manager Previous call path New call path
pnpm vp create → pnpm dlx vp create → vp dlx → pnpm dlx
npm 6 vp create → npx vp create → vp dlx → npx
npm 7+ vp create → npx vp create → vp dlx → npm exec --yes --
Yarn 1 (Classic) vp create → npx --yes vp create → vp dlx → npx --yes
Yarn 2+ vp create → yarn dlx vp create → vp dlx → yarn dlx
Bun vp create → bun x vp create → vp dlx → bun x

vp create passes the package-manager name, exact version, and any integrity hash through VP_PACKAGE_MANAGER. This preserves the selection outside a project, where vp dlx would otherwise default to pnpm.

For npm 7+, --yes overrides npm_config_yes=false when the template is missing from the cache. A separate fix is planned for the shared vp dlx resolver. Related discussion

Replace the package runner table in create with `vp dlx`, which already owns the same resolution in vp_pm_cli. Pass the selected package manager through VP_PACKAGE_MANAGER because `vp dlx` detects it from the working directory and defaults to pnpm outside a project.
@jong-kyung jong-kyung self-assigned this Nov 17, 2026
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@jong-kyung jong-kyung added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: sfw labels Nov 17, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 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-21T06:09:12.018192Z f9a58ee 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: d00d060372

ℹ️ 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".

A VP_PACKAGE_MANAGER override can carry an integrity hash, and vp_pm_cli stores a hashed install in a separate verified directory. Replacing the override with a bare name and version made `vp dlx` download the package manager again without the hash and run that copy. Keep the user's value so the template runs with the install that create verified.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: dd25243292

ℹ️ 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".

Without the terminator, the global CLI read a template's --help as a request for vp dlx help, so the generator never ran.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 4945ec9ce6

ℹ️ 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".

fengmk2 pushed a commit that referenced this pull request Nov 18, 2026
`vp dlx` built `npm exec --yes` for every npm version, but `npm exec`
first shipped in npm 7.0.0. Under npm 6, `vp dlx` printed npm's usage
text and exited with code 1 instead of running the package.

npm 6 now runs its standalone `npx`. The command leaves out `--yes`,
because that `npx` takes the word after an unknown option as its value
and would swallow the package name. It also leaves out `--`, because
that `npx` already passes everything after the command through
untouched, and it maps `--silent` to `--quiet`.

`vp create` will need this once #3478 routes remote templates through
`vp dlx`.
@jong-kyung
jong-kyung marked this pull request as ready for review November 18, 2026 11:58
A tag such as pnpm@latest was forwarded as given, so a generator running inside the new workspace could resolve it again from a different registry. Forward the version create downloaded and keep the override's integrity hash.
VP_CLI_BIN can point to an older global vp, whose dlx may differ from this release and, outside a project, picks its own Node.js instead of the one create runs on. Run this package's CLI with the current Node.js instead.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: f9a58ee4fc

ℹ️ 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".

@fengmk2
fengmk2 merged commit 426d967 into voidzero-dev:main Nov 21, 2026
122 checks passed
@jong-kyung
jong-kyung deleted the refactor/create-vp-dlx branch November 21, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants