Skip to content

vp migrate beta test#23

Draft
fengmk2 wants to merge 1 commit into
minorfrom
vp-migrate-test
Draft

vp migrate beta test#23
fengmk2 wants to merge 1 commit into
minorfrom
vp-migrate-test

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread vite.config.ts
Comment on lines +1 to 3
import { configDefaults } from 'vite-plus'
import { playwright } from 'vite-plus/test/browser-playwright'
import { defineConfig } from 'vite-plus'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These imports from 'vite-plus' can be merged into a single import statement to improve readability and maintainability.

Suggested change
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'

Comment thread scripts/setup-vitest.ts
import type { MockInstance } from 'vitest'
import type { MockInstance } from 'vite-plus/test'

declare module 'vitest' {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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'.

@fengmk2 fengmk2 force-pushed the vp-migrate-test branch 2 times, most recently from 5ddae83 to 3f18727 Compare June 26, 2026 14:00
@fengmk2 fengmk2 force-pushed the vp-migrate-test branch from 3f18727 to e3ee791 Compare July 1, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant