🔧
This commit is contained in:
85
node_modules/rollup/dist/es/shared/node-entry.js
generated
vendored
85
node_modules/rollup/dist/es/shared/node-entry.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.9.1
|
||||
Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf
|
||||
Rollup.js v4.9.5
|
||||
Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
@@ -16,7 +16,7 @@ import { xxhashBase64Url } from '../../native.js';
|
||||
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
||||
import * as tty from 'tty';
|
||||
|
||||
var version = "4.9.1";
|
||||
var version = "4.9.5";
|
||||
|
||||
const comma = ','.charCodeAt(0);
|
||||
const semicolon = ';'.charCodeAt(0);
|
||||
@@ -2041,11 +2041,10 @@ const RESERVED_NAMES = new Set([
|
||||
'with',
|
||||
'yield'
|
||||
]);
|
||||
const RESERVED_NAMES$1 = RESERVED_NAMES;
|
||||
|
||||
const illegalCharacters = /[^\w$]/g;
|
||||
const startsWithDigit = (value) => /\d/.test(value[0]);
|
||||
const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES$1.has(value) || value === 'arguments';
|
||||
const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES.has(value) || value === 'arguments';
|
||||
function isLegal(value) {
|
||||
if (needsEscape(value)) {
|
||||
return false;
|
||||
@@ -2061,9 +2060,12 @@ function makeLegal(value) {
|
||||
return value || '_';
|
||||
}
|
||||
const VALID_IDENTIFIER_REGEXP = /^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u;
|
||||
const NUMBER_REGEXP = /^\d+$/;
|
||||
const NUMBER_REGEXP = /^(?:0|[1-9]\d*)$/;
|
||||
function stringifyObjectKeyIfNeeded(key) {
|
||||
if (VALID_IDENTIFIER_REGEXP.test(key) || NUMBER_REGEXP.test(key)) {
|
||||
if (VALID_IDENTIFIER_REGEXP.test(key)) {
|
||||
return key === '__proto__' ? '["__proto__"]' : key;
|
||||
}
|
||||
if (NUMBER_REGEXP.test(key) && +key <= Number.MAX_SAFE_INTEGER) {
|
||||
return key;
|
||||
}
|
||||
return JSON.stringify(key);
|
||||
@@ -5780,7 +5782,7 @@ function toBase64(value) {
|
||||
function getSafeName(baseName, usedNames, forbiddenNames) {
|
||||
let safeName = baseName;
|
||||
let count = 1;
|
||||
while (usedNames.has(safeName) || RESERVED_NAMES$1.has(safeName) || forbiddenNames?.has(safeName)) {
|
||||
while (usedNames.has(safeName) || RESERVED_NAMES.has(safeName) || forbiddenNames?.has(safeName)) {
|
||||
safeName = `${baseName}$${toBase64(count++)}`;
|
||||
}
|
||||
usedNames.add(safeName);
|
||||
@@ -7311,7 +7313,9 @@ class Identifier extends NodeBase {
|
||||
// in the same function or at top level of module
|
||||
return (this.isTDZAccess = true);
|
||||
}
|
||||
if (!this.variable.initReached) {
|
||||
// We ignore the case where the module is not yet executed because
|
||||
// moduleSideEffects are false.
|
||||
if (!this.variable.initReached && this.scope.context.module.isExecuted) {
|
||||
// Either a const/let TDZ violation or
|
||||
// var use before declaration was encountered.
|
||||
return (this.isTDZAccess = true);
|
||||
@@ -9597,7 +9601,7 @@ class ExportDefaultDeclaration extends NodeBase {
|
||||
const hasTrailingSemicolon = code.original.charCodeAt(this.end - 1) === 59; /*";"*/
|
||||
const systemExportNames = format === 'system' && exportNamesByVariable.get(this.variable);
|
||||
if (systemExportNames) {
|
||||
code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports('${systemExportNames[0]}', `);
|
||||
code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports(${JSON.stringify(systemExportNames[0])}, `);
|
||||
code.appendRight(hasTrailingSemicolon ? this.end - 1 : this.end, ')' + (hasTrailingSemicolon ? '' : ';'));
|
||||
}
|
||||
else {
|
||||
@@ -10050,14 +10054,14 @@ const HELPER_GENERATORS = {
|
||||
`}${n}${n}`);
|
||||
},
|
||||
[INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE](_t, snippets, _liveBindings, freeze, symbols) {
|
||||
const { getDirectReturnFunction, getObject, n } = snippets;
|
||||
const { getDirectReturnFunction, getObject, n, _ } = snippets;
|
||||
const [left, right] = getDirectReturnFunction(['e'], {
|
||||
functionReturn: true,
|
||||
lineBreakIndent: null,
|
||||
name: INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE
|
||||
});
|
||||
return `${left}${getFrozen(freeze, getWithToStringTag(symbols, getObject([
|
||||
['__proto__', 'null'],
|
||||
[null, `__proto__:${_}null`],
|
||||
['default', 'e']
|
||||
], { lineBreakIndent: null }), snippets))}${right}${n}${n}`;
|
||||
},
|
||||
@@ -13510,7 +13514,7 @@ class Module {
|
||||
}
|
||||
async tryParseAsync() {
|
||||
try {
|
||||
return (await parseAstAsync(this.info.code));
|
||||
return await parseAstAsync(this.info.code);
|
||||
}
|
||||
catch (error_) {
|
||||
return this.error(logModuleParseError(error_, this.id), error_.pos);
|
||||
@@ -13573,6 +13577,12 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
||||
`${t}enumerable:${_}true,${n}` +
|
||||
`${t}get:${_}${left}${importName}${right}${n}});`;
|
||||
}
|
||||
else if (specifier.reexported === '__proto__') {
|
||||
exportBlock +=
|
||||
`Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
|
||||
`${t}enumerable:${_}true,${n}` +
|
||||
`${t}value:${_}${importName}${n}});`;
|
||||
}
|
||||
else {
|
||||
exportBlock += `exports${getPropertyAccess(specifier.reexported)}${_}=${_}${importName};`;
|
||||
}
|
||||
@@ -13586,7 +13596,12 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
||||
if (lhs !== rhs) {
|
||||
if (exportBlock)
|
||||
exportBlock += n;
|
||||
exportBlock += `${lhs}${_}=${_}${rhs};`;
|
||||
exportBlock +=
|
||||
exported === '__proto__'
|
||||
? `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
|
||||
`${t}enumerable:${_}true,${n}` +
|
||||
`${t}value:${_}${rhs}${n}});`
|
||||
: `${lhs}${_}=${_}${rhs};`;
|
||||
}
|
||||
}
|
||||
for (const { name, reexports } of dependencies) {
|
||||
@@ -13678,7 +13693,9 @@ const getDefineProperty = (name, needsLiveBinding, t, { _, getDirectReturnFuncti
|
||||
`${t}${t}enumerable:${_}true,${n}` +
|
||||
`${t}${t}get:${_}${left}${name}[k]${right}${n}${t}})`);
|
||||
}
|
||||
return `exports[k]${_}=${_}${name}[k]`;
|
||||
return (`k${_}===${_}'__proto__'${_}?${_}Object.defineProperty(exports,${_}k,${_}{${n}` +
|
||||
`${t}${t}enumerable:${_}true,${n}` +
|
||||
`${t}${t}value:${_}${name}[k]${n}${t}})${_}:${_}exports[k]${_}=${_}${name}[k]`);
|
||||
};
|
||||
|
||||
function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, indent, snippets) {
|
||||
@@ -14187,20 +14204,22 @@ function analyzeDependencies(dependencies, exports, t, { _, cnst, getObject, get
|
||||
}
|
||||
}
|
||||
if (reexportedNames.length > 1 || hasStarReexport) {
|
||||
const exportMapping = getObject(reexportedNames, { lineBreakIndent: null });
|
||||
if (hasStarReexport) {
|
||||
if (!starExcludes) {
|
||||
starExcludes = getStarExcludes({ dependencies, exports });
|
||||
}
|
||||
reexportedNames.unshift([null, `__proto__:${_}null`]);
|
||||
const exportMapping = getObject(reexportedNames, { lineBreakIndent: null });
|
||||
setter.push(`${cnst} setter${_}=${_}${exportMapping};`, `for${_}(${cnst} name in module)${_}{`, `${t}if${_}(!_starExcludes[name])${_}setter[name]${_}=${_}module[name];`, '}', 'exports(setter);');
|
||||
}
|
||||
else {
|
||||
const exportMapping = getObject(reexportedNames, { lineBreakIndent: null });
|
||||
setter.push(`exports(${exportMapping});`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const [key, value] = reexportedNames[0];
|
||||
setter.push(`exports('${key}',${_}${value});`);
|
||||
setter.push(`exports(${JSON.stringify(key)},${_}${value});`);
|
||||
}
|
||||
}
|
||||
setters.push(setter.join(`${n}${t}${t}${t}`));
|
||||
@@ -14220,9 +14239,19 @@ const getStarExcludes = ({ dependencies, exports }) => {
|
||||
}
|
||||
return starExcludes;
|
||||
};
|
||||
const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => starExcludes
|
||||
? `${n}${t}${cnst} _starExcludes${_}=${_}${getObject([...starExcludes].map(property => [property, '1']), { lineBreakIndent: { base: t, t } })};`
|
||||
: '';
|
||||
const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => {
|
||||
if (starExcludes) {
|
||||
const fields = [...starExcludes].map(property => [
|
||||
property,
|
||||
'1'
|
||||
]);
|
||||
fields.unshift([null, `__proto__:${_}null`]);
|
||||
return `${n}${t}${cnst} _starExcludes${_}=${_}${getObject(fields, {
|
||||
lineBreakIndent: { base: t, t }
|
||||
})};`;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
const getImportBindingsBlock = (importBindings, t, { _, n }) => (importBindings.length > 0 ? `${n}${t}var ${importBindings.join(`,${_}`)};` : '');
|
||||
const getHoistedExportsBlock = (exports, t, snippets) => getExportsBlock(exports.filter(expt => expt.hoisted).map(expt => ({ name: expt.exported, value: expt.local })), t, snippets);
|
||||
function getExportsBlock(exports, t, { _, n }) {
|
||||
@@ -14230,10 +14259,12 @@ function getExportsBlock(exports, t, { _, n }) {
|
||||
return '';
|
||||
}
|
||||
if (exports.length === 1) {
|
||||
return `exports('${exports[0].name}',${_}${exports[0].value});${n}${n}`;
|
||||
return `exports(${JSON.stringify(exports[0].name)},${_}${exports[0].value});${n}${n}`;
|
||||
}
|
||||
return (`exports({${n}` +
|
||||
exports.map(({ name, value }) => `${t}${name}:${_}${value}`).join(`,${n}`) +
|
||||
exports
|
||||
.map(({ name, value }) => `${t}${stringifyObjectKeyIfNeeded(name)}:${_}${value}`)
|
||||
.join(`,${n}`) +
|
||||
`${n}});${n}${n}`);
|
||||
}
|
||||
const getSyntheticExportsBlock = (exports, t, snippets) => getExportsBlock(exports
|
||||
@@ -14507,7 +14538,7 @@ function assignExportsToMangledNames(exports, exportsByName, exportNamesByVariab
|
||||
nameIndex += 9 * 64 ** (exportName.length - 1);
|
||||
exportName = toBase64(nameIndex);
|
||||
}
|
||||
} while (RESERVED_NAMES$1.has(exportName) || exportsByName.has(exportName));
|
||||
} while (RESERVED_NAMES.has(exportName) || exportsByName.has(exportName));
|
||||
}
|
||||
exportsByName.set(exportName, variable);
|
||||
exportNamesByVariable.set(variable, [exportName]);
|
||||
@@ -16445,10 +16476,10 @@ function commondir(files) {
|
||||
if (files.length === 1)
|
||||
return dirname(files[0]);
|
||||
const commonSegments = files.slice(1).reduce((commonSegments, file) => {
|
||||
const pathSegements = file.split(/\/+|\\+/);
|
||||
const pathSegments = file.split(/\/+|\\+/);
|
||||
let index;
|
||||
for (index = 0; commonSegments[index] === pathSegements[index] &&
|
||||
index < Math.min(commonSegments.length, pathSegements.length); index++)
|
||||
for (index = 0; commonSegments[index] === pathSegments[index] &&
|
||||
index < Math.min(commonSegments.length, pathSegments.length); index++)
|
||||
;
|
||||
return commonSegments.slice(0, index);
|
||||
}, files[0].split(/\/+|\\+/));
|
||||
@@ -16547,7 +16578,7 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
||||
];
|
||||
const isValidPropertyName = reservedNamesAsProps
|
||||
? (name) => VALID_IDENTIFIER_REGEXP.test(name)
|
||||
: (name) => !RESERVED_NAMES$1.has(name) && VALID_IDENTIFIER_REGEXP.test(name);
|
||||
: (name) => !RESERVED_NAMES.has(name) && VALID_IDENTIFIER_REGEXP.test(name);
|
||||
return {
|
||||
_,
|
||||
cnst,
|
||||
|
||||
4
node_modules/rollup/dist/es/shared/parseAst.js
generated
vendored
4
node_modules/rollup/dist/es/shared/parseAst.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.9.1
|
||||
Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf
|
||||
Rollup.js v4.9.5
|
||||
Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
|
||||
4
node_modules/rollup/dist/es/shared/watch.js
generated
vendored
4
node_modules/rollup/dist/es/shared/watch.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.9.1
|
||||
Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf
|
||||
Rollup.js v4.9.5
|
||||
Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user