Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

add-dist-header

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-dist-header - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

2

bin/cli.js

@@ -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):&nbsp; _Revision web asset filenames with cache busting content hash fingerprints_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):&nbsp; _Organize npm package.json scripts into named groups of easy to manage commands_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):&nbsp; _Organize npm package.json scripts into groups of easy to manage commands_
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):&nbsp; _Check the markup validity of HTML files using the W3C validator_

@@ -145,0 +145,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc