Skip to content

Commit

Permalink
tools: update lint-md-dependencies to rollup@3.4.0
Browse files Browse the repository at this point in the history
PR-URL: #45638
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
nodejs-github-bot authored and danielleadams committed Jan 5, 2023
1 parent e6fb58f commit 1a359e2
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 48 deletions.
36 changes: 20 additions & 16 deletions tools/lint-md/lint-md.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,20 @@ class VFileMessage extends Error {
}
this.name = stringifyPosition(place) || '1:1';
this.message = typeof reason === 'object' ? reason.message : reason;
this.stack = typeof reason === 'object' ? reason.stack : '';
this.stack = '';
if (typeof reason === 'object' && reason.stack) {
this.stack = reason.stack;
}
this.reason = this.message;
this.fatal;
this.line = position.start.line;
this.column = position.start.column;
this.position = position;
this.source = parts[0];
this.ruleId = parts[1];
this.position = position;
this.file;
this.actual;
this.expected;
this.file;
this.url;
this.note;
}
Expand Down Expand Up @@ -7770,17 +7773,18 @@ function remarkParse(options) {
Object.assign(this, {Parser: parser});
}

var own$4 = {}.hasOwnProperty;
const own$4 = {}.hasOwnProperty;
function zwitch(key, options) {
var settings = options || {};
function one(value) {
var fn = one.invalid;
var handlers = one.handlers;
const settings = options || {};
function one(value, ...parameters) {
let fn = one.invalid;
const handlers = one.handlers;
if (value && own$4.call(value, key)) {
fn = own$4.call(handlers, value[key]) ? handlers[value[key]] : one.unknown;
const id = String(value[key]);
fn = own$4.call(handlers, id) ? handlers[id] : one.unknown;
}
if (fn) {
return fn.apply(this, arguments)
return fn.call(this, value, ...parameters)
}
}
one.handlers = settings.handlers || {};
Expand Down Expand Up @@ -7948,14 +7952,14 @@ function hardBreak(_, _1, context, safe) {
return '\\\n'
}

function longestStreak(value, character) {
function longestStreak(value, substring) {
const source = String(value);
let index = source.indexOf(character);
let index = source.indexOf(substring);
let expected = index;
let count = 0;
let max = 0;
if (typeof character !== 'string' || character.length !== 1) {
throw new Error('Expected character')
if (typeof substring !== 'string') {
throw new TypeError('Expected substring')
}
while (index !== -1) {
if (index === expected) {
Expand All @@ -7965,8 +7969,8 @@ function longestStreak(value, character) {
} else {
count = 1;
}
expected = index + 1;
index = source.indexOf(character, expected);
expected = index + substring.length;
index = source.indexOf(substring, expected);
}
return max
}
Expand Down
62 changes: 31 additions & 31 deletions tools/lint-md/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/lint-md/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"rollup": "^3.3.0",
"rollup": "^3.4.0",
"rollup-plugin-cleanup": "^3.2.1"
}
}

0 comments on commit 1a359e2

Please sign in to comment.