- Update player class
This commit is contained in:
Kum1ta
2024-08-19 00:42:53 +02:00
parent 950abd0943
commit 227327fdf4
35 changed files with 374 additions and 251 deletions

View File

@ -1,7 +1,7 @@
/*
@license
Rollup.js v4.20.0
Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
Rollup.js v4.21.0
Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
https://github.com/rollup/rollup

View File

@ -1,7 +1,7 @@
/*
@license
Rollup.js v4.20.0
Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
Rollup.js v4.21.0
Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
https://github.com/rollup/rollup

View File

@ -1,7 +1,7 @@
/*
@license
Rollup.js v4.20.0
Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
Rollup.js v4.21.0
Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
https://github.com/rollup/rollup
@ -418,7 +418,7 @@ function getCamelizedPluginBaseName(pluginText) {
}
async function requireOrImport(pluginPath) {
try {
// eslint-disable-next-line unicorn/prefer-module
// eslint-disable-next-line unicorn/prefer-module, @typescript-eslint/no-require-imports
return require(pluginPath);
}
catch {

View File

@ -1,7 +1,7 @@
/*
@license
Rollup.js v4.20.0
Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
Rollup.js v4.21.0
Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
https://github.com/rollup/rollup

View File

@ -1,7 +1,7 @@
/*
@license
Rollup.js v4.20.0
Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
Rollup.js v4.21.0
Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
https://github.com/rollup/rollup
@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
var version = "4.20.0";
var version = "4.21.0";
function ensureArray$1(items) {
if (Array.isArray(items)) {
@ -165,12 +165,16 @@ const removeUnreferencedAssets = (outputBundle) => {
const unreferencedAssets = new Set();
const bundleEntries = Object.values(outputBundle);
for (const asset of bundleEntries) {
asset.type === 'asset' && asset.needsCodeReference && unreferencedAssets.add(asset.fileName);
if (asset.type === 'asset' && asset.needsCodeReference) {
unreferencedAssets.add(asset.fileName);
}
}
for (const chunk of bundleEntries) {
if (chunk.type === 'chunk') {
for (const referencedFile of chunk.referencedFiles) {
unreferencedAssets.has(referencedFile) && unreferencedAssets.delete(referencedFile);
if (unreferencedAssets.has(referencedFile)) {
unreferencedAssets.delete(referencedFile);
}
}
}
}
@ -992,7 +996,7 @@ class PluginDriver {
if (typeof handler !== 'function') {
return handler;
}
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
const hookResult = handler.apply(context, parameters);
if (!hookResult?.then) {
// short circuit for non-thenables and non-Promises
@ -1037,7 +1041,7 @@ class PluginDriver {
context = replaceContext(context, plugin);
}
try {
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
return handler.apply(context, parameters);
}
catch (error_) {
@ -1294,7 +1298,8 @@ async function mergeOutputOptions(config, overrides, log) {
sourcemapPathTransform: getOption('sourcemapPathTransform'),
strict: getOption('strict'),
systemNullSetters: getOption('systemNullSetters'),
validate: getOption('validate')
validate: getOption('validate'),
virtualDirname: getOption('virtualDirname')
};
warnUnknownOptions(config, Object.keys(outputOptions), 'output options', log);
return outputOptions;
@ -8863,7 +8868,9 @@ class ChildScope extends Scope {
this.parent.addNamespaceMemberAccess(name, variable);
}
addReturnExpression(expression) {
this.parent instanceof ChildScope && this.parent.addReturnExpression(expression);
if (this.parent instanceof ChildScope) {
this.parent.addReturnExpression(expression);
}
}
addUsedOutsideNames(usedNames, format, exportNamesByVariable, accessedGlobalsByScope) {
for (const variable of this.accessedOutsideVariables.values()) {
@ -9179,12 +9186,15 @@ function renderStatementList(statements, code, start, end, options) {
currentNode.end +
findFirstLineBreakOutsideComment(code.original.slice(currentNode.end, nextNode === undefined ? end : nextNode.start))[1];
if (currentNode.included) {
currentNodeNeedsBoundaries
? currentNode.render(code, options, {
if (currentNodeNeedsBoundaries) {
currentNode.render(code, options, {
end: nextNodeStart,
start: currentNodeStart
})
: currentNode.render(code, options);
});
}
else {
currentNode.render(code, options);
}
}
else {
treeshakeNode(currentNode, code, currentNodeStart, nextNodeStart);
@ -9378,7 +9388,9 @@ class RestElement extends NodeBase {
return this.argument.declare(kind, UNKNOWN_EXPRESSION);
}
deoptimizePath(path) {
path.length === 0 && this.argument.deoptimizePath(EMPTY_PATH);
if (path.length === 0) {
this.argument.deoptimizePath(EMPTY_PATH);
}
}
hasEffectsOnInteractionAtPath(path, interaction, context) {
return (path.length > 0 ||
@ -9833,7 +9845,9 @@ class AssignmentPattern extends NodeBase {
return this.left.declare(kind, init);
}
deoptimizePath(path) {
path.length === 0 && this.left.deoptimizePath(path);
if (path.length === 0) {
this.left.deoptimizePath(path);
}
}
hasEffectsOnInteractionAtPath(path, interaction, context) {
return (path.length > 0 || this.left.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context));
@ -13223,7 +13237,9 @@ class SwitchCase extends NodeBase {
}
render(code, options, nodeRenderOptions) {
if (this.consequent.length > 0) {
this.test && this.test.render(code, options);
if (this.test) {
this.test.render(code, options);
}
const testEnd = this.test
? this.test.end
: findFirstOccurrenceOutsideComment(code.original, 'default', this.start) + 7;
@ -15396,7 +15412,9 @@ class Module {
]);
}
error(properties, pos) {
pos !== undefined && this.addLocationToLogProps(properties, pos);
if (pos !== undefined) {
this.addLocationToLogProps(properties, pos);
}
return parseAst_js.error(properties);
}
// sum up the length of all ast nodes that are included
@ -17719,7 +17737,9 @@ class Chunk {
magicString.prepend(banner);
if (format === 'es' || format === 'cjs') {
const shebang = facadeModule !== null && facadeModule.info.isEntry && facadeModule.shebang;
shebang && magicString.prepend(`#!${shebang}\n`);
if (shebang) {
magicString.prepend(`#!${shebang}\n`);
}
}
if (footer)
magicString.append(footer);
@ -18040,7 +18060,7 @@ class Chunk {
: parseAst_js.relative(this.inputBase, idWithoutExtension);
}
else {
return `_virtual/${path$2.basename(idWithoutExtension)}`;
return (this.outputOptions.virtualDirname.replace(/\/$/, '') + '/' + path$2.basename(idWithoutExtension));
}
}
getReexportSpecifiers() {
@ -18879,11 +18899,13 @@ function getOptimizedChunks(chunks, minChunkSize, sideEffectAtoms, sizeByAtom, l
timeEnd('optimize chunks', 3);
return chunks; // the actual modules
}
minChunkSize > 1 &&
if (minChunkSize > 1) {
log('info', parseAst_js.logOptimizeChunkStatus(chunks.length, chunkPartition.small.size, 'Initially'));
}
mergeChunks(chunkPartition, minChunkSize, sideEffectAtoms, sizeByAtom);
minChunkSize > 1 &&
if (minChunkSize > 1) {
log('info', parseAst_js.logOptimizeChunkStatus(chunkPartition.small.size + chunkPartition.big.size, chunkPartition.small.size, 'After merging chunks'));
}
timeEnd('optimize chunks', 3);
return [...chunkPartition.small, ...chunkPartition.big];
}
@ -20889,7 +20911,8 @@ async function normalizeOutputOptions(config, inputOptions, unsetInputOptions) {
sourcemapPathTransform: config.sourcemapPathTransform,
strict: config.strict ?? true,
systemNullSetters: config.systemNullSetters ?? true,
validate: config.validate || false
validate: config.validate || false,
virtualDirname: config.virtualDirname || '_virtual'
};
warnUnknownOptions(config, Object.keys(outputOptions), 'output options', inputOptions.onLog);
return { options: outputOptions, unsetOptions };

View File

@ -1,7 +1,7 @@
/*
@license
Rollup.js v4.20.0
Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
Rollup.js v4.21.0
Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
https://github.com/rollup/rollup

View File

@ -1,7 +1,7 @@
/*
@license
Rollup.js v4.20.0
Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
Rollup.js v4.21.0
Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
https://github.com/rollup/rollup