Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Fix \d not working in version-pattern #18

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

Phault
Copy link
Contributor

@Phault Phault commented Feb 17, 2024

The example for the version-pattern in the docs does not actually work, as it uses the \d character class, which is currently disabled for the regex dep. This PR enables support for it (as well as \w and \s).

I understand that the plugin should be kept very lightweight, so alternatively the example could just be updated to use [0-9] ranges instead of \d and we can just close this PR. I suspect most people would expect \d to work though.

The `unicode-perl` feature was disabled for the regex dep at some point, but we rely on this for our usage example.
This will keep breaking for every moon release until development on v1 stops.
@@ -7,7 +7,6 @@ generate_resolve_versions_tests!(
"1.0.3" => "1.0.3",
"1.4" => "1.4.0",
"1.5" => "1.5.1",
"1" => "1.19.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this, as the test breaks every time moon is updated.

@milesj
Copy link
Contributor

milesj commented Feb 17, 2024

@Phault I removed a lot of the regex features back in the day because it made the file size really large. Let me do some testing and verify things.

@milesj milesj merged commit a383524 into moonrepo:master Feb 21, 2024
8 checks passed
@milesj
Copy link
Contributor

milesj commented Feb 21, 2024

Only added about 30kb, which isn't too bad.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants