diff --git a/CHANGELOG.md b/CHANGELOG.md index ca7acab..8306215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## 1.33.0 +- The `puby link` command no longer requires existing `pubspec.lock` files to function - Fixes `--no-fvm` flag for `puby link` - Updates for fvm 3.0.0 diff --git a/README.md b/README.md index 678c9f6..982e8e0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ Run commands in all projects in the current directory. Handle monorepos with ease. ## Features + - No configuration necessary. Run `puby` anywhere. It won't complain. -- Execute `pub get` up to five times faster with `puby link` +- Execute `pub get` in seconds rather than minutes with `puby link` - Reclaim disk space with `puby clean` - Supports all project-level pub commands - Execute any command in all projects with `puby exec` @@ -27,11 +28,13 @@ For projects configured with FVM, `fvm flutter` is used. FVM support can be disa ## Use as an executable ### Installation + ```console $ dart pub global activate puby ``` ### Usage + ```console $ puby get $ puby upgrade --major-versions @@ -39,21 +42,41 @@ $ puby upgrade --major-versions ``` ## Notes on `puby link` + This command is based on `flutter update-packages`. All of the dependencies required by all of the projects in the current directory are cataloged and cached if necessary, then `pub get --offline` can safely run in all the projects in parallel. -The `pubspec.lock` file is used to catalog the required dependencies, so for this command to run successfully you must check in your `pubspec.lock` files to version control. +This command no longer requires existing `pubspec.lock` files to function. It now uses the same version resolution strategy from the `pub` command internally and runs many times faster than the old implementation. + +The `puby link` command can run _many times faster_ than `puby get`, so it is very useful for large mono-repos. + +Benchmarks in the [flutter/packages](https://github.com/flutter/packages) repo: -The `puby link` command can run up to _five times faster_ than `puby get`, so it is very useful for large mono-repos. +| Command | Duration | +| ----------------- | -------- | +| `puby get` | 9:01.97 | +| `melos bootstrap` | 47.810 | +| `puby link` | 25.881 | + +Benchmark setup: + +- M3 MacBook Pro +- Gigabit internet connection +- Run `puby clean && dart pub cache clean` before each run +- `melos bootstrap` is run with a [custom branch of flutter/packages](https://github.com/Rexios80/packages_flutter/tree/puby_benchmarking) with the required setup ## Notes on `puby exec` + Paths relative to the directory you are running `puby` in will not work. For example: + - `puby exec ./foo.sh` will not work - `puby exec $PWD/foo.sh` will work ## Configuration + Create a `puby.yaml` file in the root of the project you want to configure ### Exclusions + Add command exclusions to prevent them from running in a project ```yaml @@ -67,4 +90,4 @@ Exclusions match from the start of a command, and the entire exclusion string mu | Exclusion | Example command excluded | | ---------------------- | ------------------------------------- | | `test` | `[engine] test --coverage` | -| `pub run build_runner` | `[engine] pub run build_runner build` | \ No newline at end of file +| `pub run build_runner` | `[engine] pub run build_runner build` |