-
Notifications
You must be signed in to change notification settings - Fork 263
fix(migrate): don't add playwright when @playwright/test exists #2637
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
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
61ccbb4
fix(migrate): don't add playwright when @playwright/test exists
yusuke99 d01e422
test(migrate): ensure playwright is not added when @playwright/test e…
yusuke99 ac1e52c
chore(migrate): update snapshot
yusuke99 03f54a8
chore: restored original snapshot
yusuke99 07cbdf9
test(migrate): added @playwright/test snapshot case
yusuke99 f2e1492
Merge branch 'main' into fix/migrate-playwright
fengmk2 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
19 changes: 19 additions & 0 deletions
19
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_playwright_test/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,19 @@ | ||
| { | ||
| "name": "playwright-test-app", | ||
| "private": true, | ||
| "devDependencies": { | ||
| "@playwright/test": "1.60.0", | ||
| "@vitest/browser-playwright": "4.1.10", | ||
| "@vitest/coverage-v8": "4.1.10", | ||
| "vite": "catalog:", | ||
| "vite-plus": "catalog:", | ||
| "vitest": "catalog:" | ||
| }, | ||
| "devEngines": { | ||
| "packageManager": { | ||
| "name": "pnpm", | ||
| "version": "11.1.1", | ||
| "onFail": "download" | ||
| } | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
..._cli_snapshots/tests/cli_snapshots/fixtures/migration_playwright_test/pnpm-workspace.yaml
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,16 @@ | ||
| packages: | ||
| - . | ||
| catalog: | ||
| vite: npm:@voidzero-dev/vite-plus-core@latest | ||
| vite-plus: latest | ||
| vitest: 4.1.10 | ||
| overrides: | ||
| vite: 'catalog:' | ||
| vitest: 'catalog:' | ||
| peerDependencyRules: | ||
| allowAny: | ||
| - vite | ||
| - vitest | ||
| allowedVersions: | ||
| vite: '*' | ||
| vitest: '*' |
8 changes: 8 additions & 0 deletions
8
...es/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_playwright_test/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,8 @@ | ||
| [[case]] | ||
| name = "migration_playwright_test" | ||
| vp = "global" | ||
| steps = [ | ||
| { argv = ["vp", "migrate", "--no-interactive"], comment = "existing Vite+ upgrade: @playwright/test should remain without adding a direct playwright dependency", continue-on-failure = true }, | ||
| { argv = ["vpt", "print-file", "package.json"], comment = "@vitest/browser-playwright and @vitest/coverage-v8 should become catalog:", continue-on-failure = true }, | ||
| { argv = ["vpt", "print-file", "pnpm-workspace.yaml"], comment = "the default catalog should own the aligned @vitest/* packages", continue-on-failure = true }, | ||
| ] |
70 changes: 70 additions & 0 deletions
70
...shots/fixtures/migration_playwright_test/snapshots/migration_playwright_test.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,70 @@ | ||
| # migration_playwright_test | ||
|
|
||
| ## `vp migrate --no-interactive` | ||
|
|
||
| existing Vite+ upgrade: @playwright/test should remain without adding a direct playwright dependency | ||
|
|
||
| ``` | ||
| VITE+ - The Unified Toolchain for the Web | ||
|
|
||
| ◇ Updated . to Vite+ <version> | ||
| • Node <version> pnpm <version> | ||
| • Dependencies: | ||
| vite-plus latest → <version> | ||
| vite → <version> | ||
| vitest 4.1.10 → <version> | ||
| @vitest/browser-playwright 4.1.10 → <version> | ||
| @vitest/coverage-v8 4.1.10 → <version> | ||
| • Package manager settings configured | ||
| ``` | ||
|
|
||
| ## `vpt print-file package.json` | ||
|
|
||
| @vitest/browser-playwright and @vitest/coverage-v8 should become catalog: | ||
|
|
||
| ``` | ||
| { | ||
| "name": "playwright-test-app", | ||
| "private": true, | ||
| "devDependencies": { | ||
| "@playwright/test": "1.60.0", | ||
| "@vitest/browser-playwright": "catalog:", | ||
| "@vitest/coverage-v8": "catalog:", | ||
| "vite": "catalog:", | ||
| "vite-plus": "catalog:", | ||
| "vitest": "catalog:" | ||
| }, | ||
| "devEngines": { | ||
| "packageManager": { | ||
| "name": "pnpm", | ||
| "version": "<version>", | ||
| "onFail": "download" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## `vpt print-file pnpm-workspace.yaml` | ||
|
|
||
| the default catalog should own the aligned @vitest/* packages | ||
|
|
||
| ``` | ||
| packages: | ||
| - . | ||
| catalog: | ||
| vite: npm:@voidzero-dev/vite-plus-core@<version> | ||
| vite-plus: <version> | ||
| vitest: <version> | ||
| '@vitest/browser-playwright': <version> | ||
| '@vitest/coverage-v8': <version> | ||
| overrides: | ||
| vite@*: 'catalog:' | ||
| vitest@*: 'catalog:' | ||
| peerDependencyRules: | ||
| allowAny: | ||
| - vite | ||
| - vitest | ||
| allowedVersions: | ||
| vite: '*' | ||
| vitest: '*' | ||
| ``` |
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
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
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
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.