chore: fix minor issues in build scripts (#7458)

This commit is contained in:
Daniel Roe 2020-06-04 09:25:53 +01:00 committed by GitHub
parent be726e42b6
commit 893cfe79d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 9 deletions

View File

@ -2,7 +2,7 @@ const path = require('path')
const consola = require('consola')
const execa = require('execa')
const fs = require('fs-extra')
const glob = require('pify')(require('glob').glob)
const glob = require('pify')(require('glob'))
async function main () {
const packageDirs = await glob('+(packages|distributions)/*')

View File

@ -27,7 +27,7 @@ async function main () {
// Step 1: Apply suffixes
for (const pkg of workspacePackages) {
if (pkg.options.suffix && pkg.options.suffix.length) {
await pkg.suffixAndVersion()
pkg.suffixAndVersion()
await pkg.writePackage()
}
}

View File

@ -4,7 +4,7 @@ import spawn from 'cross-spawn'
import { existsSync, readJSONSync, writeFile, copy, remove } from 'fs-extra'
import _ from 'lodash'
import { rollup, watch } from 'rollup'
import { glob as _glob } from 'glob'
import _glob from 'glob'
import pify from 'pify'
import sortPackageJson from 'sort-package-json'
@ -239,11 +239,6 @@ export default class Package {
this.formatError(event.error)
return this.logger.error(event.error)
// Encountered an unrecoverable error
case 'FATAL':
this.formatError(event.error)
return this.logger.fatal(event.error)
// Unknown event
default:
return this.logger.info(JSON.stringify(event))
@ -330,7 +325,7 @@ export default class Package {
}
exec (command, args, silent = false) {
const r = spawn.sync(command, args.split(' '), { cwd: this.options.rootDir }, { env: process.env })
const r = spawn.sync(command, args.split(' '), { cwd: this.options.rootDir, env: process.env })
if (!silent) {
const fullCommand = command + ' ' + args