rollup 4.21.0 → 4.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/rollup +3 -6
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +32 -44
- package/dist/es/shared/parseAst.js +2 -3
- package/dist/es/shared/watch.js +4 -4
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- package/dist/rollup.d.ts +14 -28
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +3 -3
- package/dist/shared/parseAst.js +2 -3
- package/dist/shared/rollup.js +115 -127
- package/dist/shared/watch-cli.js +9 -8
- package/dist/shared/watch.js +4 -4
- package/package.json +32 -33
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.21.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.21.1
|
|
5
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
|
@@ -1614,12 +1614,10 @@ async function getConfigPath(commandConfig) {
|
|
|
1614
1614
|
if (commandConfig.slice(0, 5) === 'node:') {
|
|
1615
1615
|
const packageName = commandConfig.slice(5);
|
|
1616
1616
|
try {
|
|
1617
|
-
// eslint-disable-next-line unicorn/prefer-module
|
|
1618
1617
|
return require.resolve(`rollup-config-${packageName}`, { paths: [process$1.cwd()] });
|
|
1619
1618
|
}
|
|
1620
1619
|
catch {
|
|
1621
1620
|
try {
|
|
1622
|
-
// eslint-disable-next-line unicorn/prefer-module
|
|
1623
1621
|
return require.resolve(packageName, { paths: [process$1.cwd()] });
|
|
1624
1622
|
}
|
|
1625
1623
|
catch (error) {
|
|
@@ -1745,7 +1743,7 @@ else if (command.version) {
|
|
|
1745
1743
|
}
|
|
1746
1744
|
else {
|
|
1747
1745
|
try {
|
|
1748
|
-
// eslint-disable-next-line
|
|
1746
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
1749
1747
|
require('source-map-support').install();
|
|
1750
1748
|
}
|
|
1751
1749
|
catch {
|
|
@@ -1753,7 +1751,6 @@ else {
|
|
|
1753
1751
|
}
|
|
1754
1752
|
const promise = runRollup(command);
|
|
1755
1753
|
if (command.forceExit) {
|
|
1756
|
-
// eslint-disable-next-line unicorn/no-process-exit
|
|
1757
1754
|
promise.then(() => process$1.exit());
|
|
1758
1755
|
}
|
|
1759
1756
|
}
|
package/dist/es/getLogFilter.js
CHANGED
package/dist/es/parseAst.js
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { performance } from 'node:perf_hooks';
|
|
|
16
16
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version = "4.21.
|
|
19
|
+
var version = "4.21.1";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -10505,7 +10505,7 @@ const getHelpersBlock = (additionalHelpers, accessedGlobals, indent, snippets, l
|
|
|
10505
10505
|
};
|
|
10506
10506
|
const HELPER_GENERATORS = {
|
|
10507
10507
|
[DOCUMENT_CURRENT_SCRIPT](_t, { _, n }) {
|
|
10508
|
-
return `var${
|
|
10508
|
+
return `var ${DOCUMENT_CURRENT_SCRIPT}${_}=${_}typeof document${_}!==${_}'undefined'${_}?${_}document.currentScript${_}:${_}null;${n}`;
|
|
10509
10509
|
},
|
|
10510
10510
|
[INTEROP_DEFAULT_COMPAT_VARIABLE](_t, snippets, liveBindings) {
|
|
10511
10511
|
const { _, getDirectReturnFunction, n } = snippets;
|
|
@@ -13908,21 +13908,17 @@ class Module {
|
|
|
13908
13908
|
},
|
|
13909
13909
|
id,
|
|
13910
13910
|
get implicitlyLoadedAfterOneOf() {
|
|
13911
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
13912
13911
|
return Array.from(implicitlyLoadedAfter, getId).sort();
|
|
13913
13912
|
},
|
|
13914
13913
|
get implicitlyLoadedBefore() {
|
|
13915
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
13916
13914
|
return Array.from(implicitlyLoadedBefore, getId).sort();
|
|
13917
13915
|
},
|
|
13918
13916
|
get importedIdResolutions() {
|
|
13919
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
13920
13917
|
return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]).filter(Boolean);
|
|
13921
13918
|
},
|
|
13922
13919
|
get importedIds() {
|
|
13923
13920
|
// We cannot use this.dependencies because this is needed before
|
|
13924
13921
|
// dependencies are populated
|
|
13925
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
13926
13922
|
return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]?.id).filter(Boolean);
|
|
13927
13923
|
},
|
|
13928
13924
|
get importers() {
|
|
@@ -14389,7 +14385,6 @@ class Module {
|
|
|
14389
14385
|
attributes: this.info.attributes,
|
|
14390
14386
|
code: this.info.code,
|
|
14391
14387
|
customTransformCache: this.customTransformCache,
|
|
14392
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
14393
14388
|
dependencies: Array.from(this.dependencies, getId),
|
|
14394
14389
|
id: this.id,
|
|
14395
14390
|
meta: this.info.meta,
|
|
@@ -14756,7 +14751,6 @@ function setAlternativeExporterIfCyclic(variable, importer, reexporter) {
|
|
|
14756
14751
|
}
|
|
14757
14752
|
}
|
|
14758
14753
|
const copyNameToModulesMap = (searchedNamesAndModules) => searchedNamesAndModules &&
|
|
14759
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
14760
14754
|
new Map(Array.from(searchedNamesAndModules, ([name, modules]) => [name, new Set(modules)]));
|
|
14761
14755
|
|
|
14762
14756
|
function removeJsExtension(name) {
|
|
@@ -16181,7 +16175,6 @@ class Chunk {
|
|
|
16181
16175
|
}
|
|
16182
16176
|
}
|
|
16183
16177
|
for (const module of entryModules) {
|
|
16184
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
16185
16178
|
const requiredFacades = Array.from(new Set(module.chunkNames.filter(({ isUserDefined }) => isUserDefined).map(({ name }) => name)),
|
|
16186
16179
|
// mapping must run after Set 'name' dedupe
|
|
16187
16180
|
name => ({
|
|
@@ -16190,7 +16183,6 @@ class Chunk {
|
|
|
16190
16183
|
if (requiredFacades.length === 0 && module.isUserDefinedEntryPoint) {
|
|
16191
16184
|
requiredFacades.push({});
|
|
16192
16185
|
}
|
|
16193
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
16194
16186
|
requiredFacades.push(...Array.from(module.chunkFileNames, fileName => ({ fileName })));
|
|
16195
16187
|
if (requiredFacades.length === 0) {
|
|
16196
16188
|
requiredFacades.push({});
|
|
@@ -16315,10 +16307,8 @@ class Chunk {
|
|
|
16315
16307
|
...this.getPreRenderedChunkInfo(),
|
|
16316
16308
|
dynamicImports: this.getDynamicDependencies().map(resolveFileName),
|
|
16317
16309
|
fileName: this.getFileName(),
|
|
16318
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
16319
16310
|
implicitlyLoadedBefore: Array.from(this.implicitlyLoadedBefore, resolveFileName),
|
|
16320
16311
|
importedBindings: getImportedBindingsPerDependency(this.getRenderedDependencies(), resolveFileName),
|
|
16321
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
16322
16312
|
imports: Array.from(this.dependencies, resolveFileName),
|
|
16323
16313
|
modules: this.renderedModules,
|
|
16324
16314
|
referencedFiles: this.getReferencedFiles()
|
|
@@ -16363,9 +16353,7 @@ class Chunk {
|
|
|
16363
16353
|
hasDefaultExport = true;
|
|
16364
16354
|
}
|
|
16365
16355
|
if (format === 'es') {
|
|
16366
|
-
renderedDependency.reexports = reexports.filter(
|
|
16367
|
-
// eslint-disable-next-line unicorn/prefer-array-some
|
|
16368
|
-
({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
|
|
16356
|
+
renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
|
|
16369
16357
|
}
|
|
16370
16358
|
}
|
|
16371
16359
|
}
|
|
@@ -16717,9 +16705,16 @@ class Chunk {
|
|
|
16717
16705
|
? sanitizedId.slice(0, -extensionName.length)
|
|
16718
16706
|
: sanitizedId;
|
|
16719
16707
|
if (isAbsolute$1(idWithoutExtension)) {
|
|
16720
|
-
|
|
16721
|
-
|
|
16722
|
-
|
|
16708
|
+
if (preserveModulesRoot && resolve$1(idWithoutExtension).startsWith(preserveModulesRoot)) {
|
|
16709
|
+
return idWithoutExtension.slice(preserveModulesRoot.length).replace(/^[/\\]/, '');
|
|
16710
|
+
}
|
|
16711
|
+
else {
|
|
16712
|
+
// handle edge case in Windows
|
|
16713
|
+
if (this.inputBase === '/' && !idWithoutExtension.startsWith('/')) {
|
|
16714
|
+
return relative$1(this.inputBase, idWithoutExtension.replace(/^[a-zA-Z]:[/\\]/, '/'));
|
|
16715
|
+
}
|
|
16716
|
+
return relative$1(this.inputBase, idWithoutExtension);
|
|
16717
|
+
}
|
|
16723
16718
|
}
|
|
16724
16719
|
else {
|
|
16725
16720
|
return (this.outputOptions.virtualDirname.replace(/\/$/, '') + '/' + basename(idWithoutExtension));
|
|
@@ -16859,7 +16854,6 @@ class Chunk {
|
|
|
16859
16854
|
const rendered = module.render(renderOptions);
|
|
16860
16855
|
if (!renderOptions.accessedDocumentCurrentScript &&
|
|
16861
16856
|
formatsMaybeAccessDocumentCurrentScript.includes(format)) {
|
|
16862
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
16863
16857
|
this.accessedGlobalsByScope.get(module.scope)?.delete(DOCUMENT_CURRENT_SCRIPT);
|
|
16864
16858
|
}
|
|
16865
16859
|
renderOptions.accessedDocumentCurrentScript = false;
|
|
@@ -16901,7 +16895,6 @@ class Chunk {
|
|
|
16901
16895
|
}
|
|
16902
16896
|
if (hoistedSource)
|
|
16903
16897
|
magicString.prepend(hoistedSource + n + n);
|
|
16904
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
16905
16898
|
if (this.needsExportsShim) {
|
|
16906
16899
|
magicString.prepend(`${n}${cnst} ${MISSING_EXPORT_SHIM_VARIABLE}${_}=${_}void 0;${n}${n}`);
|
|
16907
16900
|
}
|
|
@@ -18306,7 +18299,6 @@ class Bundle {
|
|
|
18306
18299
|
return manualChunkAliasByEntry;
|
|
18307
18300
|
}
|
|
18308
18301
|
assignManualChunks(getManualChunk) {
|
|
18309
|
-
// eslint-disable-next-line unicorn/prefer-module
|
|
18310
18302
|
const manualChunkAliasesWithEntry = [];
|
|
18311
18303
|
const manualChunksApi = {
|
|
18312
18304
|
getModuleIds: () => this.graph.modulesById.keys(),
|
|
@@ -18462,6 +18454,22 @@ function flru (max) {
|
|
|
18462
18454
|
};
|
|
18463
18455
|
}
|
|
18464
18456
|
|
|
18457
|
+
class GlobalScope extends Scope {
|
|
18458
|
+
constructor() {
|
|
18459
|
+
super();
|
|
18460
|
+
this.parent = null;
|
|
18461
|
+
this.variables.set('undefined', new UndefinedVariable());
|
|
18462
|
+
}
|
|
18463
|
+
findVariable(name) {
|
|
18464
|
+
let variable = this.variables.get(name);
|
|
18465
|
+
if (!variable) {
|
|
18466
|
+
variable = new GlobalVariable(name);
|
|
18467
|
+
this.variables.set(name, variable);
|
|
18468
|
+
}
|
|
18469
|
+
return variable;
|
|
18470
|
+
}
|
|
18471
|
+
}
|
|
18472
|
+
|
|
18465
18473
|
function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions, isEntry, attributes) {
|
|
18466
18474
|
let skipped = null;
|
|
18467
18475
|
let replaceContext = null;
|
|
@@ -19186,7 +19194,6 @@ class ModuleLoader {
|
|
|
19186
19194
|
});
|
|
19187
19195
|
}
|
|
19188
19196
|
getResolveStaticDependencyPromises(module) {
|
|
19189
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
19190
19197
|
return Array.from(module.sourcesWithAttributes, async ([source, attributes]) => [
|
|
19191
19198
|
source,
|
|
19192
19199
|
(module.resolvedIds[source] =
|
|
@@ -19325,22 +19332,6 @@ async function waitForDependencyResolution(loadPromise) {
|
|
|
19325
19332
|
return Promise.all([...resolveStaticDependencyPromises, ...resolveDynamicImportPromises]);
|
|
19326
19333
|
}
|
|
19327
19334
|
|
|
19328
|
-
class GlobalScope extends Scope {
|
|
19329
|
-
constructor() {
|
|
19330
|
-
super();
|
|
19331
|
-
this.parent = null;
|
|
19332
|
-
this.variables.set('undefined', new UndefinedVariable());
|
|
19333
|
-
}
|
|
19334
|
-
findVariable(name) {
|
|
19335
|
-
let variable = this.variables.get(name);
|
|
19336
|
-
if (!variable) {
|
|
19337
|
-
variable = new GlobalVariable(name);
|
|
19338
|
-
this.variables.set(name, variable);
|
|
19339
|
-
}
|
|
19340
|
-
return variable;
|
|
19341
|
-
}
|
|
19342
|
-
}
|
|
19343
|
-
|
|
19344
19335
|
function generateAssetFileName(name, source, originalFileName, sourceHash, outputOptions, bundle) {
|
|
19345
19336
|
const emittedName = outputOptions.sanitizeFileName(name || 'asset');
|
|
19346
19337
|
return makeUnique(renderNamePattern(typeof outputOptions.assetFileNames === 'function'
|
|
@@ -20622,7 +20613,6 @@ const getAddon = (config, name) => {
|
|
|
20622
20613
|
}
|
|
20623
20614
|
return () => configAddon || '';
|
|
20624
20615
|
};
|
|
20625
|
-
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
20626
20616
|
const getDir = (config, file) => {
|
|
20627
20617
|
const { dir } = config;
|
|
20628
20618
|
if (typeof dir === 'string' && typeof file === 'string') {
|
|
@@ -20692,9 +20682,7 @@ const getInterop = (config) => {
|
|
|
20692
20682
|
};
|
|
20693
20683
|
const validateInterop = (interop) => {
|
|
20694
20684
|
if (!ALLOWED_INTEROP_TYPES.has(interop)) {
|
|
20695
|
-
return error(logInvalidOption('output.interop', URL_OUTPUT_INTEROP,
|
|
20696
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
20697
|
-
`use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
|
|
20685
|
+
return error(logInvalidOption('output.interop', URL_OUTPUT_INTEROP, `use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
|
|
20698
20686
|
}
|
|
20699
20687
|
return interop;
|
|
20700
20688
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -808,7 +808,6 @@ function logMissingNodeBuiltins(externalBuiltins) {
|
|
|
808
808
|
message: `Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(externalBuiltins)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
|
-
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
812
811
|
function logMissingFileOrDirOption() {
|
|
813
812
|
return {
|
|
814
813
|
code: MISSING_OPTION,
|
package/dist/es/shared/watch.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
+
import { picomatch as picomatch$2, getAugmentedNamespace, fseventsImporter, createFilter, rollupInternal } from './node-entry.js';
|
|
10
11
|
import path$1 from 'node:path';
|
|
11
12
|
import process$1 from 'node:process';
|
|
12
|
-
import { picomatch as picomatch$2, getAugmentedNamespace, fseventsImporter, createFilter, rollupInternal } from './node-entry.js';
|
|
13
|
-
import { platform } from 'node:os';
|
|
14
13
|
import require$$0$1 from 'fs';
|
|
15
14
|
import require$$2 from 'util';
|
|
16
15
|
import require$$1 from 'stream';
|
|
17
16
|
import require$$0$2 from 'path';
|
|
18
17
|
import require$$2$1 from 'os';
|
|
19
18
|
import require$$0$3 from 'events';
|
|
19
|
+
import { platform } from 'node:os';
|
|
20
20
|
import './parseAst.js';
|
|
21
21
|
import '../../native.js';
|
|
22
22
|
import 'node:perf_hooks';
|
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/parseAst.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -211,9 +211,7 @@ interface ModuleInfo extends ModuleOptions {
|
|
|
211
211
|
|
|
212
212
|
export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
|
|
213
213
|
|
|
214
|
-
export
|
|
215
|
-
[plugin: string]: any;
|
|
216
|
-
}
|
|
214
|
+
export type CustomPluginOptions = Record<string, any>;
|
|
217
215
|
|
|
218
216
|
type LoggingFunctionWithPosition = (
|
|
219
217
|
log: RollupLog | string | (() => RollupLog | string),
|
|
@@ -276,9 +274,7 @@ export interface ResolvedId extends ModuleOptions {
|
|
|
276
274
|
resolvedBy: string;
|
|
277
275
|
}
|
|
278
276
|
|
|
279
|
-
export
|
|
280
|
-
[key: string]: ResolvedId;
|
|
281
|
-
}
|
|
277
|
+
export type ResolvedIdMap = Record<string, ResolvedId>;
|
|
282
278
|
|
|
283
279
|
interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
|
|
284
280
|
external?: boolean | 'absolute' | 'relative';
|
|
@@ -398,9 +394,7 @@ export type WatchChangeHook = (
|
|
|
398
394
|
*/
|
|
399
395
|
export type PluginImpl<O extends object = object, A = any> = (options?: O) => Plugin<A>;
|
|
400
396
|
|
|
401
|
-
export
|
|
402
|
-
[fileName: string]: OutputAsset | OutputChunk;
|
|
403
|
-
}
|
|
397
|
+
export type OutputBundle = Record<string, OutputAsset | OutputChunk>;
|
|
404
398
|
|
|
405
399
|
export interface FunctionPluginHooks {
|
|
406
400
|
augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void;
|
|
@@ -559,11 +553,11 @@ export type ExternalOption =
|
|
|
559
553
|
| RegExp
|
|
560
554
|
| ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue);
|
|
561
555
|
|
|
562
|
-
export type GlobalsOption =
|
|
556
|
+
export type GlobalsOption = Record<string, string> | ((name: string) => string);
|
|
563
557
|
|
|
564
|
-
export type InputOption = string | string[] |
|
|
558
|
+
export type InputOption = string | string[] | Record<string, string>;
|
|
565
559
|
|
|
566
|
-
export type ManualChunksOption =
|
|
560
|
+
export type ManualChunksOption = Record<string, string[]> | GetManualChunk;
|
|
567
561
|
|
|
568
562
|
export type LogHandlerWithDefault = (
|
|
569
563
|
level: LogLevel,
|
|
@@ -601,7 +595,7 @@ export interface InputOptions {
|
|
|
601
595
|
logLevel?: LogLevelOption;
|
|
602
596
|
makeAbsoluteExternalsRelative?: boolean | 'ifRelativeSource';
|
|
603
597
|
maxParallelFileOps?: number;
|
|
604
|
-
moduleContext?: ((id: string) => string | NullValue) |
|
|
598
|
+
moduleContext?: ((id: string) => string | NullValue) | Record<string, string>;
|
|
605
599
|
onLog?: LogHandlerWithDefault;
|
|
606
600
|
onwarn?: WarningHandlerWithDefault;
|
|
607
601
|
perf?: boolean;
|
|
@@ -624,7 +618,7 @@ export interface NormalizedInputOptions {
|
|
|
624
618
|
experimentalCacheExpiry: number;
|
|
625
619
|
experimentalLogSideEffects: boolean;
|
|
626
620
|
external: IsExternal;
|
|
627
|
-
input: string[] |
|
|
621
|
+
input: string[] | Record<string, string>;
|
|
628
622
|
logLevel: LogLevelOption;
|
|
629
623
|
makeAbsoluteExternalsRelative: boolean | 'ifRelativeSource';
|
|
630
624
|
maxParallelFileOps: number;
|
|
@@ -818,9 +812,7 @@ export type WarningHandlerWithDefault = (
|
|
|
818
812
|
defaultHandler: LoggingFunction
|
|
819
813
|
) => void;
|
|
820
814
|
|
|
821
|
-
export
|
|
822
|
-
[label: string]: [number, number, number];
|
|
823
|
-
}
|
|
815
|
+
export type SerializedTimings = Record<string, [number, number, number]>;
|
|
824
816
|
|
|
825
817
|
export interface PreRenderedAsset {
|
|
826
818
|
name: string | undefined;
|
|
@@ -857,13 +849,9 @@ export interface RenderedChunk extends PreRenderedChunk {
|
|
|
857
849
|
dynamicImports: string[];
|
|
858
850
|
fileName: string;
|
|
859
851
|
implicitlyLoadedBefore: string[];
|
|
860
|
-
importedBindings:
|
|
861
|
-
[imported: string]: string[];
|
|
862
|
-
};
|
|
852
|
+
importedBindings: Record<string, string[]>;
|
|
863
853
|
imports: string[];
|
|
864
|
-
modules:
|
|
865
|
-
[id: string]: RenderedModule;
|
|
866
|
-
};
|
|
854
|
+
modules: Record<string, RenderedModule>;
|
|
867
855
|
referencedFiles: string[];
|
|
868
856
|
}
|
|
869
857
|
|
|
@@ -874,9 +862,7 @@ export interface OutputChunk extends RenderedChunk {
|
|
|
874
862
|
preliminaryFileName: string;
|
|
875
863
|
}
|
|
876
864
|
|
|
877
|
-
export
|
|
878
|
-
[key: string]: [number, any];
|
|
879
|
-
}
|
|
865
|
+
export type SerializablePluginCache = Record<string, [number, any]>;
|
|
880
866
|
|
|
881
867
|
export interface RollupCache {
|
|
882
868
|
modules: ModuleJSON[];
|
|
@@ -948,11 +934,11 @@ export interface RollupWatchOptions extends InputOptions {
|
|
|
948
934
|
}
|
|
949
935
|
|
|
950
936
|
export type AwaitedEventListener<
|
|
951
|
-
T extends
|
|
937
|
+
T extends Record<string, (...parameters: any) => any>,
|
|
952
938
|
K extends keyof T
|
|
953
939
|
> = (...parameters: Parameters<T[K]>) => void | Promise<void>;
|
|
954
940
|
|
|
955
|
-
export interface AwaitingEventEmitter<T extends
|
|
941
|
+
export interface AwaitingEventEmitter<T extends Record<string, (...parameters: any) => any>> {
|
|
956
942
|
close(): Promise<void>;
|
|
957
943
|
emit<K extends keyof T>(event: K, ...parameters: Parameters<T[K]>): Promise<unknown>;
|
|
958
944
|
/**
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -418,7 +418,7 @@ function getCamelizedPluginBaseName(pluginText) {
|
|
|
418
418
|
}
|
|
419
419
|
async function requireOrImport(pluginPath) {
|
|
420
420
|
try {
|
|
421
|
-
// eslint-disable-next-line
|
|
421
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
422
422
|
return require(pluginPath);
|
|
423
423
|
}
|
|
424
424
|
catch {
|
package/dist/shared/parseAst.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -750,7 +750,6 @@ function logMissingNodeBuiltins(externalBuiltins) {
|
|
|
750
750
|
message: `Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(externalBuiltins)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`
|
|
751
751
|
};
|
|
752
752
|
}
|
|
753
|
-
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
754
753
|
function logMissingFileOrDirOption() {
|
|
755
754
|
return {
|
|
756
755
|
code: MISSING_OPTION,
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
|
|
32
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
33
33
|
|
|
34
|
-
var version = "4.21.
|
|
34
|
+
var version = "4.21.1";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -541,89 +541,6 @@ class FileEmitter {
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
const ANONYMOUS_PLUGIN_PREFIX = 'at position ';
|
|
545
|
-
const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = 'at output position ';
|
|
546
|
-
|
|
547
|
-
function createPluginCache(cache) {
|
|
548
|
-
return {
|
|
549
|
-
delete(id) {
|
|
550
|
-
return delete cache[id];
|
|
551
|
-
},
|
|
552
|
-
get(id) {
|
|
553
|
-
const item = cache[id];
|
|
554
|
-
if (!item)
|
|
555
|
-
return;
|
|
556
|
-
item[0] = 0;
|
|
557
|
-
return item[1];
|
|
558
|
-
},
|
|
559
|
-
has(id) {
|
|
560
|
-
const item = cache[id];
|
|
561
|
-
if (!item)
|
|
562
|
-
return false;
|
|
563
|
-
item[0] = 0;
|
|
564
|
-
return true;
|
|
565
|
-
},
|
|
566
|
-
set(id, value) {
|
|
567
|
-
cache[id] = [0, value];
|
|
568
|
-
}
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
function getTrackedPluginCache(pluginCache, onUse) {
|
|
572
|
-
return {
|
|
573
|
-
delete(id) {
|
|
574
|
-
onUse();
|
|
575
|
-
return pluginCache.delete(id);
|
|
576
|
-
},
|
|
577
|
-
get(id) {
|
|
578
|
-
onUse();
|
|
579
|
-
return pluginCache.get(id);
|
|
580
|
-
},
|
|
581
|
-
has(id) {
|
|
582
|
-
onUse();
|
|
583
|
-
return pluginCache.has(id);
|
|
584
|
-
},
|
|
585
|
-
set(id, value) {
|
|
586
|
-
onUse();
|
|
587
|
-
return pluginCache.set(id, value);
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
const NO_CACHE = {
|
|
592
|
-
delete() {
|
|
593
|
-
return false;
|
|
594
|
-
},
|
|
595
|
-
get() {
|
|
596
|
-
return undefined;
|
|
597
|
-
},
|
|
598
|
-
has() {
|
|
599
|
-
return false;
|
|
600
|
-
},
|
|
601
|
-
set() { }
|
|
602
|
-
};
|
|
603
|
-
function uncacheablePluginError(pluginName) {
|
|
604
|
-
if (pluginName.startsWith(ANONYMOUS_PLUGIN_PREFIX) ||
|
|
605
|
-
pluginName.startsWith(ANONYMOUS_OUTPUT_PLUGIN_PREFIX)) {
|
|
606
|
-
return parseAst_js.error(parseAst_js.logAnonymousPluginCache());
|
|
607
|
-
}
|
|
608
|
-
return parseAst_js.error(parseAst_js.logDuplicatePluginName(pluginName));
|
|
609
|
-
}
|
|
610
|
-
function getCacheForUncacheablePlugin(pluginName) {
|
|
611
|
-
return {
|
|
612
|
-
delete() {
|
|
613
|
-
return uncacheablePluginError(pluginName);
|
|
614
|
-
},
|
|
615
|
-
get() {
|
|
616
|
-
return uncacheablePluginError(pluginName);
|
|
617
|
-
},
|
|
618
|
-
has() {
|
|
619
|
-
return uncacheablePluginError(pluginName);
|
|
620
|
-
},
|
|
621
|
-
set() {
|
|
622
|
-
return uncacheablePluginError(pluginName);
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
|
|
627
544
|
const doNothing = () => { };
|
|
628
545
|
|
|
629
546
|
async function asyncFlatten(array) {
|
|
@@ -780,6 +697,89 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
|
|
|
780
697
|
};
|
|
781
698
|
}
|
|
782
699
|
|
|
700
|
+
const ANONYMOUS_PLUGIN_PREFIX = 'at position ';
|
|
701
|
+
const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = 'at output position ';
|
|
702
|
+
|
|
703
|
+
function createPluginCache(cache) {
|
|
704
|
+
return {
|
|
705
|
+
delete(id) {
|
|
706
|
+
return delete cache[id];
|
|
707
|
+
},
|
|
708
|
+
get(id) {
|
|
709
|
+
const item = cache[id];
|
|
710
|
+
if (!item)
|
|
711
|
+
return;
|
|
712
|
+
item[0] = 0;
|
|
713
|
+
return item[1];
|
|
714
|
+
},
|
|
715
|
+
has(id) {
|
|
716
|
+
const item = cache[id];
|
|
717
|
+
if (!item)
|
|
718
|
+
return false;
|
|
719
|
+
item[0] = 0;
|
|
720
|
+
return true;
|
|
721
|
+
},
|
|
722
|
+
set(id, value) {
|
|
723
|
+
cache[id] = [0, value];
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
function getTrackedPluginCache(pluginCache, onUse) {
|
|
728
|
+
return {
|
|
729
|
+
delete(id) {
|
|
730
|
+
onUse();
|
|
731
|
+
return pluginCache.delete(id);
|
|
732
|
+
},
|
|
733
|
+
get(id) {
|
|
734
|
+
onUse();
|
|
735
|
+
return pluginCache.get(id);
|
|
736
|
+
},
|
|
737
|
+
has(id) {
|
|
738
|
+
onUse();
|
|
739
|
+
return pluginCache.has(id);
|
|
740
|
+
},
|
|
741
|
+
set(id, value) {
|
|
742
|
+
onUse();
|
|
743
|
+
return pluginCache.set(id, value);
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
const NO_CACHE = {
|
|
748
|
+
delete() {
|
|
749
|
+
return false;
|
|
750
|
+
},
|
|
751
|
+
get() {
|
|
752
|
+
return undefined;
|
|
753
|
+
},
|
|
754
|
+
has() {
|
|
755
|
+
return false;
|
|
756
|
+
},
|
|
757
|
+
set() { }
|
|
758
|
+
};
|
|
759
|
+
function uncacheablePluginError(pluginName) {
|
|
760
|
+
if (pluginName.startsWith(ANONYMOUS_PLUGIN_PREFIX) ||
|
|
761
|
+
pluginName.startsWith(ANONYMOUS_OUTPUT_PLUGIN_PREFIX)) {
|
|
762
|
+
return parseAst_js.error(parseAst_js.logAnonymousPluginCache());
|
|
763
|
+
}
|
|
764
|
+
return parseAst_js.error(parseAst_js.logDuplicatePluginName(pluginName));
|
|
765
|
+
}
|
|
766
|
+
function getCacheForUncacheablePlugin(pluginName) {
|
|
767
|
+
return {
|
|
768
|
+
delete() {
|
|
769
|
+
return uncacheablePluginError(pluginName);
|
|
770
|
+
},
|
|
771
|
+
get() {
|
|
772
|
+
return uncacheablePluginError(pluginName);
|
|
773
|
+
},
|
|
774
|
+
has() {
|
|
775
|
+
return uncacheablePluginError(pluginName);
|
|
776
|
+
},
|
|
777
|
+
set() {
|
|
778
|
+
return uncacheablePluginError(pluginName);
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
|
|
783
783
|
function getPluginContext(plugin, pluginCache, graph, options, fileEmitter, existingPluginNames) {
|
|
784
784
|
const { logLevel, onLog } = options;
|
|
785
785
|
let cacheable = true;
|
|
@@ -11959,7 +11959,7 @@ const getHelpersBlock = (additionalHelpers, accessedGlobals, indent, snippets, l
|
|
|
11959
11959
|
};
|
|
11960
11960
|
const HELPER_GENERATORS = {
|
|
11961
11961
|
[DOCUMENT_CURRENT_SCRIPT](_t, { _, n }) {
|
|
11962
|
-
return `var${
|
|
11962
|
+
return `var ${DOCUMENT_CURRENT_SCRIPT}${_}=${_}typeof document${_}!==${_}'undefined'${_}?${_}document.currentScript${_}:${_}null;${n}`;
|
|
11963
11963
|
},
|
|
11964
11964
|
[INTEROP_DEFAULT_COMPAT_VARIABLE](_t, snippets, liveBindings) {
|
|
11965
11965
|
const { _, getDirectReturnFunction, n } = snippets;
|
|
@@ -15355,21 +15355,17 @@ class Module {
|
|
|
15355
15355
|
},
|
|
15356
15356
|
id,
|
|
15357
15357
|
get implicitlyLoadedAfterOneOf() {
|
|
15358
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
15359
15358
|
return Array.from(implicitlyLoadedAfter, getId).sort();
|
|
15360
15359
|
},
|
|
15361
15360
|
get implicitlyLoadedBefore() {
|
|
15362
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
15363
15361
|
return Array.from(implicitlyLoadedBefore, getId).sort();
|
|
15364
15362
|
},
|
|
15365
15363
|
get importedIdResolutions() {
|
|
15366
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
15367
15364
|
return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]).filter(Boolean);
|
|
15368
15365
|
},
|
|
15369
15366
|
get importedIds() {
|
|
15370
15367
|
// We cannot use this.dependencies because this is needed before
|
|
15371
15368
|
// dependencies are populated
|
|
15372
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
15373
15369
|
return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]?.id).filter(Boolean);
|
|
15374
15370
|
},
|
|
15375
15371
|
get importers() {
|
|
@@ -15836,7 +15832,6 @@ class Module {
|
|
|
15836
15832
|
attributes: this.info.attributes,
|
|
15837
15833
|
code: this.info.code,
|
|
15838
15834
|
customTransformCache: this.customTransformCache,
|
|
15839
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
15840
15835
|
dependencies: Array.from(this.dependencies, getId),
|
|
15841
15836
|
id: this.id,
|
|
15842
15837
|
meta: this.info.meta,
|
|
@@ -16203,7 +16198,6 @@ function setAlternativeExporterIfCyclic(variable, importer, reexporter) {
|
|
|
16203
16198
|
}
|
|
16204
16199
|
}
|
|
16205
16200
|
const copyNameToModulesMap = (searchedNamesAndModules) => searchedNamesAndModules &&
|
|
16206
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
16207
16201
|
new Map(Array.from(searchedNamesAndModules, ([name, modules]) => [name, new Set(modules)]));
|
|
16208
16202
|
|
|
16209
16203
|
function removeJsExtension(name) {
|
|
@@ -17519,7 +17513,6 @@ class Chunk {
|
|
|
17519
17513
|
}
|
|
17520
17514
|
}
|
|
17521
17515
|
for (const module of entryModules) {
|
|
17522
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
17523
17516
|
const requiredFacades = Array.from(new Set(module.chunkNames.filter(({ isUserDefined }) => isUserDefined).map(({ name }) => name)),
|
|
17524
17517
|
// mapping must run after Set 'name' dedupe
|
|
17525
17518
|
name => ({
|
|
@@ -17528,7 +17521,6 @@ class Chunk {
|
|
|
17528
17521
|
if (requiredFacades.length === 0 && module.isUserDefinedEntryPoint) {
|
|
17529
17522
|
requiredFacades.push({});
|
|
17530
17523
|
}
|
|
17531
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
17532
17524
|
requiredFacades.push(...Array.from(module.chunkFileNames, fileName => ({ fileName })));
|
|
17533
17525
|
if (requiredFacades.length === 0) {
|
|
17534
17526
|
requiredFacades.push({});
|
|
@@ -17653,10 +17645,8 @@ class Chunk {
|
|
|
17653
17645
|
...this.getPreRenderedChunkInfo(),
|
|
17654
17646
|
dynamicImports: this.getDynamicDependencies().map(resolveFileName),
|
|
17655
17647
|
fileName: this.getFileName(),
|
|
17656
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
17657
17648
|
implicitlyLoadedBefore: Array.from(this.implicitlyLoadedBefore, resolveFileName),
|
|
17658
17649
|
importedBindings: getImportedBindingsPerDependency(this.getRenderedDependencies(), resolveFileName),
|
|
17659
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
17660
17650
|
imports: Array.from(this.dependencies, resolveFileName),
|
|
17661
17651
|
modules: this.renderedModules,
|
|
17662
17652
|
referencedFiles: this.getReferencedFiles()
|
|
@@ -17701,9 +17691,7 @@ class Chunk {
|
|
|
17701
17691
|
hasDefaultExport = true;
|
|
17702
17692
|
}
|
|
17703
17693
|
if (format === 'es') {
|
|
17704
|
-
renderedDependency.reexports = reexports.filter(
|
|
17705
|
-
// eslint-disable-next-line unicorn/prefer-array-some
|
|
17706
|
-
({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
|
|
17694
|
+
renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
|
|
17707
17695
|
}
|
|
17708
17696
|
}
|
|
17709
17697
|
}
|
|
@@ -18055,9 +18043,16 @@ class Chunk {
|
|
|
18055
18043
|
? sanitizedId.slice(0, -extensionName.length)
|
|
18056
18044
|
: sanitizedId;
|
|
18057
18045
|
if (parseAst_js.isAbsolute(idWithoutExtension)) {
|
|
18058
|
-
|
|
18059
|
-
|
|
18060
|
-
|
|
18046
|
+
if (preserveModulesRoot && path$2.resolve(idWithoutExtension).startsWith(preserveModulesRoot)) {
|
|
18047
|
+
return idWithoutExtension.slice(preserveModulesRoot.length).replace(/^[/\\]/, '');
|
|
18048
|
+
}
|
|
18049
|
+
else {
|
|
18050
|
+
// handle edge case in Windows
|
|
18051
|
+
if (this.inputBase === '/' && !idWithoutExtension.startsWith('/')) {
|
|
18052
|
+
return parseAst_js.relative(this.inputBase, idWithoutExtension.replace(/^[a-zA-Z]:[/\\]/, '/'));
|
|
18053
|
+
}
|
|
18054
|
+
return parseAst_js.relative(this.inputBase, idWithoutExtension);
|
|
18055
|
+
}
|
|
18061
18056
|
}
|
|
18062
18057
|
else {
|
|
18063
18058
|
return (this.outputOptions.virtualDirname.replace(/\/$/, '') + '/' + path$2.basename(idWithoutExtension));
|
|
@@ -18197,7 +18192,6 @@ class Chunk {
|
|
|
18197
18192
|
const rendered = module.render(renderOptions);
|
|
18198
18193
|
if (!renderOptions.accessedDocumentCurrentScript &&
|
|
18199
18194
|
formatsMaybeAccessDocumentCurrentScript.includes(format)) {
|
|
18200
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
18201
18195
|
this.accessedGlobalsByScope.get(module.scope)?.delete(DOCUMENT_CURRENT_SCRIPT);
|
|
18202
18196
|
}
|
|
18203
18197
|
renderOptions.accessedDocumentCurrentScript = false;
|
|
@@ -18239,7 +18233,6 @@ class Chunk {
|
|
|
18239
18233
|
}
|
|
18240
18234
|
if (hoistedSource)
|
|
18241
18235
|
magicString.prepend(hoistedSource + n + n);
|
|
18242
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
18243
18236
|
if (this.needsExportsShim) {
|
|
18244
18237
|
magicString.prepend(`${n}${cnst} ${MISSING_EXPORT_SHIM_VARIABLE}${_}=${_}void 0;${n}${n}`);
|
|
18245
18238
|
}
|
|
@@ -19624,7 +19617,6 @@ class Bundle {
|
|
|
19624
19617
|
return manualChunkAliasByEntry;
|
|
19625
19618
|
}
|
|
19626
19619
|
assignManualChunks(getManualChunk) {
|
|
19627
|
-
// eslint-disable-next-line unicorn/prefer-module
|
|
19628
19620
|
const manualChunkAliasesWithEntry = [];
|
|
19629
19621
|
const manualChunksApi = {
|
|
19630
19622
|
getModuleIds: () => this.graph.modulesById.keys(),
|
|
@@ -19780,6 +19772,22 @@ function flru (max) {
|
|
|
19780
19772
|
};
|
|
19781
19773
|
}
|
|
19782
19774
|
|
|
19775
|
+
class GlobalScope extends Scope {
|
|
19776
|
+
constructor() {
|
|
19777
|
+
super();
|
|
19778
|
+
this.parent = null;
|
|
19779
|
+
this.variables.set('undefined', new UndefinedVariable());
|
|
19780
|
+
}
|
|
19781
|
+
findVariable(name) {
|
|
19782
|
+
let variable = this.variables.get(name);
|
|
19783
|
+
if (!variable) {
|
|
19784
|
+
variable = new GlobalVariable(name);
|
|
19785
|
+
this.variables.set(name, variable);
|
|
19786
|
+
}
|
|
19787
|
+
return variable;
|
|
19788
|
+
}
|
|
19789
|
+
}
|
|
19790
|
+
|
|
19783
19791
|
function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions, isEntry, attributes) {
|
|
19784
19792
|
let skipped = null;
|
|
19785
19793
|
let replaceContext = null;
|
|
@@ -20285,7 +20293,6 @@ class ModuleLoader {
|
|
|
20285
20293
|
});
|
|
20286
20294
|
}
|
|
20287
20295
|
getResolveStaticDependencyPromises(module) {
|
|
20288
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
20289
20296
|
return Array.from(module.sourcesWithAttributes, async ([source, attributes]) => [
|
|
20290
20297
|
source,
|
|
20291
20298
|
(module.resolvedIds[source] =
|
|
@@ -20424,22 +20431,6 @@ async function waitForDependencyResolution(loadPromise) {
|
|
|
20424
20431
|
return Promise.all([...resolveStaticDependencyPromises, ...resolveDynamicImportPromises]);
|
|
20425
20432
|
}
|
|
20426
20433
|
|
|
20427
|
-
class GlobalScope extends Scope {
|
|
20428
|
-
constructor() {
|
|
20429
|
-
super();
|
|
20430
|
-
this.parent = null;
|
|
20431
|
-
this.variables.set('undefined', new UndefinedVariable());
|
|
20432
|
-
}
|
|
20433
|
-
findVariable(name) {
|
|
20434
|
-
let variable = this.variables.get(name);
|
|
20435
|
-
if (!variable) {
|
|
20436
|
-
variable = new GlobalVariable(name);
|
|
20437
|
-
this.variables.set(name, variable);
|
|
20438
|
-
}
|
|
20439
|
-
return variable;
|
|
20440
|
-
}
|
|
20441
|
-
}
|
|
20442
|
-
|
|
20443
20434
|
class Queue {
|
|
20444
20435
|
constructor(maxParallel) {
|
|
20445
20436
|
this.maxParallel = maxParallel;
|
|
@@ -21017,7 +21008,6 @@ const getAddon = (config, name) => {
|
|
|
21017
21008
|
}
|
|
21018
21009
|
return () => configAddon || '';
|
|
21019
21010
|
};
|
|
21020
|
-
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
21021
21011
|
const getDir = (config, file) => {
|
|
21022
21012
|
const { dir } = config;
|
|
21023
21013
|
if (typeof dir === 'string' && typeof file === 'string') {
|
|
@@ -21087,9 +21077,7 @@ const getInterop = (config) => {
|
|
|
21087
21077
|
};
|
|
21088
21078
|
const validateInterop = (interop) => {
|
|
21089
21079
|
if (!ALLOWED_INTEROP_TYPES.has(interop)) {
|
|
21090
|
-
return parseAst_js.error(parseAst_js.logInvalidOption('output.interop', parseAst_js.URL_OUTPUT_INTEROP,
|
|
21091
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
21092
|
-
`use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
|
|
21080
|
+
return parseAst_js.error(parseAst_js.logInvalidOption('output.interop', parseAst_js.URL_OUTPUT_INTEROP, `use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
|
|
21093
21081
|
}
|
|
21094
21082
|
return interop;
|
|
21095
21083
|
};
|
package/dist/shared/watch-cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
13
13
|
|
|
14
|
+
const index = require('./index.js');
|
|
14
15
|
const promises = require('node:fs/promises');
|
|
15
16
|
const process$2 = require('node:process');
|
|
16
|
-
const index = require('./index.js');
|
|
17
17
|
const cli = require('../bin/rollup');
|
|
18
18
|
const rollup = require('./rollup.js');
|
|
19
19
|
const parseAst_js = require('./parseAst.js');
|
|
@@ -539,16 +539,17 @@ async function watch(command) {
|
|
|
539
539
|
}
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
|
|
542
|
+
function close(code) {
|
|
543
543
|
process$2.removeListener('uncaughtException', closeWithError);
|
|
544
544
|
// removing a non-existent listener is a no-op
|
|
545
545
|
process$2.stdin.removeListener('end', close);
|
|
546
|
-
if (watcher)
|
|
547
|
-
await watcher.close();
|
|
548
546
|
if (configWatcher)
|
|
549
547
|
configWatcher.close();
|
|
550
|
-
|
|
551
|
-
process$2.exit(code);
|
|
548
|
+
Promise.resolve(watcher?.close()).finally(() => {
|
|
549
|
+
process$2.exit(typeof code === 'number' ? code : 0);
|
|
550
|
+
});
|
|
551
|
+
// Tell signal-exit that we are handling this gracefully
|
|
552
|
+
return true;
|
|
552
553
|
}
|
|
553
554
|
// return a promise that never resolves to keep the process running
|
|
554
555
|
return new Promise(() => { });
|
package/dist/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.21.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.21.1
|
|
4
|
+
Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
13
13
|
|
|
14
|
+
const rollup = require('./rollup.js');
|
|
14
15
|
const path = require('node:path');
|
|
15
16
|
const process = require('node:process');
|
|
16
|
-
const rollup = require('./rollup.js');
|
|
17
|
-
const node_os = require('node:os');
|
|
18
17
|
const index = require('./index.js');
|
|
18
|
+
const node_os = require('node:os');
|
|
19
19
|
require('./parseAst.js');
|
|
20
20
|
require('../native.js');
|
|
21
21
|
require('tty');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.21.
|
|
3
|
+
"version": "4.21.1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -107,22 +107,22 @@
|
|
|
107
107
|
"homepage": "https://rollupjs.org/",
|
|
108
108
|
"optionalDependencies": {
|
|
109
109
|
"fsevents": "~2.3.2",
|
|
110
|
-
"@rollup/rollup-darwin-arm64": "4.21.
|
|
111
|
-
"@rollup/rollup-android-arm64": "4.21.
|
|
112
|
-
"@rollup/rollup-win32-arm64-msvc": "4.21.
|
|
113
|
-
"@rollup/rollup-linux-arm64-gnu": "4.21.
|
|
114
|
-
"@rollup/rollup-linux-arm64-musl": "4.21.
|
|
115
|
-
"@rollup/rollup-android-arm-eabi": "4.21.
|
|
116
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.21.
|
|
117
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.21.
|
|
118
|
-
"@rollup/rollup-win32-ia32-msvc": "4.21.
|
|
119
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.21.
|
|
120
|
-
"@rollup/rollup-linux-powerpc64le-gnu": "4.21.
|
|
121
|
-
"@rollup/rollup-linux-s390x-gnu": "4.21.
|
|
122
|
-
"@rollup/rollup-darwin-x64": "4.21.
|
|
123
|
-
"@rollup/rollup-win32-x64-msvc": "4.21.
|
|
124
|
-
"@rollup/rollup-linux-x64-gnu": "4.21.
|
|
125
|
-
"@rollup/rollup-linux-x64-musl": "4.21.
|
|
110
|
+
"@rollup/rollup-darwin-arm64": "4.21.1",
|
|
111
|
+
"@rollup/rollup-android-arm64": "4.21.1",
|
|
112
|
+
"@rollup/rollup-win32-arm64-msvc": "4.21.1",
|
|
113
|
+
"@rollup/rollup-linux-arm64-gnu": "4.21.1",
|
|
114
|
+
"@rollup/rollup-linux-arm64-musl": "4.21.1",
|
|
115
|
+
"@rollup/rollup-android-arm-eabi": "4.21.1",
|
|
116
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.21.1",
|
|
117
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.21.1",
|
|
118
|
+
"@rollup/rollup-win32-ia32-msvc": "4.21.1",
|
|
119
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.21.1",
|
|
120
|
+
"@rollup/rollup-linux-powerpc64le-gnu": "4.21.1",
|
|
121
|
+
"@rollup/rollup-linux-s390x-gnu": "4.21.1",
|
|
122
|
+
"@rollup/rollup-darwin-x64": "4.21.1",
|
|
123
|
+
"@rollup/rollup-win32-x64-msvc": "4.21.1",
|
|
124
|
+
"@rollup/rollup-linux-x64-gnu": "4.21.1",
|
|
125
|
+
"@rollup/rollup-linux-x64-musl": "4.21.1"
|
|
126
126
|
},
|
|
127
127
|
"dependencies": {
|
|
128
128
|
"@types/estree": "1.0.5"
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
"@codemirror/search": "^6.5.6",
|
|
139
139
|
"@codemirror/state": "^6.4.1",
|
|
140
140
|
"@codemirror/view": "^6.32.0",
|
|
141
|
+
"@eslint/js": "^9.9.0",
|
|
141
142
|
"@jridgewell/sourcemap-codec": "^1.5.0",
|
|
142
143
|
"@mermaid-js/mermaid-cli": "^10.9.1",
|
|
143
144
|
"@napi-rs/cli": "^2.18.4",
|
|
@@ -150,17 +151,13 @@
|
|
|
150
151
|
"@rollup/plugin-terser": "^0.4.4",
|
|
151
152
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
152
153
|
"@rollup/pluginutils": "^5.1.0",
|
|
153
|
-
"@shikijs/vitepress-twoslash": "^1.
|
|
154
|
-
"@types/eslint": "^
|
|
154
|
+
"@shikijs/vitepress-twoslash": "^1.14.1",
|
|
155
|
+
"@types/eslint": "^9.6.0",
|
|
155
156
|
"@types/inquirer": "^9.0.7",
|
|
156
157
|
"@types/mocha": "^10.0.7",
|
|
157
158
|
"@types/node": "~18.18.14",
|
|
158
159
|
"@types/semver": "^7.5.8",
|
|
159
160
|
"@types/yargs-parser": "^21.0.3",
|
|
160
|
-
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
161
|
-
"@typescript-eslint/parser": "^8.1.0",
|
|
162
|
-
"@vue/eslint-config-prettier": "^9.0.0",
|
|
163
|
-
"@vue/eslint-config-typescript": "^13.0.0",
|
|
164
161
|
"acorn": "^8.12.1",
|
|
165
162
|
"acorn-import-assertions": "^1.9.0",
|
|
166
163
|
"buble": "^0.20.0",
|
|
@@ -173,9 +170,8 @@
|
|
|
173
170
|
"date-time": "^4.0.0",
|
|
174
171
|
"es5-shim": "^4.6.7",
|
|
175
172
|
"es6-shim": "^0.35.8",
|
|
176
|
-
"eslint": "^
|
|
173
|
+
"eslint": "^9.9.0",
|
|
177
174
|
"eslint-config-prettier": "^9.1.0",
|
|
178
|
-
"eslint-plugin-import": "^2.29.1",
|
|
179
175
|
"eslint-plugin-prettier": "^5.2.1",
|
|
180
176
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
181
177
|
"eslint-plugin-vue": "^9.27.0",
|
|
@@ -183,22 +179,24 @@
|
|
|
183
179
|
"flru": "^1.0.2",
|
|
184
180
|
"fs-extra": "^11.2.0",
|
|
185
181
|
"github-api": "^3.4.0",
|
|
182
|
+
"globals": "^15.9.0",
|
|
186
183
|
"husky": "^9.1.4",
|
|
187
184
|
"inquirer": "^10.1.8",
|
|
188
185
|
"is-reference": "^3.0.2",
|
|
189
|
-
"lint-staged": "^15.2.
|
|
186
|
+
"lint-staged": "^15.2.9",
|
|
190
187
|
"locate-character": "^3.0.0",
|
|
191
188
|
"magic-string": "^0.30.11",
|
|
192
189
|
"mocha": "^10.7.3",
|
|
193
190
|
"nodemon": "^3.1.4",
|
|
194
191
|
"npm-audit-resolver": "^3.0.0-RC.0",
|
|
195
192
|
"nyc": "^17.0.0",
|
|
196
|
-
"pinia": "^2.2.
|
|
193
|
+
"pinia": "^2.2.2",
|
|
197
194
|
"prettier": "^3.3.3",
|
|
195
|
+
"prettier-plugin-organize-imports": "^4.0.0",
|
|
198
196
|
"pretty-bytes": "^6.1.1",
|
|
199
197
|
"pretty-ms": "^9.1.0",
|
|
200
198
|
"requirejs": "^2.3.7",
|
|
201
|
-
"rollup": "^4.
|
|
199
|
+
"rollup": "^4.21.0",
|
|
202
200
|
"rollup-plugin-license": "^3.5.2",
|
|
203
201
|
"rollup-plugin-string": "^3.0.0",
|
|
204
202
|
"semver": "^7.6.3",
|
|
@@ -207,17 +205,18 @@
|
|
|
207
205
|
"source-map": "^0.7.4",
|
|
208
206
|
"source-map-support": "^0.5.21",
|
|
209
207
|
"systemjs": "^6.15.1",
|
|
210
|
-
"terser": "^5.31.
|
|
208
|
+
"terser": "^5.31.6",
|
|
211
209
|
"tslib": "^2.6.3",
|
|
212
210
|
"typescript": "^5.5.4",
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
211
|
+
"typescript-eslint": "^8.2.0",
|
|
212
|
+
"vite": "^5.4.1",
|
|
213
|
+
"vitepress": "^1.3.3",
|
|
214
|
+
"vue": "^3.4.38",
|
|
216
215
|
"wasm-pack": "^0.13.0",
|
|
217
216
|
"yargs-parser": "^21.1.1"
|
|
218
217
|
},
|
|
219
218
|
"overrides": {
|
|
220
|
-
"axios": "^1.7.
|
|
219
|
+
"axios": "^1.7.4",
|
|
221
220
|
"semver": "^7.6.3",
|
|
222
221
|
"ws": "^8.18.0"
|
|
223
222
|
},
|