Add basic support for Yarn Berry (v2+) lockfiles

オープン
#2 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, python
領域
backend, devtools

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

enhancement good first issue

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.py
  • backend/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 __metadata mapping 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.

主要言語
Python
スター
2
フォーク
1
平均マージ
1時間 22分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ayushdoesdev/verspect のほかの issue

ayushdoesdev/verspect の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。