Skip to content

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

Draft
jong-kyung wants to merge 3 commits into
voidzero-dev:mainfrom
jong-kyung:refactor/create-vp-dlx
Draft

jong-kyung wants to merge 3 commits into
voidzero-dev:mainfrom
jong-kyung:refactor/create-vp-dlx

Conversation

@jong-kyung

Copy link
Copy Markdown
Collaborator

vp create now runs remote templates through vp dlx instead of its own package runner table, which duplicated the resolution in vp_pm_cli. The selected package manager is passed through VP_PACKAGE_MANAGER, because vp dlx defaults to pnpm outside a project.

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-17T10:05:51.370388Z 4945ec9 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".

const envs = templateInfo.envs;
const { command, args } = formatDlxCommand(remotePackageName, execArgs, workspaceInfo);
// `--` keeps the global CLI from reading a template's `--help` as its own.
const dlxArgs = ['dlx', '--', templateInfo.command, ...templateInfo.args];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the npm 6 fallback when delegating templates to dlx

With VP_PACKAGE_MANAGER=npm@6.14.18, both local and global creation now reach Npm::resolve in crates/vp_pm_cli/src/resolution/commands/dlx.rs, which unconditionally constructs npm exec --yes. npm 6 has npx but no exec subcommand; npm's compatibility documentation dates the rewrite to v7.0.0 and explains that “npx uses the npm exec command instead of a separate argument parser and install process.” Consequently remote scaffolding no longer runs the generator with this supported package-manager version, whereas the removed runner invoked npx. Add a version-gated npx fallback to the shared dlx resolver.

AGENTS.md reference: AGENTS.md:L9-L9

Useful? React with 👍 / 👎.

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

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.

1 participant