Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`vite-plus/test/browser-playwright` types import `playwright`, which vite-plus does not declare, so provider options go unchecked under pnpm

クローズ 初心者向け
#2,854 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@liangmiQwQ がすでに取り組んでいます。

2026年10月2日 から。

  • #2865 @liangmiQwQ による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
playwright, typescript

調査の方向性

vite-plus/dist/test/browser-playwright.d.ts と、その peer 依存関係を制御するパッケージメタデータから始めます。playwright をオプションの peer として追加し、次に提供された pnpm の再現手順と vp check を実行して、無効な contextOptions が拒否され、宣言型が正しく解決されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

pending triage

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, so contextOptions: { reducedMotion: "bogus" } compiles;
  • cdp().send(...), typed through the CDPSession augmentation, is error-typed, so type-aware Oxlint reports no-unsafe-call on every call.

Repro

  1. A pnpm project with virtualStoreType: global and [email protected], [email protected] and @vitest/[email protected] as devDependencies.
  2. In vite.config.ts: provider: playwright({ contextOptions: { reducedMotion: "bogus" } }) from vite-plus/test/browser-playwright.
  3. vp check passes.
  4. ls vite-plus's slot (<store>/links/@/vite-plus/1.0.0/<hash>/node_modules/): vitest, vite, oxlint… but no playwright.

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.

主要言語
Rust
スター
6k
フォーク
274
平均マージ
1日 13時間
マージ済み PR(30日)
195

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

voidzero-dev/vite-plus のほかの issue

voidzero-dev/vite-plus の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。