Enhancement: apply pubspec.yaml `dependency_overrides` in Dart scans
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 62/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- dart, flutter, typescript
- 領域
- tooling
調査の方向性
Start with parsePubspecYaml in src/core-open/scanners/dart-scanner.ts (around lines 203-300), where the section tracking only handles dependencies and dev_dependencies. Teach it to read dependency_overrides entries in the same forms (one-line, version map, path, git), letting the override spec replace the declared spec for packages that appear in both, and decide how override-only packages are reported. Done when the example reports http at 1.2.1, overridden dev packages keep their dev flag, projects without the section are unchanged, and a new test beside test/dart-pubspec-map.test.ts passes under npm test.
索引モデルが issue の本文から書いたものです。
説明
Context
In Dart and Flutter projects, dependency_overrides: in pubspec.yaml forces the version that actually gets resolved, whatever dependencies: or dev_dependencies: ask for:
dependencies:
http: ^0.13.0
dependency_overrides:
http: 1.2.1
parsePubspecYaml in src/core-open/scanners/dart-scanner.ts (around lines 203–300) only enters a section for dependencies: and dev_dependencies:. Any other top-level key, including dependency_overrides:, resets the section, so overrides are ignored. As a result, a project scanned without a pubspec.lock reports the ^0.13.0 constraint for http, even though the project builds with 1.2.1. A package that appears only in dependency_overrides is not reported at all.
What to do
- Read
dependency_overrides:entries in the same forms already supported for the other sections (one-line version,{ version: … }maps,path:andgit:entries). - When a package is both declared and overridden, use the override's spec for that package's row and keep it as a production or development dependency according to where it was declared.
- Decide what to do with override-only packages (for example, report them as production rows) and write the choice down in the function's doc comment.
- Add a test next to
test/dart-pubspec-map.test.ts.
Acceptance
- With the example above,
vg scanreportshttpat1.2.1, not^0.13.0. - An overridden
dev_dependenciespackage keeps its development flag. - Projects with no
dependency_overrides:section produce exactly the same output as before. - New test passes with
npm test.
- 主要言語
- TypeScript
- スター
- 4
- フォーク
- 3
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 76
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vibgrate/cli のほかの issue
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
documentation Entwickler
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area:frontend bug ci-test level:low priority:high
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
skytuhua-org/Gen-V1#2974 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
area: cli area: core priority: P3 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
appandflow/stim#6736 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
naomiaro/waveform-playlist#973 ·
メンテナーはふだん 1 日以内に返信