devoto13 / yarn-plugin-engines

Yarn Berry plugin to enforce Node version
MIT License
55 stars 13 forks source link

Use spec-compliant SemVer range check #11

Closed devoto13 closed 2 years ago

devoto13 commented 2 years ago

By default, the semver library excludes prerelease check unless explicitly included in the range: https://github.com/npm/node-semver#prerelease-tags. This behavior is handy for the wide range of npm packages where their authors can publish any versions breaking SemVer rules and those version will be picked up by ranges specified by users and installed breaking application. For the purpose of this plugin, we only deal with two mature projects and check that version matches the range specified by the user, but never install/update this version. If the user chose the >X.Y.Z constraint, we assume that they know what they are doing and choose less surprising SemVer range checking behavior.

Fixes #10