Repository navigation
fix(dart): read map-form pubspec dependencies - #597
Merged
Merged
Conversation
vibgrate-team
force-pushed
the
cursor/fix-dart-pubspec-map-deps-3b3e
branch
from
November 4, 2026 13:54
956a01d to
cd3e011
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parsePubspecYamlonly accepted one-linename: constraintentries. A map such ashttp:/version: ^1.2.0was skipped, and the nested keys (version,path,url,ref,git) were recorded as packages.http,shared, andanalyzer_pluginnever reachedvg scanorvg sbom export.A key with no value at the section's child indent now opens that package. Deeper lines belong to it and are never packages. A nested
version:scalar is the constraint.path:andgit:dependencies are recorded with their source (path:<path>,git:<url>,git:<url>#<ref>) rather than a registry version; a path or git source wins over a siblingversion. The same rules apply todependencies,dev_dependencies, anddependency_overrides. An override is kept only when that name is not already declared, so a one-line spec is unchanged.sdk: flutteris still skipped, and one-line tokens (including quotes and the first token of a range) are unchanged.The polyglot pubspec fallback uses the same parser, so a lockfile-less scan cannot prefer a row list built from nested keys.
Related issues
Closes #583
Checklist
pnpm testpassespnpm lintis cleanpnpm typecheckis cleangraph.json/ report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)git commit -s, DCO)Notes for reviewers
Path and git specs are source strings, not versions, so those rows stay in the scan without inventing a constraint. Tests in
test/dart-pubspec-map-dependencies.test.tslock that choice, the issue example (httpat^1.2.0, no packages namedversion/path/url/ref/git), and one-line behavior.