AI HELP · VERSION LISTS 2026-10-14

AI put version 1.10.0 before 1.9.0. Did it sort versions as text?

For Semantic Versioning, compare major, minor and patch as separate numbers. In ascending order, 1.9.0 comes before 1.10.0.

First identify the project’s versioning scheme. SemVer compares major, minor and patch numerically from left to right; a prerelease comes before the corresponding normal release. A version is not a decimal number.

Our small sorting test

We tested the fictional list 1.10.0, 1.9.0 and 1.2.0. Ordinary text sorting returned 1.10.0, 1.2.0, 1.9.0. The installed semver library returned 1.2.0, 1.9.0, 1.10.0. We checked these results locally without installing a package or contacting an AI service.

Include a prerelease check

For our second fictional list, the library put 2.0.0-beta.2 before 2.0.0-beta.11, then 2.0.0. It also treated 2.0.0+build.1 and 2.0.0+build.2 as equal in precedence. Build metadata does not establish which release takes precedence.

Make the requested rule explicit

Suggested input: “These identifiers follow SemVer 2.0.0. Sort by version precedence, preserve every identifier exactly and flag invalid values. Do not convert versions to decimal numbers.” Verify the result with a maintained parser appropriate to the project’s scheme.

Higher version does not mean install now

Correct ordering answers which identifier follows which. It does not establish compatibility, support or security. Read the project’s release notes and requirements before choosing an upgrade. Dates or vendor-specific version strings may need different rules.

Published October 14, 2026. Only invented lists were tested with the already installed library. We did not upgrade software, validate a real release or test an AI response.

Sources: SemVer 2.0.0.