Closed nowsprinting closed 1 week ago
This is likely because Unity didn't use the npm dist-tag correctly. Typically, they should publish version 1.x with the "latest" tag and use the "next" tag for 2.0.1-pre. However, to be fair, openupm didn't follow this convention either. Our pipeline simply compares the version with the current latest version, and if the version is newer, it marks it with the "latest" tag or the "patch" tag.
In practice, the CLI could do more by introducing a virtual dist-tag "stable", so running openupm add com.unity.test-framework@stable
would ignore all preview packages and select the latest stable version for you.
Is this a duplicate of #64?
Yes. Though I propose different solutions, use '--stable' parameter or a special '@stable' tag.
Thank you for your reply. I'd be happy if the virtual dist-tag "stable" were introduced!
Just implemented the @stable
tag and tested it with the provided example by @nowsprinting. Seems to work but I'll leave it open a bit for feedback.
A pull request for this feature is now open at #404. @nowsprinting if you have the time you could take a look to see if it also works for you. Thanks :)
@ComradeVanti san, Thanks!!! I built the code in the PR, and it works as expected!
$ openupm add com.unity.test-framework@stable
notice modified com.unity.test-framework 1.4.4 => 1.4.5
@nowsprinting great to know. The PR is now merged 🚀
Thanks!!!
The preview version will be installed when I don't specify a package version. I want an option to exclude preview and experimental versions.
Stable com.unity.test-framework version is 1.4.5. v2 is deprecated.