Add basic support for Yarn Berry (v2+) lockfiles
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, python
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 1
- Merge medio
- 1h 22m
- PR unite (30g)
- 2
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ayushdoesdev/verspect
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ayushdoesdev/verspect#5 ·
-
enhancement good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
ayushdoesdev/verspect#4 ·
-
enhancement good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
ayushdoesdev/verspect#3 ·
Tutte le issue di ayushdoesdev/verspect
Issue simili
-
DBFS append mode silently overwrites existing filesForse già presa @IlyaKhalafi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
fsspec/filesystem_spec#2429 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
volcengine/OpenViking#7014 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
fedora-copr/copr#4600 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ansys/pydpf-core#3620 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno