node-semver
node-semver copied to clipboard
[BUG?] possible issues in internal/re.js
What / Why
I've been porting internal/re.js to compose-regexp, for personal use as a vendored-in dep, because raw regexp concatenation hurts my eyes, and I've found a couple of things that strike me as possible bugs, around L73-L87... namely:
BUILDis supposed not to capture according to the comment, but it does capture its content.- the
v?prefix inFULLPLAINis different from those inLOOSEPLAINandXRANGEPLAIN(LOOSE)?([v=\\s]*).
Who
- @isaacs
BUILD is supposed not to capture according to the comment, but it does capture its content.
Ah, yes, that is an outdated and incorrect comment.
the v? prefix in FULLPLAIN is different from those in LOOSEPLAIN and XRANGEPLAIN(LOOSE)? ([v=\s]*).
I think that's because v1.2.3 or =1.2.3 is a valid version in loose mode but not in strict mode. But v1.x is always a valid range, loose or not.