Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNode.js GitHub Bot <github-bot@iojs.org>2022-03-06 03:19:45 +0300
committerRich Trott <rtrott@gmail.com>2022-03-06 15:45:15 +0300
commit0f9b618b8d72a2d53a0e9658bdd446e00c077959 (patch)
tree14a2a81616e6732e5d19830a6ecbf91accad0404 /tools
parentf34f9f1f9deb768bae4fc97963f2fed842289307 (diff)
tools: update lint-md-dependencies to rollup@2.69.1
PR-URL: https://github.com/nodejs/node/pull/42226 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/lint-md/lint-md.mjs30
-rw-r--r--tools/lint-md/package-lock.json78
-rw-r--r--tools/lint-md/package.json2
3 files changed, 56 insertions, 54 deletions
diff --git a/tools/lint-md/lint-md.mjs b/tools/lint-md/lint-md.mjs
index 0e4f89553b6..1d594809382 100644
--- a/tools/lint-md/lint-md.mjs
+++ b/tools/lint-md/lint-md.mjs
@@ -201,18 +201,17 @@ function wrap(middleware, callback) {
}
}
-var own$8 = {}.hasOwnProperty;
function stringifyPosition(value) {
if (!value || typeof value !== 'object') {
return ''
}
- if (own$8.call(value, 'position') || own$8.call(value, 'type')) {
+ if ('position' in value || 'type' in value) {
return position(value.position)
}
- if (own$8.call(value, 'start') || own$8.call(value, 'end')) {
+ if ('start' in value || 'end' in value) {
return position(value)
}
- if (own$8.call(value, 'line') || own$8.call(value, 'column')) {
+ if ('line' in value || 'column' in value) {
return point$1(value)
}
return ''
@@ -229,19 +228,18 @@ function index(value) {
class VFileMessage extends Error {
constructor(reason, place, origin) {
- var parts = [null, null];
- var position = {
+ const parts = [null, null];
+ let position = {
start: {line: null, column: null},
end: {line: null, column: null}
};
- var index;
super();
if (typeof place === 'string') {
origin = place;
- place = null;
+ place = undefined;
}
if (typeof origin === 'string') {
- index = origin.indexOf(':');
+ const index = origin.indexOf(':');
if (index === -1) {
parts[1] = origin;
} else {
@@ -21228,29 +21226,33 @@ function stringWidth(string, options = {}) {
if (typeof string !== 'string' || string.length === 0) {
return 0;
}
+ options = {
+ ambiguousIsNarrow: true,
+ ...options
+ };
string = stripAnsi(string);
if (string.length === 0) {
return 0;
}
string = string.replace(emojiRegex(), ' ');
- const ambiguousCharWidth = options.ambiguousIsNarrow ? 1 : 2;
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
let width = 0;
- for (let index = 0; index < string.length; index++) {
- const codePoint = string.codePointAt(index);
+ for (const character of string) {
+ const codePoint = character.codePointAt(0);
if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {
continue;
}
if (codePoint >= 0x300 && codePoint <= 0x36F) {
continue;
}
- const code = eastAsianWidth.eastAsianWidth(string.charAt(index));
+ const code = eastAsianWidth.eastAsianWidth(character);
switch (code) {
case 'F':
case 'W':
width += 2;
break;
case 'A':
- width += ambiguousCharWidth;
+ width += ambiguousCharacterWidth;
break;
default:
width += 1;
diff --git a/tools/lint-md/package-lock.json b/tools/lint-md/package-lock.json
index 8cca8730ed6..957e8099fa3 100644
--- a/tools/lint-md/package-lock.json
+++ b/tools/lint-md/package-lock.json
@@ -18,7 +18,7 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^21.0.2",
"@rollup/plugin-node-resolve": "^13.1.3",
- "rollup": "^2.68.0",
+ "rollup": "^2.69.1",
"rollup-plugin-cleanup": "^3.2.1"
}
},
@@ -514,12 +514,12 @@
}
},
"node_modules/magic-string": {
- "version": "0.25.7",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
- "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
+ "version": "0.25.9",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
+ "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
"dev": true,
"dependencies": {
- "sourcemap-codec": "^1.4.4"
+ "sourcemap-codec": "^1.4.8"
}
},
"node_modules/markdown-table": {
@@ -2193,9 +2193,9 @@
}
},
"node_modules/rollup": {
- "version": "2.68.0",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.68.0.tgz",
- "integrity": "sha512-XrMKOYK7oQcTio4wyTz466mucnd8LzkiZLozZ4Rz0zQD+HeX4nUK4B8GrTX/2EvN2/vBF/i2WnaXboPxo0JylA==",
+ "version": "2.69.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.69.1.tgz",
+ "integrity": "sha512-xaQKTomUVZBopk38EIshM/kOoPFkKWisgBV7Emy80coP9MOSLUDrba1jKZhqH0iS5DoGcRbbcuyl/BzblV8w5w==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
@@ -2284,9 +2284,9 @@
"dev": true
},
"node_modules/string-width": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz",
- "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"dependencies": {
"eastasianwidth": "^0.2.0",
"emoji-regex": "^9.2.2",
@@ -2450,9 +2450,9 @@
}
},
"node_modules/unist-util-stringify-position": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.0.tgz",
- "integrity": "sha512-SdfAl8fsDclywZpfMDTVDxA2V7LjtRDTOFd44wUJamgl6OlVngsqWjxvermMYf60elWHbxhuRCZml7AnuXCaSA==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.2.tgz",
+ "integrity": "sha512-7A6eiDCs9UtjcwZOcCpM4aPII3bAAGv13E96IkawkOAW0OhH+yRxtY0lzo8KiHpzEMfH7Q+FizUmwp8Iqy5EWg==",
"dependencies": {
"@types/unist": "^2.0.0"
},
@@ -2519,9 +2519,9 @@
}
},
"node_modules/vfile": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.0.tgz",
- "integrity": "sha512-Tj44nY/48OQvarrE4FAjUfrv7GZOYzPbl5OD65HxVKwLJKMPU7zmfV8cCgCnzKWnSfYG2f3pxu+ALqs7j22xQQ==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.2.tgz",
+ "integrity": "sha512-w0PLIugRY3Crkgw89TeMvHCzqCs/zpreR31hl4D92y6SOE07+bfJe+dK5Q2akwS+i/c801kzjoOr9gMcTe6IAA==",
"dependencies": {
"@types/unist": "^2.0.0",
"is-buffer": "^2.0.0",
@@ -2547,9 +2547,9 @@
}
},
"node_modules/vfile-message": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.0.tgz",
- "integrity": "sha512-4QJbBk+DkPEhBXq3f260xSaWtjE4gPKOfulzfMFF8ZNwaPZieWsg3iVlcmF04+eebzpcpeXOOFMfrYzJHVYg+g==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.2.tgz",
+ "integrity": "sha512-QjSNP6Yxzyycd4SVOtmKKyTsSvClqBPJcd00Z0zuPj3hOIjg0rUPG6DbFGPvUKRgYyaIWLPKpuEclcuvb3H8qA==",
"dependencies": {
"@types/unist": "^2.0.0",
"unist-util-stringify-position": "^3.0.0"
@@ -2998,12 +2998,12 @@
}
},
"magic-string": {
- "version": "0.25.7",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
- "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
+ "version": "0.25.9",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
+ "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
"dev": true,
"requires": {
- "sourcemap-codec": "^1.4.4"
+ "sourcemap-codec": "^1.4.8"
}
},
"markdown-table": {
@@ -4167,9 +4167,9 @@
}
},
"rollup": {
- "version": "2.68.0",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.68.0.tgz",
- "integrity": "sha512-XrMKOYK7oQcTio4wyTz466mucnd8LzkiZLozZ4Rz0zQD+HeX4nUK4B8GrTX/2EvN2/vBF/i2WnaXboPxo0JylA==",
+ "version": "2.69.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.69.1.tgz",
+ "integrity": "sha512-xaQKTomUVZBopk38EIshM/kOoPFkKWisgBV7Emy80coP9MOSLUDrba1jKZhqH0iS5DoGcRbbcuyl/BzblV8w5w==",
"dev": true,
"requires": {
"fsevents": "~2.3.2"
@@ -4236,9 +4236,9 @@
"dev": true
},
"string-width": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz",
- "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"requires": {
"eastasianwidth": "^0.2.0",
"emoji-regex": "^9.2.2",
@@ -4344,9 +4344,9 @@
"integrity": "sha512-mgy/zI9fQ2HlbOtTdr2w9lhVaiFUHWQnZrFF2EUoVOqtAUdzqMtNiD99qA5a1IcjWVR8O6aVYE9u7Z2z1v0SQA=="
},
"unist-util-stringify-position": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.0.tgz",
- "integrity": "sha512-SdfAl8fsDclywZpfMDTVDxA2V7LjtRDTOFd44wUJamgl6OlVngsqWjxvermMYf60elWHbxhuRCZml7AnuXCaSA==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.2.tgz",
+ "integrity": "sha512-7A6eiDCs9UtjcwZOcCpM4aPII3bAAGv13E96IkawkOAW0OhH+yRxtY0lzo8KiHpzEMfH7Q+FizUmwp8Iqy5EWg==",
"requires": {
"@types/unist": "^2.0.0"
}
@@ -4393,9 +4393,9 @@
}
},
"vfile": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.0.tgz",
- "integrity": "sha512-Tj44nY/48OQvarrE4FAjUfrv7GZOYzPbl5OD65HxVKwLJKMPU7zmfV8cCgCnzKWnSfYG2f3pxu+ALqs7j22xQQ==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.2.tgz",
+ "integrity": "sha512-w0PLIugRY3Crkgw89TeMvHCzqCs/zpreR31hl4D92y6SOE07+bfJe+dK5Q2akwS+i/c801kzjoOr9gMcTe6IAA==",
"requires": {
"@types/unist": "^2.0.0",
"is-buffer": "^2.0.0",
@@ -4413,9 +4413,9 @@
}
},
"vfile-message": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.0.tgz",
- "integrity": "sha512-4QJbBk+DkPEhBXq3f260xSaWtjE4gPKOfulzfMFF8ZNwaPZieWsg3iVlcmF04+eebzpcpeXOOFMfrYzJHVYg+g==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.2.tgz",
+ "integrity": "sha512-QjSNP6Yxzyycd4SVOtmKKyTsSvClqBPJcd00Z0zuPj3hOIjg0rUPG6DbFGPvUKRgYyaIWLPKpuEclcuvb3H8qA==",
"requires": {
"@types/unist": "^2.0.0",
"unist-util-stringify-position": "^3.0.0"
diff --git a/tools/lint-md/package.json b/tools/lint-md/package.json
index e87a4b95636..a3e847adcde 100644
--- a/tools/lint-md/package.json
+++ b/tools/lint-md/package.json
@@ -16,7 +16,7 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^21.0.2",
"@rollup/plugin-node-resolve": "^13.1.3",
- "rollup": "^2.68.0",
+ "rollup": "^2.69.1",
"rollup-plugin-cleanup": "^3.2.1"
}
}