From 893cfe79d3a8bc06f8a610694538e10229051bf7 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 4 Jun 2020 09:25:53 +0100 Subject: [PATCH] chore: fix minor issues in build scripts (#7458) --- scripts/link.js | 2 +- scripts/package | 2 +- scripts/package.js | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/link.js b/scripts/link.js index 952158c726..017cebb580 100644 --- a/scripts/link.js +++ b/scripts/link.js @@ -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)/*') diff --git a/scripts/package b/scripts/package index f008808fab..8ba0035f6b 100755 --- a/scripts/package +++ b/scripts/package @@ -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() } } diff --git a/scripts/package.js b/scripts/package.js index 915fd259d3..e23bab9359 100644 --- a/scripts/package.js +++ b/scripts/package.js @@ -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