Include optional dependencies in pnpm dependency graphs
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, python
- Domain
- backend
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- Avg merge
- 1h 22m
- Merged PRs (30d)
- 2
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ayushdoesdev/verspect
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ayushdoesdev/verspect#5 ·
-
enhancement good first issue
Difficulty 3/5 1-2 days Newbie friendliness 62/100
ayushdoesdev/verspect#4 ·
-
enhancement good first issue
Difficulty 3/5 1-2 days Newbie friendliness 62/100
ayushdoesdev/verspect#2 ·
All issues in ayushdoesdev/verspect
Similar issues
-
DBFS append mode silently overwrites existing filesPossibly taken @IlyaKhalafi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
fsspec/filesystem_spec#2429 ·
Maintainers usually reply within 1 day
-
[Bug]: Retrieval rerank fallback statistics stay zero after provider failurePossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
volcengine/OpenViking#7014 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
fedora-copr/copr#4600 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ansys/pydpf-core#3620 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day