Enhancement: resolve pnpm `catalog:` dependencies from `pnpm-workspace.yaml`

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

メンテナーはふだん 1 日以内に返信

@vibgrate-team がすでに取り組んでいます。

2026年11月13日 から。

  • #681 @vibgrate-team による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript, yaml
領域
backend, cli, databases

調査の方向性

Start with src/core-open/scanners/npm-cache.ts and src/core-open/scanners/node-scanner.ts, then trace how the scanner detects the root pnpm-workspace.yaml and looks up lockfile versions. Check the existing scanner tests and add cases for default, named, and missing catalog entries. Done means catalog ranges are used for drift and lockfile lookup, the written spec remains currentSpec, and missing entries still produce rows.

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

説明

enhancement

Context

pnpm catalogs let a monorepo keep shared versions in pnpm-workspace.yaml:

catalog:
  react: ^18.3.1
catalogs:
  legacy:
    react: ^17.0.2

and refer to them from each package.json as "react": "catalog:" or "react": "catalog:legacy".

isSemverSpec in src/core-open/scanners/npm-cache.ts (around line 281) rejects catalog: because it is not a semver range, and scanOnePackageJson in src/core-open/scanners/node-scanner.ts (around line 349) then skips the dependency. In a monorepo that has moved to catalogs, most dependencies vanish from vg scan.

What to do

  1. Read catalog and catalogs from the root pnpm-workspace.yaml once per scan (the scanner already checks that file exists for package-manager detection).
  2. When a spec is catalog: or catalog:default, use the default catalog entry; for catalog:<name>, use that named catalog.
  3. Use the resolved range for drift and lockfile lookup, and keep currentSpec as written.
  4. If the entry is missing, keep the row visible with an unknown version rather than dropping it.

Acceptance

  • "react": "catalog:" resolves through the default catalog
  • "react": "catalog:legacy" resolves through the named catalog
  • A missing catalog entry still produces a row
  • Tests cover both catalog forms and a missing entry
主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

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

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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