plugin-warn-if-update-available
plugin-warn-if-update-available copied to clipboard
Prerelease tag warnings not working as expected
When working with prerelease tags, we've noticed that the the plugin will warn the first time when a prerelease version has been published, for example x.x.x to x.x.x-alpha.x.
However, after that when the version has been bumped to prerelease, due to https://github.com/oclif/plugin-warn-if-update-available/blob/master/src/hooks/init/check-update.ts#L27 , there seems to be an early return due to the existence of -and there appears to no longer be any warning shown for further updates whether a prerelease or not. https://github.com/oclif/plugin-warn-if-update-available/blob/master/src/hooks/init/check-update.ts#L31 seems to indicate the possibility of splitting on a - and comparing at least the first part.
We were wondering what the reasoning is for the early return or if this is a case of unfinished logic?
Thanks
Sounds like a bug if a minor/patch doesn't warn again.
This issue has been linked to a new work item: W-16393788