Skip to content

recommend "pub upgrade" when lockfile is out of date #10

@johnpryan

Description

@johnpryan

First off, this is a really great plugin! I wanted to start a discussion around the current behavior and see this plugin could suggest running pub upgrade when dependencies in the lockfile can be upgraded.

Pub uses semantic versioning, with lockfiles to store the package versions that were last fetched using pub get or pub upgrade. For example, if I put path: ^1.5.0 in the pubspec file and run pub get, it will fetch the latest version (compatible with the other dependencies in my package) between 1.5.0 and 2.0.0. This generally means that I don't need to change my pubspec from 1.5.0 to 1.5.1, for example. However, if there is a new version of path available, I would want to run pub upgrade as soon as possible so that my lockfile can contain the latest version.

It would be great if this package could take a look at all of the packages in the pubspec.lock file and recommend a pub upgrade when there are new versions available.

There are still cases where a change to the pubspec.yaml file should be recommended though. For example, if path 2.0.0 is published, specifying path: ^1.5.0 won't allow me to upgrade, I would need to change it to path: ^2.0.0.

Hope this helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions