bump version

This commit is contained in:
undefined committed 2022-11-27 03:06:50 +08:00
1 parent c2f5541e83
commit a24fec2e7c
11 files changed
+28 -31

No files matched your search

+7 -10
View File
@@ -1,9 +1,10 @@
const globby = require('globby');
const spawn = require('cross-spawn');
import { SpawnOptions } from 'child_process';
import spawn from 'cross-spawn';
import { globby } from 'globby';
const cwd = process.cwd();
export const cwd = process.cwd();
function getWorkspaces() {
export function getWorkspaces() {
return globby(require('../package.json').workspaces, {
cwd,
deep: 0,
@@ -12,9 +13,9 @@ function getWorkspaces() {
});
}
function spawnAsync(command, path) {
export function spawnAsync(command, path) {
const args = command.split(/\s+/);
const options = { stdio: 'inherit' };
const options: SpawnOptions = { stdio: 'inherit' };
if (path) options.cwd = path;
const child = spawn(args[0], args.slice(1), options);
return new Promise((resolve, reject) => {
@@ -22,7 +23,3 @@ function spawnAsync(command, path) {
child.on('error', reject);
});
}
module.exports = {
cwd, spawnAsync, getWorkspaces,
};