Version APIs accept strings or mutable SemVer objects returned by parse or
coerce.
normalizeFull keeps build metadata; normalized, incremented, and truncated
versions omit it.
Range APIs accept strings or mutable SemVerRange objects. They support
comparators, unions, hyphens, wildcards, tilde, caret, loose parsing, and
prereleases.
Range options are fixed when a SemVerRange is created. APIs that receive a
parsed range use its stored options and do not accept another options argument:
parse, parseComparator, and parseRange throw detailed TypeErrors. Their
tryParse* wrappers return null; other safe transforms and predicates keep
their documented null/false behavior.
Migrating from node-semver
Only renamed or reshaped node-semver APIs are listed; same-named functions
such as clean, coerce, compare, and satisfies are omitted.
node-semver
verkit
SemVer
parse
parse
tryParse
valid
normalize
inc, diff
increment, difference
major, minor, patch, prerelease
getMajor, getMinor, getPatch, getPrerelease
rcompare, compareLoose, cmp
compareReversed, compare with { loose: true }, compareWithOperator
valid returns a normalized string | null in node-semver, so its equivalent
is normalize. Use isValid when you only need a boolean.
Use options objects such as { loose: true } and { identifier, identifierBase }.
Range options belong to the string-parsing step; parsed SemVerRange objects
already contain them.
Differences from node-semver
verkit follows node-semver semantics with four user-visible differences:
Array helpers never mutate their inputs.
Parsed SemVerRange objects retain their parse-time options. node-semver
helpers may reparse a Range from raw using call-site options.
verkit is ESM-only, with no CommonJS, CLI, or NODE_DEBUG=semver output.
Error text, stack traces, and supported runtimes may differ.