Repository navigation
refactor(create): run remote templates through vp dlx - #3478
Conversation
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.
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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.
|
@codex review |
There was a problem hiding this comment.
💡 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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
`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`.
# Conflicts: # packages/cli/src/create/templates/remote.ts
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Previously,
vp createselected and ran the package-manager command for each remote template. Its command table duplicated the selection logic invp_pm_cli.Now
vp createuses its current Node.js executable to runvp dlx -- <template> <args>from the samevite-pluspackage.vp dlxselects the package-manager command. The--separator passes options such as--helpthrough to the template.vp create→pnpm dlxvp create→vp dlx→pnpm dlxvp create→npxvp create→vp dlx→npxvp create→npxvp create→vp dlx→npm exec --yes --vp create→npx --yesvp create→vp dlx→npx --yesvp create→yarn dlxvp create→vp dlx→yarn dlxvp create→bun xvp create→vp dlx→bun xvp createpasses the package-manager name, exact version, and any integrity hash throughVP_PACKAGE_MANAGER. This preserves the selection outside a project, wherevp dlxwould otherwise default topnpm.For npm 7+,
--yesoverridesnpm_config_yes=falsewhen the template is missing from the cache. A separate fix is planned for the sharedvp dlxresolver. Related discussion