Make `.packages` files be more clever about defaults. (#80)

* Make `.packages` files be more clever about defaults.

The `PackageConfig` for a `.packages` file now assigns a default language version of 2.7
to all packages, and if the package location ends in `/lib/`, it assumes the package's
root directory is the parent directory of that.

* Fix test.

* Fix another test.
3 files changed
tree: 1394938b8c675794aa79f315fb416f2fadf8dc9b
  1. lib/
  2. test/
  3. .gitignore
  4. .travis.yml
  5. analysis_options.yaml
  10. pubspec.yaml

Build Status pub package

Support for working with Package Configuration files as described in the Package Configuration v2 design document.

The primary libraries are

  • package_config.dart: Defines the PackageConfig class and other types needed to use package configurations.

  • package_config_discovery.dart: Provides functions for reading configurations from files, and writing them back out.

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.