Skip to content

chore: replace semver with verkit - #158

Merged
theoephraim merged 2 commits into
mainfrom
claude/semver-verkit-migration-0b5d93
Aug 17, 2026
Merged

chore: replace semver with verkit#158
theoephraim merged 2 commits into
mainfrom
claude/semver-verkit-migration-0b5d93

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Replaces the semver dependency (plus @types/semver) with verkit — a zero-dependency, tree-shakeable SemVer library with native TypeScript types.

The API mapped nearly 1:1; the differences that needed handling:

  • semver.prerelease(v) === null checks → isPrerelease(v): verkit's getPrerelease('1.2.3') returns [] rather than null for stable versions. The snapshot guard now uses isPrerelease(version) !== true, which also refuses invalid versions (previously only stable ones) — strictly safer.
  • semver.parse returned null on invalid input; verkit's parse throws, so prerelease counter extraction uses tryParse. verkit also omits the prerelease field entirely for stable versions, so the counter check defaults it to [].
  • Tests: semver.valid(v)).toBe(v)normalize(v)).toBe(v), semver.ltisLess.

Verified at runtime that satisfies/increment/compare match node-semver's contracts (string ranges accepted, false on invalid range, null on failed increment, throw on comparing invalid versions). verkit is bundled into dist by tsdown as a devDependency, same as semver was; releaseTriggeringDevDeps updated accordingly.

All 427 tests pass; typecheck, lint, and build are clean.

@pullfrog

pullfrog Bot commented Aug 17, 2026

Copy link
Copy Markdown

Run failed. View the logs →

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using azure/gpt-5.6-sol𝕏

@github-actions

Copy link
Copy Markdown

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 1.18.1 → 1.18.2

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedverkit@​0.4.010010010091100

View full report

@theoephraim
theoephraim merged commit f5fc5f9 into main Aug 17, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant