GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(create): normalize sub-package vite-plus and drop aliased vite/vitest by fengmk2 · Pull Request #1697 · voidzero-dev/vite-plus

Conversation

@fengmk2

@fengmk2 fengmk2 commented May 27, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

Two clean-up fixes for vp create vite:monorepo:

  • packages/utils/package.json keeps \"vite-plus\": \"^x.y.z\" inherited from the remote library template (github:sxzz/tsdown-templates/vite-plus). The per-package migrator's catalog rewrite is gated on needVitePlus, which only flips true when vite/vitest/oxlint/oxfmt/tsdown/@vitest/browser* is present — none of which the library template has. So apps/website ended up with vite-plus: catalog: while packages/utils stayed pinned, leaving sub-packages drifted.

    Fix: in rewritePackageJson, also normalize an existing vite-plus value to the canonical spec (catalog: in catalog-supporting monorepos, or VITE_PLUS_VERSION under force-override). Scoped to catalog-supporting PMs so vp migrate on npm/standalone doesn't silently overwrite a user's pinned version.

  • apps/website/package.json retains aliased vite / vitest devDependencies left by create-vite vanilla-ts. The migrator only rewrites their value (e.g. vite: catalog:), it doesn't drop the keys. But in a freshly-scaffolded project the CLI scripts have already been rewritten to vp ... and no user file imports 'vite' / 'vitest', so vite-plus provides them transitively. The dangling keys are dead weight.

    Fix: in executeMonorepoTemplate, after the per-package migrator runs on apps/website, strip the vite and vitest keys from devDependencies. (Only in vp create, not vp migrate.)

CI coverage

New monorepo-only assertion step in .github/workflows/test-vp-create.yml runs across all 4 package managers and verifies:

  • apps/website devDependencies contain neither vite nor vitest
  • both apps/website and packages/utils declare vite-plus
  • for pnpm/yarn/bun, the vite-plus spec matches across both sub-packages (npm is skipped since its non-catalog vp migrate path keeps user pins untouched)

Test plan

  • vp test run packages/cli — 407 passed (added 2 unit cases covering the pnpm-normalize and npm-leave-alone paths)
  • CI: test-vp-create matrix (pnpm/npm/yarn/bun × monorepo template) passes the new assertion step

Note

Medium Risk
Touches package.json rewrite logic used by migration and create; behavior is scoped (catalog PMs, create-only strip) and covered by new tests and e2e assertions.

Overview
Fixes vp create vite:monorepo so sub-packages don’t end up with inconsistent or redundant dependency entries.

Migrator (rewritePackageJson): When a package already declares vite-plus but nothing else triggers migration, catalog-supporting monorepos (pnpm/yarn/bun) now rewrite plain version ranges to the canonical catalog: (or force-override path). Protocol-pinned specs (workspace:*, catalog:named, etc.) are left alone; npm monorepos still keep user pins. Auto-adding vitest for vitest-adjacent peers is limited to real migration passes, not this normalize-only path.

Monorepo create: After migrating apps/website, vite and vitest are removed from that app’s devDependencies (scripts already use vp; runtime comes via vite-plus).

CI & tests: test-vp-create gains a monorepo-only check for aligned vite-plus, no stray vite/vitest on the website app, and updated bun snap output; unit tests cover normalize vs npm-leave-alone and protocol preservation.

Reviewed by Cursor Bugbot for commit 0132c60. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jong-kyung reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@fengmk2
fix(create): normalize sub-package vite-plus and drop aliased vite/vi…
f9bfde4
…test

In `vp create vite:monorepo`:

- `packages/utils/package.json` inherited `"vite-plus": "^x.y.z"` from the
  remote library template and the per-package migrator never touched it
  (the existing rewrite only fires when `needVitePlus` is triggered by
  vite/vitest/oxlint/etc.). The result was sub-package drift —
  `apps/website` had `"vite-plus": "catalog:"` while `packages/utils`
  stayed pinned. Normalize an existing `vite-plus` value to the canonical
  spec (`catalog:` or `VITE_PLUS_VERSION`) whenever the project supports
  catalogs, so siblings stay aligned. Scoped to catalog-supporting PMs so
  `vp migrate` on npm/standalone doesn't silently overwrite a user pin.

- `apps/website/package.json` kept aliased `vite`/`vitest` devDeps left
  by `create-vite` because the migrator only rewrote their value
  (`vite: catalog:`) instead of removing the key. In a freshly-scaffolded
  project the CLI scripts have been rewritten to `vp ...` and no user
  code imports `'vite'`/`'vitest'`, so `vite-plus` brings them in
  transitively — drop the keys to keep the generated package.json clean.

Also extend the `test-vp-create` workflow with a monorepo-only assertion
step that catches regressions: `apps/website` must have no
`vite`/`vitest` in devDependencies, both sub-packages must declare
`vite-plus`, and (for pnpm/yarn/bun) the `vite-plus` spec must match
across them.
@fengmk2 fengmk2 added the test: create-e2e Run `vp create` e2e tests label May 27, 2026
@fengmk2 fengmk2 self-assigned this May 27, 2026
@netlify

netlify Bot commented May 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

✅ Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 5ea28d5
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a17badc7f7de5000806aec9
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fengmk2
fix(migrate): preserve protocol-prefixed vite-plus specs; gate vitest…
0132c60
… auto-add to migrations

Address review findings on the new vite-plus normalize path:

- Preserve protocol-prefixed specs (`catalog:named`, `workspace:*`, `link:`,
  `file:`, `npm:`, `github:`, `git+`/`git:`, `http(s)://`) so deliberate
  user pins survive `vp migrate`. Previously the new normalize rule
  rewrote anything that wasn't literally `catalog:` — silently clobbering
  named-catalog references, workspace and link protocols, and aliased pins.

- Split the vitest peer-dep auto-add back behind `needVitePlus` only. A
  pure normalize pass (sub-package only needed its pinned `^x.y.z`
  re-aligned to `catalog:`) must not also inject a `vitest` devDep just
  because the project happens to have a `vitest-browser-*` peer.

- Drop the now-redundant `const version = canonicalVitePlusSpec` alias.

Also update `snap-tests-global/new-vite-monorepo-bun/snap.txt` to drop the
stripped `"vite": "catalog:"` line in apps/website (matches the cleanup in
`executeMonorepoTemplate`), and add an existsSync guard to the workflow's
node -e assertion so a missing sub-package package.json surfaces with a
targeted message instead of an opaque ENOENT.

Test coverage: yarn + bun catalog normalize, protocol-prefix preservation,
and "pure normalize must not auto-add vitest". 410 passed.
@fengmk2

fengmk2 commented May 27, 2026

Copy link
Copy Markdown
Member Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fengmk2
test(create): snap-cover packages/utils vite-plus normalization
66a72a9
The new behavior (`packages/utils/package.json` has `vite-plus: catalog:`
instead of the upstream library template's `^0.1.20`) was not captured by
any global snap. Add `cat vite-plus-monorepo/packages/utils/package.json`
to both `new-vite-monorepo` (pnpm) and `new-vite-monorepo-bun` (bun)
steps.json so a regression to the migrator's normalize path or to the
post-create cleanup surfaces as a snap diff on review.

For the pnpm variant, also upgrade the existing
`ls apps/website/package.json` to `cat apps/website/package.json` so the
vite/vitest devDep strip is visible there too (previously only the bun
variant inspected its contents).

Regenerated via `pnpm bootstrap-cli && pnpm -F vite-plus snap-test-global
new-vite-monorepo new-vite-monorepo-bun`. The 6 `migration-monorepo-*`
snaps re-run cleanly with no drift.
@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 66a72a9

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed May 27, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0132c60. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label May 27, 2026
@fengmk2
fengmk2 marked this pull request as ready for review May 27, 2026 13:00
@fengmk2
Merge branch 'main' into fix/create-monorepo-vite-plus-catalog-and-vi…
96683e6
…te-cleanup
@fengmk2
fengmk2 requested review from cpojer and wan9chi May 27, 2026 13:00
cpojer
cpojer approved these changes May 27, 2026
View reviewed changes
fengmk2 added 2 commits May 28, 2026 10:28
@fengmk2
Merge branch 'main' into fix/create-monorepo-vite-plus-catalog-and-vi…
3e2a5b4
…te-cleanup
@fengmk2
Merge branch 'main' into fix/create-monorepo-vite-plus-catalog-and-vi…
5ea28d5
…te-cleanup
@fengmk2
fengmk2 merged commit 30a27a7 into main May 28, 2026
91 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@fengmk2
fengmk2 deleted the fix/create-monorepo-vite-plus-catalog-and-vite-cleanup branch May 28, 2026 05:57
Brooooooklyn added a commit that referenced this pull request May 28, 2026
@Brooooooklyn @claude
fix(migration): gate vitest-adjacent signal on missing vite-plus
443a13b
After rebasing on main's normalize-vite-plus block (#1697), the
isVitestAdjacent / browser-mode detection was flipping needVitePlus on
projects that already had vite-plus pinned, causing the "pure normalize
pass" to add vitest to the user's devDependencies — breaking the
regression test introduced in #1697. Gate both vitest-adjacent and
browser-mode signals on `!existingVitePlus` so they trigger only when
vite-plus would actually be installed, leaving normalize-only passes to
mutate just the vite-plus spec.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Brooooooklyn added a commit that referenced this pull request May 28, 2026
@Brooooooklyn @claude
fix(migration): gate vitest-adjacent signal on missing vite-plus
39842d7
After rebasing on main's normalize-vite-plus block (#1697), the
isVitestAdjacent / browser-mode detection was flipping needVitePlus on
projects that already had vite-plus pinned, causing the "pure normalize
pass" to add vitest to the user's devDependencies — breaking the
regression test introduced in #1697. Gate both vitest-adjacent and
browser-mode signals on `!existingVitePlus` so they trigger only when
vite-plus would actually be installed, leaving normalize-only passes to
mutate just the vite-plus spec.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@fengmk2 fengmk2 mentioned this pull request May 28, 2026
release: v0.1.23 #1703
Merged
fengmk2 added a commit that referenced this pull request May 29, 2026
@voidzero-guard @fengmk2
release: v0.1.23 (#1703)
2b33837
Release vite-plus v0.1.23.

Enterprise-ready HTTP (proxy + custom CA), task command shorthands in
`vite.config.ts`, a smoother `vp create`/`vp migrate`, and the
oxc/vite/rolldown bundled stack moves forward.

### Highlights

- **Proxy and custom-CA aware HTTP**: a new process-wide
`vite_shared::shared_http_client()` honors `HTTPS_PROXY` / `HTTP_PROXY`
/ `NO_PROXY`, picks up macOS System Settings / Windows registry proxies,
loads custom CAs from `SSL_CERT_FILE` and `NODE_EXTRA_CA_CERTS`, and
exposes a `VP_INSECURE_TLS` diagnostic switch; makes `vp` work through
Socket Firewall Free and other TLS-intercepting proxies
([#1686](#1686)), by
@fengmk2
- **Task command shorthands**: `run.tasks` entries in `vite.config.ts`
now accept a bare string (`"build": "cmd"`) or array (`"build": ["cmd1",
"cmd2"]`) instead of always requiring `{ command: ... }`; arrays reuse
the existing `&&` planning path so cache, `dependsOn`, and task options
stay consistent
([vite-task#391](voidzero-dev/vite-task#391)),
by @jong-kyung
- **Managed `vp outdated -g`**: routes through Vite+'s managed global
package metadata instead of delegating to the underlying `npm outdated
-g` store, so all installed global packages are reported consistently
([#1659](#1659)), by
@liangmiQwQ

### Features

- `vp pm approve-builds`: new unified subcommand that mirrors `pnpm
approve-builds` one-to-one, adapts to `bun pm trust`, and
warns-and-noops on npm/yarn
([#1662](#1662)), by
@fengmk2
- `vp create`: opt-in GitHub Copilot setup; selecting `--agent copilot`
now generates a `.github/workflows/copilot-setup-steps.yml` so the
Copilot Coding Agent can set up Vite+ and run `vp` in the new project
out of the box
([#1683](#1683)), by
@jong-kyung
- `vp migrate`: prompt to remove `baseUrl` from `tsconfig.json` before
applying type-aware lint defaults (runs `@andrewbranch/ts5to6
--fixBaseUrl .` under the hood; auto-applied in non-interactive mode)
([#1692](#1692)), by
@TheAlexLichter
- Respect `packageManager` in package-manager shims (`npm`/`npx`,
`pnpm`/`pnpx`, `yarn`/`yarnpkg`, `bun`/`bunx`); add non-mutating
`packageManager` resolution metadata for `vp env current` and `vp env
which` ([#1654](#1654)),
by @fengmk2
- vite-task: `--filter` no-match now exits `0` by default; add
`--fail-if-no-match` to opt back in
([vite-task#393](voidzero-dev/vite-task#393)),
by @kazupon

### Fixes & Enhancements

- `vp create`: keep generated `.vscode/settings.json` trackable when the
VS Code editor option is selected (avoid templates' `.vscode/*`
`.gitignore` masking it)
([#1700](#1700)), by
@jong-kyung
- `vp create vite:monorepo`: normalize sub-package `vite-plus` to
`catalog:` even when only `vite-plus` (not `vite`/`vitest`/...) is
present, and drop the `vite`/`vitest` aliases generated by the upstream
library template
([#1697](#1697)), by
@fengmk2
- `vp add/install -g <path>`: resolve the real package name from
`package.json` instead of using the path string, so local-path installs
don't create broken directories
([#1685](#1685)), by
@liangmiQwQ
- `vp test --coverage` and other direct built-in commands now expose the
workspace's `package.json#packageManager` to child processes so tools
like Vitest coverage can spawn the configured PM
([#1696](#1696)), by
@jong-kyung
- `vp migrate`: clean up the whole ESLint ecosystem (plugins, configs,
parser/resolver, type-utils) rather than just `eslint`; skip the
migration entirely when `@nuxt/eslint` is detected
([#1682](#1682)), by
@fengmk2
- `vp create`: write `fmt.configPath` (not `configPath`) for Zed oxfmt
settings to match the official Zed OXC extension layout
([#1687](#1687)), by
@chungweileong94
- `vp migrate`: parse `tsconfig.json` as JSONC so files with comments
don't break `baseUrl` detection/removal
([#1688](#1688)), by
@TheAlexLichter
- `vp env setup`: Unix env shims now point at the active `vp` executable
instead of always assuming `VP_HOME/current/bin/vp`, so Homebrew-style
installs work
([#1631](#1631)), by
@leohara
- `vp outdated -g` / `vp why -g`: don't require a local `package.json`;
global commands run regardless of cwd
([#1622](#1622)), by
@liangmiQwQ
- `vp create`: default the "Initialize a git repository?" prompt to yes
([#1650](#1650)), by
@fengmk2
- `vp` hooks: include the managed Node bin in `PATH` so
`./node_modules/.bin/vp` can find `node` from a VS Code commit on macOS
([#1647](#1647)), by
@TheAlexLichter
- `vpx` on Windows now invokes the package's `.cmd` shim instead of the
Unix binary
([#1652](#1652)), by
@tobynguyen27
- vite-task: bump cache database schema to version 13 (forces a one-time
rebuild of the local task cache)
([vite-task#402](voidzero-dev/vite-task#402)),
by @branchseer
- Bump vite-task to `d02b257` and `5833b374`; also bumps the repo's Rust
nightly toolchain to `nightly-2026-05-24` and ships the regenerated
`run` config types and docs for the new task command shorthand
([#1689](#1689),
[#1695](#1695)), by
@branchseer

### Refactor

- Replace `VP_SHELL_NU`/`VP_SHELL_PWSH` with a single `VP_SHELL`
override; add explicit shell parsing for `bash`, `zsh`, `fish`, `nu`,
`pwsh`, and `cmd`, and harden auto-detection against nested shells
([#1658](#1658)), by
@nekomoyi
- vite-task: replace `allocator-api2` with `bumpalo` collections
([vite-task#400](voidzero-dev/vite-task#400)),
by @branchseer
- vite-task: drop the unused `and_item_index` field from
`ExecutionItemDisplay`
([vite-task#394](voidzero-dev/vite-task#394)),
by @branchseer

### Docs

- Add the root `AGENTS.md` as the primary AI-agent guide for the
vite-plus repository; convert `CLAUDE.md` into a compatibility pointer
([#1670](#1670)), by
@jong-kyung
- Align the agent validation table to match `AGENTS.md`
([#1673](#1673)), by
@jong-kyung
- Update the task output caching guide so the documented behavior
matches what vite-task actually does
([#1639](#1639)), by
@ericclemmons
- Correct the bundled-source location in `packages/core/BUNDLING.md`
([#1660](#1660)), by
@shulaoda

### Chore

- Clarify `--help` text for `vp env default`/`pin`/`use`/`exec` with
`Examples:` blocks
([#1664](#1664)), by
@Boshen
- Refresh trusted stack stats on the docs homepage
([#1680](#1680)), by
@voidzero-guard[bot]
- Drop the standalone `pnpm --filter @rolldown/pluginutils build` step
now that `@rolldown/pluginutils` is published from its own package
([#1655](#1655)), by
@shulaoda
- Preserve single-quote style when `sync-remote` rewrites
`pnpm-workspace.yaml`
([#1672](#1672)), by
@lyzno1
- Enable `vite_pm_cli` lib tests by removing a stale `test = false` flag
([#1661](#1661)), by
@shulaoda
- CI: switch macOS runners back to `namespace-profile-mac-default`
([#1701](#1701)), by
@fengmk2
- CI: fix release-day flakes in the upgrade test and snap test when the
dev `package.json` version equals npm latest
([#1645](#1645)), by
@fengmk2
- CI: replace `zizmor` and `cargo-deny` workflows with
`oxc-project/security-action`
([#1635](#1635)), by
@Boshen
- CI: warm-up monorepo cache test under npm
([#1649](#1649)), by
@fengmk2
- CI: attach per-target `vp` binary archives (`.tar.gz`/`.zip`) to
GitHub Releases alongside the existing `vp-setup-*.exe` installers
([#1665](#1665)), by
@Boshen
- CI: declare Playwright via `repo.json` in ecosystem tests and bump
consumers to `>=1.60` to dodge the Node 24.16.0 hang
([#1668](#1668)), by
@fengmk2
- Update GitHub Actions
([#1640](#1640),
[#1675](#1675),
[#1678](#1678),
[#1679](#1679),
[#1691](#1691)), by
@renovate[bot]
- Upgrade upstream dependencies: vite `8.0.11 → 8.0.14`, rolldown `1.0.0
→ 1.0.3`, vitest `4.1.6 → 4.1.7`, oxlint `1.63.0 → 1.67.0`, oxfmt
`0.48.0 → 0.52.0`, oxlint-tsgolint `0.22.1 → 0.23.0`, `@oxc-project/*`
and oxc Rust crates `0.129.0 → 0.133.0`
([#1646](#1646),
[#1653](#1653),
[#1693](#1693),
[#1699](#1699)), by
@voidzero-guard[bot]

### Bundled Versions

| Tool | Version | Source |
| --- | --- | --- |
| vite | `8.0.14` |
[`c917f1e`](vitejs/vite@c917f1e)
|
| rolldown | `1.0.3` |
[`a287faa`](rolldown/rolldown@a287faa)
|
| tsdown | `0.22.0` | [npm](https://npmx.dev/package/tsdown/v/0.22.0) |
| vitest | `4.1.7` | [npm](https://npmx.dev/package/vitest/v/4.1.7) |
| oxlint | `1.67.0` | [npm](https://npmx.dev/package/oxlint/v/1.67.0) |
| oxlint-tsgolint | `0.23.0` |
[npm](https://npmx.dev/package/oxlint-tsgolint/v/0.23.0) |
| oxfmt | `0.52.0` | [npm](https://npmx.dev/package/oxfmt/v/0.52.0) |

### New Contributors

Welcome to all new contributors! 🎉

@ericclemmons, @tobynguyen27, @shulaoda, @leohara, @chungweileong94

**Full Changelog**:
v0.1.22...v0.1.23

Merging this PR will trigger the release workflow.

---------

Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com>
Co-authored-by: MK <[email protected]>
@BrewTestBot BrewTestBot mentioned this pull request May 29, 2026
vite-plus 0.1.23 Homebrew/homebrew-core#285211
Closed
Brooooooklyn added a commit that referenced this pull request May 29, 2026
@Brooooooklyn @claude
fix(migration): gate vitest-adjacent signal on missing vite-plus
a977718
After rebasing on main's normalize-vite-plus block (#1697), the
isVitestAdjacent / browser-mode detection was flipping needVitePlus on
projects that already had vite-plus pinned, causing the "pure normalize
pass" to add vitest to the user's devDependencies — breaking the
regression test introduced in #1697. Gate both vitest-adjacent and
browser-mode signals on `!existingVitePlus` so they trigger only when
vite-plus would actually be installed, leaving normalize-only passes to
mutate just the vite-plus spec.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Brooooooklyn added a commit that referenced this pull request May 30, 2026
@Brooooooklyn @claude
fix(migration): gate vitest-adjacent signal on missing vite-plus
6748db6
After rebasing on main's normalize-vite-plus block (#1697), the
isVitestAdjacent / browser-mode detection was flipping needVitePlus on
projects that already had vite-plus pinned, causing the "pure normalize
pass" to add vitest to the user's devDependencies — breaking the
regression test introduced in #1697. Gate both vitest-adjacent and
browser-mode signals on `!existingVitePlus` so they trigger only when
vite-plus would actually be installed, leaving normalize-only passes to
mutate just the vite-plus spec.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@fengmk2 fengmk2 mentioned this pull request Jun 1, 2026
fix(create): keep aliased vite in pnpm monorepo website so override stays effective #1728
Merged
fengmk2 added a commit that referenced this pull request Jun 1, 2026
@fengmk2
fix(create): keep aliased vite in pnpm monorepo website so override s…
adf79db
…tays effective (#1728)

## Summary

In a monorepo created via `vp create vite:monorepo` with **pnpm**,
running `vp why vite` reported the override as ineffective: it resolved
`vite` to upstream `vite` (a transitive dependency of
`@voidzero-dev/vite-plus-core`) rather than to
`@voidzero-dev/vite-plus-core` itself.

## Root cause

PR #1697 added `dropAliasedRuntimeDevDeps`, which strips `vite`/`vitest`
from `apps/website/package.json` for every package manager. For pnpm
this removed the only direct `vite` dependency in a fresh workspace, so
the `pnpm-workspace.yaml` `overrides.vite: catalog:` entry had no
consumer to redirect. The only `vite` left in the tree was
vite-plus-core's own internal `vite`, so `vp why vite` showed upstream
vite and the override looked ineffective. The single-package app keeps
`vite: catalog:` and resolves correctly.

## npm / yarn / bun: confirmed not affected (no fix needed)

I verified their override is effective in both single-app and monorepo:
`node_modules/vite` resolves to `@voidzero-dev/vite-plus-core`, and
`<pm> why @voidzero-dev/vite-plus-core` shows it redirecting even
vite-plus-test's peer `vite`. Their root `overrides`/`resolutions`
redirect the transitive/peer `vite` regardless of a direct dependency.
Their `vp why vite` display gap is a pre-existing limitation of `npm
explain` / `yarn why` / `bun why` (they query by resolved package name,
not the `vite` alias key), identical with or without the monorepo strip,
so it is out of scope here.

## Fix

`dropAliasedRuntimeDevDeps` now returns early for pnpm, keeping the
aliased `vite`/`vitest` so the workspace override has a direct consumer.
npm/yarn/bun keep stripping the dead-weight keys.

## Before / after (`vp why vite` in a fresh pnpm monorepo)

Before:

```
[email protected]
└─┬ @voidzero-dev/[email protected]
  └─┬ [email protected]
    ...
Found 1 version of vite
```

After:

```
@voidzero-dev/[email protected]
├─┬ @voidzero-dev/[email protected]
│ └─┬ [email protected]
│   └── [email protected] (devDependencies)
...
```

## Verification

- New unit test `packages/cli/src/create/__tests__/monorepo.spec.ts`:
failed for pnpm before the fix (vite stripped), now passes 4/4 (pnpm
keeps, npm/yarn/bun drop).
- Create + migration unit suite: 234/234 pass; lint clean.
- End-to-end against a rebuilt global CLI: real `vp create
vite:monorepo` + `vp why vite` now resolves to
`@voidzero-dev/vite-plus-core`.
- Global snap test `new-vite-monorepo` regenerated (website now keeps
`vite: catalog:`); `new-vite-monorepo-bun` unchanged.
- CI `test-vp-create.yml` assertion made pnpm-aware: pnpm must keep
`vite`; npm/yarn/bun must drop `vite`/`vitest`.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Scoped to monorepo scaffold post-processing and documentation;
behavior change is intentional and covered by unit, snap, and CI checks.
> 
> **Overview**
> **pnpm monorepo create** no longer strips aliased `vite`/`vitest` from
`apps/website/package.json`. The logic moves into exported
**`dropAliasedRuntimeDevDeps`**, which **returns early for pnpm** so
workspace `overrides` still have a direct `vite` consumer (fixing
misleading `vp why vite` after `vp create vite:monorepo`). **npm, yarn,
and bun** still remove those keys after migration.
> 
> Migration guidance is updated in **`docs/guide/migrate.md`**, **`vp
migrate` help**, and snap tests to say: on pnpm, **keep**
migrator-aliased `vite`/`vitest`; on other package managers, remove them
after import rewrites.
> 
> **CI** (`test-vp-create.yml`) now asserts pnpm keeps `vite` on the
website app while other PMs must not. New **`monorepo.spec.ts`** covers
pnpm vs npm/yarn/bun behavior; **`new-vite-monorepo`** snap expects
`vite: catalog:` on the website.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
16f7d45. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Brooooooklyn added a commit that referenced this pull request Jun 12, 2026
@Brooooooklyn @claude
fix(migration): gate vitest-adjacent signal on missing vite-plus
511b0fb
After rebasing on main's normalize-vite-plus block (#1697), the
isVitestAdjacent / browser-mode detection was flipping needVitePlus on
projects that already had vite-plus pinned, causing the "pure normalize
pass" to add vitest to the user's devDependencies — breaking the
regression test introduced in #1697. Gate both vitest-adjacent and
browser-mode signals on `!existingVitePlus` so they trigger only when
vite-plus would actually be installed, leaving normalize-only passes to
mutate just the vite-plus spec.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Brooooooklyn added a commit that referenced this pull request Jun 12, 2026
@Brooooooklyn @claude
fix(migration): gate vitest-adjacent signal on missing vite-plus
09edc32
After rebasing on main's normalize-vite-plus block (#1697), the
isVitestAdjacent / browser-mode detection was flipping needVitePlus on
projects that already had vite-plus pinned, causing the "pure normalize
pass" to add vitest to the user's devDependencies — breaking the
regression test introduced in #1697. Gate both vitest-adjacent and
browser-mode signals on `!existingVitePlus` so they trigger only when
vite-plus would actually be installed, leaving normalize-only passes to
mutate just the vite-plus spec.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Brooooooklyn added a commit that referenced this pull request Jun 15, 2026
@Brooooooklyn @claude
fix(migration): gate vitest-adjacent signal on missing vite-plus
12edc4a
After rebasing on main's normalize-vite-plus block (#1697), the
isVitestAdjacent / browser-mode detection was flipping needVitePlus on
projects that already had vite-plus pinned, causing the "pure normalize
pass" to add vitest to the user's devDependencies — breaking the
regression test introduced in #1697. Gate both vitest-adjacent and
browser-mode signals on `!existingVitePlus` so they trigger only when
vite-plus would actually be installed, leaving normalize-only passes to
mutate just the vite-plus spec.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@SaKaNa-Y SaKaNa-Y mentioned this pull request Sep 16, 2026
fix(create): align built-in library toolchain versions #2721
Open
@jong-kyung jong-kyung mentioned this pull request Nov 10, 2026
fix(migrate): keep migrated toolchain specs resolvable and aligned #3397
Merged
fengmk2 added a commit that referenced this pull request Nov 10, 2026
@jong-kyung @fengmk2
fix(migrate): keep migrated toolchain specs resolvable and aligned (#…
f2ec4c5
…3397)

Fixes #3375.

Bun resolves `catalog:` references whenever the root `package.json` has
a `workspaces` field, even an empty one, but `vp migrate` required a
non-empty package list. Fixing that exposed other cases where migration
wrote references the package manager cannot resolve, or left packages on
different Vite+ versions.

Bun:
- Bun before 1.2.21 reads only catalogs under `workspaces`. On those
versions, migration keeps concrete specs unless the project already has
a catalog there, in both fresh and upgrade migrations.
- A stale `vite-plus` value in a Bun catalog is now reported as pending,
so the upgrade is no longer skipped.
- When a named catalog already owns the toolchain, missing entries go to
that catalog instead of a new default catalog, as with pnpm.

All package managers:
- Alignable `@vitest/*` packages that become `catalog:` references now
always get a catalog entry. Previously pnpm and Bun added it only when
the catalog had `vitest`, so a project with only an excluded utility
such as `@vitest/utils` failed to install.
- An existing plain `vite-plus` range in a child package is now
re-pinned to the concrete version when catalogs are unavailable, which
covers npm, pnpm before 9.5, Yarn before 4.10, and Bun before 1.2.21.
This changes the choice made in #1697 to leave these pins alone on npm,
because the upgrade path already re-pins them and the root and shared
`vite` override otherwise move to a newer version than the child.
Protocol pins such as `workspace:*` are kept, and `test-vp-create` now
checks sibling alignment on npm too.

The Bun section of `docs/guide/migrate-rules.md` is updated. Each case
has a unit test, and the
`migration_upgrade_bun_empty_workspaces_catalog` and
`migration_bun_old_no_top_level_catalog` snapshots cover the
empty-workspace upgrade and the Bun 1.2.20 fresh migration.

---------

Co-authored-by: MK (fengmk2) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@cpojer cpojer cpojer approved these changes
@wan9chi wan9chi Awaiting requested review from wan9chi

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@fengmk2 fengmk2

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@fengmk2 @cpojer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.