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 小时 新手友好度 82/100
microsoft/markitdown#2820 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
yt-project/yt#5624 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
NousResearch/hermes-agent#148376 ·
维护者通常 1 天内回复