Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(migrate): tolerate nested npm overrides during bootstrap detection

Đang mở
#2,002 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@fengmk2 đang làm issue này rồi.

Từ ngày 1/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug

detectVitePlusBootstrapPending assumes npm overrides values are strings, but npm supports nested override objects. A valid package.json such as this can throw during migration because the bootstrap detection calls string methods like .startsWith() on the override value:

{
  "overrides": {
    "vite": {
      "rollup": "..."
    }
  }
}

Expected behavior:

  • Migration should not crash when overrides.vite or overrides.vitest is a nested object.
  • Non-string override values should be treated as not satisfying the Vite+ override and then handled safely by the migration rewrite logic.
  • Add a regression test covering a nested npm override under a managed key.

Suggested test:

Create an npm fixture with nested overrides:

{
  "devDependencies": {
    "vite-plus": "0.1.x"
  },
  "overrides": {
    "vite": {
      "rollup": "^4.0.0"
    }
  }
}

Run:

vp migrate --no-interactive

Assert that migration completes or reports an actionable migration error, but does not throw a TypeError from bootstrap detection.

Ngôn ngữ chính
Rust
Star
5.8k
Fork
263
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
148

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của voidzero-dev/vite-plus

Tất cả issue của voidzero-dev/vite-plus

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.