Skip to content

fix(ci): install committed dependencies before preview migrations - #2822

Merged
wan9chi merged 2 commits into
mainfrom
fix/migrate-harness-install-lockfile
Sep 26, 2026
Merged

wan9chi merged 2 commits into
mainfrom
fix/migrate-harness-install-lockfile

Conversation

@wan9chi

@wan9chi wan9chi commented Sep 25, 2026

Copy link
Copy Markdown
Member

test-pkg-pr-new-migrate.sh deletes the root lockfile and node_modules before it runs vp migrate. Since the Vitest 5 migration (#2551), vp migrate reads the original Vitest version from the lockfile or node_modules. Without both, every project on a 0.x release stops with BLOCK [source-version] Cannot determine the original Vitest version and no files change. The v1.0.0-rc.1 ecosystem smoke test (#2818) hit this on its first project.

The harness now installs the project's committed dependencies before it migrates, as a user upgrading would have them. The install runs without the preview VP_VERSION and VP_OVERRIDE_PACKAGES overrides, so it reproduces the original dependency tree. A project without a usable lockfile falls back to a regular install. The test-pkg-pr-new-migrate skill describes the new step.

The lockfile deletion was added so a stale optional-peer copy of vite-plus (for example through vite-plugin-checker) would not survive the reinstall. In the rc.1 smoke test, which keeps the committed lockfile and installed dependencies, all 32 completed migrations resolved exactly one vite-plus (the preview build), one @voidzero-dev/vite-plus-core, and vitest@5.0.1. That includes a project that depends on vite-plugin-checker.

Validation against vite-plus-ecosystem-ci/Cookies-EU-banner at the same base commit (vite-plus@0.3.3, clean checkout without node_modules), using preview build 73ce44ef:

Harness Result
Before Exit 1, BLOCK [source-version], no files changed
After Exit 0, migrated to the preview build; one version each of vite-plus, @voidzero-dev/vite-plus-core, and vitest

test-pkg-pr-new-migrate.sh deleted the root lockfile and node_modules
before running vp migrate. The Vitest 5 migration reads the original
Vitest version from the lockfile or node_modules, so projects on a
0.x release blocked with "Cannot determine the original Vitest
version" and no files changed.

Install the committed dependencies first, as a user upgrading would
have them, without the preview overrides. Fall back to a regular
install when the lockfile cannot be used.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-migrate-harness-install-lockfile-viteplus-dev.voidzero-docs.workers.dev (commit de4da27)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://41ce1306-viteplus-dev.voidzero-docs.workers.dev de4da27 2026-09-26T03:30:52.395Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://377c3ba5-viteplus-dev.voidzero-docs.workers.dev d0b4de4 2026-09-25T16:25:47.915Z Visit the dashboard ↗

@wan9chi
wan9chi requested review from cpojer and fengmk2 September 26, 2026 03:24
@wan9chi
wan9chi merged commit 5c08a72 into main Sep 26, 2026
49 checks passed
@wan9chi
wan9chi deleted the fix/migrate-harness-install-lockfile branch September 26, 2026 03:38
wan9chi added a commit that referenced this pull request Sep 26, 2026
Task cache settings now live under `cache`, and `vp migrate` moves
existing task settings for you. `vp lint` and `vp fmt` run from a
package directory now pick the same config as your editor, and piped
`vp` output exits cleanly.

### Breaking Changes

Task cache settings in `run.tasks` now go inside `cache`
([#2813](#2813),
[#2814](#2814),
[#2823](#2823),
[vite-task#749](voidzero-dev/vite-task#749)), by
@wan9chi.

| Old (top level of a task) | New |
| --- | --- |
| `env` | `cache.env` |
| `untrackedEnv` | `cache.untrackedEnv` |
| `input` | `cache.input` |
| `output` | `cache.output` |

`cache: true` is the same as `cache: {}`. After upgrading, a task that
still uses the old top-level fields fails with an error that points to
`vp migrate`. Run `vp migrate` to move the fields in `vite.config.*` for
the workspace root and every package. It warns about tasks in
`vite.config.*` that it cannot rewrite safely. Tasks created in other
modules, such as by a shared helper function, are not detected, so move
their fields by hand; the error lists every task that still needs it.
Projects whose tasks do not use these fields need no changes. See the
[task cache migration
rules](https://viteplus.dev/guide/migrate-rules#task-cache-configuration)
and the [`cache` reference](https://viteplus.dev/config/run#cache).

### Highlights

- `vp lint` and `vp fmt` run from a package directory now use the same
config as Oxlint, Oxfmt, and the language server, so results match your
editor. `vp check` still applies the workspace-root settings
([#2807](#2807)), by
@fengmk2.
- Global `vp` commands now exit cleanly when piped into a command that
closes early, such as `vp --version | head -n 1`, instead of aborting
with exit code 134
([#2785](#2785),
[#2793](#2793)), by
@naokihaba.
- Cached tasks on macOS no longer intermittently fail with `oils I/O
error (main): No such process`
([vite-task#703](voidzero-dev/vite-task#703)),
by @lifeiscontent.

### Features

- The bundled tools update `vite@8.3.0` -> `vite@8.3.1`,
`rolldown@1.2.9` -> `rolldown@1.2.11`, and `oxlint-tsgolint@7.0.2002` ->
`oxlint-tsgolint@7.0.2003`
([#2805](#2805),
[#2812](#2812)), by
@voidzero-guard[bot].

### Fixes & Enhancements

- Async `defineConfig` callbacks now type-check lint and format options,
such as `'warn'` rule severities, the same way as synchronous callbacks,
so configs updated by `vp migrate` no longer fail with `TS2769`
([#2803](#2803)), by
@TheAlexLichter.
- `vp test --help` now lists the Vitest 5 options `--repeats`,
`--injectCjsGlobals`, `--fsModuleCache`, `--fsModuleCachePath`, and
`--sharedViteServer`
([#2809](#2809)), by
@Marve10s.
- On Windows, `vp run` now matches environment variable names regardless
of letter case
([vite-task#747](voidzero-dev/vite-task#747)),
by @wan9chi.

### Docs

- The copy prompt dialog no longer nests scroll areas and shows clearer
copy feedback
([#2794](#2794),
[#2799](#2799)), by
@liangmiQwQ and @Boshen.

### Chore

- Snapshot tests share prepared packages and one Chromium process, run
faster on every platform, and no longer read the live npm registry in
the standalone npm fallback case
([#2771](#2771),
[#2786](#2786),
[#2797](#2797)), by
@fengmk2 and @voidzero-guard[bot].
- The snapshot setup check links the local `vite-plus` package into its
reference home instead of installing the version under release from npm,
so it passes before that version is published
([#2819](#2819)), by
@wan9chi.
- The preview migration harness installs a project's committed
dependencies before running `vp migrate`, so the Vitest 5 migration can
read the original Vitest version
([#2822](#2822)), by
@wan9chi.
- The standalone install workflow loads the generated environment before
running `vp env doctor`
([#2790](#2790)), by
@naokihaba.

### Bundled Versions

| Tool | Version | Source |
| --- | --- | --- |
| vite | `8.3.1` |
[`39ddf7c`](vitejs/vite@39ddf7c)
|
| rolldown | `1.2.11` |
[`8df4219`](rolldown/rolldown@8df4219)
|
| tsdown | `0.23.0` | [npm](https://npmx.dev/package/tsdown/v/0.23.0) |
| vitest | `5.0.1` | [npm](https://npmx.dev/package/vitest/v/5.0.1) |
| oxlint | `1.85.0` | [npm](https://npmx.dev/package/oxlint/v/1.85.0) |
| oxlint-tsgolint | `7.0.2003` |
[npm](https://npmx.dev/package/oxlint-tsgolint/v/7.0.2003) |
| oxfmt | `0.70.0` | [npm](https://npmx.dev/package/oxfmt/v/0.70.0) |

### Upgrade

```bash
vp upgrade
```

### New Contributors

@Marve10s

**Full Changelog**:
v1.0.0-rc.0...v1.0.0-rc.1

---

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: wan9chi <me@wan9chi.com>
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.

2 participants