pub_cache 0.1.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 81

pub_cache

A library to reflect on the local pub cache.

pub package Build Status Build status Coverage Status

How do I use it?

pub_cache lets you reflect on the information in your Pub cache. For example, to find all the applications that have been activated:

PubCache cache = new PubCache();

for (Application app in cache.getGlobalApplications()) {
  print('activated app: ${app.name}, version: ${app.version}');
}

Some other interesting use cases:

  • finding all the activated applications whose defining package has a specific meta-data file
  • given a package name, locate the directory on disk for that package, and using that location to read resources contained in the package
  • finding the latest non-dev version of all the packages in the cache

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.1.1

  • fixed an issue with global_packages enumeration

0.1.0

  • release as 0.1.0

0.0.1+2

  • ensure that any missing version constraint is returned as Version.none

0.0.1+1

  • fix an issue with parsing pubspec.yaml files without a version property defined

0.0.1

  • initial version

1. Depend on it

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


dependencies:
  pub_cache: "^0.1.1"

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:pub_cache/pub_cache.dart';
        
Version Uploaded Documentation Archive
0.1.1 Oct 13, 2017 Go to the documentation of pub_cache 0.1.1 Download pub_cache 0.1.1 archive
0.1.0 Jul 10, 2015 Go to the documentation of pub_cache 0.1.0 Download pub_cache 0.1.0 archive
0.0.1+2 Apr 13, 2015 Go to the documentation of pub_cache 0.0.1+2 Download pub_cache 0.0.1+2 archive
0.0.1+1 Apr 13, 2015 Go to the documentation of pub_cache 0.0.1+1 Download pub_cache 0.0.1+1 archive
0.0.1 Apr 12, 2015 Go to the documentation of pub_cache 0.0.1 Download pub_cache 0.0.1 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

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

Platforms

Detected platforms: Flutter, other

Primary library: package:pub_cache/pub_cache.dart with components: io.

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.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use pub_cache.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
path ^1.0.0 1.5.1
pub_semver ^1.0.0 1.3.2
yaml ^2.0.0 2.1.13
Transitive dependencies
charcode 1.1.1
collection 1.14.5
source_span 1.4.0
string_scanner 1.0.2
Dev dependencies
test ^0.12.0