Skip to content

Commit f86f1af

Browse files
committed
deps: @npmcli/disparity-colors@2.0.0
1 parent 1a90b9e commit f86f1af

File tree

4 files changed

+37
-25
lines changed

4 files changed

+37
-25
lines changed

node_modules/@npmcli/disparity-colors/index.js node_modules/@npmcli/disparity-colors/lib/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const colors = {
44
removed: ansi.red,
55
added: ansi.green,
66
header: ansi.yellow,
7-
section: ansi.magenta
7+
section: ansi.magenta,
88
}
99

1010
function colorize (str, opts) {
@@ -13,10 +13,10 @@ function colorize (str, opts) {
1313
headerLength = 2
1414
}
1515

16-
const color = (str, colorId) => {
16+
const color = (colorStr, colorId) => {
1717
const { open, close } = colors[colorId]
1818
// avoid highlighting the "\n" (would highlight till the end of the line)
19-
return str.replace(/[^\n\r]+/g, open + '$&' + close)
19+
return colorStr.replace(/[^\n\r]+/g, open + '$&' + close)
2020
}
2121

2222
// this RegExp will include all the `\n` chars into the lines, easier to join
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"name": "@npmcli/disparity-colors",
3-
"version": "1.0.1",
3+
"version": "2.0.0",
4+
"main": "lib/index.js",
45
"files": [
5-
"index.js"
6+
"bin/",
7+
"lib/"
68
],
79
"engines": {
8-
"node": ">=10"
10+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
911
},
1012
"description": "Colorizes unified diff output",
11-
"repository": "https://github.com/npm/disparity-colors",
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/npm/disparity-colors.git"
16+
},
1217
"keywords": [
1318
"disparity",
1419
"npm",
@@ -24,7 +29,7 @@
2429
"cli",
2530
"tty"
2631
],
27-
"author": "npm Inc. <support@npmjs.com>",
32+
"author": "GitHub Inc.",
2833
"contributors": [
2934
{
3035
"name": "Ruy Adorno",
@@ -34,27 +39,31 @@
3439
],
3540
"license": "ISC",
3641
"scripts": {
37-
"lint": "standard index.js",
42+
"lint": "eslint \"**/*.js\"",
3843
"pretest": "npm run lint",
3944
"test": "tap",
4045
"snap": "tap",
4146
"preversion": "npm test",
4247
"postversion": "npm publish",
43-
"prepublishOnly": "git push origin --follow-tags"
48+
"prepublishOnly": "git push origin --follow-tags",
49+
"postlint": "template-oss-check",
50+
"template-oss-apply": "template-oss-apply --force",
51+
"lintfix": "npm run lint -- --fix",
52+
"posttest": "npm run lint"
4453
},
4554
"tap": {
4655
"check-coverage": true
4756
},
48-
"standard": {
49-
"ignore": [
50-
"/tap-snapshots/"
51-
]
52-
},
5357
"devDependencies": {
54-
"standard": "^16.0.3",
55-
"tap": "^14.11.0"
58+
"@npmcli/eslint-config": "^3.0.1",
59+
"@npmcli/template-oss": "3.2.2",
60+
"tap": "^16.0.1"
5661
},
5762
"dependencies": {
5863
"ansi-styles": "^4.3.0"
64+
},
65+
"templateOSS": {
66+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
67+
"version": "3.2.2"
5968
}
6069
}

package-lock.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -828,13 +828,14 @@
828828
}
829829
},
830830
"node_modules/@npmcli/disparity-colors": {
831-
"version": "1.0.1",
832-
"license": "ISC",
831+
"version": "2.0.0",
832+
"resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-2.0.0.tgz",
833+
"integrity": "sha512-FFXGrIjhvd2qSZ8iS0yDvbI7nbjdyT2VNO7wotosjYZM2p2r8PN3B7Om3M5NO9KqW/OVzfzLB3L0V5Vo5QXC7A==",
833834
"dependencies": {
834835
"ansi-styles": "^4.3.0"
835836
},
836837
"engines": {
837-
"node": ">=10"
838+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
838839
}
839840
},
840841
"node_modules/@npmcli/eslint-config": {
@@ -9606,7 +9607,7 @@
96069607
"version": "4.0.2",
96079608
"license": "ISC",
96089609
"dependencies": {
9609-
"@npmcli/disparity-colors": "^1.0.1",
9610+
"@npmcli/disparity-colors": "^2.0.0",
96109611
"@npmcli/installed-package-contents": "^1.0.7",
96119612
"binary-extensions": "^2.2.0",
96129613
"diff": "^5.0.0",
@@ -10242,7 +10243,7 @@
1024210243
"ssri": "^8.0.1",
1024310244
"tap": "^15.1.2",
1024410245
"tcompare": "^5.0.6",
10245-
"treeverse": "2.0.0",
10246+
"treeverse": "^2.0.0",
1024610247
"walk-up-path": "^1.0.0"
1024710248
}
1024810249
},
@@ -10263,7 +10264,9 @@
1026310264
}
1026410265
},
1026510266
"@npmcli/disparity-colors": {
10266-
"version": "1.0.1",
10267+
"version": "2.0.0",
10268+
"resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-2.0.0.tgz",
10269+
"integrity": "sha512-FFXGrIjhvd2qSZ8iS0yDvbI7nbjdyT2VNO7wotosjYZM2p2r8PN3B7Om3M5NO9KqW/OVzfzLB3L0V5Vo5QXC7A==",
1026710270
"requires": {
1026810271
"ansi-styles": "^4.3.0"
1026910272
}
@@ -12430,7 +12433,7 @@
1243012433
"libnpmdiff": {
1243112434
"version": "file:workspaces/libnpmdiff",
1243212435
"requires": {
12433-
"@npmcli/disparity-colors": "^1.0.1",
12436+
"@npmcli/disparity-colors": "2.0.0",
1243412437
"@npmcli/eslint-config": "^3.0.1",
1243512438
"@npmcli/installed-package-contents": "^1.0.7",
1243612439
"@npmcli/template-oss": "3.2.2",

workspaces/libnpmdiff/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"tap": "^15.0.9"
5454
},
5555
"dependencies": {
56-
"@npmcli/disparity-colors": "^1.0.1",
56+
"@npmcli/disparity-colors": "^2.0.0",
5757
"@npmcli/installed-package-contents": "^1.0.7",
5858
"binary-extensions": "^2.2.0",
5959
"diff": "^5.0.0",

0 commit comments

Comments
 (0)