This commit is contained in:
TiclemFR
2024-01-20 23:14:52 +01:00
parent a068f54957
commit 031f7071e6
881 changed files with 241469 additions and 247870 deletions

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env node
/*
@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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

18
node_modules/rollup/dist/rollup.d.ts generated vendored
View File

@@ -1,3 +1,5 @@
import type { Program } from 'estree';
export const VERSION: string;
// utils
@@ -98,13 +100,13 @@ interface ModuleOptions {
}
export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
ast?: AstNode;
ast?: ProgramNode;
code: string;
map?: SourceMapInput;
}
export interface TransformModuleJSON {
ast?: AstNode;
ast?: ProgramNode;
code: string;
// note if plugins use new this.cache to opt-out auto transform cache
customTransformCache: boolean;
@@ -115,7 +117,7 @@ export interface TransformModuleJSON {
}
export interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
ast: AstNode;
ast: ProgramNode;
dependencies: string[];
id: string;
resolvedIds: ResolvedIdMap;
@@ -171,7 +173,7 @@ export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
export type EmitFile = (emittedFile: EmittedFile) => string;
interface ModuleInfo extends ModuleOptions {
ast: AstNode | null;
ast: ProgramNode | null;
code: string | null;
dynamicImporters: readonly string[];
dynamicallyImportedIdResolutions: readonly ResolvedId[];
@@ -204,7 +206,7 @@ type LoggingFunctionWithPosition = (
export type ParseAst = (
input: string,
options?: { allowReturnOutsideFunction?: boolean }
) => AstNode;
) => ProgramNode;
// declare AbortSignal here for environments without DOM lib or @types/node
declare global {
@@ -214,7 +216,7 @@ declare global {
export type ParseAstAsync = (
input: string,
options?: { allowReturnOutsideFunction?: boolean; signal?: AbortSignal }
) => Promise<AstNode>;
) => Promise<ProgramNode>;
export interface PluginContext extends MinimalPluginContext {
addWatchFile: (id: string) => void;
@@ -280,7 +282,7 @@ export type ResolveIdHook = (
export type ShouldTransformCachedModuleHook = (
this: PluginContext,
options: {
ast: AstNode;
ast: ProgramNode;
code: string;
id: string;
meta: CustomPluginOptions;
@@ -977,6 +979,8 @@ interface AstNode {
type: string;
}
type ProgramNode = Program & AstNode;
export function defineConfig(options: RollupOptions): RollupOptions;
export function defineConfig(options: RollupOptions[]): RollupOptions[];
export function defineConfig(optionsFunction: RollupOptionsFunction): RollupOptionsFunction;

4
node_modules/rollup/dist/rollup.js generated vendored
View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
var version = "4.9.1";
var version = "4.9.5";
function ensureArray$1(items) {
if (Array.isArray(items)) {
@@ -3487,11 +3487,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;
@@ -3507,9 +3506,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);
@@ -7214,7 +7216,7 @@ class ParameterVariable extends LocalVariable {
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);
@@ -8743,7 +8745,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);
@@ -11029,7 +11033,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 {
@@ -11482,14 +11486,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}`;
},
@@ -14935,7 +14939,7 @@ class Module {
}
async tryParseAsync() {
try {
return (await parseAst_js.parseAstAsync(this.info.code));
return await parseAst_js.parseAstAsync(this.info.code);
}
catch (error_) {
return this.error(parseAst_js.logModuleParseError(error_, this.id), error_.pos);
@@ -14998,6 +15002,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};`;
}
@@ -15011,7 +15021,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) {
@@ -15103,7 +15118,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) {
@@ -15612,20 +15629,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}`));
@@ -15645,9 +15664,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 }) {
@@ -15655,10 +15684,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
@@ -15932,7 +15963,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]);
@@ -17765,10 +17796,10 @@ function commondir(files) {
if (files.length === 1)
return node_path.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(/\/+|\\+/));
@@ -17867,7 +17898,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,

View File

@@ -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

View File

@@ -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