Clone this repo:
  1. 2c1d30a Revert accidental merge. (#12) by Lasse R.H. Nielsen · 2 weeks ago master
  2. c36c2af Add dev-dependency directly on stack_trace package. (#11) by Lasse R.H. Nielsen · 2 weeks ago
  3. fa74ac3 Remove upper case constants (#9) by Lasse R.H. Nielsen · 2 weeks ago
  4. f61e227 Merge pull request #8 from dart-lang/kevmoo-patch-1 by Natalie Weizenbaum · 3 months ago
  5. c744bb9 dartfmt by Kevin Moore · 3 months ago

A package that defines a common class, PackageResolver, for defining how to resolve package: URIs. This class may be based on the current isolate's package resolution strategy, but it may also be explicitly defined by the user—for example, you could create a resolver that represents the strategy used to compile a .dart.js file.

The Dart VM provides two mutually exclusive means of resolving package: URIs: a package spec and a package root.

  • A package spec usually comes in the form of a .packages file on the filesystem. It defines an individual root URL for each package name, so that package:$name/$path resolves to $root/$path.

  • A package root is a single URL that acts as the base for all package: URIs, so that package:$name/$path resolves to $base/$name/$path.

This normalizes access to these resolution schemes, and makes it easy for code to resolve package URIs no matter where the resolution information comes from.