Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7d52950

Browse filesBrowse files
nodejs-github-botruyadorno
authored andcommitted
tools: update lint-md-dependencies
Update to @rollup/plugin-commonjs@25.0.2 and rollup@3.25.2. PR-URL: #48544 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent 8914a52 commit 7d52950
Copy full SHA for 7d52950

File tree

Expand file treeCollapse file tree

3 files changed

+34
-20
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+34
-20
lines changed
Open diff view settings
Collapse file

‎tools/lint-md/lint-md.mjs‎

Copy file name to clipboardExpand all lines: tools/lint-md/lint-md.mjs
+21-7Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19521,6 +19521,7 @@ const MAX_LENGTH$1 = 256;
1952119521
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER ||
1952219522
9007199254740991;
1952319523
const MAX_SAFE_COMPONENT_LENGTH = 16;
19524+
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;
1952419525
const RELEASE_TYPES = [
1952519526
'major',
1952619527
'premajor',
@@ -19533,6 +19534,7 @@ const RELEASE_TYPES = [
1953319534
var constants = {
1953419535
MAX_LENGTH: MAX_LENGTH$1,
1953519536
MAX_SAFE_COMPONENT_LENGTH,
19537+
MAX_SAFE_BUILD_LENGTH,
1953619538
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
1953719539
RELEASE_TYPES,
1953819540
SEMVER_SPEC_VERSION,
@@ -19544,18 +19546,30 @@ getDefaultExportFromCjs(constants);
1954419546
var re$1 = {exports: {}};
1954519547

1954619548
(function (module, exports) {
19547-
const { MAX_SAFE_COMPONENT_LENGTH } = constants;
19549+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH } = constants;
1954819550
const debug = debug_1;
1954919551
exports = module.exports = {};
1955019552
const re = exports.re = [];
1955119553
const safeRe = exports.safeRe = [];
1955219554
const src = exports.src = [];
1955319555
const t = exports.t = {};
1955419556
let R = 0;
19557+
const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
19558+
const safeRegexReplacements = [
19559+
['\\s', 1],
19560+
['\\d', MAX_SAFE_COMPONENT_LENGTH],
19561+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
19562+
];
19563+
const makeSafeRegex = (value) => {
19564+
for (const [token, max] of safeRegexReplacements) {
19565+
value = value
19566+
.split(`${token}*`).join(`${token}{0,${max}}`)
19567+
.split(`${token}+`).join(`${token}{1,${max}}`);
19568+
}
19569+
return value
19570+
};
1955519571
const createToken = (name, value, isGlobal) => {
19556-
const safe = value
19557-
.split('\\s*').join('\\s{0,1}')
19558-
.split('\\s+').join('\\s');
19572+
const safe = makeSafeRegex(value);
1955919573
const index = R++;
1956019574
debug(name, index, value);
1956119575
t[name] = index;
@@ -19564,8 +19578,8 @@ var re$1 = {exports: {}};
1956419578
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
1956519579
};
1956619580
createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
19567-
createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');
19568-
createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
19581+
createToken('NUMERICIDENTIFIERLOOSE', '\\d+');
19582+
createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
1956919583
createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
1957019584
`(${src[t.NUMERICIDENTIFIER]})\\.` +
1957119585
`(${src[t.NUMERICIDENTIFIER]})`);
@@ -19580,7 +19594,7 @@ var re$1 = {exports: {}};
1958019594
}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
1958119595
createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
1958219596
}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
19583-
createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
19597+
createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`);
1958419598
createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
1958519599
}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
1958619600
createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
Collapse file

‎tools/lint-md/package-lock.json‎

Copy file name to clipboardExpand all lines: tools/lint-md/package-lock.json
+11-11Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎tools/lint-md/package.json‎

Copy file name to clipboardExpand all lines: tools/lint-md/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"vfile-reporter": "^8.0.0"
1515
},
1616
"devDependencies": {
17-
"@rollup/plugin-commonjs": "^25.0.1",
17+
"@rollup/plugin-commonjs": "^25.0.2",
1818
"@rollup/plugin-node-resolve": "^15.1.0",
19-
"rollup": "^3.25.1",
19+
"rollup": "^3.25.2",
2020
"rollup-plugin-cleanup": "^3.2.1"
2121
}
2222
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.