Yarn command gates use the launcher version instead of the version selected by yarnPath
Maintainer thường phản hồi trong vòng 1 ngày
@jong-kyung đang làm issue này rồi.
Từ ngày 3/11/2026.
- #3329 của @voidzero-bot — đã đóng, không merge
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
Vite+ selects Yarn behavior from the version in packageManager, which is the launcher it downloads. However, the launcher hands the command to the release in yarnPath unless ignorePath or YARN_IGNORE_PATH disables that delegation. When the two versions differ, Vite+ makes its decision for a version that does not run the command.
The most serious result is a silent false success. With packageManager: "[email protected]" and yarnPath pointing to Yarn 3.8.7, vp unlink prints a warning and exits with code 0, but the portal: resolution stays in package.json. Running the same launcher directly removes it. This was found in the review of #3286.
Reproduction
These steps need the unlink gate from #3286.
- Set
"packageManager": "[email protected]"inpackage.json. - Copy
bin/yarn.jsfrom@yarnpkg/[email protected]to.yarn/releases/yarn-3.8.7.cjs. - Create
.yarnrc.ymlwithnodeLinker: node-modulesandyarnPath: .yarn/releases/yarn-3.8.7.cjs. - Run
vp install. - Create
../linked-lib/package.jsonwith the namelinked-lib, then runvp link ../linked-lib. - Run
vp unlink linked-lib.
Expected: Yarn 3 removes the linked-lib resolution from package.json.
Actual: Vite+ prints this warning and exits with code 0, and the resolution stays.
warn: yarn unlink requires Yarn Classic or yarn >= 3.0.0. Skipping.
Affected checks
| Result of a mismatch | Checks | Launcher and effective version | Source |
|---|---|---|---|
| Skips a supported command | unlink, patch-commit --save (Yarn 3) |
2.x and 3 or later | #3286 |
| Skips a supported command | audit (Yarn 2.4) |
Below 2.4 and 2.4 or later | #3286 |
| Skips a supported command | patch, patch-commit, rebuild, whoami |
Classic and Berry | main |
| Skips a supported command | list, licenses, team |
Berry and Classic | main |
| Falls back to npm | stage (Yarn 4.16) |
Below 4.16 and 4.16 or later | main |
| Rejects a supported option | not_supported(yarn ...) rules with version conditions |
Depends on the rule | Mostly main |
| Builds arguments for the wrong Yarn family | is_berry() branches |
Classic and Berry | main |
| Sends a setting the effective Yarn rejects | YARN_ENABLE_TIPS in resolve_for_manager |
4.x and 2.x or 3.x | main |
This table comes from reading the code. Only the Yarn 2 launcher delegating to Yarn 3 has been reproduced end to end. The Classic and Berry rows, and whether the Classic launcher delegates in the same way, still need to be confirmed.
Possible direction
An earlier attempt in #3286 (eb4b2c713) ran yarn --version before every Yarn command. It is accurate because Yarn applies its own configuration rules, but it adds a process to every command.
A cheaper option is to resolve with the launcher version first and query the effective version only when Vite+ declines the request, which means a Noop, an InvalidArgument, or a FallbackCommand diagnostic. If the query reports a different version, Vite+ resolves again. Commands that run need no query because Yarn reports its own errors.
This option would not fix the is_berry() argument branches or YARN_ENABLE_TIPS, because those affect commands that do run. Reading the version from the yarnPath file name avoids a process, but the name can be arbitrary, and it would not account for parent or home configuration files or environment overrides.
- Ngôn ngữ chính
- Rust
- Star
- 6.5k
- Fork
- 297
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 245
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
-
triage: failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
voidzero-dev/vite-plus#3360 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage: not actionable
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
voidzero-dev/vite-plus#3296 · 1 bình luận · 1 reaction ·
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 63/100
voidzero-dev/vite-plus#3235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and laterCó thể đã có người làm @kshanxs đã nhận 13 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
voidzero-dev/vite-plus#3219 · 2 bình luận · 1 reaction ·
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
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
ScoopInstaller/Extras#19275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:plugins kind:bug priority:p2 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority: medium ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
storytold/gridcraft#3496 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bip39: Mnemonic::new_from_phrase rejects phrases with extra or non-space whitespaceCó thể đã có người làm @chukwudiikeh đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày