Enhancement: apply pubspec.yaml `dependency_overrides` in Dart scans
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- dart, flutter, typescript
- Área
- tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 3
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 76
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vibgrate/cli
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
Todos los issues de vibgrate/cli
Issues similares
-
area: documentation status: in progress type: documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
Oddmash/oddmash-ui#222 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
appium/appium-wincore-driver#169 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
india-ultimate/hub#715 ·
Los mantenedores suelen responder en 1 día
-
documentation Entwickler
Dificultad 1/5 Menos de una hora Aptitud para principiantes 89/100
Los mantenedores suelen responder en 1 día