@rollup/wasm-node 4.53.2 → 4.53.4
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 +106 -54
- 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 +106 -54
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/dist/wasm-node/bindings_wasm.js +68 -71
- package/dist/wasm-node/bindings_wasm_bg.wasm +0 -0
- package/package.json +24 -23
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
|
-
Mon,
|
|
4
|
+
Rollup.js v4.53.4
|
|
5
|
+
Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
|
|
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
|
-
Mon,
|
|
3
|
+
Rollup.js v4.53.4
|
|
4
|
+
Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
|
|
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.4";
|
|
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
|
|
@@ -2584,6 +2588,7 @@ class ExternalModule {
|
|
|
2584
2588
|
this.reexported = false;
|
|
2585
2589
|
this.used = false;
|
|
2586
2590
|
this.declarations = new Map();
|
|
2591
|
+
this.importersByExportedName = new Map();
|
|
2587
2592
|
this.mostCommonSuggestion = 0;
|
|
2588
2593
|
this.nameSuggestions = new Map();
|
|
2589
2594
|
this.suggestedVariableName = makeLegal(id.split(/[/\\]/).pop());
|
|
@@ -2620,8 +2625,11 @@ class ExternalModule {
|
|
|
2620
2625
|
cacheInfoGetters() {
|
|
2621
2626
|
cacheObjectGetters(this.info, ['dynamicImporters', 'importers']);
|
|
2622
2627
|
}
|
|
2623
|
-
getVariableForExportName(name) {
|
|
2628
|
+
getVariableForExportName(name, { importChain }) {
|
|
2624
2629
|
const declaration = this.declarations.get(name);
|
|
2630
|
+
for (const module of importChain) {
|
|
2631
|
+
getOrCreate(this.importersByExportedName, name, getNewSet).add(module);
|
|
2632
|
+
}
|
|
2625
2633
|
if (declaration)
|
|
2626
2634
|
return [declaration];
|
|
2627
2635
|
const externalVariable = new ExternalVariable(this, name);
|
|
@@ -2645,7 +2653,10 @@ class ExternalModule {
|
|
|
2645
2653
|
return;
|
|
2646
2654
|
const importersSet = new Set();
|
|
2647
2655
|
for (const name of unused) {
|
|
2648
|
-
|
|
2656
|
+
const importersOfName = this.importersByExportedName.get(name);
|
|
2657
|
+
for (const importer of this.importers) {
|
|
2658
|
+
if (!importersOfName?.has(importer))
|
|
2659
|
+
continue;
|
|
2649
2660
|
importersSet.add(importer);
|
|
2650
2661
|
}
|
|
2651
2662
|
}
|
|
@@ -4263,6 +4274,27 @@ const knownGlobals = {
|
|
|
4263
4274
|
for: PF,
|
|
4264
4275
|
keyFor: PF,
|
|
4265
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
|
+
},
|
|
4266
4298
|
toStringTag: {
|
|
4267
4299
|
__proto__: null,
|
|
4268
4300
|
[ValueProperties]: {
|
|
@@ -5110,6 +5142,7 @@ class LocalVariable extends Variable {
|
|
|
5110
5142
|
return true;
|
|
5111
5143
|
if (path.length === 0)
|
|
5112
5144
|
return false;
|
|
5145
|
+
// if (this.isReassigned || this.init.included) return true;
|
|
5113
5146
|
if (this.isReassigned)
|
|
5114
5147
|
return true;
|
|
5115
5148
|
return (!context.assigned.trackEntityAtPathAndGetIfTracked(path, this) &&
|
|
@@ -7662,11 +7695,11 @@ class MemberExpression extends NodeBase {
|
|
|
7662
7695
|
this.dynamicPropertyKey = this.propertyKey;
|
|
7663
7696
|
const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
|
|
7664
7697
|
return (this.dynamicPropertyKey =
|
|
7665
|
-
value ===
|
|
7666
|
-
? value
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7698
|
+
typeof value === 'symbol'
|
|
7699
|
+
? WELL_KNOWN_SYMBOLS.has(value)
|
|
7700
|
+
? value
|
|
7701
|
+
: UnknownKey
|
|
7702
|
+
: String(value));
|
|
7670
7703
|
}
|
|
7671
7704
|
return this.dynamicPropertyKey;
|
|
7672
7705
|
}
|
|
@@ -11626,7 +11659,8 @@ class AssignmentExpression extends NodeBase {
|
|
|
11626
11659
|
this.left.hasEffectsWhenDestructuring?.(context, EMPTY_PATH, right));
|
|
11627
11660
|
}
|
|
11628
11661
|
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
11629
|
-
return this.
|
|
11662
|
+
return ((interaction.type === INTERACTION_ASSIGNED && this.left.included) ||
|
|
11663
|
+
this.right.hasEffectsOnInteractionAtPath(path, interaction, context));
|
|
11630
11664
|
}
|
|
11631
11665
|
include(context, includeChildrenRecursively) {
|
|
11632
11666
|
const { deoptimized, isConstReassignment, left, right, operator } = this;
|
|
@@ -13043,8 +13077,9 @@ function isReassignedExportsMember(variable, exportNamesByVariable) {
|
|
|
13043
13077
|
}
|
|
13044
13078
|
|
|
13045
13079
|
class VariableDeclarator extends NodeBase {
|
|
13046
|
-
declareDeclarator(kind
|
|
13047
|
-
this.isUsingDeclaration =
|
|
13080
|
+
declareDeclarator(kind) {
|
|
13081
|
+
this.isUsingDeclaration = kind === 'using';
|
|
13082
|
+
this.isAsyncUsingDeclaration = kind === 'await using';
|
|
13048
13083
|
this.id.declare(kind, EMPTY_PATH, this.init || UNDEFINED_EXPRESSION);
|
|
13049
13084
|
}
|
|
13050
13085
|
deoptimizePath(path) {
|
|
@@ -13055,6 +13090,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
13055
13090
|
this.id.markDeclarationReached();
|
|
13056
13091
|
return (initEffect ||
|
|
13057
13092
|
this.isUsingDeclaration ||
|
|
13093
|
+
this.isAsyncUsingDeclaration ||
|
|
13058
13094
|
this.id.hasEffects(context) ||
|
|
13059
13095
|
(this.scope.context.options.treeshake
|
|
13060
13096
|
.propertyReadSideEffects &&
|
|
@@ -13063,7 +13099,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
13063
13099
|
include(context, includeChildrenRecursively) {
|
|
13064
13100
|
const { id, init } = this;
|
|
13065
13101
|
if (!this.included)
|
|
13066
|
-
this.includeNode();
|
|
13102
|
+
this.includeNode(context);
|
|
13067
13103
|
init?.include(context, includeChildrenRecursively);
|
|
13068
13104
|
id.markDeclarationReached();
|
|
13069
13105
|
if (includeChildrenRecursively) {
|
|
@@ -13079,7 +13115,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
13079
13115
|
render(code, options) {
|
|
13080
13116
|
const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
|
|
13081
13117
|
const { end, id, init, start } = this;
|
|
13082
|
-
const renderId = id.included || this.isUsingDeclaration;
|
|
13118
|
+
const renderId = id.included || this.isUsingDeclaration || this.isAsyncUsingDeclaration;
|
|
13083
13119
|
if (renderId) {
|
|
13084
13120
|
id.render(code, options);
|
|
13085
13121
|
}
|
|
@@ -13101,20 +13137,30 @@ class VariableDeclarator extends NodeBase {
|
|
|
13101
13137
|
code.appendLeft(end, `${_}=${_}void 0`);
|
|
13102
13138
|
}
|
|
13103
13139
|
}
|
|
13104
|
-
includeNode() {
|
|
13140
|
+
includeNode(context) {
|
|
13105
13141
|
this.included = true;
|
|
13106
13142
|
const { id, init } = this;
|
|
13107
|
-
if (init
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
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
|
+
}
|
|
13112
13156
|
}
|
|
13113
13157
|
}
|
|
13114
13158
|
}
|
|
13115
13159
|
}
|
|
13116
13160
|
}
|
|
13117
13161
|
VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
13162
|
+
const SYMBOL_DISPOSE_PATH = [SymbolDispose];
|
|
13163
|
+
const SYMBOL_ASYNC_DISPOSE_PATH = [SymbolAsyncDispose];
|
|
13118
13164
|
|
|
13119
13165
|
function getChunkInfoWithPath(chunk) {
|
|
13120
13166
|
return { fileName: chunk.getFileName(), ...chunk.getPreRenderedChunkInfo() };
|
|
@@ -15352,23 +15398,6 @@ class UpdateExpression extends NodeBase {
|
|
|
15352
15398
|
}
|
|
15353
15399
|
UpdateExpression.prototype.includeNode = onlyIncludeSelf;
|
|
15354
15400
|
|
|
15355
|
-
function areAllDeclarationsIncludedAndNotExported(declarations, exportNamesByVariable) {
|
|
15356
|
-
for (const declarator of declarations) {
|
|
15357
|
-
if (!declarator.id.included)
|
|
15358
|
-
return false;
|
|
15359
|
-
if (declarator.id.type === Identifier$1) {
|
|
15360
|
-
if (exportNamesByVariable.has(declarator.id.variable))
|
|
15361
|
-
return false;
|
|
15362
|
-
}
|
|
15363
|
-
else {
|
|
15364
|
-
const exportedVariables = [];
|
|
15365
|
-
declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
|
|
15366
|
-
if (exportedVariables.length > 0)
|
|
15367
|
-
return false;
|
|
15368
|
-
}
|
|
15369
|
-
}
|
|
15370
|
-
return true;
|
|
15371
|
-
}
|
|
15372
15401
|
class VariableDeclaration extends NodeBase {
|
|
15373
15402
|
deoptimizePath() {
|
|
15374
15403
|
for (const declarator of this.declarations) {
|
|
@@ -15398,17 +15427,15 @@ class VariableDeclaration extends NodeBase {
|
|
|
15398
15427
|
}
|
|
15399
15428
|
initialise() {
|
|
15400
15429
|
super.initialise();
|
|
15401
|
-
this.isUsingDeclaration = this.kind === 'await using' || this.kind === 'using';
|
|
15402
15430
|
for (const declarator of this.declarations) {
|
|
15403
|
-
declarator.declareDeclarator(this.kind
|
|
15431
|
+
declarator.declareDeclarator(this.kind);
|
|
15404
15432
|
}
|
|
15405
15433
|
}
|
|
15406
15434
|
removeAnnotations(code) {
|
|
15407
15435
|
this.declarations[0].removeAnnotations(code);
|
|
15408
15436
|
}
|
|
15409
15437
|
render(code, options, nodeRenderOptions = BLANK) {
|
|
15410
|
-
if (this.
|
|
15411
|
-
areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
|
|
15438
|
+
if (this.areAllDeclarationsIncludedAndNotExported(options.exportNamesByVariable)) {
|
|
15412
15439
|
for (const declarator of this.declarations) {
|
|
15413
15440
|
declarator.render(code, options);
|
|
15414
15441
|
}
|
|
@@ -15508,6 +15535,26 @@ class VariableDeclaration extends NodeBase {
|
|
|
15508
15535
|
}
|
|
15509
15536
|
this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, aggregatedSystemExports, options);
|
|
15510
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
|
+
}
|
|
15511
15558
|
}
|
|
15512
15559
|
function gatherSystemExportsAndGetSingleExport(separatedNodes, options, aggregatedSystemExports) {
|
|
15513
15560
|
let singleSystemExport = null;
|
|
@@ -16750,7 +16797,7 @@ const MISSING_EXPORT_SHIM_DESCRIPTION = {
|
|
|
16750
16797
|
identifier: null,
|
|
16751
16798
|
localName: MISSING_EXPORT_SHIM_VARIABLE
|
|
16752
16799
|
};
|
|
16753
|
-
function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map()) {
|
|
16800
|
+
function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map(), importChain) {
|
|
16754
16801
|
const searchedModules = searchedNamesAndModules.get(name);
|
|
16755
16802
|
if (searchedModules) {
|
|
16756
16803
|
if (searchedModules.has(target)) {
|
|
@@ -16762,6 +16809,7 @@ function getVariableForExportNameRecursive(target, name, importerForSideEffects,
|
|
|
16762
16809
|
searchedNamesAndModules.set(name, new Set([target]));
|
|
16763
16810
|
}
|
|
16764
16811
|
return target.getVariableForExportName(name, {
|
|
16812
|
+
importChain,
|
|
16765
16813
|
importerForSideEffects,
|
|
16766
16814
|
isExportAllSearch,
|
|
16767
16815
|
searchedNamesAndModules
|
|
@@ -17092,7 +17140,7 @@ class Module {
|
|
|
17092
17140
|
}
|
|
17093
17141
|
return this.syntheticNamespace;
|
|
17094
17142
|
}
|
|
17095
|
-
getVariableForExportName(name, { importerForSideEffects, isExportAllSearch, onlyExplicit, searchedNamesAndModules } = EMPTY_OBJECT) {
|
|
17143
|
+
getVariableForExportName(name, { importerForSideEffects, importChain = [], isExportAllSearch, onlyExplicit, searchedNamesAndModules } = EMPTY_OBJECT) {
|
|
17096
17144
|
if (name[0] === '*') {
|
|
17097
17145
|
if (name.length === 1) {
|
|
17098
17146
|
// export * from './other'
|
|
@@ -17100,12 +17148,14 @@ class Module {
|
|
|
17100
17148
|
}
|
|
17101
17149
|
// export * from 'external'
|
|
17102
17150
|
const module = this.graph.modulesById.get(name.slice(1));
|
|
17103
|
-
return module.getVariableForExportName('*'
|
|
17151
|
+
return module.getVariableForExportName('*', {
|
|
17152
|
+
importChain: [...importChain, this.id]
|
|
17153
|
+
});
|
|
17104
17154
|
}
|
|
17105
17155
|
// export { foo } from './other'
|
|
17106
17156
|
const reexportDeclaration = this.reexportDescriptions.get(name);
|
|
17107
17157
|
if (reexportDeclaration) {
|
|
17108
|
-
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
|
|
17158
|
+
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules, [...importChain, this.id]);
|
|
17109
17159
|
if (!variable) {
|
|
17110
17160
|
return this.error(logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id, !!options?.missingButExportExists), reexportDeclaration.start);
|
|
17111
17161
|
}
|
|
@@ -17141,7 +17191,7 @@ class Module {
|
|
|
17141
17191
|
}
|
|
17142
17192
|
if (name !== 'default') {
|
|
17143
17193
|
const foundNamespaceReexport = this.namespaceReexportsByName.get(name) ??
|
|
17144
|
-
this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules);
|
|
17194
|
+
this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, [...importChain, this.id]);
|
|
17145
17195
|
this.namespaceReexportsByName.set(name, foundNamespaceReexport);
|
|
17146
17196
|
if (foundNamespaceReexport[0]) {
|
|
17147
17197
|
return foundNamespaceReexport;
|
|
@@ -17395,7 +17445,7 @@ class Module {
|
|
|
17395
17445
|
if (otherModule instanceof Module && importDescription.name === '*') {
|
|
17396
17446
|
return otherModule.namespace;
|
|
17397
17447
|
}
|
|
17398
|
-
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
|
|
17448
|
+
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules, [this.id]);
|
|
17399
17449
|
if (!declaration) {
|
|
17400
17450
|
return this.error(logMissingExport(importDescription.name, this.id, otherModule.id, !!options?.missingButExportExists), importDescription.start);
|
|
17401
17451
|
}
|
|
@@ -17600,13 +17650,13 @@ class Module {
|
|
|
17600
17650
|
getImportedJsxFactoryVariable(baseName, nodeStart, importSource) {
|
|
17601
17651
|
const { id } = this.resolvedIds[importSource];
|
|
17602
17652
|
const module = this.graph.modulesById.get(id);
|
|
17603
|
-
const [variable] = module.getVariableForExportName(baseName);
|
|
17653
|
+
const [variable] = module.getVariableForExportName(baseName, { importChain: [this.id] });
|
|
17604
17654
|
if (!variable) {
|
|
17605
17655
|
return this.error(logMissingJsxExport(baseName, id, this.id), nodeStart);
|
|
17606
17656
|
}
|
|
17607
17657
|
return variable;
|
|
17608
17658
|
}
|
|
17609
|
-
getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules) {
|
|
17659
|
+
getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, importChain) {
|
|
17610
17660
|
let foundSyntheticDeclaration = null;
|
|
17611
17661
|
const foundInternalDeclarations = new Map();
|
|
17612
17662
|
const foundExternalDeclarations = new Set();
|
|
@@ -17618,7 +17668,7 @@ class Module {
|
|
|
17618
17668
|
const [variable, options] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true,
|
|
17619
17669
|
// We are creating a copy to handle the case where the same binding is
|
|
17620
17670
|
// imported through different namespace reexports gracefully
|
|
17621
|
-
copyNameToModulesMap(searchedNamesAndModules));
|
|
17671
|
+
copyNameToModulesMap(searchedNamesAndModules), importChain);
|
|
17622
17672
|
if (module instanceof ExternalModule || options?.indirectExternal) {
|
|
17623
17673
|
foundExternalDeclarations.add(variable);
|
|
17624
17674
|
}
|
|
@@ -17659,7 +17709,9 @@ class Module {
|
|
|
17659
17709
|
const syntheticNamespaces = new Set();
|
|
17660
17710
|
for (const module of [this, ...this.exportAllModules]) {
|
|
17661
17711
|
if (module instanceof ExternalModule) {
|
|
17662
|
-
const [externalVariable] = module.getVariableForExportName('*'
|
|
17712
|
+
const [externalVariable] = module.getVariableForExportName('*', {
|
|
17713
|
+
importChain: [this.id]
|
|
17714
|
+
});
|
|
17663
17715
|
externalVariable.includePath(UNKNOWN_PATH, createInclusionContext());
|
|
17664
17716
|
this.includedImports.add(externalVariable);
|
|
17665
17717
|
externalNamespaces.add(externalVariable);
|
|
@@ -21818,7 +21870,7 @@ class FileEmitter {
|
|
|
21818
21870
|
}
|
|
21819
21871
|
else {
|
|
21820
21872
|
const sourceHash = getHash(consumedFile.source);
|
|
21821
|
-
getOrCreate(consumedAssetsByHash, sourceHash,
|
|
21873
|
+
getOrCreate(consumedAssetsByHash, sourceHash, getNewArray).push(consumedFile);
|
|
21822
21874
|
}
|
|
21823
21875
|
}
|
|
21824
21876
|
else if (consumedFile.type === 'prebuilt-chunk') {
|
|
@@ -22737,7 +22789,7 @@ class Graph {
|
|
|
22737
22789
|
for (const module of this.modules) {
|
|
22738
22790
|
for (const importDescription of module.importDescriptions.values()) {
|
|
22739
22791
|
if (importDescription.name !== '*') {
|
|
22740
|
-
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name);
|
|
22792
|
+
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] });
|
|
22741
22793
|
if (!variable) {
|
|
22742
22794
|
module.log(LOGLEVEL_WARN, logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);
|
|
22743
22795
|
}
|
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