package_resolver 1.0.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 83

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.

1.0.2

  • Don't crash on URIs without path components.

1.0.1

  • Internal changes only.

1.0.0

  • Initial version.

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  package_resolver: "^1.0.2"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:package_resolver/package_resolver.dart';
        
Version Uploaded Documentation Archive
1.0.2 Aug 24, 2016 Go to the documentation of package_resolver 1.0.2 Download package_resolver 1.0.2 archive
1.0.1 Aug 8, 2016 Go to the documentation of package_resolver 1.0.1 Download package_resolver 1.0.1 archive
1.0.0 Jul 21, 2016 Go to the documentation of package_resolver 1.0.0 Download package_resolver 1.0.0 archive

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
93 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
33 / 100
Overall score:
Weighted score of the above. [more]
83
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

Primary library: package:package_resolver/package_resolver.dart with components: isolate.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use package_resolver.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 5 hints.

    Run dartfmt to format lib/src/current_isolate_resolver.dart.

    Run dartfmt to format lib/src/package_config_resolver.dart.

    Similar analysis of the following files failed:

    • lib/src/sync_package_resolver.dart (hint)
    • lib/src/utils.dart (hint)
  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.14.0 <2.0.0
collection ^1.9.0 1.14.9
http ^0.11.0 0.11.3+16
package_config >=0.1.0 <2.0.0 1.0.3
path ^1.0.0 1.5.1
Transitive dependencies
async 2.0.6
charcode 1.1.1
http_parser 3.1.1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
shelf ^0.6.0
test ^0.12.0