`vite-plus/test/browser-playwright` types import `playwright`, which vite-plus does not declare, so provider options go unchecked under pnpm
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- playwright, typescript
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Bắt đầu với vite-plus/dist/test/browser-playwright.d.ts và metadata của package kiểm soát các peer dependency của nó. Thêm playwright dưới dạng peer tùy chọn, sau đó chạy quy trình tái hiện được cung cấp bằng pnpm và vp check để xác nhận rằng các contextOptions không hợp lệ bị từ chối và các kiểu khai báo được phân giải chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
vite-plus/dist/test/browser-playwright.d.ts imports types from playwright:
import { Page, Frame, FrameLocator, BrowserContext, CDPSession, Browser, LaunchOptions, ConnectOptions, BrowserContextOptions } from 'playwright';
vite-plus doesn't declare playwright as a dependency or a peer. It only declares @vitest/browser-playwright as an optional peer. With pnpm's isolated layouts (confirmed with virtualStoreType: global), vite-plus's own slot therefore has no playwright, and TypeScript can't resolve the import. With skipLibCheck: true (the usual setting), the Playwright types in the provider's declarations silently lose their meaning:
playwright({ contextOptions })is unchecked, socontextOptions: { reducedMotion: "bogus" }compiles;cdp().send(...), typed through theCDPSessionaugmentation, is error-typed, so type-aware Oxlint reportsno-unsafe-callon every call.
Repro
- A pnpm project with
virtualStoreType: globaland[email protected],[email protected]and@vitest/[email protected]as devDependencies. - In
vite.config.ts:provider: playwright({ contextOptions: { reducedMotion: "bogus" } })fromvite-plus/test/browser-playwright. vp checkpasses.lsvite-plus's slot (<store>/links/@/vite-plus/1.0.0/<hash>/node_modules/):vitest,vite,oxlint… but noplaywright.
Proposal
Declare playwright as an optional peer of vite-plus, the way @vitest/browser-playwright already is:
"peerDependencies": { "playwright": "*" },
"peerDependenciesMeta": { "playwright": { "optional": true } }
Workaround: a .pnpmfile.mjs readPackage hook that adds that optional peer to vite-plus. With it, playwright is linked into vite-plus's slot, and vp check rejects reducedMotion: "bogus" with TS2322: Type '"bogus"' is not assignable to type '"no-preference" | "reduce" | null | undefined'.
Versions: vite-plus 1.0.0, pnpm 12.8.1, playwright 1.63.0, TypeScript 7.0.2, macOS.
- Ngôn ngữ chính
- Rust
- Star
- 6k
- Fork
- 274
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 196
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-plus
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package managerCó thể đã có người làm @Crimson341 đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
voidzero-dev/vite-plus#2970 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/vite-plus#2882 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
voidzero-dev/vite-plus#2097 · 10 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vp treats a nested project as part of the parent's pnpm workspace, ignoring its own packageManager and lockfileCó thể đã có người làm @liangmiQwQ đã nhận hôm nay. Đang mởbug enhancement
voidzero-dev/vite-plus#3013 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedCó thể đã có người làm @fengmk2 đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
voidzero-dev/vite-plus#2984 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
proxy: SQL-over-HTTP turns empty arrays into [""] or [false], or HTTP 500 for int and float arraysĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
neondatabase/neon#12965 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
goauthentik/authentik#26867 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
api bug macos maintainer-needed p2 triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eclipse-zenoh/zenoh#2842 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày