ds icon indicating copy to clipboard operation
ds copied to clipboard

semver crate parsing feature parity with node-semver

Open zkat opened this issue 5 years ago β€’ 11 comments

Currently, there's a number of open issues in the semver crate that involve bringing it to feature parity with node-semver. We need this because of the sorts of things we'll run into in the wild. This issue is a tracking issue for that work -- it's likely we'll need to do it ourselves if we want it done because dev on the crate seems stalled.

Off the top of my head, these are the missing features:

  1. "loose" parsing, which involves handling garbage in semver strings. Because it's actually needed. This is an extra option in node-semver but it's used throughout NPM and the ecosystem has come to rely on it.
  2. Space-separated range specifiers. This is supported by semver-parser but semver hasn't been updated to use it.
  3. Or (||)-separated ranges
  4. Other stuff?

zkat avatar Dec 08 '19 09:12 zkat

What's the time frame? I'd love to help but I don't know if I can fit it into my schedule today.

larsgw avatar Dec 08 '19 12:12 larsgw

Yay Lars! Hi!

The time frame is "over the next week or two". Probably longer but I'd rather get it done sooner rather than later. Does that work for you?

zkat avatar Dec 08 '19 13:12 zkat

Update: it looks like Steve has a full rewrite that just needs some help getting over the finish line: https://twitter.com/steveklabnik/status/1203691014055190528?s=19

zkat avatar Dec 08 '19 17:12 zkat

Ah, cool.

larsgw avatar Dec 08 '19 18:12 larsgw

You should definitely ping him about it if you're still interested. It seems like he could still use a bit of help :)

zkat avatar Dec 08 '19 18:12 zkat

Heyo! Did y'all manage to get in touch and get the ball rolling? Any updates?

zkat avatar Dec 22 '19 23:12 zkat

Yep, I made a spreadsheet to track progress but there's not much of any yet, unfortunately.

larsgw avatar Dec 23 '19 00:12 larsgw

Thanks for the update! πŸ‘πŸΌπŸ‘πŸΌπŸ‘πŸΌ

zkat avatar Dec 23 '19 00:12 zkat

I started working on it a week ago but know I'm waiting for Steve to answer some minor but progress-blocking questions (for me at least), and I think he may be out during the holidays.

larsgw avatar Dec 30 '19 16:12 larsgw

Current state (some of which I said on discord earlier):

  • I started working on the main missing features, most of which are done now;
  • Loose parsing, clean() and coerce() (as from node-semver) are still pending feedback;
  • There are some other things left to do that I did not think of earlier, namely
    • documentation,
    • proper use of Error (although the use of String may have been on purpose, will have to discuss) and
    • going through the existing GitHub issues (which is not as much as it may sound)

larsgw avatar Feb 02 '20 00:02 larsgw

This is awesome! Thanks again for the update!

zkat avatar Feb 03 '20 02:02 zkat