# Bug reports

1. **Prerelease with a number sorts after a word.** `semver.lt('1.0.0-alpha.1', '1.0.0-alpha.beta')` is `false`. The spec says numeric identifiers always have lower precedence than alphanumeric ones. Sorting `['1.0.0-beta', '1.0.0-1']` also puts `beta` first.

2. **`1.0.0-alpha.1` is considered older than `1.0.0-alpha`.** A larger set of prerelease fields should have higher precedence when all preceding fields are equal. `semver.compare('1.0.0-a.b', '1.0.0-a')` returns -1.

3. **Tilde range allows a new minor version.** `semver.satisfies('1.5.0', '~1.2.3')` is `true`, but `~1.2.3` should only allow patch-level changes. `~1.2` and `~1` look fine.

4. **Caret on 0.0.x is too loose.** `semver.satisfies('0.0.5', '^0.0.3')` is `true`; `^0.0.3` should mean exactly the 0.0.3 patch line. `^0.1.2` behaves correctly.

5. **Hyphen range with a partial upper bound cuts off too early.** `semver.satisfies('2.3.5', '1.2 - 2.3')` is `false`, but per the docs `1.2 - 2.3` means `>=1.2.0 <2.4.0-0`. Full versions on both ends (`1.2.3 - 2.3.4`) work.

6. **`maxSatisfying` returns a prerelease instead of the release.** `semver.maxSatisfying(['1.2.3-beta', '1.2.3', '1.2.2'], '>=1.2.3-alpha')` returns `'1.2.3-beta'`, expected `'1.2.3'`. It depends on the order of the input array.

7. **`coerce` drops the minor part of a number.** `semver.coerce(3.14).version` is `'3.0.0'`; the string `'3.14'` gives `'3.14.0'` as expected.

8. **`inc(..., 'preminor')` keeps the patch number.** `semver.inc('1.2.3', 'preminor')` returns `'1.3.3-0'`, expected `'1.3.0-0'`.
