vp migrate beta test#23
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the repository's build and testing configuration from vite and vitest to vite-plus and vite-plus/test. This includes updating package dependencies, configuring pnpm-workspace.yaml overrides, wrapping Vite plugins with lazyPlugins, and updating test imports across multiple packages. The review feedback suggests merging duplicate imports from 'vite-plus' in vite.config.ts and updating module augmentations in scripts/setup-vitest.ts and setupBrowser.ts to target 'vite-plus/test' and 'vite-plus/test/browser' respectively, ensuring custom matchers and selectors remain correctly typed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| import { configDefaults } from 'vite-plus' | ||
| import { playwright } from 'vite-plus/test/browser-playwright' | ||
| import { defineConfig } from 'vite-plus' |
There was a problem hiding this comment.
These imports from 'vite-plus' can be merged into a single import statement to improve readability and maintainability.
| import { configDefaults } from 'vite-plus' | |
| import { playwright } from 'vite-plus/test/browser-playwright' | |
| import { defineConfig } from 'vite-plus' | |
| import { configDefaults, defineConfig } from 'vite-plus' | |
| import { playwright } from 'vite-plus/test/browser-playwright' |
| import type { MockInstance } from 'vitest' | ||
| import type { MockInstance } from 'vite-plus/test' | ||
|
|
||
| declare module 'vitest' { |
There was a problem hiding this comment.
Since the imports have been migrated from 'vitest' to 'vite-plus/test', the module augmentation should be updated to target 'vite-plus/test' instead of 'vitest' to ensure the custom matchers are correctly typed for 'vite-plus/test' imports.
| declare module 'vitest' { | |
| declare module 'vite-plus/test' { |
| @@ -1,4 +1,4 @@ | |||
| import { type Locator, locators } from 'vitest/browser' | |||
| import { type Locator, locators } from 'vite-plus/test/browser' | |||
There was a problem hiding this comment.
Since the import has been migrated from 'vitest/browser' to 'vite-plus/test/browser', please also update the module augmentation on line 13 from declare module 'vitest/browser' to declare module 'vite-plus/test/browser'. This ensures that the custom selectors (like getByCSS) are correctly typed when importing from 'vite-plus/test/browser'.
5ddae83 to
3f18727
Compare
No description provided.