Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
info: Preparing Node.js and pnpm...
info: Installing dependencies...
✓ Dependencies installed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
⠿ Preparing Node.js and pnpm... <duration>
```

Expand All @@ -16,7 +16,7 @@ info: installing vite-plus@0.3.3...

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
⠿ Downloading pnpm <version>... <size> B (<size> B/s)
```

Expand All @@ -26,15 +26,15 @@ info: installing vite-plus@0.3.3...

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
⠿ Installing dependencies... <duration>
```

**← write-key:** `enter`

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
error: Setup error: Failed to install production dependencies (exit code: 17). See log for details: <workspace>/home/upgrade.log
Failure log preserves pnpm stdout and stderr.
After installation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
⠿ Preparing Node.js and pnpm... <duration>
```

Expand All @@ -16,7 +16,7 @@ info: installing vite-plus@0.3.3...

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
⠿ Downloading pnpm <version>... <size> B (<size> B/s)
```

Expand All @@ -26,15 +26,15 @@ info: installing vite-plus@0.3.3...

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
⠿ Installing dependencies... <duration>
```

**← write-key:** `enter`

```
Before installation: preserve this output.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
✓ Dependencies installed.
Setup:
Preparing vite-plus environment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Before installation: preserve this output.
Bootstrap stdout contains only shell assignments.
After installation.
info: installing vite-plus@0.3.3...
info: installing vite-plus@<version>...
info: Preparing Node.js and pnpm...
info: Installing dependencies...
✓ Dependencies installed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ stems, https:// URLs) survive.
steps = [
{ argv = ["vpt", "print-native-path", "src/index.ts", "dist/assets/app.js"], comment = "prints OS-native separators; the snapshot must show forward slashes on every OS" },
{ argv = ["vpt", "print", "dist/assets/index-Dra_-aT4.js 0.71 kB / gzip: 0.40 kB / total 1 MB"], comment = "sizes and hash suffixes are masked" },
{ argv = ["vpt", "print", "info: installing vite-plus@9.8.7-rc.6..."], comment = "standalone installer versions are masked" },
{ argv = ["vpt", "print", "keep vite-tsconfig.js and https://viteplus.dev/guide/ intact"], comment = "lowercase 8-letter stems and URLs survive redaction" },
]
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ sizes and hash suffixes are masked
dist/assets/index-<hash>.js <size> kB / gzip: <size> kB / total <size> MB
```

## `vpt print 'info: installing vite-plus@9.8.7-rc.6...'`

standalone installer versions are masked

```
info: installing vite-plus@<version>...
```

## `vpt print 'keep vite-tsconfig.js and https://viteplus.dev/guide/ intact'`

lowercase 8-letter stems and URLs survive redaction
Expand Down
13 changes: 13 additions & 0 deletions crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ static VP_VERSION_RE: LazyLock<regex::Regex> = LazyLock::new(|| {
)
.unwrap()
});
// Standalone installation progress prints the release version in
// `info: installing vite-plus@0.3.3...`. The value changes for every release,
// so mask only this status-line context and keep other `vite-plus@<version>`
// output available for assertions.
static VP_INSTALL_VERSION_RE: LazyLock<regex::Regex> = LazyLock::new(|| {
regex::Regex::new(
r"(installing vite-plus@)\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?",
)
.unwrap()
});
// `vp create`/`vp migrate` pin the exact resolved runtime and package-manager
// version into a scaffolded manifest's `devEngines` block (`{ "name": "yarn",
// "version": "4.17.0", ... }`, likewise pnpm/bun/node). Those track whatever
Expand Down Expand Up @@ -539,6 +549,9 @@ pub fn redact_output(
// (see VP_VERSION_RE), which bumps on every release.
output = VP_VERSION_RE.replace_all(&output, "${1}<version>").into_owned();

// Redact the release version in standalone installation progress output.
output = VP_INSTALL_VERSION_RE.replace_all(&output, "${1}<version>").into_owned();

// Redact scaffolded devEngines runtime/package-manager pins by name
// context (see DEV_ENGINES_VERSION_RE), which track upstream releases.
output = DEV_ENGINES_VERSION_RE.replace_all(&output, "${1}<version>").into_owned();
Expand Down
2 changes: 1 addition & 1 deletion crates/vp_global_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vp_global_cli"
version = "0.3.3"
version = "1.0.0-rc.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions docs/.vitepress/theme/data/migration-prompts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const localMigrationPrompt = `Without a global installation, run the target CLI through the package manager from the workspace root. For the 1.0.0 release, use \`pnpm dlx --package=vite-plus@1.0.0 vp migrate --no-interactive\` or \`npx --package=vite-plus@1.0.0 vp migrate --no-interactive\`. First run the same command with \`help migrate\` instead of \`migrate --no-interactive\` to read its help. These commands fetch the target CLI without replacing the old project dependencies first.`;
const localMigrationPrompt = `Without a global installation, run the target CLI through the package manager from the workspace root. For the 1.0.0-rc.0 release, use \`pnpm dlx --package=vite-plus@1.0.0-rc.0 vp migrate --no-interactive\` or \`npx --package=vite-plus@1.0.0-rc.0 vp migrate --no-interactive\`. First run the same command with \`help migrate\` instead of \`migrate --no-interactive\` to read its help. These commands fetch the target CLI without replacing the old project dependencies first.`;

const compatibilityReviewPrompt = `After establishing a passing baseline, try to remove the generated "Vitest v4 compatibility" settings with no code changes or small, localized fixes:

Expand Down Expand Up @@ -28,7 +28,7 @@ Use the CLI from the target Vite+ 1.0 release or its preview build. Use a suppor
- With a global vp installation, follow ${__DOCS_ORIGIN__}/guide/upgrade to select the target release and check \`vp toolchain --global\`. Run \`vp help\` and \`vp help migrate\`, then \`vp migrate --no-interactive\` from the workspace root.
- ${localMigrationPrompt}

Replace 1.0.0 with the intended release version. For a preview, use the version from its PR and pass \`--registry=https://registry-bridge.viteplus.dev\` to pnpm or npx before the vp command.
Replace 1.0.0-rc.0 with the intended release version. For a preview, use the version from its PR and pass \`--registry=https://registry-bridge.viteplus.dev\` to pnpm or npx before the vp command.

Do not run migration with an old project's node_modules/.bin/vp. Migrate monorepos from the workspace root so shared manifests, catalogs, overrides, and lockfiles remain consistent.

Expand Down Expand Up @@ -64,7 +64,7 @@ Use the CLI from the target Vite+ 1.0 release or its preview build. A global ins
- With a global vp installation, follow ${__DOCS_ORIGIN__}/guide/upgrade to upgrade it and check \`vp toolchain --global\`. Run \`vp help migrate\`, then \`vp migrate --no-interactive\` from the workspace root.
- ${localMigrationPrompt}

Replace 1.0.0 with the intended release version. For a preview, use the version from its PR and pass \`--registry=https://registry-bridge.viteplus.dev\` to pnpm or npx before the vp command. Do not run migration with the old project's node_modules/.bin/vp. Keep the existing project setup; do not use --full unless I request it.
Replace 1.0.0-rc.0 with the intended release version. For a preview, use the version from its PR and pass \`--registry=https://registry-bridge.viteplus.dev\` to pnpm or npx before the vp command. Do not run migration with the old project's node_modules/.bin/vp. Keep the existing project setup; do not use --full unless I request it.

Resolve BLOCK findings and rerun migration. Review each REVIEW finding using its documentation link, even if migration exits with success. Preserve test intent and keep the generated Vitest v4 and tsdown <0.23 compatibility settings and comments for the first validation run.

Expand All @@ -91,7 +91,7 @@ A global installation is optional. To install the global \`vp\` CLI when it is n

Open a new terminal after installation. Follow ${__DOCS_ORIGIN__}/guide/upgrade to select the target release or preview and check \`vp toolchain --global\` before scaffolding.

Without a global installation, use a supported Node.js runtime from the compatibility guide. For the 1.0.0 release, run \`pnpm dlx --package=vite-plus@1.0.0 vp create\` or \`npx --package=vite-plus@1.0.0 vp create\`. Replace 1.0.0 with the intended release version. For a preview, use the version from its PR and pass \`--registry=https://registry-bridge.viteplus.dev\` to pnpm or npx before the vp command.
Without a global installation, use a supported Node.js runtime from the compatibility guide. For the 1.0.0-rc.0 release, run \`pnpm dlx --package=vite-plus@1.0.0-rc.0 vp create\` or \`npx --package=vite-plus@1.0.0-rc.0 vp create\`. Replace 1.0.0-rc.0 with the intended release version. For a preview, use the version from its PR and pass \`--registry=https://registry-bridge.viteplus.dev\` to pnpm or npx before the vp command.

Run \`vp install\`, \`vp check\`, and \`vp test\`, then \`vp build\` for applications or \`vp pack\` for libraries. Without a global CLI, install with the project's package manager and run the local CLI through it, such as \`pnpm exec vp check\` or \`npm exec -- vp check\`. Explain how to use \`vp dev\` for the dev server and \`vp run <task>\` for project scripts or tasks. Report the setup changes, validation results, and any remaining work. Do not commit or push unless I ask.

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,21 @@ Upgrade the [global CLI](./upgrade.md#global-vp) to your target 1.0 release, the

### Without the Global CLI

Use an existing Node.js runtime that satisfies `^22.18.0 || ^24.11.0 || >=26.0.0`. Run the target migrator through your package manager without adding it to the project first. For the `1.0.0` release:
Use an existing Node.js runtime that satisfies `^22.18.0 || ^24.11.0 || >=26.0.0`. Run the target migrator through your package manager without adding it to the project first. For the `1.0.0-rc.0` release:

::: code-group

```bash [pnpm]
pnpm dlx --package=vite-plus@1.0.0 vp migrate --no-interactive
pnpm dlx --package=vite-plus@1.0.0-rc.0 vp migrate --no-interactive
```

```bash [npm]
npx --package=vite-plus@1.0.0 vp migrate --no-interactive
npx --package=vite-plus@1.0.0-rc.0 vp migrate --no-interactive
```

:::

Replace `1.0.0` with your target release. For a preview, use the version from the PR and pass `--registry=https://registry-bridge.viteplus.dev` to `pnpm` or `npx` before the `vp` command. Keep the version in `--package` explicit so you run the target migrator rather than the old local CLI.
Replace `1.0.0-rc.0` with your target release. For a preview, use the version from the PR and pass `--registry=https://registry-bridge.viteplus.dev` to `pnpm` or `npx` before the `vp` command. Keep the version in `--package` explicit so you run the target migrator rather than the old local CLI.

After migration, finish dependency installation and validate with the updated local CLI:

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/binding/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vite-plus-cli"
version = "0.3.3"
version = "1.0.0-rc.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
Loading
Loading