diff --git a/README.md b/README.md index f6e6554..c372d8c 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ See the **TypeScript Declarations** at the top of [esm-to-plain-js.ts](esm-to-pl - 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):  _Run a command on each file in a folder and its subfolders_ - 🔍 [replacer-util](https://github.com/center-key/replacer-util):  _Find and replace strings or template outputs in text files_ - 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets):  _Revision web asset filenames with cache busting content hash fingerprints_ - - 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into named groups of easy to manage commands_ + - 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into groups of easy to manage commands_ - 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):  _Check the markup validity of HTML files using the W3C validator_ [MIT License](LICENSE.txt) diff --git a/dist/esm-to-plain-js.d.ts b/dist/esm-to-plain-js.d.ts index 88eb52d..4cd8385 100644 --- a/dist/esm-to-plain-js.d.ts +++ b/dist/esm-to-plain-js.d.ts @@ -1,4 +1,4 @@ -//! esm-to-plain-js v1.1.2 ~~ https://github.com/center-key/esm-to-plain-js ~~ MIT License +//! esm-to-plain-js v1.1.3 ~~ https://github.com/center-key/esm-to-plain-js ~~ MIT License export type Settings = { cd: string; diff --git a/dist/esm-to-plain-js.js b/dist/esm-to-plain-js.js index b96ac7a..da64920 100644 --- a/dist/esm-to-plain-js.js +++ b/dist/esm-to-plain-js.js @@ -1,4 +1,4 @@ -//! esm-to-plain-js v1.1.2 ~~ https://github.com/center-key/esm-to-plain-js ~~ MIT License +//! esm-to-plain-js v1.1.3 ~~ https://github.com/center-key/esm-to-plain-js ~~ MIT License import chalk from 'chalk'; import fs from 'fs'; @@ -26,10 +26,10 @@ const esmToPlainJs = { !sourceExists ? 'Source file does not exist: ' + source : !sourceIsFile ? 'Source is not a file: ' + source : !target ? 'Must specify a target file.' : - badTargetFolder ? 'Target folder cannot be written to: ' + targetFolder : + badTargetFolder ? 'Target folder cannot be written to: ' + String(targetFolder) : null; if (errorMessage) - throw Error('[esm-to-plain-js] ' + errorMessage); + throw new Error('[esm-to-plain-js] ' + errorMessage); const esm = fs.readFileSync(source, 'utf-8'); const normalizeEol = /\r/g; const normalizeEof = /\s*$(?!\n)/; diff --git a/package.json b/package.json index 9695dcb..5032163 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esm-to-plain-js", - "version": "1.1.2", + "version": "1.1.3", "description": "Simplistic string substitution to replace export with a globalThis assignment (CLI tool designed for use in npm package.json scripts)", "license": "MIT", "type": "module", @@ -61,7 +61,7 @@ "devDependencies": { "@eslint/js": "~9.9", "@types/fancy-log": "~2.0", - "@types/node": "~22.2", + "@types/node": "~22.3", "add-dist-header": "~1.4", "assert-deep-strict-equal": "~1.2", "copy-file-util": "~1.2",