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
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Options:
-f, --force Force reinstall all dependencies
--ignore-scripts Do not run lifecycle scripts
--no-lockfile Don't read or generate lockfile
--fix-lockfile Fix broken lockfile entries (pnpm and yarn@2+ only)
--fix-lockfile Fix broken lockfile entries (pnpm and yarn@4+ only)
--shamefully-hoist Create flat `node_modules` (pnpm only)
--resolution-only Re-run resolution for peer dependency analysis (pnpm only)
--silent Suppress output (silent mode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ should error because allow-build is not supported at pnpm@9
**Exit code:** 1

```
 ERROR  Unknown option: 'allow-build'
For help, run: pnpm help add
pnpm < 10.4.0 does not support --allow-build.
```

## `vp install test-vite-plus-package@1.0.0 --save-peer`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ steps = [
{ argv = ["vpt", "print-file", "package.json", "packages/app/package.json", "packages/utils/package.json", "pnpm-workspace.yaml"], continue-on-failure = true },
{ argv = ["vp", "add", "--filter", "app", "test-vite-plus-package-optional", "--save-catalog-name", "v1"], comment = "should error because save-catalog-name is not supported at pnpm@9", continue-on-failure = true },
{ argv = ["vp", "add", "--filter=./packages/utils", "test-vite-plus-package-optional", "-O", "--save-catalog", "v2"], comment = "should error because save-catalog is not supported at pnpm@9", continue-on-failure = true },
{ argv = ["vp", "install", "testnpm2", "--save-catalog"], comment = "The install alias must apply the add catalog version guard.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ should error because save-catalog-name is not supported at pnpm@9
**Exit code:** 1

```
 ERROR  Unknown option: 'save-catalog-name'
Did you mean 'save-optional'? Use "--config.unknown=value" to force an unknown option.
For help, run: pnpm help add
pnpm < 10.12.0 does not support --save-catalog-name.
```

## `vp add --filter=./packages/utils test-vite-plus-package-optional -O --save-catalog v2`
Expand All @@ -215,7 +213,17 @@ should error because save-catalog is not supported at pnpm@9
**Exit code:** 1

```
 ERROR  Unknown option: 'save-catalog'
Did you mean 'save-exact', or 'save-prod'? Use "--config.unknown=value" to force an unknown option.
For help, run: pnpm help add
pnpm < 10.12.0 does not support --save-catalog.
```

## `vp install testnpm2 --save-catalog`

The install alias must apply the add catalog version guard.

**Exit code:** 1

```
VITE+ - The Unified Toolchain for the Web

pnpm < 10.12.0 does not support --save-catalog.
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ steps = [
{ argv = ["vpt", "print-file", "package.json"], continue-on-failure = true },
{ argv = ["vp", "add", "test-vite-plus-package-optional", "--", "--tilde"], comment = "support pass through arguments" },
{ argv = ["vpt", "print-file", "package.json"], continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "yarn@2.4.2"], snapshot = false },
{ argv = ["vp", "add", "testnpm2", "--ignore-scripts"], comment = "Yarn 2 supports skip-builds for install, but not for add.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,16 @@ support pass through arguments
}
}
```

## `vpt json-edit package.json packageManager yarn@2.4.2`


## `vp add testnpm2 --ignore-scripts`

Yarn 2 supports skip-builds for install, but not for add.

**Exit code:** 1

```
yarn >= 2 && < 3 does not support --ignore-scripts.
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ steps = [
{ argv = ["vp", "pm", "list", "--find-by", "customFinder"], comment = "should use custom finder (pnpm-specific)", continue-on-failure = true },
{ argv = ["vp", "pm", "list", "--recursive"], comment = "should list packages recursively in workspace", continue-on-failure = true },
{ argv = ["vp", "pm", "list", "--", "--loglevel=warn"], comment = "should support pass through arguments", continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "pnpm@10.15.1"], snapshot = false },
{ argv = ["vp", "pm", "list", "--find-by", "customFinder"], comment = "Reject finders before pnpm 10.16.0.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,16 @@ testnpm2 1.0.1
devDependencies:
test-vite-plus-package 1.0.0
```

## `vpt json-edit package.json packageManager pnpm@10.15.1`


## `vp pm list --find-by customFinder`

Reject finders before pnpm 10.16.0.

**Exit code:** 1

```
pnpm < 10.16.0 does not support --find-by.
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ steps = [
{ argv = ["vpt", "rm", "-rf", "./dist"], continue-on-failure = true },
{ argv = ["vp", "pm", "pack", "--json", "--", "--loglevel=warn"], comment = "should support pass through arguments" },
{ argv = ["vpt", "rm", "-f", "command-pack-npm10-1.0.0.tgz"], snapshot = false, continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "npm@7.8.0"], snapshot = false },
{ argv = ["vp", "pm", "pack", "--filter", "app"], comment = "Reject workspace selection before npm 7.9.0.", continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "npm@7.17.0"], snapshot = false },
{ argv = ["vp", "pm", "pack", "--pack-destination", "dist"], comment = "Reject pack-destination before npm 7.18.0.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,29 @@ should support pass through arguments

## `vpt rm -f command-pack-npm10-1.0.0.tgz`


## `vpt json-edit package.json packageManager npm@7.8.0`


## `vp pm pack --filter app`

Reject workspace selection before npm 7.9.0.

**Exit code:** 1

```
npm < 7.9.0 does not support --filter.
```

## `vpt json-edit package.json packageManager npm@7.17.0`


## `vp pm pack --pack-destination dist`

Reject pack-destination before npm 7.18.0.

**Exit code:** 1

```
npm < 7.18.0 does not support --pack-destination.
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ steps = [
{ argv = ["vpt", "rm", "-f", "command-pack-pnpm10-1.0.0.tgz"], snapshot = false, continue-on-failure = true },
{ argv = ["vp", "pm", "pack", "--", "--loglevel=warn"], comment = "should support pass through arguments" },
{ argv = ["vpt", "rm", "-f", "command-pack-pnpm10-1.0.0.tgz"], snapshot = false, continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "pnpm@10.10.0"], snapshot = false },
{ argv = ["vp", "pm", "pack", "--recursive"], comment = "Reject recursive pack before pnpm 10.11.0.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,16 @@ command-pack-pnpm10-1.0.0.tgz

## `vpt rm -f command-pack-pnpm10-1.0.0.tgz`


## `vpt json-edit package.json packageManager pnpm@10.10.0`


## `vp pm pack --recursive`

Reject recursive pack before pnpm 10.11.0.

**Exit code:** 1

```
pnpm < 10.11.0 does not support --recursive.
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ steps = [
{ argv = ["vp", "pm", "publish", "--help"], comment = "should show help", continue-on-failure = true },
{ argv = ["vp", "pm", "publish", "--dry-run", "--", "--loglevel", "error"], comment = "should preview publish without actually publishing (uses npm publish --dry-run)", continue-on-failure = true },
{ argv = ["vp", "pm", "publish", "--dry-run", "--json", "--", "--ignore-scripts", "--loglevel", "error"], comment = "should preserve JSON output without publishing", continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "private", "true"], snapshot = false },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "npm@5.8.0"], snapshot = false },
{ argv = ["vp", "pm", "publish", "--dry-run"], comment = "Reject npm versions that publish despite dry-run. The package is private for safety.", continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "npm@9.4.2"], snapshot = false },
{ argv = ["vp", "pm", "publish", "--dry-run", "--provenance"], comment = "Reject provenance before npm 9.5.0.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,32 @@ should preserve JSON output without publishing
"bundled": []
}
```

## `vpt json-edit package.json private true`


## `vpt json-edit package.json packageManager npm@5.8.0`


## `vp pm publish --dry-run`

Reject npm versions that publish despite dry-run. The package is private for safety.

**Exit code:** 1

```
npm < 5.10.0 does not support --dry-run.
```

## `vpt json-edit package.json packageManager npm@9.4.2`


## `vp pm publish --dry-run --provenance`

Reject provenance before npm 9.5.0.

**Exit code:** 1

```
npm < 9.5.0 does not support --provenance.
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ vp = "global"
steps = [
{ argv = ["vp", "pm", "publish", "--help"], comment = "should show help", continue-on-failure = true },
{ argv = ["vp", "pm", "publish", "--dry-run", "--", "--loglevel", "error"], comment = "should preview publish without actually publishing (uses pnpm publish --dry-run)", continue-on-failure = true },
{ argv = ["vp", "pm", "publish", "--dry-run", "--json"], comment = "Reject pnpm 11.0.6, which silently omitted JSON output.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,13 @@ should preview publish without actually publishing (uses pnpm publish --dry-run)

```
```

## `vp pm publish --dry-run --json`

Reject pnpm 11.0.6, which silently omitted JSON output.

**Exit code:** 1

```
pnpm >= 11.0.0 && < 11.0.7 does not support --json.
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ steps = [
{ argv = ["vpt", "print-file", "package.json"], continue-on-failure = true },
{ argv = ["vp", "up", "testnpm2", "--latest"], comment = "should update to absolute latest version" },
{ argv = ["vpt", "print-file", "package.json"], continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "bun@1.3.14"], snapshot = false },
{ argv = ["vp", "update", "--prod"], comment = "Reject production dependency selection before Bun 1.4.", continue-on-failure = true },
{ argv = ["vp", "update", "--no-optional"], comment = "Reject optional dependency exclusion before Bun 1.4.", continue-on-failure = true },
{ argv = ["vp", "update", "--recursive"], comment = "Reject recursive updates before Bun 1.4.", continue-on-failure = true },
{ argv = ["vp", "update", "--filter", "app"], comment = "Reject filtered updates before Bun 1.4.", continue-on-failure = true },
{ argv = ["vp", "update", "--interactive", "--recursive"], comment = "Interactive updates use the same Bun version requirement.", continue-on-failure = true },
{ argv = ["vp", "update", "--interactive", "--filter", "app"], continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,64 @@ installed testnpm2@1.0.1
"packageManager": "bun@1.3.11"
}
```

## `vpt json-edit package.json packageManager bun@1.3.14`


## `vp update --prod`

Reject production dependency selection before Bun 1.4.

**Exit code:** 1

```
bun < 1.4 does not support --prod.
```

## `vp update --no-optional`

Reject optional dependency exclusion before Bun 1.4.

**Exit code:** 1

```
bun < 1.4 does not support --no-optional.
```

## `vp update --recursive`

Reject recursive updates before Bun 1.4.

**Exit code:** 1

```
bun < 1.4 does not support --recursive.
```

## `vp update --filter app`

Reject filtered updates before Bun 1.4.

**Exit code:** 1

```
bun < 1.4 does not support --filter.
```

## `vp update --interactive --recursive`

Interactive updates use the same Bun version requirement.

**Exit code:** 1

```
bun < 1.4 does not support --recursive.
```

## `vp update --interactive --filter app`

**Exit code:** 1

```
bun < 1.4 does not support --filter.
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ steps = [
{ argv = ["vp", "why", "test-vite-plus-package-optional", "--no-optional"], comment = "should exclude optional dependencies", continue-on-failure = true },
{ argv = ["vp", "why", "testnpm2", "--find-by", "customFinder"], comment = "should support find-by option (pnpm-specific)", continue-on-failure = true },
{ argv = ["vp", "why", "testnpm2", "--", "--reporter=silent"], comment = "should support pass through arguments", continue-on-failure = true },
{ argv = ["vp", "why", "--find-by", "customFinder"], comment = "Package names remain required even when a finder is supplied.", continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "pnpm@10.15.1"], snapshot = false },
{ argv = ["vp", "why", "testnpm2", "--find-by", "customFinder"], comment = "Reject finders before pnpm 10.16.0.", continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,31 @@ command-why-pnpm10@1.0.0 <workspace>
dependencies:
testnpm2 1.0.1
```

## `vp why --find-by customFinder`

Package names remain required even when a finder is supplied.

**Exit code:** 2

```
error: the following required arguments were not provided:
<PACKAGES>...

Usage: vp why --find-by <FINDER_NAME> <PACKAGES>... [-- <PASS_THROUGH_ARGS>...]

For more information, try '--help'.
```

## `vpt json-edit package.json packageManager pnpm@10.15.1`


## `vp why testnpm2 --find-by customFinder`

Reject finders before pnpm 10.16.0.

**Exit code:** 1

```
pnpm < 10.16.0 does not support --find-by.
```
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,31 @@ command-why-pnpm10@1.0.0 <workspace>
dependencies:
testnpm2 1.0.1
```

## `vp why --find-by customFinder`

Package names remain required even when a finder is supplied.

**Exit code:** 2

```
error: the following required arguments were not provided:
<PACKAGES>...

Usage: vp why --find-by <FINDER_NAME> <PACKAGES>... [-- <PASS_THROUGH_ARGS>...]

For more information, try '--help'.
```

## `vpt json-edit package.json packageManager pnpm@10.15.1`


## `vp why testnpm2 --find-by customFinder`

Reject finders before pnpm 10.16.0.

**Exit code:** 1

```
pnpm < 10.16.0 does not support --find-by.
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ steps = [
{ argv = ["vpt", "list-dir", "node_modules"], continue-on-failure = true },
{ argv = ["vp", "run", "install"], comment = "install again hit cache", continue-on-failure = true },
{ argv = ["vp", "run", "--last-details"], continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "npm@7.13.0"], snapshot = false },
{ argv = ["vp", "install", "--filter", "app"], comment = "Reject workspace selection before npm 7.14.0.", continue-on-failure = true },
{ argv = ["vpt", "json-edit", "package.json", "packageManager", "npm@8.0.0"], snapshot = false },
{ argv = ["vp", "install", "--workspace-root"], comment = "Reject workspace root inclusion before npm 8.1.0.", continue-on-failure = true },
]
Loading
Loading