node-pty icon indicating copy to clipboard operation
node-pty copied to clipboard

Semver violation

Open linvain opened this issue 5 years ago • 0 comments

According to semver:

identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order

Full text Precedence refers to how versions are compared to each other when ordered. Precedence MUST be calculated by separating the version into major, minor, patch and pre-release identifiers in that order (Build metadata does not figure into precedence). Precedence is determined by the first difference when comparing each of these identifiers from left to right as follows: Major, minor, and patch versions are always compared numerically. Example: 1.0.0

So you should place a dot between beta and the number or the precedence would be broken.

yarn add node-pty@beta installs latest beta but interactive input sorts versions lexically:

Show
$ yarn add [email protected]
yarn add v1.17.3
[1/4] Resolving packages...
Couldn't find any versions for "node-pty" that matches "0.9"
? Please choose a version of "node-pty" from this list: (Use arrow keys)
❯ 0.9.0-beta9 
  0.9.0-beta8 
  0.9.0-beta7 
  0.9.0-beta6 
  0.9.0-beta5 
  0.9.0-beta4 
  0.9.0-beta3 
  0.9.0-beta24 
  0.9.0-beta23 
  0.9.0-beta22 
  0.9.0-beta21 
  0.9.0-beta20 
  0.9.0-beta2 
  0.9.0-beta19 
  0.9.0-beta18 
  0.9.0-beta17 
  0.9.0-beta16 
  0.9.0-beta15 
  0.9.0-beta14 
  0.9.0-beta13 
  0.9.0-beta12 
  0.9.0-beta11 
  0.9.0-beta10 
  0.9.0-beta1

linvain avatar Aug 27 '19 14:08 linvain