Skip to content

Commit 29ec84c

Browse files
nodejs-github-botrichardlau
authored andcommitted
tools: update lint-md-dependencies to rollup@4.10.0
PR-URL: #51720 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 7821ce7 commit 29ec84c

File tree

3 files changed

+98
-92
lines changed

3 files changed

+98
-92
lines changed

tools/lint-md/lint-md.mjs

+20-14
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function wrap(middleware, callback) {
175175
return done(exception)
176176
}
177177
if (!fnExpectsCallback) {
178-
if (result instanceof Promise) {
178+
if (result && result.then && typeof result.then === 'function') {
179179
result.then(then, done);
180180
} else if (result instanceof Error) {
181181
done(result);
@@ -3083,35 +3083,32 @@ function normalizeIdentifier$1(value) {
30833083
)
30843084
}
30853085

3086-
const unicodePunctuationInternal = regexCheck(/\p{P}/u);
30873086
const asciiAlpha = regexCheck(/[A-Za-z]/);
30883087
const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
30893088
const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
30903089
function asciiControl(code) {
30913090
return (
30923091
code !== null && (code < 32 || code === 127)
3093-
)
3092+
);
30943093
}
30953094
const asciiDigit = regexCheck(/\d/);
30963095
const asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
30973096
const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
30983097
function markdownLineEnding(code) {
3099-
return code !== null && code < -2
3098+
return code !== null && code < -2;
31003099
}
31013100
function markdownLineEndingOrSpace(code) {
3102-
return code !== null && (code < 0 || code === 32)
3101+
return code !== null && (code < 0 || code === 32);
31033102
}
31043103
function markdownSpace(code) {
3105-
return code === -2 || code === -1 || code === 32
3106-
}
3107-
function unicodePunctuation(code) {
3108-
return asciiPunctuation(code) || unicodePunctuationInternal(code)
3104+
return code === -2 || code === -1 || code === 32;
31093105
}
3106+
const unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);
31103107
const unicodeWhitespace = regexCheck(/\s/);
31113108
function regexCheck(regex) {
3112-
return check
3109+
return check;
31133110
function check(code) {
3114-
return code !== null && code > -1 && regex.test(String.fromCharCode(code))
3111+
return code !== null && code > -1 && regex.test(String.fromCharCode(code));
31153112
}
31163113
}
31173114

@@ -8993,10 +8990,14 @@ const phrasing =
89938990
'image',
89948991
'imageReference',
89958992
'inlineCode',
8993+
'inlineMath',
89968994
'link',
89978995
'linkReference',
8996+
'mdxJsxTextElement',
8997+
'mdxTextExpression',
89988998
'strong',
8999-
'text'
8999+
'text',
9000+
'textDirective'
90009001
])
90019002
);
90029003

@@ -24440,12 +24441,17 @@ var re$1 = {exports: {}};
2444024441
`)?)?`);
2444124442
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
2444224443
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
24443-
createToken('COERCE', `${'(^|[^\\d])' +
24444+
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
2444424445
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
2444524446
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
24446-
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
24447+
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
24448+
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
24449+
createToken('COERCEFULL', src[t.COERCEPLAIN] +
24450+
`(?:${src[t.PRERELEASE]})?` +
24451+
`(?:${src[t.BUILD]})?` +
2444724452
`(?:$|[^\\d])`);
2444824453
createToken('COERCERTL', src[t.COERCE], true);
24454+
createToken('COERCERTLFULL', src[t.COERCEFULL], true);
2444924455
createToken('LONETILDE', '(?:~>?)');
2445024456
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
2445124457
exports.tildeTrimReplace = '$1~';

0 commit comments

Comments
 (0)