Revert bundling Vitest directly inside Vite+

オープン
#2,401 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
javascript

調査の方向性

まず Vite+ のパッケージエクスポートと依存関係のオーバーライド設定を追跡し、次に npm のエイリアス例および以前の @voidzero-dev/vite-plus-test のセットアップと比較します。vitest パッケージをインポートする、またはプログラムから使用するインテグレーションが、vite-plus/test への移行を必要とせずに Vite+ で解決されれば完了です。

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

説明

pending triage
Description

Currently, there is no way to add an import subpath as a package override (example below)

{
    "devDependencies": {
        "vitest": "npm:vite-plus@0.2.8/test" // doesn't work!
    }
}

This means that, despite supposedly being compatible with Vitest, packages and integrations may break now due to the absence of a vitest package to import from.

Suggested solution

The old setup of overriding vitest with @voidzero-dev/vite-plus-test worked fine for this purpose. I propose that we bring it back, at least temporarily, if the Vite+ core team is dead set on bundling it. This way, integrations that check for the vitest package still work with Vite+.

Alternative

Alternatives include migrating the entire ecosystem to use the vite-plus/test export which seems unlikely to happen (and also would break compatibility with vanilla Vitest unless packages have to check for both exports, which is another optional peer dependency required to be declared).

Additional context

This isn't as much of a problem for Vite, tsdown, Rolldown, and Oxlint because their requirements are type-level imports or (in the case of Vite) is already bypassed by overriding the vite package. On the other hand, some Vitest reporters rely on extending existing reporters or programmatically running Vitest, which isn't covered in the current export model.

Validations
  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.
主要言語
Rust
スター
5.8k
フォーク
263
平均マージ
22時間 44分
マージ済み PR(30日)
134

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

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

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

似ている issue

Rust の issue をもっと見る

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

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