-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Confused by resolveVersion #168
Comments
no, the logic from 335 to 337 is not right indeed! it should be fixed. the rest is to simplify the version expression, because when we fetch package info form npm we can get all the versions of the package, then we must decide to which version we should use. |
thanks, I'll look more there |
@ije would you be opposed to using something like or maybe even exactly this? https://github.com/Masterminds/semver |
this https://github.com/Masterminds/semver looks great, i like it~ |
would you create a pr on it? currently i am focusing on the new cjs lexer in rust instead of the cjs-module-lexer and evel for some safety reasons |
switch to https://github.com/Masterminds/semver in v65 |
@ije I'm really not understanding what
resolveVersion
does. It literally looks like it is removing semver constraint symbols from a version constraint, and calling that "resolved".Example:
https://github.com/alephjs/esm.sh/blob/c8be4051019116a99a741545185985c0866226c0/server/nodejs.go#L335-L337
How is that logic right? If the package constraint is
react@<17
, how does that come to meanreact@latest
(which is 17). The rest of the function is also confusing, as it's just removing symbols rather than actually resolving from what I am attempting to understand.If you have some time, can you please explain this function?
The text was updated successfully, but these errors were encountered: