pub_updater
0.6.0, released 3 months ago by verygood.ventures
Checks if a pub package is up to date and can trigger updates
What it does
PubUpdater queries pub.dev for the latest version of a package and compares it to a supplied current version. It can also run the update command to bring a package to its latest release.
AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a CLI tool to verify package versions during development or CI
- You want to prompt users to upgrade dependencies automatically
Skip it when
- You need a full dependency management solution beyond simple version checks
- You require integration with other package managers
Strengths
- Simple API, no code generation
- Supports Dart 3.12 and newer
- Handles pre-release and stable releases correctly
- No build_runner or codegen required
Weaknesses
- Only works with pub.dev or self-hosted pub servers
- Limited to Dart packages, not Flutter plugins with platform code
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 4
Add dependency to pubspec and import 'package:pub_updater/pub_updater.dart'; no special permissions or build steps
import 'package:pub_updater/pub_updater.dart';
void main() async {
final updater = PubUpdater();
final upToDate = await updater.isUpToDate(packageName: 'my_package', currentVersion: '0.1.0');
if (!upToDate) await updater.update(packageName: 'my_package');
}Alternatives
Packages that do the same job and could replace pub_updater.
- cli_launcher
Utility to launch a locally installed version of a CLI when a global version is invoked.
77Compare - dartdosh
Flutter build and release CLI to automate version bumping, file naming, and uploads.
65Compare
Works with
Packages commonly used together with pub_updater: ones it builds on, ones built on it, and its own family.
- pub_semverpub_updater depends on itVersions and version constraints implementing pub's versioning policy.
- json_annotationpub_updater depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- processpub_updater depends on itPluggable, mockable process invocation abstraction for Dart.
- melosBuilt on pub_updaterA tool for managing Dart and Flutter monorepos with script execution, versioning, and publishing.
- very_good_cliBuilt on pub_updaterCLI for creating and managing Dart/Flutter projects
- mason_cliBuilt on pub_updaterCLI tool to create and consume reusable template bricks for code generation.
- patrol_cliBuilt on pub_updaterCommand-line tool to run and debug Patrol UI tests on multiple platforms
- fvmBuilt on pub_updaterCLI to manage Flutter SDK versions per project