Add basic support for Yarn Berry (v2+) lockfiles
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 62/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, python
调研方向
Start with the _yarn_entries parser in backend/app/scanners/analyzers/javascript.py and read how it currently handles Yarn Classic entries, including the __metadata block that Berry files add. Then read backend/tests/scanners/test_javascript_analyzer.py to see the existing Classic fixtures you must keep passing. Done means a representative Berry fixture yields correct scoped and unscoped versions and dependencies, __metadata is skipped, malformed entries stay unresolved, and the focused analyzer tests pass.
由索引模型根据 Issue 内容生成。
描述
Summary
The current _yarn_entries parser in backend/app/scanners/analyzers/javascript.py is structured around Yarn Classic lockfiles. Yarn Berry (v2+) uses a YAML-style lockfile with __metadata and selectors such as package@npm:^version, so packages and their relationships may not be inventoried correctly.
Affected files
backend/app/scanners/analyzers/javascript.pybackend/tests/scanners/test_javascript_analyzer.py
Scope
Add basic parsing for representative Yarn Berry lockfiles while retaining Yarn Classic behavior. Keep malformed or unsupported entries unresolved instead of guessing versions.
Acceptance criteria
- Yarn Berry package entries are recognized.
- The
__metadatamapping is not treated as a package. - Resolved versions are extracted from supported entries for scoped and unscoped packages.
- Regular dependency relationships are captured.
- Yarn Classic lockfiles continue to parse as before.
- A representative Berry fixture and focused tests cover scoped/unscoped entries, dependencies, metadata handling, and malformed input.
- No package version is invented when the lockfile entry cannot be parsed.
Testing expectations
Run the focused JavaScript analyzer tests and the relevant backend scanner tests. Include regression coverage for existing Yarn Classic fixtures.
- 主要语言
- Python
- 星标
- 2
- 派生
- 1
- 平均合并
- 1 小时 22 分钟
- 30 天内合并 PR
- 2
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ayushdoesdev/verspect 的其他 Issue
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 82/100
ayushdoesdev/verspect#5 ·
-
enhancement good first issue
难度 3/5 1-2 天 新手友好度 62/100
ayushdoesdev/verspect#4 ·
-
enhancement good first issue
难度 3/5 1-2 天 新手友好度 62/100
ayushdoesdev/verspect#3 ·
查看 ayushdoesdev/verspect 的全部 Issue
相似的 Issue
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishable可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
mozilla/code-review#3794 ·
维护者通常 1 天内回复
-
[oblt-aw][autodoc] Update docs that still describe the security registry as empty可能已有人在做 @github-actions 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
[Bug] adb backup script reports "Done" & exits 0 when the backup fails可能已有人在做 @bhattmanthan 今天认领。 未关闭request-issue-assignment
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
agent-ui bug p2
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
correction metadata
难度 1/5 1 小时以内 新手友好度 72/100
acl-org/acl-anthology#10768 · 1 条评论 ·
维护者通常 1 天内回复