Package version compares dotted semantic-version strings (major.minor.patch).
It is deliberately tiny and dependency-free so both the API update check and
the CLI self-upgrade can share one comparator.
Parse returns the major.minor.patch of a version string. A leading "v" and
any "-pre"/"+build" suffix are ignored. ok is false for unparseable input
(e.g. "dev").