Dashboard › craft › Craft uses home-grown SemVer utils — do…
019c9fa3-fcfe-7b07-8351-90944df38ca0| Project | Hits | Last recalled |
|---|---|---|
| opencode-lore | 1 | 2026-08-06 |
Despite semver being a dependency (used in src/utils/autoVersion.ts for semver.inc()), the codebase has its own SemVer interface and utilities in src/utils/version.ts: parseVersion(), versionGreaterOrEqualThan(), isPreviewRelease(), etc. These are used throughout the codebase (npm target, publish tag logic, etc.). When adding version comparison logic, use these existing utilities rather than introducing new custom comparison functions or reaching for the semver package. Example: the OIDC minimum npm version check was initially implemented with 3 separate constants and a custom comparison helper, then refactored to a single SemVer constant + versionGreaterOrEqualThan().