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. .gitignore
  2. .travis.yml
  3. AUTHORS
  4. CHANGELOG.md
  5. CONTRIBUTING.md
  6. LICENSE
  7. README.md
  8. analysis_options.yaml
  9. lib/
  10. pubspec.yaml
  11. test/
README.md

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.