From e2a9bca79948ee79a7775127084c18a996674bcf Mon Sep 17 00:00:00 2001 From: dpilafian Date: Sun, 18 Jun 2023 01:38:53 -0700 Subject: [PATCH] Release v1.1.1 --- README.md | 1 + dist/run-scripts.d.ts | 2 +- dist/run-scripts.js | 5 +++-- dist/run-scripts.umd.cjs | 5 +++-- package.json | 16 ++++++++-------- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 97420a9..cb04c5d 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ Even though **run-scripts-util** is primarily intended for build scripts, the pa Example: ``` typescript import { runScripts } from 'run-scripts-util'; + const options = { quiet: false }; runScripts.exec('compile', options); runScripts.execParallel('watch', options); diff --git a/dist/run-scripts.d.ts b/dist/run-scripts.d.ts index da8e029..dbcfbed 100644 --- a/dist/run-scripts.d.ts +++ b/dist/run-scripts.d.ts @@ -1,4 +1,4 @@ -//! run-scripts-util v1.1.0 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License +//! run-scripts-util v1.1.1 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License export type Settings = { only: number | null; diff --git a/dist/run-scripts.js b/dist/run-scripts.js index 78ee052..4a29174 100644 --- a/dist/run-scripts.js +++ b/dist/run-scripts.js @@ -1,4 +1,4 @@ -//! run-scripts-util v1.1.0 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License +//! run-scripts-util v1.1.1 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License import { spawn, spawnSync } from 'node:child_process'; import chalk from 'chalk'; @@ -26,8 +26,9 @@ const runScripts = { const logItems = settings.verbose ? [chalk.white(group), chalk.yellow(step), arrow] : []; logger(...logItems, chalk.cyanBright(command)); const task = spawnSync(command, { shell: true, stdio: 'inherit' }); + const errorMessage = () => `[run-scripts-util] Task: ${group} (step ${step}), Status: ${task.status}`; if (task.status !== 0) - throw Error(`[run-scripts-util] ${group} #${step}, error status: ${task.status}`); + throw Error(errorMessage() + '\nCommand: ' + command); logger(...logItems, chalk.green('done'), chalk.white(`(${Date.now() - startTime}ms)`)); }; const active = (step) => settings.only === null || step === settings.only; diff --git a/dist/run-scripts.umd.cjs b/dist/run-scripts.umd.cjs index e4ae8a7..14a3309 100644 --- a/dist/run-scripts.umd.cjs +++ b/dist/run-scripts.umd.cjs @@ -1,4 +1,4 @@ -//! run-scripts-util v1.1.0 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License +//! run-scripts-util v1.1.1 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -41,8 +41,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { const logItems = settings.verbose ? [chalk_1.default.white(group), chalk_1.default.yellow(step), arrow] : []; logger(...logItems, chalk_1.default.cyanBright(command)); const task = (0, node_child_process_1.spawnSync)(command, { shell: true, stdio: 'inherit' }); + const errorMessage = () => `[run-scripts-util] Task: ${group} (step ${step}), Status: ${task.status}`; if (task.status !== 0) - throw Error(`[run-scripts-util] ${group} #${step}, error status: ${task.status}`); + throw Error(errorMessage() + '\nCommand: ' + command); logger(...logItems, chalk_1.default.green('done'), chalk_1.default.white(`(${Date.now() - startTime}ms)`)); }; const active = (step) => settings.only === null || step === settings.only; diff --git a/package.json b/package.json index 4007111..4153fa8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "run-scripts-util", - "version": "1.1.0", + "version": "1.1.1", "description": "Organize npm scripts into named groups of easy to manage commands (CLI tool designed for use in npm scripts)", "license": "MIT", "type": "module", @@ -113,19 +113,19 @@ }, "devDependencies": { "@types/fancy-log": "~2.0", - "@types/node": "~18.15", - "@typescript-eslint/eslint-plugin": "~5.57", - "@typescript-eslint/parser": "~5.57", + "@types/node": "~20.3", + "@typescript-eslint/eslint-plugin": "~5.59", + "@typescript-eslint/parser": "~5.59", "add-dist-header": "~1.0", "assert-deep-strict-equal": "~1.0", "copy-file-util": "~1.0", "copy-folder-util": "~1.0", - "eslint": "~8.37", + "eslint": "~8.43", "jshint": "~2.13", "mocha": "~10.2", "npm-run-all2": "~6.0", - "rev-web-assets": "~1.0", - "rimraf": "~4.4", - "typescript": "~5.0" + "rev-web-assets": "~1.1", + "rimraf": "~5.0", + "typescript": "~5.1" } }