chore(deps): replace semver with verkit - #76
Conversation
There was a problem hiding this comment.
Important
pnpm typecheck fails on this branch, so the required Test workflow cannot go green as-is. It's a one-line fix, inline below. Everything else about the swap checks out.
Reviewed changes — the complete semver → [email protected] swap across all 5 files, plus a call-site-by-call-site behavioural comparison against [email protected].
package.json/pnpm-lock.yaml— dropssemverand@types/semver, addsverkitpinned at exactly0.4.0.utils/version.ts—semver.valid(v) !== null→isValid(v)in the pinned-devDependency guard.utils/packageManager.ts— the sameisValidswap behind theconcreteflag for both thepackageManageranddevEnginesspecs, andsemver.satisfies→satisfiesin the precedence resolution.utils/versioning.ts—semver.parse→tryParse,semver.satisfies→satisfies, and a new localminVersionhelper wrappingfindMinimumForRange+normalizeto stand in forsemver.minVersion.
Verification I ran locally, so it doesn't need repeating:
- Behavioural parity — compared
verkitagainst[email protected]across every input shape these call sites can receive: 14 version strings forisValid(includingv1.2.3, whitespace-padded,1.2,1.2.3+build,workspace:*,catalog:), 9 version/range pairs forsatisfies(including prerelease exclusion andx-ranges like^0.1.x), and 7 ranges forminVersion. Identical results on all of them. Notablyverkit'ssatisfiesalso swallows malformed ranges and returnsfalserather than throwing, matchingsemver— that one matters, sincedevEngines.packageManager.versioninutils/packageManager.ts:130is arbitrary text from a user'spackage.json. - Tests — 739 unit tests pass, including all 15 in
utils/versioning.test.ts. (test/ci.test.tsfails in my sandbox for an unrelated directory-layout reason.) - Packaging —
pnpm install --frozen-lockfilesucceeds under the pinned[email protected], andnode esbuild.config.jsinlinesverkitintodist/with no dangling external import. Sincepackage.jsonhas nodependenciesand ships onlydist/, a pure-ESM dependency was the thing most likely to break here, and it doesn't.
ℹ️ verkit is pre-1.0 on the path that gates every incoming payload
Not a defect, just a call only the maintainer can make. validateCompatibility is invoked on every payload the action processes (utils/payload.ts:143), and resolvePackageManagerSpec decides what gets pinned via corepack — so this swaps the reference SemVer implementation for a 0.x, single-maintainer package on load-bearing paths. Under SemVer a 0.x minor bump may carry breaking changes; the exact 0.4.0 pin contains that (and matches how agent-browser, opencode-ai, and skills are already pinned here), at the cost of not picking up patch fixes automatically.
Technical details
# Pre-1.0 dependency on payload-compatibility path
## Affected sites
- `package.json:64` — `"verkit": "0.4.0"`, a pre-1.0 release
- `utils/versioning.ts:1` — imported by `validateCompatibility`, reached from `utils/payload.ts:143` for every payload
- `utils/packageManager.ts:4` — imported by `resolvePackageManagerSpec`, which drives corepack pinning
## Open questions for the human
- Is a `0.x` dependency acceptable on these paths, or should this wait for `verkit` 1.0?
- If it lands: is the exact pin the intended policy (no automatic patch uptake), and who owns bumping it?
- `utils/packageManager.ts` and `utils/version.ts` have no unit tests covering the `concrete` flag or the pinned-version guard. Parity is verified for this swap, but nothing in the repo would catch a regression on a future `verkit` bump.ℹ️ Nitpicks
pnpm-lock.yamlcarries churn unrelated to the dependency swap: peer deps re-bucketed underoptionalDependencies(ajv-formats,fdir,follow-redirects,xsschema,vitest), vite's peer hash gaining([email protected]), andzod: {}/vite: {}dropping out ofpeerDependenciesMeta. I confirmed--frozen-lockfilestill installs cleanly under the pinned[email protected], so this is benign — but it inflates the diff and will conflict with any other in-flight dependency PR. Regenerating the lockfile with only thesemver/verkitdelta would keep it reviewable.
Claude Opus (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ Blocking typecheck failure is fixed. One leftover one-character nit inline.
Reviewed changes — only the delta since my previous review at a8ecc31, which is a single one-line change in 6236d93 Update versioning.ts.
utils/versioning.ts:20— adds the outer non-null assertion tominVersion, sonormalize'sstring | nullreturn no longer conflicts with the declaredstringreturn type.
Re-verified against the new head: pnpm typecheck passes clean (it failed on the previous head), and utils/versioning.test.ts still passes all 15 cases. My earlier thread on this is resolved.
The pre-1.0 dependency question I raised in the previous review is unchanged and still a maintainer call — nothing in this commit affects it.
Claude Opus (free via Pullfrog for OSS) | 𝕏
| const COMPATIBILITY_POLICY: CompatibilityPolicy = "non-breaking"; | ||
|
|
||
| function minVersion(range: string): string { | ||
| return normalize(findMinimumForRange(range)!)! |
There was a problem hiding this comment.
nit: missing the trailing semicolon. Nothing enforces it — the repo has no formatter or linter config — but every other statement in this file and across utils/ terminates with one.
| return normalize(findMinimumForRange(range)!)! | |
| return normalize(findMinimumForRange(range)!)!; |
6236d93 to
acb1511
Compare

Context: e18e/ecosystem-issues#277
Note
Cursor Bugbot is generating a summary for commit a8ecc31. Configure here.