From 32d893da695ac0300ad00d943622d38e967ecb19 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Fri, 26 Apr 2024 01:49:08 +0800 Subject: [PATCH] chore: rename alias `ezspawnAsync` -> `ezspawn` --- src/commands/check/checkGlobal.ts | 8 ++++---- test/cli.test.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands/check/checkGlobal.ts b/src/commands/check/checkGlobal.ts index af4b333..dd4a21d 100644 --- a/src/commands/check/checkGlobal.ts +++ b/src/commands/check/checkGlobal.ts @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import { async as ezspawnAsync } from '@jsdevtools/ez-spawn' +import { async as ezspawn } from '@jsdevtools/ez-spawn' import c from 'picocolors' import prompts from 'prompts' import { type Agent, getCommand } from '@antfu/ni' @@ -118,7 +118,7 @@ async function loadGlobalPnpmPackage(options: CheckOptions): Promise { - const { stdout } = await ezspawnAsync('npm', ['ls', '--global', '--depth=0', '--json'], { stdio: 'pipe' }) + const { stdout } = await ezspawn('npm', ['ls', '--global', '--depth=0', '--json'], { stdio: 'pipe' }) const npmOut = JSON.parse(stdout) as NpmOut const filter = createDependenciesFilter(options.include, options.exclude) @@ -182,5 +182,5 @@ async function installPkg(pkg: GlobalPackageMeta) { const dependencies = dumpDependencies(changes, 'dependencies') const updateArgs = Object.entries(dependencies).map(([name, version]) => `${name}@${version}`) const installCommand = getCommand(pkg.agent, 'global', [...updateArgs]) - await ezspawnAsync(installCommand, { stdio: 'inherit' }) + await ezspawn(installCommand, { stdio: 'inherit' }) } diff --git a/test/cli.test.ts b/test/cli.test.ts index 256e89a..c0e476d 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,11 +1,11 @@ import path from 'node:path' import { expect, it } from 'vitest' -import { async as ezspawnAsync } from '@jsdevtools/ez-spawn' +import { async as ezspawn } from '@jsdevtools/ez-spawn' it('taze cli should just works', async () => { const binPath = path.resolve(__dirname, '../bin/taze.mjs') - const proc = await ezspawnAsync(process.execPath, [binPath], { stdio: 'pipe' }) + const proc = await ezspawn(process.execPath, [binPath], { stdio: 'pipe' }) expect(proc.stderr).toBe('') })