-
Chris Bracken authored
In https://github.com/flutter/flutter/pull/103771, we rolled dependencies in Flutter, which triggered an update of package:coverage to v1.3.1. The new version includes https://github.com/dart-lang/coverage/pull/370 in which two deprecations landed: * The `Resolver` default constructor was deprecated and replaced with the `Resolver.create` static factory method, which unfortunately happens to be async. * The `packagesPath` parameter to `HitMap.parseJson`, which takes the path to the `.packages` file of the package for which coverage is to be collected, was deprecated. This parameter was replaced with `packagePath` in https://github.com/dart-lang/coverage/pull/370 which was part of the overall deprecation of the .packages file in Dart itself https://github.com/dart-lang/sdk/issues/48272. The overall goal being that end-user code shouldn't need to know about implementation details such as whether dependency information is stored in a .packages file or a package_info.json file, but rather use the package_config package to obtain the package metadata and perform other functions such as resolving its dependencies to filesystem paths. packagesPath was replaced by packagePath, which takes the path to the package directory itself. Internally, package:coverage then uses package_config to do the rest of the package/script URI resolution to filesystem paths. This migrates off the deprecated `packagesPath` parameter to the replacement `packagePath` paramter. Issue: https://github.com/flutter/flutter/issues/103830