Closed feinstein closed 1 month ago
You have specified the version that it is showing in your root pubspec, so this is not a bug.
What do you mean by the version in my root pubspec.yaml? How can I know the version of the melos tool that I have installed in my system?
What do you mean by the version in my root pubspec.yaml? How can I know the version of the melos tool that I have installed in my system?
Run melos --version
outside of a monorepo and you'll know the global version that is installed.
Check your pubspec.yaml
file in the root of the monorepo you currently are in and you'll see that it's an older version specified there.
Oh I see, is this documented? Because when I run melos --help
I only see the description of version
for generating new versions of packages
It could probably be better documented indeed, both on the site and in the cli. Would you like to contribute with a PR with updated docs? :)
I don't mind, but I don't know what is the expected behaviour, so I could document it
The expected behavior is the one that you have observed, --version
reports the version of Melos that it is currently using, so if it is in a repo that constraints it to a lower version than what is installed globally that is the version that will be reported, and if you're not in a repo, or a repository that doesn't constrain the version, it will report the version installed globally.
Is there an existing issue for this?
Version
6.1.0 or 3.2.0
Description
When I run
melos --version
it shows:Then I try
dart pub global deactivate melos
anddart pub global activate melos
and I get this:And then again if I run
melos --version
I get:Steps to reproduce
melos --version
1.dart pub global deactivate melos
1.dart pub global activate melos
melos --version
Expected behavior
melos --version
should show 6.1.0Screenshots
No response
Additional context and comments
Dart SDK version: 3.4.3 (stable) (Tue Jun 4 19:51:39 2024 +0000) on "macos_arm64"