devOnly property
Package -> the lib/, bin/ or hook/ files that import it while it is
declared only under dev_dependencies:. Sorted by package, then file.
It compiles in the package itself, which is what makes it easy to miss: the root package resolves its dev dependencies. Pub never resolves them for a package that depends on this one, so that package cannot build.
Implementation
final Map<String, List<String>> devOnly;