rollup 4.53.3 → 4.53.5
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 +2 -2
- 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 +85 -42
- package/dist/es/shared/parseAst.js +2 -2
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- package/dist/rollup.d.ts +5 -3
- 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 +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +85 -42
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +39 -39
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.53.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.53.5
|
|
5
|
+
Tue, 16 Dec 2025 06:14:08 GMT - commit 31bb66ee9eea35e5ae348e4074bbad55d390112b
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
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.53.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.53.5
|
|
4
|
+
Tue, 16 Dec 2025 06:14:08 GMT - commit 31bb66ee9eea35e5ae348e4074bbad55d390112b
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ function _mergeNamespaces(n, m) {
|
|
|
27
27
|
return Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' });
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var version = "4.53.
|
|
30
|
+
var version = "4.53.5";
|
|
31
31
|
|
|
32
32
|
// src/vlq.ts
|
|
33
33
|
var comma = ",".charCodeAt(0);
|
|
@@ -2002,6 +2002,10 @@ const UnknownKey = Symbol('Unknown Key');
|
|
|
2002
2002
|
const UnknownNonAccessorKey = Symbol('Unknown Non-Accessor Key');
|
|
2003
2003
|
const UnknownInteger = Symbol('Unknown Integer');
|
|
2004
2004
|
const SymbolToStringTag = Symbol('Symbol.toStringTag');
|
|
2005
|
+
const SymbolDispose = Symbol('Symbol.asyncDispose');
|
|
2006
|
+
const SymbolAsyncDispose = Symbol('Symbol.dispose');
|
|
2007
|
+
const WELL_KNOWN_SYMBOLS_LIST = [SymbolToStringTag, SymbolDispose, SymbolAsyncDispose];
|
|
2008
|
+
const WELL_KNOWN_SYMBOLS = new Set(WELL_KNOWN_SYMBOLS_LIST);
|
|
2005
2009
|
const EMPTY_PATH = [];
|
|
2006
2010
|
const UNKNOWN_PATH = [UnknownKey];
|
|
2007
2011
|
// For deoptimizations, this means we are modifying an unknown property but did
|
|
@@ -4270,6 +4274,27 @@ const knownGlobals = {
|
|
|
4270
4274
|
for: PF,
|
|
4271
4275
|
keyFor: PF,
|
|
4272
4276
|
prototype: O,
|
|
4277
|
+
asyncDispose: {
|
|
4278
|
+
__proto__: null,
|
|
4279
|
+
[ValueProperties]: {
|
|
4280
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
4281
|
+
getLiteralValue() {
|
|
4282
|
+
return SymbolAsyncDispose;
|
|
4283
|
+
},
|
|
4284
|
+
// This might not be needed, but then we need to check a few more cases
|
|
4285
|
+
hasEffectsWhenCalled: returnTrue
|
|
4286
|
+
}
|
|
4287
|
+
},
|
|
4288
|
+
dispose: {
|
|
4289
|
+
__proto__: null,
|
|
4290
|
+
[ValueProperties]: {
|
|
4291
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
4292
|
+
getLiteralValue() {
|
|
4293
|
+
return SymbolDispose;
|
|
4294
|
+
},
|
|
4295
|
+
hasEffectsWhenCalled: returnTrue
|
|
4296
|
+
}
|
|
4297
|
+
},
|
|
4273
4298
|
toStringTag: {
|
|
4274
4299
|
__proto__: null,
|
|
4275
4300
|
[ValueProperties]: {
|
|
@@ -6490,7 +6515,7 @@ class ExpressionStatement extends NodeBase {
|
|
|
6490
6515
|
render(code, options) {
|
|
6491
6516
|
super.render(code, options);
|
|
6492
6517
|
if (code.original[this.end - 1] !== ';') {
|
|
6493
|
-
code.
|
|
6518
|
+
code.appendRight(this.end, ';');
|
|
6494
6519
|
}
|
|
6495
6520
|
}
|
|
6496
6521
|
shouldBeIncluded(context) {
|
|
@@ -7670,11 +7695,11 @@ class MemberExpression extends NodeBase {
|
|
|
7670
7695
|
this.dynamicPropertyKey = this.propertyKey;
|
|
7671
7696
|
const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
|
|
7672
7697
|
return (this.dynamicPropertyKey =
|
|
7673
|
-
value ===
|
|
7674
|
-
? value
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7698
|
+
typeof value === 'symbol'
|
|
7699
|
+
? WELL_KNOWN_SYMBOLS.has(value)
|
|
7700
|
+
? value
|
|
7701
|
+
: UnknownKey
|
|
7702
|
+
: String(value));
|
|
7678
7703
|
}
|
|
7679
7704
|
return this.dynamicPropertyKey;
|
|
7680
7705
|
}
|
|
@@ -13052,8 +13077,9 @@ function isReassignedExportsMember(variable, exportNamesByVariable) {
|
|
|
13052
13077
|
}
|
|
13053
13078
|
|
|
13054
13079
|
class VariableDeclarator extends NodeBase {
|
|
13055
|
-
declareDeclarator(kind
|
|
13056
|
-
this.isUsingDeclaration =
|
|
13080
|
+
declareDeclarator(kind) {
|
|
13081
|
+
this.isUsingDeclaration = kind === 'using';
|
|
13082
|
+
this.isAsyncUsingDeclaration = kind === 'await using';
|
|
13057
13083
|
this.id.declare(kind, EMPTY_PATH, this.init || UNDEFINED_EXPRESSION);
|
|
13058
13084
|
}
|
|
13059
13085
|
deoptimizePath(path) {
|
|
@@ -13064,6 +13090,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
13064
13090
|
this.id.markDeclarationReached();
|
|
13065
13091
|
return (initEffect ||
|
|
13066
13092
|
this.isUsingDeclaration ||
|
|
13093
|
+
this.isAsyncUsingDeclaration ||
|
|
13067
13094
|
this.id.hasEffects(context) ||
|
|
13068
13095
|
(this.scope.context.options.treeshake
|
|
13069
13096
|
.propertyReadSideEffects &&
|
|
@@ -13072,7 +13099,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
13072
13099
|
include(context, includeChildrenRecursively) {
|
|
13073
13100
|
const { id, init } = this;
|
|
13074
13101
|
if (!this.included)
|
|
13075
|
-
this.includeNode();
|
|
13102
|
+
this.includeNode(context);
|
|
13076
13103
|
init?.include(context, includeChildrenRecursively);
|
|
13077
13104
|
id.markDeclarationReached();
|
|
13078
13105
|
if (includeChildrenRecursively) {
|
|
@@ -13088,7 +13115,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
13088
13115
|
render(code, options) {
|
|
13089
13116
|
const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
|
|
13090
13117
|
const { end, id, init, start } = this;
|
|
13091
|
-
const renderId = id.included || this.isUsingDeclaration;
|
|
13118
|
+
const renderId = id.included || this.isUsingDeclaration || this.isAsyncUsingDeclaration;
|
|
13092
13119
|
if (renderId) {
|
|
13093
13120
|
id.render(code, options);
|
|
13094
13121
|
}
|
|
@@ -13110,20 +13137,30 @@ class VariableDeclarator extends NodeBase {
|
|
|
13110
13137
|
code.appendLeft(end, `${_}=${_}void 0`);
|
|
13111
13138
|
}
|
|
13112
13139
|
}
|
|
13113
|
-
includeNode() {
|
|
13140
|
+
includeNode(context) {
|
|
13114
13141
|
this.included = true;
|
|
13115
13142
|
const { id, init } = this;
|
|
13116
|
-
if (init
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13143
|
+
if (init) {
|
|
13144
|
+
if (this.isUsingDeclaration) {
|
|
13145
|
+
init.includePath(SYMBOL_DISPOSE_PATH, context);
|
|
13146
|
+
}
|
|
13147
|
+
else if (this.isAsyncUsingDeclaration) {
|
|
13148
|
+
init.includePath(SYMBOL_ASYNC_DISPOSE_PATH, context);
|
|
13149
|
+
}
|
|
13150
|
+
if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
|
|
13151
|
+
const { name, variable } = id;
|
|
13152
|
+
for (const accessedVariable of init.scope.accessedOutsideVariables.values()) {
|
|
13153
|
+
if (accessedVariable !== variable) {
|
|
13154
|
+
accessedVariable.forbidName(name);
|
|
13155
|
+
}
|
|
13121
13156
|
}
|
|
13122
13157
|
}
|
|
13123
13158
|
}
|
|
13124
13159
|
}
|
|
13125
13160
|
}
|
|
13126
13161
|
VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
13162
|
+
const SYMBOL_DISPOSE_PATH = [SymbolDispose];
|
|
13163
|
+
const SYMBOL_ASYNC_DISPOSE_PATH = [SymbolAsyncDispose];
|
|
13127
13164
|
|
|
13128
13165
|
function getChunkInfoWithPath(chunk) {
|
|
13129
13166
|
return { fileName: chunk.getFileName(), ...chunk.getPreRenderedChunkInfo() };
|
|
@@ -15361,23 +15398,6 @@ class UpdateExpression extends NodeBase {
|
|
|
15361
15398
|
}
|
|
15362
15399
|
UpdateExpression.prototype.includeNode = onlyIncludeSelf;
|
|
15363
15400
|
|
|
15364
|
-
function areAllDeclarationsIncludedAndNotExported(declarations, exportNamesByVariable) {
|
|
15365
|
-
for (const declarator of declarations) {
|
|
15366
|
-
if (!declarator.id.included)
|
|
15367
|
-
return false;
|
|
15368
|
-
if (declarator.id.type === Identifier$1) {
|
|
15369
|
-
if (exportNamesByVariable.has(declarator.id.variable))
|
|
15370
|
-
return false;
|
|
15371
|
-
}
|
|
15372
|
-
else {
|
|
15373
|
-
const exportedVariables = [];
|
|
15374
|
-
declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
|
|
15375
|
-
if (exportedVariables.length > 0)
|
|
15376
|
-
return false;
|
|
15377
|
-
}
|
|
15378
|
-
}
|
|
15379
|
-
return true;
|
|
15380
|
-
}
|
|
15381
15401
|
class VariableDeclaration extends NodeBase {
|
|
15382
15402
|
deoptimizePath() {
|
|
15383
15403
|
for (const declarator of this.declarations) {
|
|
@@ -15407,17 +15427,15 @@ class VariableDeclaration extends NodeBase {
|
|
|
15407
15427
|
}
|
|
15408
15428
|
initialise() {
|
|
15409
15429
|
super.initialise();
|
|
15410
|
-
this.isUsingDeclaration = this.kind === 'await using' || this.kind === 'using';
|
|
15411
15430
|
for (const declarator of this.declarations) {
|
|
15412
|
-
declarator.declareDeclarator(this.kind
|
|
15431
|
+
declarator.declareDeclarator(this.kind);
|
|
15413
15432
|
}
|
|
15414
15433
|
}
|
|
15415
15434
|
removeAnnotations(code) {
|
|
15416
15435
|
this.declarations[0].removeAnnotations(code);
|
|
15417
15436
|
}
|
|
15418
15437
|
render(code, options, nodeRenderOptions = BLANK) {
|
|
15419
|
-
if (this.
|
|
15420
|
-
areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
|
|
15438
|
+
if (this.areAllDeclarationsIncludedAndNotExported(options.exportNamesByVariable)) {
|
|
15421
15439
|
for (const declarator of this.declarations) {
|
|
15422
15440
|
declarator.render(code, options);
|
|
15423
15441
|
}
|
|
@@ -15517,6 +15535,26 @@ class VariableDeclaration extends NodeBase {
|
|
|
15517
15535
|
}
|
|
15518
15536
|
this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, aggregatedSystemExports, options);
|
|
15519
15537
|
}
|
|
15538
|
+
areAllDeclarationsIncludedAndNotExported(exportNamesByVariable) {
|
|
15539
|
+
if (this.kind === 'await using' || this.kind === 'using') {
|
|
15540
|
+
return true;
|
|
15541
|
+
}
|
|
15542
|
+
for (const declarator of this.declarations) {
|
|
15543
|
+
if (!declarator.id.included)
|
|
15544
|
+
return false;
|
|
15545
|
+
if (declarator.id.type === Identifier$1) {
|
|
15546
|
+
if (exportNamesByVariable.has(declarator.id.variable))
|
|
15547
|
+
return false;
|
|
15548
|
+
}
|
|
15549
|
+
else {
|
|
15550
|
+
const exportedVariables = [];
|
|
15551
|
+
declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
|
|
15552
|
+
if (exportedVariables.length > 0)
|
|
15553
|
+
return false;
|
|
15554
|
+
}
|
|
15555
|
+
}
|
|
15556
|
+
return true;
|
|
15557
|
+
}
|
|
15520
15558
|
}
|
|
15521
15559
|
function gatherSystemExportsAndGetSingleExport(separatedNodes, options, aggregatedSystemExports) {
|
|
15522
15560
|
let singleSystemExport = null;
|
|
@@ -20262,11 +20300,16 @@ function collapseSourcemaps(file, map, modules, bundleSourcemapChain, excludeCon
|
|
|
20262
20300
|
sources = sources.map((source) => relative(directory, source));
|
|
20263
20301
|
file = basename(file);
|
|
20264
20302
|
}
|
|
20265
|
-
sourcesContent = (excludeContent ? null : sourcesContent);
|
|
20266
20303
|
for (const module of modules) {
|
|
20267
20304
|
resetSourcemapCache(module.originalSourcemap, module.sourcemapChain);
|
|
20268
20305
|
}
|
|
20269
|
-
return new SourceMap({
|
|
20306
|
+
return new SourceMap({
|
|
20307
|
+
file,
|
|
20308
|
+
mappings,
|
|
20309
|
+
names,
|
|
20310
|
+
sources,
|
|
20311
|
+
sourcesContent: excludeContent ? undefined : sourcesContent
|
|
20312
|
+
});
|
|
20270
20313
|
}
|
|
20271
20314
|
function collapseSourcemap(id, originalCode, originalSourcemap, sourcemapChain, log) {
|
|
20272
20315
|
if (sourcemapChain.length === 0) {
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/parseAst.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -562,7 +562,8 @@ export type PluginHooks = {
|
|
|
562
562
|
};
|
|
563
563
|
|
|
564
564
|
export interface OutputPlugin
|
|
565
|
-
extends
|
|
565
|
+
extends
|
|
566
|
+
Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>,
|
|
566
567
|
Partial<Record<AddonHooks, ObjectHook<AddonHook>>> {
|
|
567
568
|
cacheKey?: string | undefined;
|
|
568
569
|
name: string;
|
|
@@ -618,8 +619,9 @@ export interface NormalizedTreeshakingOptions {
|
|
|
618
619
|
unknownGlobalSideEffects: boolean;
|
|
619
620
|
}
|
|
620
621
|
|
|
621
|
-
export interface TreeshakingOptions
|
|
622
|
-
|
|
622
|
+
export interface TreeshakingOptions extends Partial<
|
|
623
|
+
Omit<NormalizedTreeshakingOptions, 'moduleSideEffects'>
|
|
624
|
+
> {
|
|
623
625
|
moduleSideEffects?: ModuleSideEffectsOption | undefined;
|
|
624
626
|
preset?: TreeshakingPreset | undefined;
|
|
625
627
|
}
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.53.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.53.5
|
|
4
|
+
Tue, 16 Dec 2025 06:14:08 GMT - commit 31bb66ee9eea35e5ae348e4074bbad55d390112b
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -42,7 +42,7 @@ function _mergeNamespaces(n, m) {
|
|
|
42
42
|
|
|
43
43
|
const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises);
|
|
44
44
|
|
|
45
|
-
var version = "4.53.
|
|
45
|
+
var version = "4.53.5";
|
|
46
46
|
|
|
47
47
|
function ensureArray$1(items) {
|
|
48
48
|
if (Array.isArray(items)) {
|
|
@@ -5793,6 +5793,10 @@ const UnknownKey = Symbol('Unknown Key');
|
|
|
5793
5793
|
const UnknownNonAccessorKey = Symbol('Unknown Non-Accessor Key');
|
|
5794
5794
|
const UnknownInteger = Symbol('Unknown Integer');
|
|
5795
5795
|
const SymbolToStringTag = Symbol('Symbol.toStringTag');
|
|
5796
|
+
const SymbolDispose = Symbol('Symbol.asyncDispose');
|
|
5797
|
+
const SymbolAsyncDispose = Symbol('Symbol.dispose');
|
|
5798
|
+
const WELL_KNOWN_SYMBOLS_LIST = [SymbolToStringTag, SymbolDispose, SymbolAsyncDispose];
|
|
5799
|
+
const WELL_KNOWN_SYMBOLS = new Set(WELL_KNOWN_SYMBOLS_LIST);
|
|
5796
5800
|
const EMPTY_PATH = [];
|
|
5797
5801
|
const UNKNOWN_PATH = [UnknownKey];
|
|
5798
5802
|
// For deoptimizations, this means we are modifying an unknown property but did
|
|
@@ -8059,6 +8063,27 @@ const knownGlobals = {
|
|
|
8059
8063
|
for: PF,
|
|
8060
8064
|
keyFor: PF,
|
|
8061
8065
|
prototype: O,
|
|
8066
|
+
asyncDispose: {
|
|
8067
|
+
__proto__: null,
|
|
8068
|
+
[ValueProperties]: {
|
|
8069
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
8070
|
+
getLiteralValue() {
|
|
8071
|
+
return SymbolAsyncDispose;
|
|
8072
|
+
},
|
|
8073
|
+
// This might not be needed, but then we need to check a few more cases
|
|
8074
|
+
hasEffectsWhenCalled: returnTrue
|
|
8075
|
+
}
|
|
8076
|
+
},
|
|
8077
|
+
dispose: {
|
|
8078
|
+
__proto__: null,
|
|
8079
|
+
[ValueProperties]: {
|
|
8080
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
8081
|
+
getLiteralValue() {
|
|
8082
|
+
return SymbolDispose;
|
|
8083
|
+
},
|
|
8084
|
+
hasEffectsWhenCalled: returnTrue
|
|
8085
|
+
}
|
|
8086
|
+
},
|
|
8062
8087
|
toStringTag: {
|
|
8063
8088
|
__proto__: null,
|
|
8064
8089
|
[ValueProperties]: {
|
|
@@ -10267,7 +10292,7 @@ class ExpressionStatement extends NodeBase {
|
|
|
10267
10292
|
render(code, options) {
|
|
10268
10293
|
super.render(code, options);
|
|
10269
10294
|
if (code.original[this.end - 1] !== ';') {
|
|
10270
|
-
code.
|
|
10295
|
+
code.appendRight(this.end, ';');
|
|
10271
10296
|
}
|
|
10272
10297
|
}
|
|
10273
10298
|
shouldBeIncluded(context) {
|
|
@@ -11447,11 +11472,11 @@ class MemberExpression extends NodeBase {
|
|
|
11447
11472
|
this.dynamicPropertyKey = this.propertyKey;
|
|
11448
11473
|
const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
|
|
11449
11474
|
return (this.dynamicPropertyKey =
|
|
11450
|
-
value ===
|
|
11451
|
-
? value
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11475
|
+
typeof value === 'symbol'
|
|
11476
|
+
? WELL_KNOWN_SYMBOLS.has(value)
|
|
11477
|
+
? value
|
|
11478
|
+
: UnknownKey
|
|
11479
|
+
: String(value));
|
|
11455
11480
|
}
|
|
11456
11481
|
return this.dynamicPropertyKey;
|
|
11457
11482
|
}
|
|
@@ -14662,8 +14687,9 @@ function isReassignedExportsMember(variable, exportNamesByVariable) {
|
|
|
14662
14687
|
}
|
|
14663
14688
|
|
|
14664
14689
|
class VariableDeclarator extends NodeBase {
|
|
14665
|
-
declareDeclarator(kind
|
|
14666
|
-
this.isUsingDeclaration =
|
|
14690
|
+
declareDeclarator(kind) {
|
|
14691
|
+
this.isUsingDeclaration = kind === 'using';
|
|
14692
|
+
this.isAsyncUsingDeclaration = kind === 'await using';
|
|
14667
14693
|
this.id.declare(kind, EMPTY_PATH, this.init || UNDEFINED_EXPRESSION);
|
|
14668
14694
|
}
|
|
14669
14695
|
deoptimizePath(path) {
|
|
@@ -14674,6 +14700,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
14674
14700
|
this.id.markDeclarationReached();
|
|
14675
14701
|
return (initEffect ||
|
|
14676
14702
|
this.isUsingDeclaration ||
|
|
14703
|
+
this.isAsyncUsingDeclaration ||
|
|
14677
14704
|
this.id.hasEffects(context) ||
|
|
14678
14705
|
(this.scope.context.options.treeshake
|
|
14679
14706
|
.propertyReadSideEffects &&
|
|
@@ -14682,7 +14709,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
14682
14709
|
include(context, includeChildrenRecursively) {
|
|
14683
14710
|
const { id, init } = this;
|
|
14684
14711
|
if (!this.included)
|
|
14685
|
-
this.includeNode();
|
|
14712
|
+
this.includeNode(context);
|
|
14686
14713
|
init?.include(context, includeChildrenRecursively);
|
|
14687
14714
|
id.markDeclarationReached();
|
|
14688
14715
|
if (includeChildrenRecursively) {
|
|
@@ -14698,7 +14725,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
14698
14725
|
render(code, options) {
|
|
14699
14726
|
const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
|
|
14700
14727
|
const { end, id, init, start } = this;
|
|
14701
|
-
const renderId = id.included || this.isUsingDeclaration;
|
|
14728
|
+
const renderId = id.included || this.isUsingDeclaration || this.isAsyncUsingDeclaration;
|
|
14702
14729
|
if (renderId) {
|
|
14703
14730
|
id.render(code, options);
|
|
14704
14731
|
}
|
|
@@ -14720,20 +14747,30 @@ class VariableDeclarator extends NodeBase {
|
|
|
14720
14747
|
code.appendLeft(end, `${_}=${_}void 0`);
|
|
14721
14748
|
}
|
|
14722
14749
|
}
|
|
14723
|
-
includeNode() {
|
|
14750
|
+
includeNode(context) {
|
|
14724
14751
|
this.included = true;
|
|
14725
14752
|
const { id, init } = this;
|
|
14726
|
-
if (init
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14753
|
+
if (init) {
|
|
14754
|
+
if (this.isUsingDeclaration) {
|
|
14755
|
+
init.includePath(SYMBOL_DISPOSE_PATH, context);
|
|
14756
|
+
}
|
|
14757
|
+
else if (this.isAsyncUsingDeclaration) {
|
|
14758
|
+
init.includePath(SYMBOL_ASYNC_DISPOSE_PATH, context);
|
|
14759
|
+
}
|
|
14760
|
+
if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
|
|
14761
|
+
const { name, variable } = id;
|
|
14762
|
+
for (const accessedVariable of init.scope.accessedOutsideVariables.values()) {
|
|
14763
|
+
if (accessedVariable !== variable) {
|
|
14764
|
+
accessedVariable.forbidName(name);
|
|
14765
|
+
}
|
|
14731
14766
|
}
|
|
14732
14767
|
}
|
|
14733
14768
|
}
|
|
14734
14769
|
}
|
|
14735
14770
|
}
|
|
14736
14771
|
VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
14772
|
+
const SYMBOL_DISPOSE_PATH = [SymbolDispose];
|
|
14773
|
+
const SYMBOL_ASYNC_DISPOSE_PATH = [SymbolAsyncDispose];
|
|
14737
14774
|
|
|
14738
14775
|
function getChunkInfoWithPath(chunk) {
|
|
14739
14776
|
return { fileName: chunk.getFileName(), ...chunk.getPreRenderedChunkInfo() };
|
|
@@ -16971,23 +17008,6 @@ class UpdateExpression extends NodeBase {
|
|
|
16971
17008
|
}
|
|
16972
17009
|
UpdateExpression.prototype.includeNode = onlyIncludeSelf;
|
|
16973
17010
|
|
|
16974
|
-
function areAllDeclarationsIncludedAndNotExported(declarations, exportNamesByVariable) {
|
|
16975
|
-
for (const declarator of declarations) {
|
|
16976
|
-
if (!declarator.id.included)
|
|
16977
|
-
return false;
|
|
16978
|
-
if (declarator.id.type === parseAst_js.Identifier) {
|
|
16979
|
-
if (exportNamesByVariable.has(declarator.id.variable))
|
|
16980
|
-
return false;
|
|
16981
|
-
}
|
|
16982
|
-
else {
|
|
16983
|
-
const exportedVariables = [];
|
|
16984
|
-
declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
|
|
16985
|
-
if (exportedVariables.length > 0)
|
|
16986
|
-
return false;
|
|
16987
|
-
}
|
|
16988
|
-
}
|
|
16989
|
-
return true;
|
|
16990
|
-
}
|
|
16991
17011
|
class VariableDeclaration extends NodeBase {
|
|
16992
17012
|
deoptimizePath() {
|
|
16993
17013
|
for (const declarator of this.declarations) {
|
|
@@ -17017,17 +17037,15 @@ class VariableDeclaration extends NodeBase {
|
|
|
17017
17037
|
}
|
|
17018
17038
|
initialise() {
|
|
17019
17039
|
super.initialise();
|
|
17020
|
-
this.isUsingDeclaration = this.kind === 'await using' || this.kind === 'using';
|
|
17021
17040
|
for (const declarator of this.declarations) {
|
|
17022
|
-
declarator.declareDeclarator(this.kind
|
|
17041
|
+
declarator.declareDeclarator(this.kind);
|
|
17023
17042
|
}
|
|
17024
17043
|
}
|
|
17025
17044
|
removeAnnotations(code) {
|
|
17026
17045
|
this.declarations[0].removeAnnotations(code);
|
|
17027
17046
|
}
|
|
17028
17047
|
render(code, options, nodeRenderOptions = parseAst_js.BLANK) {
|
|
17029
|
-
if (this.
|
|
17030
|
-
areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
|
|
17048
|
+
if (this.areAllDeclarationsIncludedAndNotExported(options.exportNamesByVariable)) {
|
|
17031
17049
|
for (const declarator of this.declarations) {
|
|
17032
17050
|
declarator.render(code, options);
|
|
17033
17051
|
}
|
|
@@ -17127,6 +17145,26 @@ class VariableDeclaration extends NodeBase {
|
|
|
17127
17145
|
}
|
|
17128
17146
|
this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, aggregatedSystemExports, options);
|
|
17129
17147
|
}
|
|
17148
|
+
areAllDeclarationsIncludedAndNotExported(exportNamesByVariable) {
|
|
17149
|
+
if (this.kind === 'await using' || this.kind === 'using') {
|
|
17150
|
+
return true;
|
|
17151
|
+
}
|
|
17152
|
+
for (const declarator of this.declarations) {
|
|
17153
|
+
if (!declarator.id.included)
|
|
17154
|
+
return false;
|
|
17155
|
+
if (declarator.id.type === parseAst_js.Identifier) {
|
|
17156
|
+
if (exportNamesByVariable.has(declarator.id.variable))
|
|
17157
|
+
return false;
|
|
17158
|
+
}
|
|
17159
|
+
else {
|
|
17160
|
+
const exportedVariables = [];
|
|
17161
|
+
declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
|
|
17162
|
+
if (exportedVariables.length > 0)
|
|
17163
|
+
return false;
|
|
17164
|
+
}
|
|
17165
|
+
}
|
|
17166
|
+
return true;
|
|
17167
|
+
}
|
|
17130
17168
|
}
|
|
17131
17169
|
function gatherSystemExportsAndGetSingleExport(separatedNodes, options, aggregatedSystemExports) {
|
|
17132
17170
|
let singleSystemExport = null;
|
|
@@ -21756,11 +21794,16 @@ function collapseSourcemaps(file, map, modules, bundleSourcemapChain, excludeCon
|
|
|
21756
21794
|
sources = sources.map((source) => path.relative(directory, source));
|
|
21757
21795
|
file = path.basename(file);
|
|
21758
21796
|
}
|
|
21759
|
-
sourcesContent = (excludeContent ? null : sourcesContent);
|
|
21760
21797
|
for (const module of modules) {
|
|
21761
21798
|
resetSourcemapCache(module.originalSourcemap, module.sourcemapChain);
|
|
21762
21799
|
}
|
|
21763
|
-
return new SourceMap({
|
|
21800
|
+
return new SourceMap({
|
|
21801
|
+
file,
|
|
21802
|
+
mappings,
|
|
21803
|
+
names,
|
|
21804
|
+
sources,
|
|
21805
|
+
sourcesContent: excludeContent ? undefined : sourcesContent
|
|
21806
|
+
});
|
|
21764
21807
|
}
|
|
21765
21808
|
function collapseSourcemap(id, originalCode, originalSourcemap, sourcemapChain, log) {
|
|
21766
21809
|
if (sourcemapChain.length === 0) {
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.53.
|
|
3
|
+
"version": "4.53.5",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -111,28 +111,28 @@
|
|
|
111
111
|
"homepage": "https://rollupjs.org/",
|
|
112
112
|
"optionalDependencies": {
|
|
113
113
|
"fsevents": "~2.3.2",
|
|
114
|
-
"@rollup/rollup-darwin-arm64": "4.53.
|
|
115
|
-
"@rollup/rollup-android-arm64": "4.53.
|
|
116
|
-
"@rollup/rollup-win32-arm64-msvc": "4.53.
|
|
117
|
-
"@rollup/rollup-freebsd-arm64": "4.53.
|
|
118
|
-
"@rollup/rollup-linux-arm64-gnu": "4.53.
|
|
119
|
-
"@rollup/rollup-linux-arm64-musl": "4.53.
|
|
120
|
-
"@rollup/rollup-android-arm-eabi": "4.53.
|
|
121
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.53.
|
|
122
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.53.
|
|
123
|
-
"@rollup/rollup-win32-ia32-msvc": "4.53.
|
|
124
|
-
"@rollup/rollup-linux-loong64-gnu": "4.53.
|
|
125
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.53.
|
|
126
|
-
"@rollup/rollup-linux-riscv64-musl": "4.53.
|
|
127
|
-
"@rollup/rollup-linux-ppc64-gnu": "4.53.
|
|
128
|
-
"@rollup/rollup-linux-s390x-gnu": "4.53.
|
|
129
|
-
"@rollup/rollup-darwin-x64": "4.53.
|
|
130
|
-
"@rollup/rollup-win32-x64-gnu": "4.53.
|
|
131
|
-
"@rollup/rollup-win32-x64-msvc": "4.53.
|
|
132
|
-
"@rollup/rollup-freebsd-x64": "4.53.
|
|
133
|
-
"@rollup/rollup-linux-x64-gnu": "4.53.
|
|
134
|
-
"@rollup/rollup-linux-x64-musl": "4.53.
|
|
135
|
-
"@rollup/rollup-openharmony-arm64": "4.53.
|
|
114
|
+
"@rollup/rollup-darwin-arm64": "4.53.5",
|
|
115
|
+
"@rollup/rollup-android-arm64": "4.53.5",
|
|
116
|
+
"@rollup/rollup-win32-arm64-msvc": "4.53.5",
|
|
117
|
+
"@rollup/rollup-freebsd-arm64": "4.53.5",
|
|
118
|
+
"@rollup/rollup-linux-arm64-gnu": "4.53.5",
|
|
119
|
+
"@rollup/rollup-linux-arm64-musl": "4.53.5",
|
|
120
|
+
"@rollup/rollup-android-arm-eabi": "4.53.5",
|
|
121
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.53.5",
|
|
122
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.53.5",
|
|
123
|
+
"@rollup/rollup-win32-ia32-msvc": "4.53.5",
|
|
124
|
+
"@rollup/rollup-linux-loong64-gnu": "4.53.5",
|
|
125
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.53.5",
|
|
126
|
+
"@rollup/rollup-linux-riscv64-musl": "4.53.5",
|
|
127
|
+
"@rollup/rollup-linux-ppc64-gnu": "4.53.5",
|
|
128
|
+
"@rollup/rollup-linux-s390x-gnu": "4.53.5",
|
|
129
|
+
"@rollup/rollup-darwin-x64": "4.53.5",
|
|
130
|
+
"@rollup/rollup-win32-x64-gnu": "4.53.5",
|
|
131
|
+
"@rollup/rollup-win32-x64-msvc": "4.53.5",
|
|
132
|
+
"@rollup/rollup-freebsd-x64": "4.53.5",
|
|
133
|
+
"@rollup/rollup-linux-x64-gnu": "4.53.5",
|
|
134
|
+
"@rollup/rollup-linux-x64-musl": "4.53.5",
|
|
135
|
+
"@rollup/rollup-openharmony-arm64": "4.53.5"
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
138
|
"@types/estree": "1.0.8"
|
|
@@ -146,12 +146,12 @@
|
|
|
146
146
|
"@codemirror/language": "^6.11.3",
|
|
147
147
|
"@codemirror/search": "^6.5.11",
|
|
148
148
|
"@codemirror/state": "^6.5.2",
|
|
149
|
-
"@codemirror/view": "^6.
|
|
149
|
+
"@codemirror/view": "^6.39.3",
|
|
150
150
|
"@eslint/js": "^9.39.1",
|
|
151
|
-
"@inquirer/prompts": "^7.10.
|
|
151
|
+
"@inquirer/prompts": "^7.10.1",
|
|
152
152
|
"@jridgewell/sourcemap-codec": "^1.5.5",
|
|
153
153
|
"@mermaid-js/mermaid-cli": "^11.12.0",
|
|
154
|
-
"@napi-rs/cli": "
|
|
154
|
+
"@napi-rs/cli": "3.4.1",
|
|
155
155
|
"@rollup/plugin-alias": "^6.0.0",
|
|
156
156
|
"@rollup/plugin-buble": "^1.0.3",
|
|
157
157
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -161,13 +161,13 @@
|
|
|
161
161
|
"@rollup/plugin-terser": "^0.4.4",
|
|
162
162
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
163
163
|
"@rollup/pluginutils": "^5.3.0",
|
|
164
|
-
"@shikijs/vitepress-twoslash": "^3.
|
|
164
|
+
"@shikijs/vitepress-twoslash": "^3.19.0",
|
|
165
165
|
"@types/mocha": "^10.0.10",
|
|
166
|
-
"@types/node": "^20.19.
|
|
166
|
+
"@types/node": "^20.19.26",
|
|
167
167
|
"@types/picomatch": "^4.0.2",
|
|
168
168
|
"@types/semver": "^7.7.1",
|
|
169
169
|
"@types/yargs-parser": "^21.0.3",
|
|
170
|
-
"@vue/language-server": "^3.1.
|
|
170
|
+
"@vue/language-server": "^3.1.8",
|
|
171
171
|
"acorn": "^8.15.0",
|
|
172
172
|
"acorn-import-assertions": "^1.9.0",
|
|
173
173
|
"acorn-jsx": "^5.3.2",
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"eslint-config-prettier": "^10.1.8",
|
|
185
185
|
"eslint-plugin-prettier": "^5.5.4",
|
|
186
186
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
187
|
-
"eslint-plugin-vue": "^10.
|
|
187
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
188
188
|
"fixturify": "^3.0.0",
|
|
189
189
|
"flru": "^1.0.2",
|
|
190
190
|
"fs-extra": "^11.3.2",
|
|
@@ -192,10 +192,10 @@
|
|
|
192
192
|
"globals": "^16.5.0",
|
|
193
193
|
"husky": "^9.1.7",
|
|
194
194
|
"is-reference": "^3.0.3",
|
|
195
|
-
"lint-staged": "^16.2.
|
|
195
|
+
"lint-staged": "^16.2.7",
|
|
196
196
|
"locate-character": "^3.0.0",
|
|
197
197
|
"magic-string": "^0.30.21",
|
|
198
|
-
"memfs": "^4.
|
|
198
|
+
"memfs": "^4.51.1",
|
|
199
199
|
"mocha": "^11.7.5",
|
|
200
200
|
"nodemon": "^3.1.11",
|
|
201
201
|
"npm-audit-resolver": "^3.0.0-RC.0",
|
|
@@ -204,12 +204,12 @@
|
|
|
204
204
|
"picocolors": "^1.1.1",
|
|
205
205
|
"picomatch": "^4.0.3",
|
|
206
206
|
"pinia": "^3.0.4",
|
|
207
|
-
"prettier": "^3.
|
|
207
|
+
"prettier": "^3.7.4",
|
|
208
208
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
209
209
|
"pretty-bytes": "^7.1.0",
|
|
210
210
|
"pretty-ms": "^9.3.0",
|
|
211
|
-
"requirejs": "^2.3.
|
|
212
|
-
"rollup": "^4.53.
|
|
211
|
+
"requirejs": "^2.3.8",
|
|
212
|
+
"rollup": "^4.53.3",
|
|
213
213
|
"rollup-plugin-license": "^3.6.0",
|
|
214
214
|
"rollup-plugin-string": "^3.0.0",
|
|
215
215
|
"semver": "^7.7.3",
|
|
@@ -221,12 +221,12 @@
|
|
|
221
221
|
"terser": "^5.44.1",
|
|
222
222
|
"tslib": "^2.8.1",
|
|
223
223
|
"typescript": "^5.9.3",
|
|
224
|
-
"typescript-eslint": "^8.
|
|
225
|
-
"vite": "^7.2.
|
|
224
|
+
"typescript-eslint": "^8.49.0",
|
|
225
|
+
"vite": "^7.2.7",
|
|
226
226
|
"vitepress": "^1.6.4",
|
|
227
|
-
"vue": "^3.5.
|
|
227
|
+
"vue": "^3.5.25",
|
|
228
228
|
"vue-eslint-parser": "^10.2.0",
|
|
229
|
-
"vue-tsc": "^3.1.
|
|
229
|
+
"vue-tsc": "^3.1.8",
|
|
230
230
|
"wasm-pack": "^0.13.1",
|
|
231
231
|
"yargs-parser": "^21.1.1"
|
|
232
232
|
},
|