An open API service indexing awesome lists of open source software.

https://github.com/sgehrman/pubspec_updater

A native tool to update versions in pubspec.yaml files
https://github.com/sgehrman/pubspec_updater

dart flutter yaml

Last synced: about 1 year ago
JSON representation

A native tool to update versions in pubspec.yaml files

Awesome Lists containing this project

README

          

# pubspec_updater

Creates a native tool to update all package versions in pubspec.yaml

```bash
dart install.dart
```

This will copy a tool called pubspec_updater in to /home/user/bin. Make sure you have a bin dir in home and it's added to your \$PATH.

Only tested on Linux, but should work on macOS.

Send in Pull Requests if it doesn't work for you. Let me know if there is a better way to build this.

Once the tool is installed, you can go to any flutter package directory with a pubspec.yaml file and run:

This will display what it will change, but not write out the changes

```bash
pubspec_updater
```

Run with -u to actually write the pubspec.yaml

```bash
pubspec_updater -u
```

There are other flags to control how it change the versions. Use -h for help.

```bash
pubspec_updater -h
```

It will also add versions for pubs with out a version. It avoids any versions with < or >

Code is based on [https://github.com/mauriciotogneri/dapackages](https://github.com/mauriciotogneri/dapackages)

Inspired by npm-check-updates [https://github.com/tjunnone/npm-check-updates](https://github.com/tjunnone/npm-check-updates)