pub_cache 0.2.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 85

pub_cache

A library to reflect on the local pub cache.

pub package Build Status Build 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.2.1

  • Dart 2 dependency upgrades

0.2.0

  • upgraded to support Dart 2

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

Use this package as a library

1. Depend on it

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


dependencies:
  pub_cache: ^0.2.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 flutter 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.2.1 Jul 22, 2018 Go to the documentation of pub_cache 0.2.1 Download pub_cache 0.2.1 archive
0.2.0 Apr 19, 2018 Go to the documentation of pub_cache 0.2.0 Download pub_cache 0.2.0 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
Popularity:
Describes how popular the package is relative to other packages. [more]
70
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.11.8

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 of the API.

Fix lib/pub_cache.dart.

Analysis of lib/pub_cache.dart reported 1 hint:

line 222 col 17: Always override hashCode if overriding ==.

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 >=2.0.0-dev.17.0 <3.0.0
path ^1.0.0 1.6.2
pub_semver ^1.0.0 1.4.2
yaml ^2.0.0 2.1.15
Transitive dependencies
charcode 1.1.2
collection 1.14.11
source_span 1.4.1
string_scanner 1.0.3
Dev dependencies
test ^1.0.0