-
Notifications
You must be signed in to change notification settings - Fork 232
fix(pm): fallback for Yarn Classic dedupe #2139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fengmk2
merged 1 commit into
voidzero-dev:main
from
jong-kyung:fix/yarn-classic-dedupe-fallback
Jul 10, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/bun/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "pm-dedupe-bun", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "bun@1.3.11" | ||
| } |
7 changes: 7 additions & 0 deletions
7
crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/npm/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "pm-dedupe-npm", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "npm@11.13.0" | ||
| } |
7 changes: 7 additions & 0 deletions
7
crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/pnpm/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "pm-dedupe-pnpm", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "pnpm@11.11.0" | ||
| } |
45 changes: 45 additions & 0 deletions
45
crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/snapshots.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| [[case]] | ||
| name = "pm_dedupe_npm" | ||
| vp = "global" | ||
| cwd = "npm" | ||
| steps = [ | ||
| { argv = ["vp", "dedupe", "--", "--json"], comment = "npm deduplicates dependencies" }, | ||
| { argv = ["vpt", "print-file", "package.json"], comment = "verify npm completed" }, | ||
| ] | ||
|
|
||
| [[case]] | ||
| name = "pm_dedupe_pnpm" | ||
| vp = "global" | ||
| cwd = "pnpm" | ||
| steps = [ | ||
| { argv = ["vp", "dedupe"], comment = "pnpm deduplicates dependencies" }, | ||
| { argv = ["vpt", "print-file", "package.json"], comment = "verify pnpm completed" }, | ||
| ] | ||
|
|
||
| [[case]] | ||
| name = "pm_dedupe_yarn" | ||
| vp = "global" | ||
| cwd = "yarn" | ||
| steps = [ | ||
| { argv = ["vp", "dedupe", "--", "--silent"], comment = "Yarn Classic falls back to install because install already deduplicates dependencies" }, | ||
| { argv = ["vpt", "print-file", "package.json"], comment = "verify Yarn Classic completed" }, | ||
| ] | ||
|
|
||
| [[case]] | ||
| name = "pm_dedupe_yarn_berry" | ||
| vp = "global" | ||
| cwd = "yarn_berry" | ||
| env = { YARN_ENABLE_TELEMETRY = "0" } | ||
| steps = [ | ||
| { argv = ["vp", "dedupe", "--", "--json"], comment = "Yarn Berry deduplicates dependencies" }, | ||
| { argv = ["vpt", "print-file", "package.json"], comment = "verify Yarn Berry completed" }, | ||
| ] | ||
|
|
||
| [[case]] | ||
| name = "pm_dedupe_bun" | ||
| vp = "global" | ||
| cwd = "bun" | ||
| steps = [ | ||
| { argv = ["vp", "dedupe", "--", "--silent"], comment = "Bun falls back to install because it does not support dedupe" }, | ||
| { argv = ["vpt", "print-file", "package.json"], comment = "verify Bun completed" }, | ||
| ] |
23 changes: 23 additions & 0 deletions
23
...cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/snapshots/pm_dedupe_bun.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # pm_dedupe_bun | ||
|
|
||
| ## `vp dedupe -- --silent` | ||
|
|
||
| Bun falls back to install because it does not support dedupe | ||
|
|
||
| ``` | ||
| warn: bun does not support dedupe, falling back to bun install | ||
| ``` | ||
|
|
||
| ## `vpt print-file package.json` | ||
|
|
||
| verify Bun completed | ||
|
|
||
| ``` | ||
| { | ||
| "name": "pm-dedupe-bun", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "bun@1.3.11" | ||
| } | ||
| ``` |
50 changes: 50 additions & 0 deletions
50
...cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/snapshots/pm_dedupe_npm.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # pm_dedupe_npm | ||
|
|
||
| ## `vp dedupe -- --json` | ||
|
|
||
| npm deduplicates dependencies | ||
|
|
||
| ``` | ||
| { | ||
| "add": [], | ||
| "added": 0, | ||
| "audited": 1, | ||
| "change": [], | ||
| "changed": 0, | ||
| "funding": 0, | ||
| "remove": [], | ||
| "removed": 0, | ||
| "audit": { | ||
| "vulnerabilities": { | ||
| "info": 0, | ||
| "low": 0, | ||
| "moderate": 0, | ||
| "high": 0, | ||
| "critical": 0, | ||
| "total": 0 | ||
| }, | ||
| "dependencies": { | ||
| "prod": 1, | ||
| "dev": 0, | ||
| "optional": 0, | ||
| "peer": 0, | ||
| "peerOptional": 0, | ||
| "total": 0 | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## `vpt print-file package.json` | ||
|
|
||
| verify npm completed | ||
|
|
||
| ``` | ||
| { | ||
| "name": "pm-dedupe-npm", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "npm@11.13.0" | ||
| } | ||
| ``` |
23 changes: 23 additions & 0 deletions
23
...li_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/snapshots/pm_dedupe_pnpm.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # pm_dedupe_pnpm | ||
|
|
||
| ## `vp dedupe` | ||
|
|
||
| pnpm deduplicates dependencies | ||
|
|
||
| ``` | ||
| Already up to date | ||
| ``` | ||
|
|
||
| ## `vpt print-file package.json` | ||
|
|
||
| verify pnpm completed | ||
|
|
||
| ``` | ||
| { | ||
| "name": "pm-dedupe-pnpm", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "pnpm@11.11.0" | ||
| } | ||
| ``` |
23 changes: 23 additions & 0 deletions
23
...li_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/snapshots/pm_dedupe_yarn.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # pm_dedupe_yarn | ||
|
|
||
| ## `vp dedupe -- --silent` | ||
|
|
||
| Yarn Classic falls back to install because install already deduplicates dependencies | ||
|
|
||
| ``` | ||
| warn: Yarn Classic dedupes during install, falling back to yarn install | ||
| ``` | ||
|
|
||
| ## `vpt print-file package.json` | ||
|
|
||
| verify Yarn Classic completed | ||
|
|
||
| ``` | ||
| { | ||
| "name": "pm-dedupe-yarn", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "yarn@1.22.22" | ||
| } | ||
| ``` |
22 changes: 22 additions & 0 deletions
22
...pshots/tests/cli_snapshots/fixtures/pm_dedupe/snapshots/pm_dedupe_yarn_berry.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # pm_dedupe_yarn_berry | ||
|
|
||
| ## `vp dedupe -- --json` | ||
|
|
||
| Yarn Berry deduplicates dependencies | ||
|
|
||
| ``` | ||
| ``` | ||
|
|
||
| ## `vpt print-file package.json` | ||
|
|
||
| verify Yarn Berry completed | ||
|
|
||
| ``` | ||
| { | ||
| "name": "pm-dedupe-yarn-berry", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "yarn@4.12.0" | ||
| } | ||
| ``` |
7 changes: 7 additions & 0 deletions
7
crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/yarn/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "pm-dedupe-yarn", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "yarn@1.22.22" | ||
| } |
7 changes: 7 additions & 0 deletions
7
crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/pm_dedupe/yarn_berry/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "pm-dedupe-yarn-berry", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "license": "MIT", | ||
| "packageManager": "yarn@4.12.0" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.