Enhancement: apply pubspec.yaml `dependency_overrides` in Dart scans
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 62/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- dart, flutter, typescript
- Ambito
- tooling
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 3
- Merge medio
- 1g 22h
- PR unite (30g)
- 76
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un 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 vibgrate/cli
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vibgrate/cli
Issue simili
-
area: documentation status: in progress type: documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
Oddmash/oddmash-ui#222 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
appium/appium-wincore-driver#169 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
india-ultimate/hub#715 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation Entwickler
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
I maintainer di solito rispondono entro 1 giorno