Enhancement: fall back to `.tool-versions` for the Node.js runtime
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
阅读src/core-open/scanners/node-scanner.ts中nodeRuntimeFromPins附近的代码,以及Python扫描器对.tool-versions的处理,然后检查test/node-runtime-pin.test.ts。为nodejs和node条目、被忽略的注释和空行、无法映射的令牌,以及所述优先级添加测试覆盖。完成标准是测试确认有效的 pin 会报告 Node 运行时滞后,且优先级更高的 pin 仍然优先。
由索引模型根据 Issue 内容生成。
描述
- Difficulty: small
- Area: Node / CLI UX (runtime lag)
Problem
#628 added volta.node, .nvmrc, and .node-version as fallbacks when engines.node is missing (nodeRuntimeFromPins in src/core-open/scanners/node-scanner.ts, around lines 104–128). The helper still does not read asdf/mise .tool-versions:
nodejs 20.11.1
# or:
node 20.11.1
Python, Ruby, and Elixir already read .tool-versions. A Node project that only pins the runtime there reports no runtime and no runtime lag.
Expected behaviour
When engines.node, volta.node, .nvmrc, and .node-version have not produced a runtime, read .tool-versions in the same directory as package.json. Accept a nodejs or node line. Use the first version token (reuse normalizeNodePin / the Python pythonVersionFromToolVersions pattern). Skip non-version tokens such as system, lts, or ref:… unless normalizeNodePin already maps them (it already maps some .nvmrc lts codenames — stay consistent). Comments and blank lines are ignored.
Precedence, first match wins: engines.node > volta.node > .nvmrc > .node-version > .tool-versions.
Acceptance
- Extend
test/node-runtime-pin.test.ts. - Only
.tool-versionswithnodejs 20.11.1ornode 20.11.1reports Node 20.11.1 and runtime lag. .nvmrcstill wins over.tool-versions.engines.nodestill wins over every pin file.- A
system(or otherwise unmappable).tool-versionsentry yields no runtime. - Comments and blank lines are ignored.
- 主要语言
- TypeScript
- 星标
- 4
- 派生
- 3
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 76
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vibgrate/cli 的其他 Issue
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
documentation Entwickler
难度 1/5 1 小时以内 新手友好度 89/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:frontend bug ci-test level:low priority:high
难度 2/5 1-3 小时 新手友好度 75/100
skytuhua-org/Gen-V1#2974 · 4 条评论 ·
维护者通常 2 天内回复
-
area: cli area: core priority: P3 type: bug
难度 2/5 1-3 小时 新手友好度 75/100
appandflow/stim#6736 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
naomiaro/waveform-playlist#973 ·
维护者通常 1 天内回复