|
|
|
@ -2,15 +2,12 @@ import { spawn } from 'cross-spawn'
|
|
|
|
import type { SpawnOptions } from 'node:child_process'
|
|
|
|
import type { SpawnOptions } from 'node:child_process'
|
|
|
|
import { once } from 'node:events'
|
|
|
|
import { once } from 'node:events'
|
|
|
|
import fs from 'node:fs'
|
|
|
|
import fs from 'node:fs'
|
|
|
|
import { createRequire } from 'node:module'
|
|
|
|
|
|
|
|
import { resolve } from 'node:path'
|
|
|
|
import { resolve } from 'node:path'
|
|
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import * as prompts from '@clack/prompts'
|
|
|
|
import * as prompts from '@clack/prompts'
|
|
|
|
import semver from 'semver'
|
|
|
|
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 { inc: _inc, valid } = semver
|
|
|
|
|
|
|
|
|
|
|
|
const versionIncrements = ['patch', 'minor', 'major'] as const
|
|
|
|
const versionIncrements = ['patch', 'minor', 'major'] as const
|
|
|
|
|