taori / NugetUnlister

dotnet global tool, to unlist nuget packages
MIT License
5 stars 0 forks source link

Add `Before` command to work on non-prerelease packages #2

Closed danielcrenna closed 5 years ago

danielcrenna commented 5 years ago

Can you add a new command to allow dropping non-prelease packages?

taori commented 5 years ago

Sure. I'll have a look at your pull request. Though you should be aware that nuget discourages from unlisting non-prerelease packages

taori commented 5 years ago

One issue i noticed while verifying the pull request is that the filter does not show x.x.x.146 when you specify x.x.x.147, which technically is an error (since if you want to drop release versions you might want to drop versions on the same level as well). However given that this tool should mostly be used for dropping prerelease versions this isn't really relevant to me.

Anyways - Thanks for your contribution @danielcrenna

danielcrenna commented 5 years ago

@taori I noticed that as well, I'm not sure what the root cause of that is, since SemVer parsing is returning false on TryParse for any x.x.x.NNN release, anything past three points of revisions, actually. I believe it's occurring on the prerelease filter as well.

danielcrenna commented 5 years ago

And yes, duly noted on the non-pre-release warning, I had a specific use case for it since our packages are halfway between prerelease/released and I want to unlist old distros that nobody is really using anyway. In real life I wouldn't unlist released packages if they had actual customers using them.

taori commented 5 years ago

@taori I noticed that as well, I'm not sure what the root cause of that is, since SemVer parsing is returning false on TryParse for any x.x.x.NNN release, anything past three points of revisions, actually. I believe it's occurring on the prerelease filter as well.

Yep. You're correct about that. drop PreRelease has this issue too, due to the nature of the code it shares. However in both scenarios i look at this as "it is wrong, but most people who use the tool probably are not actually affected by it". If someone actually needs it i'll get around to changing the behavior.

Personally i would not unlist prereleased packages at all, but i get that there are scenarios where someone would want to do that and just wants some sort of existing tooling to automate the process.

Hence i think the SemVer filtering for build versions isn't that much of an issue who use this tool.

taori commented 4 years ago

@danielcrenna I only just noticed that while i merged your changes to master, i failed to update the nuget package. I was reminded of that in #4. f you update the tool on your end be aware that i made breaking changes to the Calling syntax and removed the necessity to pass on argument names, since most arguments are mandatory anyway.