We’re excited to announce the release of Melos v3, a significant update with new features, performance improvements, and bug fixes to help streamline your Dart and Flutter mono-repo management. However, this release also includes some breaking changes that require your attention. This blog post will summarize the key changes and guide you through the necessary migration steps.
Highlights of Melos v3
Here are the major highlights of Melos v3:
- Improved performance with more efficient package finding.
- Support for listing cycles in dependencies.
- Support running scripts in topological order with
melos exec
. - Support a local installation of Melos in workspaces.
- Lifecycle hooks moved to command sections.
- More consistent naming around package filters.
- New mechanism for local package linking using
pubspec_overrides.yaml
.
Breaking Changes
Melos v3 introduces several breaking changes, including:
- Local installation of Melos in workspaces: Melos now requires a
pubspec.yaml
file in the workspace root directory to specify the version of Melos being used. - Changes in the local package linking mechanism: The
usePubspecOverrides
configuration option has been removed, andpubspec_overrides.yaml
is now the only mechanism used by Melos. - Removal of the
--since
flag in favor of the--diff
flag. - Changes in option defaults: Some options are now enabled by default.
- Changes in lifecycle hooks: Hooks have been moved to the respective command configurations.
- Changes in package filters: The
select-package
option for scripts has been renamed topackageFilters
, and filter names are now camel-cased instead of kebab-cased.
Migrating to Melos v3
To help you migrate your projects to Melos v3, we’ve prepared a detailed migration guide that covers all the necessary steps. You can find the migration guide at: https://melos.invertase.dev/guides/migrations
We recommend reviewing the migration guide and following the steps to ensure a smooth transition to Melos v3.
Changelog
For a complete list of changes, improvements, and bug fixes in Melos v3, please refer to the changelog.
Conclusion
Melos v3 brings many improvements to help you manage your Dart and Flutter mono-repos more efficiently. While some breaking changes require your attention, the migration process should be straightforward with the help of our migration guide.
We hope you enjoy Melos v3 and benefit from its new features and improvements! As always, we appreciate your feedback and contributions to the project.
Thanks to Gabriel for his continued contributions to Melos that made this release possible.