Include optional dependencies in pnpm dependency graphs
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 62/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript, python
- 領域
- backend
研究方向
Start in backend/app/scanners/analyzers/javascript.py where the _pnpm_packages parser reads dependencies:, then check how backend/app/models/dependency_relationship.py stores edge_type before deciding how optional edges are marked. Add fixture-based cases to backend/tests/scanners/test_javascript_analyzer.py for both pnpm v6 and v9 lockfiles, asserting optional and required edges separately. Done when optional edges are distinct, existing required-edge tests still pass, and the focused analyzer and scanner tests run green.
由索引模型根據 Issue 內容生成。
描述
Summary
The _pnpm_packages parser currently collects relationships from dependencies: but not optionalDependencies:. This leaves optional package edges out of the pnpm dependency graph or risks treating them as required if added without preserving their kind.
Affected files
backend/app/scanners/analyzers/javascript.pybackend/app/models/dependency_relationship.py(inspect the existing graph representation before implementation)backend/tests/scanners/test_javascript_analyzer.py
Scope
Parse optional dependency references in the supported pnpm v6 and v9 lockfile forms. The current graph model stores directed parent-to-child edges with an edge_type string; trace graph persistence and serialization so optional status remains distinguishable to consumers. Do not change existing required-edge semantics.
Acceptance criteria
- Optional dependency references are parsed from supported pnpm v6 and v9 lockfiles.
- Optional edges are represented distinctly using the existing graph model (or a compatible existing mechanism).
- Optional dependencies are not classified as required dependencies.
- Existing required
dependencies:edges and pnpm graph behavior remain unchanged. - Focused fixture-based tests cover both lockfile versions and assert required and optional edge semantics separately.
Testing expectations
Run the focused JavaScript analyzer tests and relevant backend scanner tests. Include regression tests for current required dependency edges.
- 主要語言
- 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#2 ·
查看 ayushdoesdev/verspect 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 64/100
its-me-prash/vwgroup-connect-ha#2019 ·
維護者通常 1 天內回覆
-
bug good first issue
難度 2/5 1-3 小時 新手友好度 86/100
KonstantinStarovoytov/kitden#21 ·
維護者通常 1 天內回覆
-
Refactor未關閉
難度 2/5 1-3 小時 新手友好度 62/100
ehmatthes/gh-profiler#166 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
smart-on-fhir/smart-fetch#73 ·
-
good first issue help wanted
難度 1/5 1-3 小時 新手友好度 85/100
RizgarOzan/playcal#13 ·