From 7fbc916ccb9b2ca632a3e8407c1550d1baff93a5 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Sun, 25 Jun 2023 00:32:49 +0000 Subject: [PATCH] tools: update lint-md-dependencies to @rollup/plugin-commonjs@25.0.2 rollup@3.25.2 --- tools/lint-md/lint-md.mjs | 28 +++++++++++++++++++++------- tools/lint-md/package-lock.json | 22 +++++++++++----------- tools/lint-md/package.json | 4 ++-- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/tools/lint-md/lint-md.mjs b/tools/lint-md/lint-md.mjs index 8444a313db0c6b..933b99ed9aa77d 100644 --- a/tools/lint-md/lint-md.mjs +++ b/tools/lint-md/lint-md.mjs @@ -19521,6 +19521,7 @@ const MAX_LENGTH$1 = 256; const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; const MAX_SAFE_COMPONENT_LENGTH = 16; +const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6; const RELEASE_TYPES = [ 'major', 'premajor', @@ -19533,6 +19534,7 @@ const RELEASE_TYPES = [ var constants = { MAX_LENGTH: MAX_LENGTH$1, MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1, RELEASE_TYPES, SEMVER_SPEC_VERSION, @@ -19544,7 +19546,7 @@ getDefaultExportFromCjs(constants); var re$1 = {exports: {}}; (function (module, exports) { - const { MAX_SAFE_COMPONENT_LENGTH } = constants; + const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH } = constants; const debug = debug_1; exports = module.exports = {}; const re = exports.re = []; @@ -19552,10 +19554,22 @@ var re$1 = {exports: {}}; const src = exports.src = []; const t = exports.t = {}; let R = 0; + const LETTERDASHNUMBER = '[a-zA-Z0-9-]'; + const safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_SAFE_COMPONENT_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], + ]; + const makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value + .split(`${token}*`).join(`${token}{0,${max}}`) + .split(`${token}+`).join(`${token}{1,${max}}`); + } + return value + }; const createToken = (name, value, isGlobal) => { - const safe = value - .split('\\s*').join('\\s{0,1}') - .split('\\s+').join('\\s'); + const safe = makeSafeRegex(value); const index = R++; debug(name, index, value); t[name] = index; @@ -19564,8 +19578,8 @@ var re$1 = {exports: {}}; safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined); }; createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*'); - createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+'); - createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*'); + createToken('NUMERICIDENTIFIERLOOSE', '\\d+'); + createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`); @@ -19580,7 +19594,7 @@ var re$1 = {exports: {}}; }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+'); + createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`); createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] }(?:\\.${src[t.BUILDIDENTIFIER]})*))`); createToken('FULLPLAIN', `v?${src[t.MAINVERSION] diff --git a/tools/lint-md/package-lock.json b/tools/lint-md/package-lock.json index 3538c921c944c5..ea980b89cd8f66 100644 --- a/tools/lint-md/package-lock.json +++ b/tools/lint-md/package-lock.json @@ -16,9 +16,9 @@ "vfile-reporter": "^8.0.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.1", + "@rollup/plugin-commonjs": "^25.0.2", "@rollup/plugin-node-resolve": "^15.1.0", - "rollup": "^3.25.1", + "rollup": "^3.25.2", "rollup-plugin-cleanup": "^3.2.1" } }, @@ -29,9 +29,9 @@ "dev": true }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.1.tgz", - "integrity": "sha512-2DJ4kv4b1xfTJopWhu61ANdNRHvzQZ2fpaIrlgaP2jOfUv1wDJ0Ucqy8AZlbFmn/iUjiwKoqki9j55Y6L8kyNQ==", + "version": "25.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz", + "integrity": "sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -2230,9 +2230,9 @@ } }, "node_modules/rollup": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", - "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", + "version": "3.25.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.2.tgz", + "integrity": "sha512-VLnkxZMDr3jpxgtmS8pQZ0UvhslmF4ADq/9w4erkctbgjCqLW9oa89fJuXEs4ZmgyoF7Dm8rMDKSS5b5u2hHUg==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -2288,9 +2288,9 @@ } }, "node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "dependencies": { "lru-cache": "^6.0.0" }, diff --git a/tools/lint-md/package.json b/tools/lint-md/package.json index 476c65f84f6349..5e71755ea08527 100644 --- a/tools/lint-md/package.json +++ b/tools/lint-md/package.json @@ -14,9 +14,9 @@ "vfile-reporter": "^8.0.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.1", + "@rollup/plugin-commonjs": "^25.0.2", "@rollup/plugin-node-resolve": "^15.1.0", - "rollup": "^3.25.1", + "rollup": "^3.25.2", "rollup-plugin-cleanup": "^3.2.1" } }