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 consola = require('consola')
const execa = require('execa') const execa = require('execa')
const fs = require('fs-extra') const fs = require('fs-extra')
const glob = require('pify')(require('glob').glob) const glob = require('pify')(require('glob'))
async function main () { async function main () {
const packageDirs = await glob('+(packages|distributions)/*') const packageDirs = await glob('+(packages|distributions)/*')

View File

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

View File

@ -4,7 +4,7 @@ import spawn from 'cross-spawn'
import { existsSync, readJSONSync, writeFile, copy, remove } from 'fs-extra' import { existsSync, readJSONSync, writeFile, copy, remove } from 'fs-extra'
import _ from 'lodash' import _ from 'lodash'
import { rollup, watch } from 'rollup' import { rollup, watch } from 'rollup'
import { glob as _glob } from 'glob' import _glob from 'glob'
import pify from 'pify' import pify from 'pify'
import sortPackageJson from 'sort-package-json' import sortPackageJson from 'sort-package-json'
@ -239,11 +239,6 @@ export default class Package {
this.formatError(event.error) this.formatError(event.error)
return this.logger.error(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 // Unknown event
default: default:
return this.logger.info(JSON.stringify(event)) return this.logger.info(JSON.stringify(event))
@ -330,7 +325,7 @@ export default class Package {
} }
exec (command, args, silent = false) { 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) { if (!silent) {
const fullCommand = command + ' ' + args const fullCommand = command + ' ' + args