From 73a9fd4974aa70953b12fd2b27977dafb35df5b9 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 22 Sep 2026 09:19:19 +0000 Subject: [PATCH] refactor: migrate from `semver` to `verkit` --- package.json | 3 +-- pnpm-lock.yaml | 20 +++++++++----------- scripts/update-changelog.ts | 4 ++-- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index e057826f..68ffd34d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ }, "devDependencies": { "@nuxt/test-utils": "3.23.0", - "@types/semver": "7.7.1", "changelogen": "0.6.2", "consola": "^3.4.2", "devalue": "6.0.0", @@ -44,9 +43,9 @@ "ofetch": "1.5.1", "pathe": "^2.0.3", "playwright-core": "1.61.0", - "semver": "7.8.5", "std-env": "4.1.0", "typescript-eslint": "^8.61.1", + "verkit": "0.5.0", "vitest": "4.1.11", "vue": "2.7.16", "vue-eslint-parser": "^10.4.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af6e1da2..ec141f8c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,9 +20,6 @@ importers: '@nuxt/test-utils': specifier: 3.23.0 version: 3.23.0(happy-dom@20.10.6)(magicast@0.5.2)(playwright-core@1.61.0)(typescript@6.0.3)(vitest@4.1.11(@types/node@25.6.0)(happy-dom@20.10.6)(vite@8.0.16(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(yaml@2.9.0))) - '@types/semver': - specifier: 7.7.1 - version: 7.7.1 changelogen: specifier: 0.6.2 version: 0.6.2(magicast@0.5.2) @@ -86,15 +83,15 @@ importers: playwright-core: specifier: 1.61.0 version: 1.61.0 - semver: - specifier: 7.8.5 - version: 7.8.5 std-env: specifier: 4.1.0 version: 4.1.0 typescript-eslint: specifier: ^8.61.1 version: 8.61.1(eslint@9.39.4(jiti@2.7.0))(typescript@6.0.3) + verkit: + specifier: 0.5.0 + version: 0.5.0 vitest: specifier: 4.1.11 version: 4.1.11(@types/node@25.6.0)(happy-dom@20.10.6)(vite@8.0.16(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(yaml@2.9.0)) @@ -2876,9 +2873,6 @@ packages: '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - '@types/semver@7.7.1': - resolution: {integrity: sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==} - '@types/source-list-map@0.1.6': resolution: {integrity: sha512-5JcVt1u5HDmlXkwOD2nslZVllBBc7HDuOICfiZah2Z0is8M8g+ddAEawbmd3VjedfDHBzxCaXLs07QEmb7y54g==} @@ -8864,6 +8858,10 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + verkit@0.5.0: + resolution: {integrity: sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==} + engines: {node: '>=18.12.0'} + version-guard@1.1.3: resolution: {integrity: sha512-JwPr6erhX53EWH/HCSzfy1tTFrtPXUe927wdM1jqBBeYp1OM+qPHjWbsvv6pIBduqdgxxS+ScfG7S28pzyr2DQ==} engines: {node: '>=0.10.48'} @@ -11942,8 +11940,6 @@ snapshots: '@types/resolve@1.20.2': {} - '@types/semver@7.7.1': {} - '@types/source-list-map@0.1.6': {} '@types/tapable@1.0.12': {} @@ -18993,6 +18989,8 @@ snapshots: vary@1.1.2: {} + verkit@0.5.0: {} + version-guard@1.1.3: {} vite-node@6.0.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(yaml@2.9.0): diff --git a/scripts/update-changelog.ts b/scripts/update-changelog.ts index a66a947f..dd8d0ca6 100644 --- a/scripts/update-changelog.ts +++ b/scripts/update-changelog.ts @@ -1,6 +1,6 @@ import { execSync } from 'node:child_process' import { $fetch } from 'ofetch' -import { inc } from 'semver' +import { increment } from 'verkit' import { generateMarkDown, getCurrentGitBranch, loadChangelogConfig } from 'changelogen' import { consola } from 'consola' import { determineBumpType, getContributors, getLatestCommits, loadWorkspace } from './_utils.ts' @@ -15,7 +15,7 @@ async function main () { )) const bumpType = await determineBumpType() - const newVersion = inc(workspace.find('@nuxt/bridge').data.version, bumpType || 'patch') + const newVersion = increment(workspace.find('@nuxt/bridge').data.version, bumpType || 'patch') const changelog = await generateMarkDown(commits, config) // Create and push a branch with bumped versions if it has not already been created