commit | cff98c90acc457a3b0750f0a7da0e351a35e5d0c | [log] [tgz] |
---|---|---|
author | Lasse R.H. Nielsen <lrn@google.com> | Mon May 23 14:01:41 2022 |
committer | GitHub <noreply@github.com> | Mon May 23 14:01:41 2022 |
tree | 9c3ce573bbe12a4978a92ec327613583b2c62eba | |
parent | 33d656b0dc0274ce41eb5bd5b5a96fb994f0ea41 [diff] |
Adds `minVersion` to `findPackageConfig{,Uri}` methods. (#125) * Adds `minVersion` to `findPackageConfig{,Uri}` methods. This parameter currently allows you to ignore `.packages` files while searching for a configuration file. If we later add a version 3 of the configuration, it should also allow ignoring version 2 configurations.
Support for working with Package Configuration files as described in the Package Configuration v2 design document.
A Dart package configuration file is used to resolve Dart package names (e.g. foobar
) to Dart files containing the source code for that package (e.g. file:///Users/myuser/.pub-cache/hosted/pub.dartlang.org/foobar-1.1.0
). The standard package configuration file is .dart_tool/package_config.json
, and is written by the Dart tool when the command dart pub get
is run.
The primary libraries of this package are
package_config.dart
: Defines the PackageConfig
class and other types needed to use package configurations, and provides functions to find, read and write package configuration files.
package_config_types.dart
: Just the PackageConfig
class and other types needed to use package configurations. This library does not depend on dart:io
.
The package includes deprecated backwards compatible functionality to work with the .packages
file. This functionality will not be maintained, and will be removed in a future version of this package.