Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling for EXPath Package SemVer Templates #18

Merged
merged 26 commits into from Jan 3, 2023

Conversation

joewiz
Copy link
Member

@joewiz joewiz commented Dec 30, 2022

This PR adds handling for resolving EXPath Package SemVer Templates - a feature needed to support the forthcoming fix to eXist-db/public-repo#72. Tests have been added for the new functions.

It also significantly simplifies the implementation of semver:coerce - by adding a new regex that can flexibly capture groups. All existing tests involving coercion pass.

It also adds missing variants of semver:eq#3 and new variants of all of the comparison functions for working directly with parsed version maps (e.g., semver:eq-parsed), to avoid needless parsing/serializing when performing comparisons of already-parsed versions.

It also deprecates semver:compare#1, renaming it as semver:compare-parsed, to follow the pattern of appending -parsed to the names of functions that handle parsed SemVer version maps.

@joewiz joewiz force-pushed the simplify-coerce-add-templates branch from b72ec44 to bc75cc5 Compare December 30, 2022 15:16
… and move anonymous functions into utility functions
… and call semver:coerce as soon as semver regex fails
… to be next to the other comparison functions
@joewiz joewiz force-pushed the simplify-coerce-add-templates branch 5 times, most recently from 271fe89 to 0ca898e Compare December 30, 2022 16:07
@joewiz joewiz force-pushed the simplify-coerce-add-templates branch 2 times, most recently from adafedd to 7b64a49 Compare December 31, 2022 07:59
@joewiz joewiz marked this pull request as draft December 31, 2022 08:41
@joewiz joewiz force-pushed the simplify-coerce-add-templates branch from 7b64a49 to bc2d9b9 Compare December 31, 2022 15:04
@joewiz joewiz marked this pull request as ready for review December 31, 2022 15:05
@joewiz joewiz force-pushed the simplify-coerce-add-templates branch from c0e6349 to 2ed37ea Compare December 31, 2022 21:32
@joewiz joewiz force-pushed the simplify-coerce-add-templates branch from 2ed37ea to 8d4f94d Compare December 31, 2022 22:29
@adamretter
Copy link
Member

Quite the piece of work @joewiz. Nicely done.

@adamretter adamretter merged commit 46a1cf6 into eXist-db:master Jan 3, 2023
@joewiz joewiz deleted the simplify-coerce-add-templates branch January 3, 2023 14:21
@joewiz joewiz added the enhancement New feature or request label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants