From f86f1af636f39d7d30a97873bbb6652416f68013 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 5 Apr 2022 09:51:49 -0700 Subject: [PATCH] deps: @npmcli/disparity-colors@2.0.0 --- .../disparity-colors/{ => lib}/index.js | 6 +-- .../@npmcli/disparity-colors/package.json | 37 ++++++++++++------- package-lock.json | 17 +++++---- workspaces/libnpmdiff/package.json | 2 +- 4 files changed, 37 insertions(+), 25 deletions(-) rename node_modules/@npmcli/disparity-colors/{ => lib}/index.js (87%) diff --git a/node_modules/@npmcli/disparity-colors/index.js b/node_modules/@npmcli/disparity-colors/lib/index.js similarity index 87% rename from node_modules/@npmcli/disparity-colors/index.js rename to node_modules/@npmcli/disparity-colors/lib/index.js index a02b8f884d8ac..3d2aa56be9253 100644 --- a/node_modules/@npmcli/disparity-colors/index.js +++ b/node_modules/@npmcli/disparity-colors/lib/index.js @@ -4,7 +4,7 @@ const colors = { removed: ansi.red, added: ansi.green, header: ansi.yellow, - section: ansi.magenta + section: ansi.magenta, } function colorize (str, opts) { @@ -13,10 +13,10 @@ function colorize (str, opts) { headerLength = 2 } - const color = (str, colorId) => { + const color = (colorStr, colorId) => { const { open, close } = colors[colorId] // avoid highlighting the "\n" (would highlight till the end of the line) - return str.replace(/[^\n\r]+/g, open + '$&' + close) + return colorStr.replace(/[^\n\r]+/g, open + '$&' + close) } // this RegExp will include all the `\n` chars into the lines, easier to join diff --git a/node_modules/@npmcli/disparity-colors/package.json b/node_modules/@npmcli/disparity-colors/package.json index 3f389a42c9f99..2b45920a7e783 100644 --- a/node_modules/@npmcli/disparity-colors/package.json +++ b/node_modules/@npmcli/disparity-colors/package.json @@ -1,14 +1,19 @@ { "name": "@npmcli/disparity-colors", - "version": "1.0.1", + "version": "2.0.0", + "main": "lib/index.js", "files": [ - "index.js" + "bin/", + "lib/" ], "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, "description": "Colorizes unified diff output", - "repository": "https://github.com/npm/disparity-colors", + "repository": { + "type": "git", + "url": "https://github.com/npm/disparity-colors.git" + }, "keywords": [ "disparity", "npm", @@ -24,7 +29,7 @@ "cli", "tty" ], - "author": "npm Inc. ", + "author": "GitHub Inc.", "contributors": [ { "name": "Ruy Adorno", @@ -34,27 +39,31 @@ ], "license": "ISC", "scripts": { - "lint": "standard index.js", + "lint": "eslint \"**/*.js\"", "pretest": "npm run lint", "test": "tap", "snap": "tap", "preversion": "npm test", "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" + "prepublishOnly": "git push origin --follow-tags", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint" }, "tap": { "check-coverage": true }, - "standard": { - "ignore": [ - "/tap-snapshots/" - ] - }, "devDependencies": { - "standard": "^16.0.3", - "tap": "^14.11.0" + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.2.2", + "tap": "^16.0.1" }, "dependencies": { "ansi-styles": "^4.3.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.2.2" } } diff --git a/package-lock.json b/package-lock.json index 2e3800ede9ded..a43ae9fa178e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -828,13 +828,14 @@ } }, "node_modules/@npmcli/disparity-colors": { - "version": "1.0.1", - "license": "ISC", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-2.0.0.tgz", + "integrity": "sha512-FFXGrIjhvd2qSZ8iS0yDvbI7nbjdyT2VNO7wotosjYZM2p2r8PN3B7Om3M5NO9KqW/OVzfzLB3L0V5Vo5QXC7A==", "dependencies": { "ansi-styles": "^4.3.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/@npmcli/eslint-config": { @@ -9606,7 +9607,7 @@ "version": "4.0.2", "license": "ISC", "dependencies": { - "@npmcli/disparity-colors": "^1.0.1", + "@npmcli/disparity-colors": "^2.0.0", "@npmcli/installed-package-contents": "^1.0.7", "binary-extensions": "^2.2.0", "diff": "^5.0.0", @@ -10242,7 +10243,7 @@ "ssri": "^8.0.1", "tap": "^15.1.2", "tcompare": "^5.0.6", - "treeverse": "2.0.0", + "treeverse": "^2.0.0", "walk-up-path": "^1.0.0" } }, @@ -10263,7 +10264,9 @@ } }, "@npmcli/disparity-colors": { - "version": "1.0.1", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-2.0.0.tgz", + "integrity": "sha512-FFXGrIjhvd2qSZ8iS0yDvbI7nbjdyT2VNO7wotosjYZM2p2r8PN3B7Om3M5NO9KqW/OVzfzLB3L0V5Vo5QXC7A==", "requires": { "ansi-styles": "^4.3.0" } @@ -12430,7 +12433,7 @@ "libnpmdiff": { "version": "file:workspaces/libnpmdiff", "requires": { - "@npmcli/disparity-colors": "^1.0.1", + "@npmcli/disparity-colors": "2.0.0", "@npmcli/eslint-config": "^3.0.1", "@npmcli/installed-package-contents": "^1.0.7", "@npmcli/template-oss": "3.2.2", diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index eeddaf09fdc77..950e8f373c66c 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -53,7 +53,7 @@ "tap": "^15.0.9" }, "dependencies": { - "@npmcli/disparity-colors": "^1.0.1", + "@npmcli/disparity-colors": "^2.0.0", "@npmcli/installed-package-contents": "^1.0.7", "binary-extensions": "^2.2.0", "diff": "^5.0.0",