add-dist-header
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -56,3 +56,3 @@ #!/usr/bin/env node | ||
if (error) | ||
throw Error('[add-dist-header] ' + error); | ||
throw new Error('[add-dist-header] ' + error); | ||
const calcOptions = (sourceFilename) => ({ | ||
@@ -59,0 +59,0 @@ allFiles: cli.flagOn.allFiles, |
@@ -1,2 +0,2 @@ | ||
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
@@ -3,0 +3,0 @@ export type Settings = { |
@@ -1,2 +0,2 @@ | ||
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
@@ -21,3 +21,3 @@ import { isBinary } from 'istextorbinary'; | ||
if (!filename) | ||
throw Error('[add-dist-header] Must specify the "filename" option.'); | ||
throw new Error('[add-dist-header] Must specify the "filename" option.'); | ||
const doctypeLine = /^<(!doctype|\?xml).*\n/i; | ||
@@ -48,7 +48,7 @@ const commentStyle = { | ||
const out3 = mlStyle && doctype ? out2.replace(doctype, '') : out2; | ||
const versionPattern = /{{(pkg|package)[.]version}}/g; | ||
const versionPattern = /{{package[.]version}}/g; | ||
const out4 = settings.setVersion ? out3.replace(versionPattern, pkg.version) : out3; | ||
const info = pkg.homepage ?? pkg.docs ?? pkg.repository; | ||
const unlicensed = !pkg.license || pkg.license === 'UNLICENSED'; | ||
const license = unlicensed ? 'All Rights Reserved' : pkg.license + ' License'; | ||
const license = unlicensed ? 'All Rights Reserved' : `${pkg.license} License`; | ||
const delimiter = ' ' + settings.delimiter + ' '; | ||
@@ -55,0 +55,0 @@ const banner = [`${pkg.name} v${pkg.version}`, info, license].join(delimiter); |
{ | ||
"name": "add-dist-header", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Prepend a one-line banner comment (with license notice) to distribution files", | ||
@@ -45,21 +45,2 @@ "license": "MIT", | ||
}, | ||
"eslintConfig": { | ||
"ignorePatterns": [ | ||
"build", | ||
"dist", | ||
"node_modules" | ||
], | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": "off" | ||
} | ||
}, | ||
"runScriptsConfig": { | ||
@@ -71,3 +52,3 @@ "clean": [ | ||
"jshint . --exclude-path .gitignore", | ||
"eslint --max-warnings 0 . --ext .ts", | ||
"eslint --max-warnings 0", | ||
"tsc" | ||
@@ -89,3 +70,3 @@ ], | ||
"fancy-log": "~2.0", | ||
"glob": "~10.3", | ||
"glob": "~11.0", | ||
"istextorbinary": "~9.5", | ||
@@ -95,17 +76,17 @@ "slash": "~5.1" | ||
"devDependencies": { | ||
"@eslint/js": "~9.9", | ||
"@types/fancy-log": "~2.0", | ||
"@types/node": "~20.12", | ||
"@typescript-eslint/eslint-plugin": "~7.8", | ||
"@typescript-eslint/parser": "~7.8", | ||
"@types/node": "~22.2", | ||
"assert-deep-strict-equal": "~1.2", | ||
"copy-file-util": "~1.2", | ||
"copy-folder-util": "~1.1", | ||
"eslint": "8.57.0", | ||
"eslint": "~9.9", | ||
"jshint": "~2.13", | ||
"mocha": "~10.4", | ||
"rimraf": "~5.0", | ||
"run-scripts-util": "~1.2", | ||
"typescript": "~5.4", | ||
"mocha": "~10.7", | ||
"rimraf": "~6.0", | ||
"run-scripts-util": "~1.3", | ||
"typescript": "~5.5", | ||
"typescript-eslint": "~8.0", | ||
"w3c-html-validator": "~1.8" | ||
} | ||
} |
@@ -142,3 +142,3 @@ # Add Dist Header | ||
- 🔢 [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_ | ||
@@ -145,0 +145,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18763
+ Addedglob@11.0.0(transitive)
+ Addedjackspeak@4.0.2(transitive)
+ Addedlru-cache@11.0.2(transitive)
+ Addedminimatch@10.0.1(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedpath-scurry@2.0.0(transitive)
- Removed@pkgjs/parseargs@0.11.0(transitive)
- Removedglob@10.3.16(transitive)
- Removedjackspeak@3.4.3(transitive)
- Removedlru-cache@10.4.3(transitive)
- Removedminimatch@9.0.5(transitive)
- Removedpath-scurry@1.11.1(transitive)
Updatedglob@~11.0