pubspeccheck 0.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new48

PubSpecCheck

pub package

Utility to check the versions of packages in a pubspec.yaml file. Useful to see if there is a shift in major versions (ex: 0.7.0 to 0.8.0) so you can update your version rules inside the pubspec file.

Installation

To install:

> pub global activate pubspeccheck

To update, run activate again:

> pub global activate pubspeccheck

Usage

pubspec yourfile.yaml
pubspec -c yourfile.yaml
pubspec -a yourfile.yaml

Example

If you run the utility on its own pubspec.yaml

> pubspec pubspec.yaml

You will get

[pubspec.yaml]
HostedDependency: ^2.1.15 => 2.1.15 	 yaml
HostedDependency: ^0.1.2+2 => 0.1.2+2 	 pubspec_parse
HostedDependency: ^3.0.0 => 3.0.2 	 pub_client
HostedDependency: ^1.5.0 => 1.5.0 	 args

If a major change is detected, it will give you the link to the changelog to see if there are any breaking changes. Here is an example:

--------- MAJOR DIFFERENCE ---------
Changelog: https://pub.dartlang.org/packages/flutter_inapp_purchase#-changelog-tab-
HostedDependency: 0.7.0 => 0.8.0         flutter_inapp_purchase
------------------------------------
HostedDependency: ^0.5.18 => 0.5.20      firebase_auth

Please note that if you don't use ^ in your yaml file, you will get a notification of a major difference as well.

--------- MAJOR DIFFERENCE ---------
Changelog: https://pub.dartlang.org/packages/flutter_inapp_purchase#-changelog-tab-
HostedDependency: 0.8.0 => 0.8.2         flutter_inapp_purchase
------------------------------------

Show all changelogs

With the -c flag, all changelogs urls will be shown for packages where the versions are different from those found in the pubspec.yaml file.

With the -a flag, all changelogs will be shown, regardless of version numbers.

For example, when running this:

> pubspec -c pubspec.yaml

You might get something like:

------------------------------------
Changelog: https://pub.dartlang.org/packages/timeago#-changelog-tab-
HostedDependency: ^2.0.1 => 2.0.8        timeago

--------- MAJOR DIFFERENCE ---------
Changelog: https://pub.dartlang.org/packages/flutter_inapp_purchase#-changelog-tab-
HostedDependency: 0.8.0 => 0.8.2         flutter_inapp_purchase
------------------------------------
------------------------------------
No new version, no changelog needed
HostedDependency: ^0.3.2 => 0.3.2        package_info
------------------------------------

Notes

There is little to no error handling of any kind, this is just a quick and dirty script 🙂

0.1.0

  • Version bump since everything seems fine for now

0.0.2

  • README fixes, code is the same

0.0.1

  • First version that can be run as a binary with command pubspec

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate pubspeccheck

2. Use it

The package has the following executables:


$ pubspec
Version Uploaded Documentation Archive
0.1.0 Oct 23, 2018 Go to the documentation of pubspeccheck 0.1.0 Download pubspeccheck 0.1.0 archive
0.0.2 Oct 23, 2018 Go to the documentation of pubspeccheck 0.0.2 Download pubspeccheck 0.0.2 archive
0.0.1 Oct 23, 2018 Go to the documentation of pubspeccheck 0.0.1 Download pubspeccheck 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.6

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Maintenance suggestions

Maintain an example. (-10 points)

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 pubspeccheck.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
args ^1.5.0 1.5.1
pub_client ^3.0.0 3.0.2
pub_semver ^1.4.2 1.4.2
pubspec_parse ^0.1.2+2 0.1.2+3
yaml ^2.1.15 2.1.15
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http 0.11.3+17 0.12.0
http_parser 3.1.3
json_annotation 1.2.0 2.0.0
meta 1.1.6
path 1.6.2
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6