diff --git a/scripts/release.ts b/scripts/release.ts index 1e44e490d838..1164aba01fc3 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -2,15 +2,12 @@ import { spawn } from 'cross-spawn' import type { SpawnOptions } from 'node:child_process' import { once } from 'node:events' import fs from 'node:fs' -import { createRequire } from 'node:module' import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' import * as prompts from '@clack/prompts' import semver from 'semver' +import { version as currentVersion } from '../package.json' with { type: 'json' } -const { version: currentVersion } = createRequire(import.meta.url)( - '../package.json' -) const { inc: _inc, valid } = semver const versionIncrements = ['patch', 'minor', 'major'] as const