mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
tools: update lint-md-dependencies to @rollup/plugin-commonjs@24.1.0
PR-URL: https://github.com/nodejs/node/pull/47577 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
b4ca788878
commit
6535ab90d9
3 files changed
+142
-113
No files matched your search
+116
-87
@@ -1,6 +1,7 @@
|
||||
import fs from 'fs';
|
||||
import path$1 from 'path';
|
||||
import { fileURLToPath, pathToFileURL, URL as URL$1 } from 'url';
|
||||
import require$$5 from 'util';
|
||||
import proc from 'process';
|
||||
import process$1 from 'node:process';
|
||||
import os from 'node:os';
|
||||
@@ -14,6 +15,10 @@ function bail(error) {
|
||||
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||
|
||||
function getDefaultExportFromCjs (x) {
|
||||
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
@@ -24,6 +29,7 @@ var isBuffer = function isBuffer (obj) {
|
||||
return obj != null && obj.constructor != null &&
|
||||
typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
||||
};
|
||||
var buffer$1 = getDefaultExportFromCjs(isBuffer);
|
||||
|
||||
var hasOwn = Object.prototype.hasOwnProperty;
|
||||
var toStr = Object.prototype.toString;
|
||||
@@ -108,6 +114,7 @@ var extend$1 = function extend() {
|
||||
}
|
||||
return target;
|
||||
};
|
||||
var extend$2 = getDefaultExportFromCjs(extend$1);
|
||||
|
||||
function isPlainObject(value) {
|
||||
if (typeof value !== 'object' || value === null) {
|
||||
@@ -431,7 +438,7 @@ function assertPath(path, name) {
|
||||
}
|
||||
}
|
||||
function buffer(value) {
|
||||
return isBuffer(value)
|
||||
return buffer$1(value)
|
||||
}
|
||||
|
||||
const unified = base().freeze();
|
||||
@@ -461,7 +468,7 @@ function base() {
|
||||
while (++index < attachers.length) {
|
||||
destination.use(...attachers[index]);
|
||||
}
|
||||
destination.data(extend$1(true, {}, namespace));
|
||||
destination.data(extend$2(true, {}, namespace));
|
||||
return destination
|
||||
}
|
||||
function data(key, value) {
|
||||
@@ -561,7 +568,7 @@ function base() {
|
||||
}
|
||||
if (entry) {
|
||||
if (isPlainObject(entry[1]) && isPlainObject(value)) {
|
||||
value = extend$1(true, entry[1], value);
|
||||
value = extend$2(true, entry[1], value);
|
||||
}
|
||||
entry[1] = value;
|
||||
} else {
|
||||
@@ -735,7 +742,7 @@ function looksLikeAVFile$1(value) {
|
||||
)
|
||||
}
|
||||
function looksLikeAVFileValue(value) {
|
||||
return typeof value === 'string' || isBuffer(value)
|
||||
return typeof value === 'string' || buffer$1(value)
|
||||
}
|
||||
|
||||
const emptyOptions = {};
|
||||
@@ -12160,11 +12167,7 @@ function commonjsRequire(path) {
|
||||
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
||||
}
|
||||
|
||||
var pluralizeExports = {};
|
||||
var pluralize = {
|
||||
get exports(){ return pluralizeExports; },
|
||||
set exports(v){ pluralizeExports = v; },
|
||||
};
|
||||
var pluralize = {exports: {}};
|
||||
|
||||
(function (module, exports) {
|
||||
(function (root, pluralize) {
|
||||
@@ -12490,7 +12493,8 @@ var pluralize = {
|
||||
return pluralize;
|
||||
});
|
||||
} (pluralize));
|
||||
var plural = pluralizeExports;
|
||||
var pluralizeExports = pluralize.exports;
|
||||
var plural = getDefaultExportFromCjs(pluralizeExports);
|
||||
|
||||
/**
|
||||
* ## When should I use this?
|
||||
@@ -15013,7 +15017,7 @@ var remarkLintFinalDefinition$1 = remarkLintFinalDefinition;
|
||||
*
|
||||
* 1:1-1:14: First heading level should be `2`
|
||||
*/
|
||||
const re$3 = /<h([1-6])/;
|
||||
const re$2 = /<h([1-6])/;
|
||||
const remarkLintFirstHeadingLevel = lintRule(
|
||||
{
|
||||
origin: 'remark-lint:first-heading-level',
|
||||
@@ -15040,7 +15044,7 @@ const remarkLintFirstHeadingLevel = lintRule(
|
||||
);
|
||||
var remarkLintFirstHeadingLevel$1 = remarkLintFirstHeadingLevel;
|
||||
function infer(node) {
|
||||
const results = node.value.match(re$3);
|
||||
const results = node.value.match(re$2);
|
||||
return results ? Number(results[1]) : undefined
|
||||
}
|
||||
|
||||
@@ -16131,6 +16135,7 @@ var sliced$1 = function (args, slice, sliceEnd) {
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
getDefaultExportFromCjs(sliced$1);
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
var co_1 = co$1;
|
||||
@@ -16285,6 +16290,7 @@ function error(err) {
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
getDefaultExportFromCjs(co_1);
|
||||
|
||||
var sliced = sliced$1;
|
||||
var noop = function(){};
|
||||
@@ -16336,6 +16342,7 @@ function generator(value) {
|
||||
function promise(value) {
|
||||
return value && 'function' == typeof value.then;
|
||||
}
|
||||
getDefaultExportFromCjs(wrapped_1);
|
||||
|
||||
var wrapped = wrapped_1;
|
||||
var unifiedLintRule = factory;
|
||||
@@ -16425,6 +16432,7 @@ function coerce(name, value) {
|
||||
result[0] = level;
|
||||
return result
|
||||
}
|
||||
getDefaultExportFromCjs(unifiedLintRule);
|
||||
|
||||
var rule = unifiedLintRule;
|
||||
var remarkLintNoTrailingSpaces = rule('remark-lint:no-trailing-spaces', noTrailingSpaces);
|
||||
@@ -16443,6 +16451,7 @@ function noTrailingSpaces(ast, file) {
|
||||
}
|
||||
}
|
||||
}
|
||||
var remarkLintNoTrailingSpaces$1 = getDefaultExportFromCjs(remarkLintNoTrailingSpaces);
|
||||
|
||||
function* getLinksRecursively(node) {
|
||||
if (node.url) {
|
||||
@@ -19297,24 +19306,6 @@ var jsYaml = {
|
||||
safeDump: safeDump
|
||||
};
|
||||
|
||||
const SEMVER_SPEC_VERSION = '2.0.0';
|
||||
const MAX_LENGTH$2 = 256;
|
||||
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER ||
|
||||
9007199254740991;
|
||||
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
||||
var constants = {
|
||||
SEMVER_SPEC_VERSION,
|
||||
MAX_LENGTH: MAX_LENGTH$2,
|
||||
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
|
||||
MAX_SAFE_COMPONENT_LENGTH,
|
||||
};
|
||||
|
||||
var reExports = {};
|
||||
var re$2 = {
|
||||
get exports(){ return reExports; },
|
||||
set exports(v){ reExports = v; },
|
||||
};
|
||||
|
||||
const debug$1 = (
|
||||
typeof process === 'object' &&
|
||||
process.env &&
|
||||
@@ -19323,6 +19314,34 @@ const debug$1 = (
|
||||
) ? (...args) => console.error('SEMVER', ...args)
|
||||
: () => {};
|
||||
var debug_1 = debug$1;
|
||||
getDefaultExportFromCjs(debug_1);
|
||||
|
||||
const SEMVER_SPEC_VERSION = '2.0.0';
|
||||
const MAX_LENGTH$1 = 256;
|
||||
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER ||
|
||||
9007199254740991;
|
||||
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
||||
const RELEASE_TYPES = [
|
||||
'major',
|
||||
'premajor',
|
||||
'minor',
|
||||
'preminor',
|
||||
'patch',
|
||||
'prepatch',
|
||||
'prerelease',
|
||||
];
|
||||
var constants = {
|
||||
MAX_LENGTH: MAX_LENGTH$1,
|
||||
MAX_SAFE_COMPONENT_LENGTH,
|
||||
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
|
||||
RELEASE_TYPES,
|
||||
SEMVER_SPEC_VERSION,
|
||||
FLAG_INCLUDE_PRERELEASE: 0b001,
|
||||
FLAG_LOOSE: 0b010,
|
||||
};
|
||||
getDefaultExportFromCjs(constants);
|
||||
|
||||
var re$1 = {exports: {}};
|
||||
|
||||
(function (module, exports) {
|
||||
const { MAX_SAFE_COMPONENT_LENGTH } = constants;
|
||||
@@ -19416,17 +19435,23 @@ var debug_1 = debug$1;
|
||||
createToken('STAR', '(<|>)?=?\\s*\\*');
|
||||
createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
|
||||
createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
|
||||
} (re$2, reExports));
|
||||
} (re$1, re$1.exports));
|
||||
var reExports = re$1.exports;
|
||||
getDefaultExportFromCjs(reExports);
|
||||
|
||||
const opts = ['includePrerelease', 'loose', 'rtl'];
|
||||
const parseOptions$2 = options =>
|
||||
!options ? {}
|
||||
: typeof options !== 'object' ? { loose: true }
|
||||
: opts.filter(k => options[k]).reduce((o, k) => {
|
||||
o[k] = true;
|
||||
return o
|
||||
}, {});
|
||||
var parseOptions_1 = parseOptions$2;
|
||||
const looseOption = Object.freeze({ loose: true });
|
||||
const emptyOpts = Object.freeze({ });
|
||||
const parseOptions$1 = options => {
|
||||
if (!options) {
|
||||
return emptyOpts
|
||||
}
|
||||
if (typeof options !== 'object') {
|
||||
return looseOption
|
||||
}
|
||||
return options
|
||||
};
|
||||
var parseOptions_1 = parseOptions$1;
|
||||
getDefaultExportFromCjs(parseOptions_1);
|
||||
|
||||
const numeric = /^[0-9]+$/;
|
||||
const compareIdentifiers$1 = (a, b) => {
|
||||
@@ -19447,15 +19472,16 @@ var identifiers = {
|
||||
compareIdentifiers: compareIdentifiers$1,
|
||||
rcompareIdentifiers,
|
||||
};
|
||||
getDefaultExportFromCjs(identifiers);
|
||||
|
||||
const debug = debug_1;
|
||||
const { MAX_LENGTH: MAX_LENGTH$1, MAX_SAFE_INTEGER } = constants;
|
||||
const { re: re$1, t: t$1 } = reExports;
|
||||
const parseOptions$1 = parseOptions_1;
|
||||
const { MAX_LENGTH, MAX_SAFE_INTEGER } = constants;
|
||||
const { re, t } = reExports;
|
||||
const parseOptions = parseOptions_1;
|
||||
const { compareIdentifiers } = identifiers;
|
||||
let SemVer$2 = class SemVer {
|
||||
constructor (version, options) {
|
||||
options = parseOptions$1(options);
|
||||
options = parseOptions(options);
|
||||
if (version instanceof SemVer) {
|
||||
if (version.loose === !!options.loose &&
|
||||
version.includePrerelease === !!options.includePrerelease) {
|
||||
@@ -19464,18 +19490,18 @@ let SemVer$2 = class SemVer {
|
||||
version = version.version;
|
||||
}
|
||||
} else if (typeof version !== 'string') {
|
||||
throw new TypeError(`Invalid Version: ${version}`)
|
||||
throw new TypeError(`Invalid Version: ${require$$5.inspect(version)}`)
|
||||
}
|
||||
if (version.length > MAX_LENGTH$1) {
|
||||
if (version.length > MAX_LENGTH) {
|
||||
throw new TypeError(
|
||||
`version is longer than ${MAX_LENGTH$1} characters`
|
||||
`version is longer than ${MAX_LENGTH} characters`
|
||||
)
|
||||
}
|
||||
debug('SemVer', version, options);
|
||||
this.options = options;
|
||||
this.loose = !!options.loose;
|
||||
this.includePrerelease = !!options.includePrerelease;
|
||||
const m = version.trim().match(options.loose ? re$1[t$1.LOOSE] : re$1[t$1.FULL]);
|
||||
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
||||
if (!m) {
|
||||
throw new TypeError(`Invalid Version: ${version}`)
|
||||
}
|
||||
@@ -19592,31 +19618,31 @@ let SemVer$2 = class SemVer {
|
||||
}
|
||||
} while (++i)
|
||||
}
|
||||
inc (release, identifier) {
|
||||
inc (release, identifier, identifierBase) {
|
||||
switch (release) {
|
||||
case 'premajor':
|
||||
this.prerelease.length = 0;
|
||||
this.patch = 0;
|
||||
this.minor = 0;
|
||||
this.major++;
|
||||
this.inc('pre', identifier);
|
||||
this.inc('pre', identifier, identifierBase);
|
||||
break
|
||||
case 'preminor':
|
||||
this.prerelease.length = 0;
|
||||
this.patch = 0;
|
||||
this.minor++;
|
||||
this.inc('pre', identifier);
|
||||
this.inc('pre', identifier, identifierBase);
|
||||
break
|
||||
case 'prepatch':
|
||||
this.prerelease.length = 0;
|
||||
this.inc('patch', identifier);
|
||||
this.inc('pre', identifier);
|
||||
this.inc('patch', identifier, identifierBase);
|
||||
this.inc('pre', identifier, identifierBase);
|
||||
break
|
||||
case 'prerelease':
|
||||
if (this.prerelease.length === 0) {
|
||||
this.inc('patch', identifier);
|
||||
this.inc('patch', identifier, identifierBase);
|
||||
}
|
||||
this.inc('pre', identifier);
|
||||
this.inc('pre', identifier, identifierBase);
|
||||
break
|
||||
case 'major':
|
||||
if (
|
||||
@@ -19643,9 +19669,13 @@ let SemVer$2 = class SemVer {
|
||||
}
|
||||
this.prerelease = [];
|
||||
break
|
||||
case 'pre':
|
||||
case 'pre': {
|
||||
const base = Number(identifierBase) ? 1 : 0;
|
||||
if (!identifier && identifierBase === false) {
|
||||
throw new Error('invalid increment argument: identifier is empty')
|
||||
}
|
||||
if (this.prerelease.length === 0) {
|
||||
this.prerelease = [0];
|
||||
this.prerelease = [base];
|
||||
} else {
|
||||
let i = this.prerelease.length;
|
||||
while (--i >= 0) {
|
||||
@@ -19655,19 +19685,27 @@ let SemVer$2 = class SemVer {
|
||||
}
|
||||
}
|
||||
if (i === -1) {
|
||||
this.prerelease.push(0);
|
||||
if (identifier === this.prerelease.join('.') && identifierBase === false) {
|
||||
throw new Error('invalid increment argument: identifier already exists')
|
||||
}
|
||||
this.prerelease.push(base);
|
||||
}
|
||||
}
|
||||
if (identifier) {
|
||||
let prerelease = [identifier, base];
|
||||
if (identifierBase === false) {
|
||||
prerelease = [identifier];
|
||||
}
|
||||
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
||||
if (isNaN(this.prerelease[1])) {
|
||||
this.prerelease = [identifier, 0];
|
||||
this.prerelease = prerelease;
|
||||
}
|
||||
} else {
|
||||
this.prerelease = [identifier, 0];
|
||||
this.prerelease = prerelease;
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
default:
|
||||
throw new Error(`invalid increment argument: ${release}`)
|
||||
}
|
||||
@@ -19677,42 +19715,35 @@ let SemVer$2 = class SemVer {
|
||||
}
|
||||
};
|
||||
var semver = SemVer$2;
|
||||
getDefaultExportFromCjs(semver);
|
||||
|
||||
const { MAX_LENGTH } = constants;
|
||||
const { re, t } = reExports;
|
||||
const SemVer$1 = semver;
|
||||
const parseOptions = parseOptions_1;
|
||||
const parse = (version, options) => {
|
||||
options = parseOptions(options);
|
||||
const parse = (version, options, throwErrors = false) => {
|
||||
if (version instanceof SemVer$1) {
|
||||
return version
|
||||
}
|
||||
if (typeof version !== 'string') {
|
||||
return null
|
||||
}
|
||||
if (version.length > MAX_LENGTH) {
|
||||
return null
|
||||
}
|
||||
const r = options.loose ? re[t.LOOSE] : re[t.FULL];
|
||||
if (!r.test(version)) {
|
||||
return null
|
||||
}
|
||||
try {
|
||||
return new SemVer$1(version, options)
|
||||
} catch (er) {
|
||||
return null
|
||||
if (!throwErrors) {
|
||||
return null
|
||||
}
|
||||
throw er
|
||||
}
|
||||
};
|
||||
var parse_1 = parse;
|
||||
var semverParse = getDefaultExportFromCjs(parse_1);
|
||||
|
||||
const SemVer = semver;
|
||||
const compare$2 = (a, b, loose) =>
|
||||
new SemVer(a, loose).compare(new SemVer(b, loose));
|
||||
var compare_1 = compare$2;
|
||||
getDefaultExportFromCjs(compare_1);
|
||||
|
||||
const compare$1 = compare_1;
|
||||
const lt = (a, b, loose) => compare$1(a, b, loose) < 0;
|
||||
var lt_1 = lt;
|
||||
var semverLt = getDefaultExportFromCjs(lt_1);
|
||||
|
||||
const allowedKeys = [
|
||||
"added",
|
||||
@@ -19723,7 +19754,7 @@ const allowedKeys = [
|
||||
];
|
||||
const changesExpectedKeys = ["version", "pr-url", "description"];
|
||||
const VERSION_PLACEHOLDER = "REPLACEME";
|
||||
const MAX_SAFE_SEMVER_VERSION = parse_1(
|
||||
const MAX_SAFE_SEMVER_VERSION = semverParse(
|
||||
Array.from({ length: 3 }, () => Number.MAX_SAFE_INTEGER).join(".")
|
||||
);
|
||||
const validVersionNumberRegex = /^v\d+\.\d+\.\d+$/;
|
||||
@@ -19770,7 +19801,7 @@ function areVersionsUnordered(versions) {
|
||||
if (!Array.isArray(versions)) return false;
|
||||
for (let index = 1; index < versions.length; index++) {
|
||||
if (
|
||||
lt_1(
|
||||
semverLt(
|
||||
getValidSemver(versions[index - 1]),
|
||||
getValidSemver(versions[index])
|
||||
)
|
||||
@@ -20770,7 +20801,7 @@ const plugins = [
|
||||
remarkLintNoShellDollars$1,
|
||||
remarkLintNoTableIndentation$1,
|
||||
remarkLintNoTabs$1,
|
||||
remarkLintNoTrailingSpaces,
|
||||
remarkLintNoTrailingSpaces$1,
|
||||
remarkLintNodejsLinks,
|
||||
remarkLintNodejsYamlComments,
|
||||
[
|
||||
@@ -20810,7 +20841,7 @@ const remarkPresetLintNode = { plugins, settings };
|
||||
function toVFile(description) {
|
||||
if (typeof description === 'string' || description instanceof URL$1) {
|
||||
description = {path: description};
|
||||
} else if (isBuffer(description)) {
|
||||
} else if (buffer$1(description)) {
|
||||
description = {path: String(description)};
|
||||
}
|
||||
return looksLikeAVFile(description)
|
||||
@@ -20925,11 +20956,7 @@ function stripAnsi(string) {
|
||||
return string.replace(ansiRegex(), '');
|
||||
}
|
||||
|
||||
var eastasianwidthExports = {};
|
||||
var eastasianwidth = {
|
||||
get exports(){ return eastasianwidthExports; },
|
||||
set exports(v){ eastasianwidthExports = v; },
|
||||
};
|
||||
var eastasianwidth = {exports: {}};
|
||||
|
||||
(function (module) {
|
||||
var eaw = {};
|
||||
@@ -21233,11 +21260,13 @@ var eastasianwidth = {
|
||||
return result;
|
||||
};
|
||||
} (eastasianwidth));
|
||||
var eastAsianWidth = eastasianwidthExports;
|
||||
var eastasianwidthExports = eastasianwidth.exports;
|
||||
var eastAsianWidth = getDefaultExportFromCjs(eastasianwidthExports);
|
||||
|
||||
var emojiRegex = function () {
|
||||
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\Line truncated
|
||||
};
|
||||
var emojiRegex$1 = getDefaultExportFromCjs(emojiRegex);
|
||||
|
||||
function stringWidth(string, options = {}) {
|
||||
if (typeof string !== 'string' || string.length === 0) {
|
||||
@@ -21251,7 +21280,7 @@ function stringWidth(string, options = {}) {
|
||||
if (string.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
string = string.replace(emojiRegex(), ' ');
|
||||
string = string.replace(emojiRegex$1(), ' ');
|
||||
const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
|
||||
let width = 0;
|
||||
for (const character of string) {
|
||||
|
||||
Generated
+24
-24
@@ -16,22 +16,22 @@
|
||||
"vfile-reporter": "^7.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@rollup/plugin-commonjs": "^24.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.2",
|
||||
"rollup": "^3.20.2",
|
||||
"rollup": "^3.20.7",
|
||||
"rollup-plugin-cleanup": "^3.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.14",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
|
||||
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
|
||||
"version": "1.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@rollup/plugin-commonjs": {
|
||||
"version": "24.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.1.tgz",
|
||||
"integrity": "sha512-15LsiWRZk4eOGqvrJyu3z3DaBu5BhXIMeWnijSRvd8irrrg9SHpQ1pH+BUK4H6Z9wL9yOxZJMTLU+Au86XHxow==",
|
||||
"version": "24.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz",
|
||||
"integrity": "sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^5.0.1",
|
||||
@@ -109,9 +109,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz",
|
||||
"integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz",
|
||||
"integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA=="
|
||||
},
|
||||
"node_modules/@types/estree-jsx": {
|
||||
"version": "1.0.0",
|
||||
@@ -435,9 +435,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
|
||||
"integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
|
||||
"version": "2.12.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz",
|
||||
"integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
@@ -2215,12 +2215,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.2",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
|
||||
"integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
|
||||
"version": "1.22.3",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz",
|
||||
"integrity": "sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.11.0",
|
||||
"is-core-module": "^2.12.0",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
@@ -2232,9 +2232,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "3.20.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz",
|
||||
"integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==",
|
||||
"version": "3.20.7",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.7.tgz",
|
||||
"integrity": "sha512-P7E2zezKSLhWnTz46XxjSmInrbOCiul1yf+kJccMxT56vxjHwCbDfoLbiqFgu+WQoo9ij2PkraYaBstgB2prBA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
@@ -2290,9 +2290,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.3.8",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz",
|
||||
"integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
"vfile-reporter": "^7.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@rollup/plugin-commonjs": "^24.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.2",
|
||||
"rollup": "^3.20.2",
|
||||
"rollup": "^3.20.7",
|
||||
"rollup-plugin-cleanup": "^3.2.1"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user