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
-
難度 2/5 1-3 小時 新手友好度 74/100
strawberry-graphql/strawberry#4794 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
dataforgoodfr/cetolog#21 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
btclib-org/btclib#2932 ·
維護者通常 1 天內回覆
-
metrics priority: medium
難度 1/5 1-3 小時 新手友好度 86/100
LearningCircuit/local-deep-research#8336 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 80/100