Add basic support for Yarn Berry (v2+) lockfiles
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
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- 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#3 ·
All issues in ayushdoesdev/verspect
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
elviskahoro/sdk-python-attio#144 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
RenyiELBO raises TypeError when model has no sample sitesPossibly taken @alibb007 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day