liquidz / antq

Point out your outdated dependencies.
Other
394 stars 22 forks source link

How to exclude only prereleases? #235

Closed svdo closed 10 months ago

svdo commented 10 months ago

I have a dependency org.apache.santuario/xmlsec that is currently on 3.0.2. There is now a new version, 4.0.0-M1, which is not intended for production use according to their documentation. Can I somehow exclude only these prereleases? Excluding 4.0.0-Mx and 4.0.0-x doesn't seem to work. And I'd rather not exclude 4.0.x or something.

Please note that the hyphen (-) has a specific meaning in semantic versioning (https://semver.org/#spec-item-9). It's also used for things like -RC.1 and -alpha.3. Apart from allowed characters you're pretty free in what you can put there.

I find myself wondering if the ability to exclude using regex might be a good solution, not sure.

liquidz commented 10 months ago

@svdo Sorry for late reply.

Excluding 4.0.0-Mx and 4.0.0-x doesn't seem to work. And I'd rather not exclude 4.0.x or something.

Indeed. Currently antq only supports .x, so wildcarding any x is not supported.

I'll try to support * for enabling to use 4.0.0-M*.

I find myself wondering if the ability to exclude using regex might be a good solution, not sure.

For now, I intend to expand wildcards like package.json instead of regex. cf. https://github.com/liquidz/antq/issues/212

liquidz commented 10 months ago

@svdo I've added support for * in version ranges for exclusions. Could you try dev branch?

svdo commented 10 months ago

That works nicely for me: --exclude=org.apache.santuario/xmlsec@4.0.0-M* has the expected result. Thank you!

liquidz commented 10 months ago

@svdo Thanks for your confirmation! I just released v2.6.1121 :)