`devEngines.runtime.version: "lts/*"` is accepted without a warning
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
用 grep 搜索 issue 引用的两个字符串——is not a valid semver range 以及已经对裸 lts 触发的现有警告 invalid version ... in devEngines.runtime, ignoring——以找到 devEngines.runtime.version 的验证路径。阅读 rfcs/dev-engines.md 了解所需消息,然后检查为什么 lts/* 会跳过拒绝 lts 的 semver-range 检查。用所报告的 package.json 和 vp env default node@22 复现,并添加一个测试,断言 lts/* 会发出警告并回退到默认值。完成意味着警告会打印出来,并且 node -v 显示所固定的默认值。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
rfcs/dev-engines.md says LTS aliases are not valid in devEngines.runtime.version and should warn:
devEngines.runtime.version "lts/*" is not a valid semver range (see devEngines spec)
lts/* is silently resolved to the latest LTS instead. Bare lts is rejected as expected.
devEngines.runtime.version |
Result (default: 22.23.3) |
|---|---|
lts/* |
v24.21.0, no warning |
lts |
warning: invalid version 'lts' in devEngines.runtime, ignoring → v22.23.3 |
pnpm rejects both (ERR_PNPM_BAD_RUNTIME_VERSION), so a project that works with vp fails on pnpm install.
Reproduction
See steps below.
Steps to reproduce
mkdir repro && cd repro
echo '{ "devEngines": { "runtime": { "name": "node", "version": "lts/*", "onFail": "error" } } }' > package.json
vp env default node@22
node -v # v24.21.0, expected a warning and v22.23.3
System Info
$ vp env current
Node.js:
Version 24.21.0
Source devEngines.runtime
Bin Path /home/nodejs/.local/share/vite-plus/js_runtime/node/24.21.0/bin/node
Installed true
Mode managed
$ vp --version
vp v1.0.0
Used Package Manager
pnpm
Logs
No response
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
- 主要语言
- Rust
- 星标
- 6k
- 派生
- 274
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 196
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-plus 的其他 Issue
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package manager可能已有人在做 @Crimson341 于 1 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 70/100
voidzero-dev/vite-plus#2970 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
voidzero-dev/vite-plus#2097 · 10 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
vp treats a nested project as part of the parent's pnpm workspace, ignoring its own packageManager and lockfile可能已有人在做 @liangmiQwQ 今天认领。 未关闭bug enhancement
voidzero-dev/vite-plus#3013 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognized可能已有人在做 @fengmk2 于 1 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 30/100
voidzero-dev/vite-plus#2984 · 1 条评论 ·
维护者通常 1 天内回复
-
Accept arguments before command name (e.g. `vp -r run`)可能重新可做 关联的 PR 已关闭且未合并。 未关闭pending triage
难度 3/5 1-2 天 新手友好度 40/100
voidzero-dev/vite-plus#2983 ·
维护者通常 1 天内回复
查看 voidzero-dev/vite-plus 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
extendr/extendr.github.io#134 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
bgreenwell/xleak#90 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 76/100
cloudflare/boring#530 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
project-robius/robrix#1154 ·
维护者通常 1 天内回复