Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: update lint-md-dependencies to [email protected] #45638

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}