chore(deps): replace execa w/ tinyexec (#665)

This commit is contained in:
藍+85CD
2025-10-18 19:12:54 +08:00
committed by GitHub
parent 4daf9d8080
commit 4a1a33f9b6
6 changed files with 27 additions and 21 deletions
-1
View File
@@ -144,7 +144,6 @@
"electron": "^38.2.2",
"electron-builder": "26.0.20",
"electron-vite": "^4.0.1",
"execa": "^9.6.0",
"less": "^4.4.2",
"unocss-preset-scrollbar": "^3.2.0",
"unplugin-info": "^1.2.4",
+3 -3
View File
@@ -5,7 +5,7 @@ import process from 'node:process'
import { readFile } from 'node:fs/promises'
import { resolve } from 'node:path'
import { execa } from 'execa'
import { x } from 'tinyexec'
import * as yaml from 'yaml'
@@ -14,7 +14,7 @@ import packageJSON from '../package.json' assert { type: 'json' }
export async function getVersion(options: { release: boolean, autoTag: boolean, tag: string[] }) {
if (!options.release || !options.tag) {
// Otherwise, fetch from the latest git ref
const res = await execa('git', ['log', '-1', '--pretty=format:"%H"'])
const res = await x('git', ['log', '-1', '--pretty=format:"%H"'])
const date = new Date().toISOString().split('T')[0].replace(/-/g, '')
return `nightly-${date}-${String(res.stdout.replace(/"/g, '')).trim().substring(0, 7)}`
}
@@ -43,7 +43,7 @@ export async function getVersion(options: { release: boolean, autoTag: boolean,
// Now, only auto-tag & release && non-specific tag is the only possibility,
// fetch the latest git ref
try {
const res = await execa('git', ['describe', '--tags', '--abbrev=0'])
const res = await x('git', ['describe', '--tags', '--abbrev=0'])
return String(res.stdout).replace(/^v/, '').trim()
}
catch {
-1
View File
@@ -116,7 +116,6 @@
"@vue-macros/volar": "^3.1.1",
"@vueuse/motion": "^3.0.3",
"csstype": "^3.1.3",
"execa": "^9.6.0",
"hfup": "^1.0.0",
"less": "^4.4.2",
"unplugin-info": "^1.2.4",