-
Notifications
You must be signed in to change notification settings - Fork 263
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
Fix: correct node version parse #884
Conversation
464302f
to
2871cd2
Compare
2871cd2
to
7aefcb7
Compare
@half0wl please would you take a look this pr? |
BTW, I found every languages may have their own semver rules (for example, rust semver is different of node semver, most of languages use standard semver), so I cant port it to other languages. But I think other provider may have same issue. |
0207c5b
to
82f2b06
Compare
82f2b06
to
2c022f2
Compare
Rust clippy: "you looks not smart" 😢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
BTW, I found every languages may have their own semver rules (for example, rust semver is different of node semver, most of languages use standard semver), so I cant port it to other languages. But I think other provider may have same issue.
Yeah, good call pulling in node-semver
to deal with this! Happy to see the regex gone ;-)
This PR:
fix #858
#858 describe our current implementation cant parse
^14.10.3
correctly, it will return the default node version, but it should return14
.In real world
node-semver
is more complicated. You can check how npm handle this https://github.com/npm/node-semverFortunately, we have a great crate can do same thing https://github.com/felipesere/node-semver-rs
How I think the original implementation?
inputs (one of):
v
)outputs:
node version that statisfied the inputs version (one of):