rollup 4.45.1 → 4.46.0
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 +96 -52
- package/dist/es/shared/parseAst.js +15 -6
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/native.js +1 -1
- package/dist/parseAst.js +2 -2
- 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 +15 -6
- package/dist/shared/rollup.js +96 -52
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +69 -74
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.46.0
|
|
5
|
+
Sun, 27 Jul 2025 06:51:20 GMT - commit 09794f1bf24473e63b3ff10daa7e9f4d5d50ce1e
|
|
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.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.46.0
|
|
4
|
+
Sun, 27 Jul 2025 06:51:20 GMT - commit 09794f1bf24473e63b3ff10daa7e9f4d5d50ce1e
|
|
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.
|
|
30
|
+
var version = "4.46.0";
|
|
31
31
|
|
|
32
32
|
// src/vlq.ts
|
|
33
33
|
var comma = ",".charCodeAt(0);
|
|
@@ -7658,11 +7658,11 @@ function resolveNamespaceVariables(baseVariable, path, astContext) {
|
|
|
7658
7658
|
if (!baseVariable.isNamespace || baseVariable instanceof ExternalVariable)
|
|
7659
7659
|
return null;
|
|
7660
7660
|
const exportName = path[0].key;
|
|
7661
|
-
const variable = baseVariable.context.traceExport(exportName);
|
|
7661
|
+
const [variable, options] = baseVariable.context.traceExport(exportName);
|
|
7662
7662
|
if (!variable) {
|
|
7663
7663
|
if (path.length === 1) {
|
|
7664
7664
|
const fileName = baseVariable.context.fileName;
|
|
7665
|
-
astContext.log(LOGLEVEL_WARN, logMissingExport(exportName, astContext.module.id, fileName), path[0].pos);
|
|
7665
|
+
astContext.log(LOGLEVEL_WARN, logMissingExport(exportName, astContext.module.id, fileName, !!options?.missingButExportExists), path[0].pos);
|
|
7666
7666
|
return 'undefined';
|
|
7667
7667
|
}
|
|
7668
7668
|
return null;
|
|
@@ -7937,7 +7937,7 @@ class NamespaceVariable extends Variable {
|
|
|
7937
7937
|
const sortedExports = [...this.context.getExports(), ...this.context.getReexports()].sort();
|
|
7938
7938
|
for (const name of sortedExports) {
|
|
7939
7939
|
if (name[0] !== '*' && name !== this.module.info.syntheticNamedExports) {
|
|
7940
|
-
const exportedVariable = this.context.traceExport(name);
|
|
7940
|
+
const [exportedVariable] = this.context.traceExport(name);
|
|
7941
7941
|
if (exportedVariable) {
|
|
7942
7942
|
memberVariables[name] = exportedVariable;
|
|
7943
7943
|
}
|
|
@@ -9179,6 +9179,7 @@ function requireConstants () {
|
|
|
9179
9179
|
|
|
9180
9180
|
// Replace globs with equivalent patterns to reduce parsing time.
|
|
9181
9181
|
REPLACEMENTS: {
|
|
9182
|
+
__proto__: null,
|
|
9182
9183
|
'***': '*',
|
|
9183
9184
|
'**/**': '**',
|
|
9184
9185
|
'**/**/**': '**'
|
|
@@ -11558,13 +11559,18 @@ ObjectPattern.prototype.includeNode = onlyIncludeSelfNoDeoptimize;
|
|
|
11558
11559
|
ObjectPattern.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
11559
11560
|
|
|
11560
11561
|
class AssignmentExpression extends NodeBase {
|
|
11562
|
+
constructor() {
|
|
11563
|
+
super(...arguments);
|
|
11564
|
+
this.isConstReassignment = false;
|
|
11565
|
+
}
|
|
11561
11566
|
hasEffects(context) {
|
|
11562
|
-
const { deoptimized, left, operator, right } = this;
|
|
11567
|
+
const { deoptimized, isConstReassignment, left, operator, right } = this;
|
|
11563
11568
|
if (!deoptimized)
|
|
11564
11569
|
this.applyDeoptimizations();
|
|
11565
11570
|
// MemberExpressions do not access the property before assignments if the
|
|
11566
11571
|
// operator is '='.
|
|
11567
|
-
return (
|
|
11572
|
+
return (isConstReassignment ||
|
|
11573
|
+
right.hasEffects(context) ||
|
|
11568
11574
|
left.hasEffectsAsAssignmentTarget(context, operator !== '=') ||
|
|
11569
11575
|
this.left.hasEffectsWhenDestructuring?.(context, EMPTY_PATH, right));
|
|
11570
11576
|
}
|
|
@@ -11572,13 +11578,14 @@ class AssignmentExpression extends NodeBase {
|
|
|
11572
11578
|
return this.right.hasEffectsOnInteractionAtPath(path, interaction, context);
|
|
11573
11579
|
}
|
|
11574
11580
|
include(context, includeChildrenRecursively) {
|
|
11575
|
-
const { deoptimized, left, right, operator } = this;
|
|
11581
|
+
const { deoptimized, isConstReassignment, left, right, operator } = this;
|
|
11576
11582
|
if (!deoptimized)
|
|
11577
11583
|
this.applyDeoptimizations();
|
|
11578
11584
|
if (!this.included)
|
|
11579
11585
|
this.includeNode(context);
|
|
11580
11586
|
const hasEffectsContext = createHasEffectsContext();
|
|
11581
11587
|
if (includeChildrenRecursively ||
|
|
11588
|
+
isConstReassignment ||
|
|
11582
11589
|
operator !== '=' ||
|
|
11583
11590
|
left.included ||
|
|
11584
11591
|
left.hasEffectsAsAssignmentTarget(hasEffectsContext, false) ||
|
|
@@ -11598,7 +11605,8 @@ class AssignmentExpression extends NodeBase {
|
|
|
11598
11605
|
if (this.left instanceof Identifier) {
|
|
11599
11606
|
const variable = this.scope.variables.get(this.left.name);
|
|
11600
11607
|
if (variable?.kind === 'const') {
|
|
11601
|
-
this.
|
|
11608
|
+
this.isConstReassignment = true;
|
|
11609
|
+
this.scope.context.log(LOGLEVEL_WARN, logConstVariableReassignError(), this.left.start);
|
|
11602
11610
|
}
|
|
11603
11611
|
}
|
|
11604
11612
|
this.left.setAssignedValue(this.right);
|
|
@@ -11751,6 +11759,33 @@ class AwaitExpression extends NodeBase {
|
|
|
11751
11759
|
}
|
|
11752
11760
|
const THEN_PATH = ['then'];
|
|
11753
11761
|
|
|
11762
|
+
function getRenderedLiteralValue(value) {
|
|
11763
|
+
if (value === undefined) {
|
|
11764
|
+
return 'void 0';
|
|
11765
|
+
}
|
|
11766
|
+
if (typeof value === 'boolean') {
|
|
11767
|
+
return String(value);
|
|
11768
|
+
}
|
|
11769
|
+
if (typeof value === 'string') {
|
|
11770
|
+
return JSON.stringify(value);
|
|
11771
|
+
}
|
|
11772
|
+
if (typeof value === 'number') {
|
|
11773
|
+
return getSimplifiedNumber(value);
|
|
11774
|
+
}
|
|
11775
|
+
return UnknownValue;
|
|
11776
|
+
}
|
|
11777
|
+
function getSimplifiedNumber(value) {
|
|
11778
|
+
if (Object.is(-0, value)) {
|
|
11779
|
+
return '-0';
|
|
11780
|
+
}
|
|
11781
|
+
const exp = value.toExponential();
|
|
11782
|
+
const [base, exponent] = exp.split('e');
|
|
11783
|
+
const floatLength = base.split('.')[1]?.length || 0;
|
|
11784
|
+
const finalizedExp = `${base.replace('.', '')}e${parseInt(exponent) - floatLength}`;
|
|
11785
|
+
const stringifiedValue = String(value).replace('+', '');
|
|
11786
|
+
return finalizedExp.length < stringifiedValue.length ? finalizedExp : stringifiedValue;
|
|
11787
|
+
}
|
|
11788
|
+
|
|
11754
11789
|
const binaryOperators = {
|
|
11755
11790
|
'!=': (left, right) => left != right,
|
|
11756
11791
|
'!==': (left, right) => left !== right,
|
|
@@ -11777,14 +11812,25 @@ const binaryOperators = {
|
|
|
11777
11812
|
// in: () => UnknownValue,
|
|
11778
11813
|
// instanceof: () => UnknownValue,
|
|
11779
11814
|
};
|
|
11815
|
+
const UNASSIGNED$1 = Symbol('Unassigned');
|
|
11780
11816
|
class BinaryExpression extends NodeBase {
|
|
11781
|
-
|
|
11817
|
+
constructor() {
|
|
11818
|
+
super(...arguments);
|
|
11819
|
+
this.renderedLiteralValue = UNASSIGNED$1;
|
|
11820
|
+
}
|
|
11821
|
+
deoptimizeCache() {
|
|
11822
|
+
this.renderedLiteralValue = UnknownValue;
|
|
11823
|
+
}
|
|
11782
11824
|
getLiteralValueAtPath(path, recursionTracker, origin) {
|
|
11783
11825
|
if (path.length > 0)
|
|
11784
11826
|
return UnknownValue;
|
|
11785
11827
|
const leftValue = this.left.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
|
|
11786
11828
|
if (typeof leftValue === 'symbol')
|
|
11787
11829
|
return UnknownValue;
|
|
11830
|
+
// Optimize `'export' in namespace`
|
|
11831
|
+
if (this.operator === 'in' && this.right.variable?.isNamespace) {
|
|
11832
|
+
return (this.right.variable.context.traceExport(String(leftValue))[0] != null);
|
|
11833
|
+
}
|
|
11788
11834
|
const rightValue = this.right.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
|
|
11789
11835
|
if (typeof rightValue === 'symbol')
|
|
11790
11836
|
return UnknownValue;
|
|
@@ -11793,6 +11839,14 @@ class BinaryExpression extends NodeBase {
|
|
|
11793
11839
|
return UnknownValue;
|
|
11794
11840
|
return operatorFunction(leftValue, rightValue);
|
|
11795
11841
|
}
|
|
11842
|
+
getRenderedLiteralValue() {
|
|
11843
|
+
// Only optimize `'export' in ns`
|
|
11844
|
+
if (this.operator !== 'in' || !this.right.variable?.isNamespace)
|
|
11845
|
+
return UnknownValue;
|
|
11846
|
+
if (this.renderedLiteralValue !== UNASSIGNED$1)
|
|
11847
|
+
return this.renderedLiteralValue;
|
|
11848
|
+
return (this.renderedLiteralValue = getRenderedLiteralValue(this.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this)));
|
|
11849
|
+
}
|
|
11796
11850
|
hasEffects(context) {
|
|
11797
11851
|
// support some implicit type coercion runtime errors
|
|
11798
11852
|
if (this.operator === '+' &&
|
|
@@ -11805,9 +11859,15 @@ class BinaryExpression extends NodeBase {
|
|
|
11805
11859
|
hasEffectsOnInteractionAtPath(path, { type }) {
|
|
11806
11860
|
return type !== INTERACTION_ACCESSED || path.length > 1;
|
|
11807
11861
|
}
|
|
11862
|
+
include(context, includeChildrenRecursively, _options) {
|
|
11863
|
+
this.included = true;
|
|
11864
|
+
if (typeof this.getRenderedLiteralValue() === 'symbol') {
|
|
11865
|
+
super.include(context, includeChildrenRecursively, _options);
|
|
11866
|
+
}
|
|
11867
|
+
}
|
|
11808
11868
|
includeNode(context) {
|
|
11809
11869
|
this.included = true;
|
|
11810
|
-
if (this.operator === 'in') {
|
|
11870
|
+
if (this.operator === 'in' && typeof this.getRenderedLiteralValue() === 'symbol') {
|
|
11811
11871
|
this.right.includePath(UNKNOWN_PATH, context);
|
|
11812
11872
|
}
|
|
11813
11873
|
}
|
|
@@ -11815,8 +11875,14 @@ class BinaryExpression extends NodeBase {
|
|
|
11815
11875
|
this.left.removeAnnotations(code);
|
|
11816
11876
|
}
|
|
11817
11877
|
render(code, options, { renderedSurroundingElement } = BLANK) {
|
|
11818
|
-
this.
|
|
11819
|
-
|
|
11878
|
+
const renderedLiteralValue = this.getRenderedLiteralValue();
|
|
11879
|
+
if (typeof renderedLiteralValue !== 'symbol') {
|
|
11880
|
+
code.overwrite(this.start, this.end, renderedLiteralValue);
|
|
11881
|
+
}
|
|
11882
|
+
else {
|
|
11883
|
+
this.left.render(code, options, { renderedSurroundingElement });
|
|
11884
|
+
this.right.render(code, options);
|
|
11885
|
+
}
|
|
11820
11886
|
}
|
|
11821
11887
|
}
|
|
11822
11888
|
BinaryExpression.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
@@ -15156,33 +15222,6 @@ class UnaryExpression extends NodeBase {
|
|
|
15156
15222
|
}
|
|
15157
15223
|
}
|
|
15158
15224
|
const CHARACTERS_THAT_DO_NOT_REQUIRE_SPACE = /[\s([=%&*+-/<>^|,?:;]/;
|
|
15159
|
-
function getRenderedLiteralValue(value) {
|
|
15160
|
-
if (value === undefined) {
|
|
15161
|
-
// At the moment, the undefined only happens when the operator is void
|
|
15162
|
-
return 'void 0';
|
|
15163
|
-
}
|
|
15164
|
-
if (typeof value === 'boolean') {
|
|
15165
|
-
return String(value);
|
|
15166
|
-
}
|
|
15167
|
-
if (typeof value === 'string') {
|
|
15168
|
-
return JSON.stringify(value);
|
|
15169
|
-
}
|
|
15170
|
-
if (typeof value === 'number') {
|
|
15171
|
-
return getSimplifiedNumber(value);
|
|
15172
|
-
}
|
|
15173
|
-
return UnknownValue;
|
|
15174
|
-
}
|
|
15175
|
-
function getSimplifiedNumber(value) {
|
|
15176
|
-
if (Object.is(-0, value)) {
|
|
15177
|
-
return '-0';
|
|
15178
|
-
}
|
|
15179
|
-
const exp = value.toExponential();
|
|
15180
|
-
const [base, exponent] = exp.split('e');
|
|
15181
|
-
const floatLength = base.split('.')[1]?.length || 0;
|
|
15182
|
-
const finalizedExp = `${base.replace('.', '')}e${parseInt(exponent) - floatLength}`;
|
|
15183
|
-
const stringifiedValue = String(value).replace('+', '');
|
|
15184
|
-
return finalizedExp.length < stringifiedValue.length ? finalizedExp : stringifiedValue;
|
|
15185
|
-
}
|
|
15186
15225
|
UnaryExpression.prototype.includeNode = onlyIncludeSelf;
|
|
15187
15226
|
|
|
15188
15227
|
class UpdateExpression extends NodeBase {
|
|
@@ -16989,9 +17028,9 @@ class Module {
|
|
|
16989
17028
|
// export { foo } from './other'
|
|
16990
17029
|
const reexportDeclaration = this.reexportDescriptions.get(name);
|
|
16991
17030
|
if (reexportDeclaration) {
|
|
16992
|
-
const [variable] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
|
|
17031
|
+
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
|
|
16993
17032
|
if (!variable) {
|
|
16994
|
-
return this.error(logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id), reexportDeclaration.start);
|
|
17033
|
+
return this.error(logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id, !!options?.missingButExportExists), reexportDeclaration.start);
|
|
16995
17034
|
}
|
|
16996
17035
|
if (importerForSideEffects) {
|
|
16997
17036
|
setAlternativeExporterIfCyclic(variable, importerForSideEffects, this);
|
|
@@ -17011,6 +17050,9 @@ class Module {
|
|
|
17011
17050
|
importerForSideEffects,
|
|
17012
17051
|
searchedNamesAndModules
|
|
17013
17052
|
});
|
|
17053
|
+
if (!variable) {
|
|
17054
|
+
return [null, { missingButExportExists: true }];
|
|
17055
|
+
}
|
|
17014
17056
|
if (importerForSideEffects) {
|
|
17015
17057
|
setAlternativeExporterIfCyclic(variable, importerForSideEffects, this);
|
|
17016
17058
|
getOrCreate(importerForSideEffects.sideEffectDependenciesByVariable, variable, (getNewSet)).add(this);
|
|
@@ -17201,7 +17243,7 @@ class Module {
|
|
|
17201
17243
|
newlyIncludedVariableInits: this.graph.newlyIncludedVariableInits,
|
|
17202
17244
|
options: this.options,
|
|
17203
17245
|
requestTreeshakingPass: () => (this.graph.needsTreeshakingPass = true),
|
|
17204
|
-
traceExport: (name) => this.getVariableForExportName(name)
|
|
17246
|
+
traceExport: (name) => this.getVariableForExportName(name),
|
|
17205
17247
|
traceVariable: this.traceVariable.bind(this),
|
|
17206
17248
|
usesTopLevelAwait: false
|
|
17207
17249
|
};
|
|
@@ -17274,9 +17316,9 @@ class Module {
|
|
|
17274
17316
|
if (otherModule instanceof Module && importDescription.name === '*') {
|
|
17275
17317
|
return otherModule.namespace;
|
|
17276
17318
|
}
|
|
17277
|
-
const [declaration] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
|
|
17319
|
+
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
|
|
17278
17320
|
if (!declaration) {
|
|
17279
|
-
return this.error(logMissingExport(importDescription.name, this.id, otherModule.id), importDescription.start);
|
|
17321
|
+
return this.error(logMissingExport(importDescription.name, this.id, otherModule.id, !!options?.missingButExportExists), importDescription.start);
|
|
17280
17322
|
}
|
|
17281
17323
|
return declaration;
|
|
17282
17324
|
}
|
|
@@ -17494,11 +17536,11 @@ class Module {
|
|
|
17494
17536
|
if (module.info.syntheticNamedExports === name) {
|
|
17495
17537
|
continue;
|
|
17496
17538
|
}
|
|
17497
|
-
const [variable,
|
|
17539
|
+
const [variable, options] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true,
|
|
17498
17540
|
// We are creating a copy to handle the case where the same binding is
|
|
17499
17541
|
// imported through different namespace reexports gracefully
|
|
17500
17542
|
copyNameToModulesMap(searchedNamesAndModules));
|
|
17501
|
-
if (module instanceof ExternalModule || indirectExternal) {
|
|
17543
|
+
if (module instanceof ExternalModule || options?.indirectExternal) {
|
|
17502
17544
|
foundExternalDeclarations.add(variable);
|
|
17503
17545
|
}
|
|
17504
17546
|
else if (variable instanceof SyntheticNamedExportVariable) {
|
|
@@ -17526,7 +17568,7 @@ class Module {
|
|
|
17526
17568
|
if (foundDeclarationList.length > 1) {
|
|
17527
17569
|
this.options.onLog(LOGLEVEL_WARN, logAmbiguousExternalNamespaces(name, this.id, usedDeclaration.module.id, foundDeclarationList.map(declaration => declaration.module.id)));
|
|
17528
17570
|
}
|
|
17529
|
-
return [usedDeclaration, true];
|
|
17571
|
+
return [usedDeclaration, { indirectExternal: true }];
|
|
17530
17572
|
}
|
|
17531
17573
|
if (foundSyntheticDeclaration) {
|
|
17532
17574
|
return [foundSyntheticDeclaration];
|
|
@@ -22602,9 +22644,11 @@ class Graph {
|
|
|
22602
22644
|
warnForMissingExports() {
|
|
22603
22645
|
for (const module of this.modules) {
|
|
22604
22646
|
for (const importDescription of module.importDescriptions.values()) {
|
|
22605
|
-
if (importDescription.name !== '*'
|
|
22606
|
-
|
|
22607
|
-
|
|
22647
|
+
if (importDescription.name !== '*') {
|
|
22648
|
+
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name);
|
|
22649
|
+
if (!variable) {
|
|
22650
|
+
module.log(LOGLEVEL_WARN, logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);
|
|
22651
|
+
}
|
|
22608
22652
|
}
|
|
22609
22653
|
}
|
|
22610
22654
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.46.0
|
|
4
|
+
Sun, 27 Jul 2025 06:51:20 GMT - commit 09794f1bf24473e63b3ff10daa7e9f4d5d50ce1e
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -764,16 +764,25 @@ function logMissingEntryExport(binding, exporter) {
|
|
|
764
764
|
url: getRollupUrl(URL_NAME_IS_NOT_EXPORTED)
|
|
765
765
|
};
|
|
766
766
|
}
|
|
767
|
-
function logMissingExport(binding, importingModule, exporter) {
|
|
768
|
-
const
|
|
769
|
-
return {
|
|
767
|
+
function logMissingExport(binding, importingModule, exporter, missingButExportExists) {
|
|
768
|
+
const baseLog = {
|
|
770
769
|
binding,
|
|
771
770
|
code: MISSING_EXPORT,
|
|
772
771
|
exporter,
|
|
773
772
|
id: importingModule,
|
|
774
|
-
message: `"${binding}" is not exported by "${relativeId(exporter)}", imported by "${relativeId(importingModule)}".${isJson ? ' (Note that you need @rollup/plugin-json to import JSON files)' : ''}`,
|
|
775
773
|
url: getRollupUrl(URL_NAME_IS_NOT_EXPORTED)
|
|
776
774
|
};
|
|
775
|
+
if (missingButExportExists) {
|
|
776
|
+
return {
|
|
777
|
+
...baseLog,
|
|
778
|
+
message: `Exported variable "${binding}" is not defined in "${relativeId(exporter)}", but it is imported by "${relativeId(importingModule)}".`
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
const isJson = extname(exporter) === '.json';
|
|
782
|
+
return {
|
|
783
|
+
...baseLog,
|
|
784
|
+
message: `"${binding}" is not exported by "${relativeId(exporter)}", imported by "${relativeId(importingModule)}".${isJson ? ' (Note that you need @rollup/plugin-json to import JSON files)' : ''}`
|
|
785
|
+
};
|
|
777
786
|
}
|
|
778
787
|
function logMissingGlobalName(externalId, guess) {
|
|
779
788
|
return {
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/native.js
CHANGED
|
@@ -21,7 +21,7 @@ const bindingsByPlatformAndArch = {
|
|
|
21
21
|
arm: { base: 'linux-arm-gnueabihf', musl: 'linux-arm-musleabihf' },
|
|
22
22
|
arm64: { base: 'linux-arm64-gnu', musl: 'linux-arm64-musl' },
|
|
23
23
|
loong64: { base: 'linux-loongarch64-gnu', musl: null },
|
|
24
|
-
ppc64: { base: 'linux-
|
|
24
|
+
ppc64: { base: 'linux-ppc64-gnu', musl: null },
|
|
25
25
|
riscv64: { base: 'linux-riscv64-gnu', musl: 'linux-riscv64-musl' },
|
|
26
26
|
s390x: { base: 'linux-s390x-gnu', musl: null },
|
|
27
27
|
x64: { base: 'linux-x64-gnu', musl: 'linux-x64-musl' }
|
package/dist/parseAst.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.46.0
|
|
4
|
+
Sun, 27 Jul 2025 06:51:20 GMT - commit 09794f1bf24473e63b3ff10daa7e9f4d5d50ce1e
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -694,16 +694,25 @@ function logMissingEntryExport(binding, exporter) {
|
|
|
694
694
|
url: getRollupUrl(URL_NAME_IS_NOT_EXPORTED)
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
function logMissingExport(binding, importingModule, exporter) {
|
|
698
|
-
const
|
|
699
|
-
return {
|
|
697
|
+
function logMissingExport(binding, importingModule, exporter, missingButExportExists) {
|
|
698
|
+
const baseLog = {
|
|
700
699
|
binding,
|
|
701
700
|
code: MISSING_EXPORT,
|
|
702
701
|
exporter,
|
|
703
702
|
id: importingModule,
|
|
704
|
-
message: `"${binding}" is not exported by "${relativeId(exporter)}", imported by "${relativeId(importingModule)}".${isJson ? ' (Note that you need @rollup/plugin-json to import JSON files)' : ''}`,
|
|
705
703
|
url: getRollupUrl(URL_NAME_IS_NOT_EXPORTED)
|
|
706
704
|
};
|
|
705
|
+
if (missingButExportExists) {
|
|
706
|
+
return {
|
|
707
|
+
...baseLog,
|
|
708
|
+
message: `Exported variable "${binding}" is not defined in "${relativeId(exporter)}", but it is imported by "${relativeId(importingModule)}".`
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
const isJson = path.extname(exporter) === '.json';
|
|
712
|
+
return {
|
|
713
|
+
...baseLog,
|
|
714
|
+
message: `"${binding}" is not exported by "${relativeId(exporter)}", imported by "${relativeId(importingModule)}".${isJson ? ' (Note that you need @rollup/plugin-json to import JSON files)' : ''}`
|
|
715
|
+
};
|
|
707
716
|
}
|
|
708
717
|
function logMissingExternalConfig(file) {
|
|
709
718
|
return {
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.46.0
|
|
4
|
+
Sun, 27 Jul 2025 06:51:20 GMT - commit 09794f1bf24473e63b3ff10daa7e9f4d5d50ce1e
|
|
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.
|
|
45
|
+
var version = "4.46.0";
|
|
46
46
|
|
|
47
47
|
function ensureArray$1(items) {
|
|
48
48
|
if (Array.isArray(items)) {
|
|
@@ -1076,6 +1076,7 @@ function requireConstants () {
|
|
|
1076
1076
|
|
|
1077
1077
|
// Replace globs with equivalent patterns to reduce parsing time.
|
|
1078
1078
|
REPLACEMENTS: {
|
|
1079
|
+
__proto__: null,
|
|
1079
1080
|
'***': '*',
|
|
1080
1081
|
'**/**': '**',
|
|
1081
1082
|
'**/**/**': '**'
|
|
@@ -11433,11 +11434,11 @@ function resolveNamespaceVariables(baseVariable, path, astContext) {
|
|
|
11433
11434
|
if (!baseVariable.isNamespace || baseVariable instanceof ExternalVariable)
|
|
11434
11435
|
return null;
|
|
11435
11436
|
const exportName = path[0].key;
|
|
11436
|
-
const variable = baseVariable.context.traceExport(exportName);
|
|
11437
|
+
const [variable, options] = baseVariable.context.traceExport(exportName);
|
|
11437
11438
|
if (!variable) {
|
|
11438
11439
|
if (path.length === 1) {
|
|
11439
11440
|
const fileName = baseVariable.context.fileName;
|
|
11440
|
-
astContext.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(exportName, astContext.module.id, fileName), path[0].pos);
|
|
11441
|
+
astContext.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(exportName, astContext.module.id, fileName, !!options?.missingButExportExists), path[0].pos);
|
|
11441
11442
|
return 'undefined';
|
|
11442
11443
|
}
|
|
11443
11444
|
return null;
|
|
@@ -11712,7 +11713,7 @@ class NamespaceVariable extends Variable {
|
|
|
11712
11713
|
const sortedExports = [...this.context.getExports(), ...this.context.getReexports()].sort();
|
|
11713
11714
|
for (const name of sortedExports) {
|
|
11714
11715
|
if (name[0] !== '*' && name !== this.module.info.syntheticNamedExports) {
|
|
11715
|
-
const exportedVariable = this.context.traceExport(name);
|
|
11716
|
+
const [exportedVariable] = this.context.traceExport(name);
|
|
11716
11717
|
if (exportedVariable) {
|
|
11717
11718
|
memberVariables[name] = exportedVariable;
|
|
11718
11719
|
}
|
|
@@ -13167,13 +13168,18 @@ ObjectPattern.prototype.includeNode = onlyIncludeSelfNoDeoptimize;
|
|
|
13167
13168
|
ObjectPattern.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
13168
13169
|
|
|
13169
13170
|
class AssignmentExpression extends NodeBase {
|
|
13171
|
+
constructor() {
|
|
13172
|
+
super(...arguments);
|
|
13173
|
+
this.isConstReassignment = false;
|
|
13174
|
+
}
|
|
13170
13175
|
hasEffects(context) {
|
|
13171
|
-
const { deoptimized, left, operator, right } = this;
|
|
13176
|
+
const { deoptimized, isConstReassignment, left, operator, right } = this;
|
|
13172
13177
|
if (!deoptimized)
|
|
13173
13178
|
this.applyDeoptimizations();
|
|
13174
13179
|
// MemberExpressions do not access the property before assignments if the
|
|
13175
13180
|
// operator is '='.
|
|
13176
|
-
return (
|
|
13181
|
+
return (isConstReassignment ||
|
|
13182
|
+
right.hasEffects(context) ||
|
|
13177
13183
|
left.hasEffectsAsAssignmentTarget(context, operator !== '=') ||
|
|
13178
13184
|
this.left.hasEffectsWhenDestructuring?.(context, EMPTY_PATH, right));
|
|
13179
13185
|
}
|
|
@@ -13181,13 +13187,14 @@ class AssignmentExpression extends NodeBase {
|
|
|
13181
13187
|
return this.right.hasEffectsOnInteractionAtPath(path, interaction, context);
|
|
13182
13188
|
}
|
|
13183
13189
|
include(context, includeChildrenRecursively) {
|
|
13184
|
-
const { deoptimized, left, right, operator } = this;
|
|
13190
|
+
const { deoptimized, isConstReassignment, left, right, operator } = this;
|
|
13185
13191
|
if (!deoptimized)
|
|
13186
13192
|
this.applyDeoptimizations();
|
|
13187
13193
|
if (!this.included)
|
|
13188
13194
|
this.includeNode(context);
|
|
13189
13195
|
const hasEffectsContext = createHasEffectsContext();
|
|
13190
13196
|
if (includeChildrenRecursively ||
|
|
13197
|
+
isConstReassignment ||
|
|
13191
13198
|
operator !== '=' ||
|
|
13192
13199
|
left.included ||
|
|
13193
13200
|
left.hasEffectsAsAssignmentTarget(hasEffectsContext, false) ||
|
|
@@ -13207,7 +13214,8 @@ class AssignmentExpression extends NodeBase {
|
|
|
13207
13214
|
if (this.left instanceof Identifier) {
|
|
13208
13215
|
const variable = this.scope.variables.get(this.left.name);
|
|
13209
13216
|
if (variable?.kind === 'const') {
|
|
13210
|
-
this.
|
|
13217
|
+
this.isConstReassignment = true;
|
|
13218
|
+
this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logConstVariableReassignError(), this.left.start);
|
|
13211
13219
|
}
|
|
13212
13220
|
}
|
|
13213
13221
|
this.left.setAssignedValue(this.right);
|
|
@@ -13360,6 +13368,33 @@ class AwaitExpression extends NodeBase {
|
|
|
13360
13368
|
}
|
|
13361
13369
|
const THEN_PATH = ['then'];
|
|
13362
13370
|
|
|
13371
|
+
function getRenderedLiteralValue(value) {
|
|
13372
|
+
if (value === undefined) {
|
|
13373
|
+
return 'void 0';
|
|
13374
|
+
}
|
|
13375
|
+
if (typeof value === 'boolean') {
|
|
13376
|
+
return String(value);
|
|
13377
|
+
}
|
|
13378
|
+
if (typeof value === 'string') {
|
|
13379
|
+
return JSON.stringify(value);
|
|
13380
|
+
}
|
|
13381
|
+
if (typeof value === 'number') {
|
|
13382
|
+
return getSimplifiedNumber(value);
|
|
13383
|
+
}
|
|
13384
|
+
return UnknownValue;
|
|
13385
|
+
}
|
|
13386
|
+
function getSimplifiedNumber(value) {
|
|
13387
|
+
if (Object.is(-0, value)) {
|
|
13388
|
+
return '-0';
|
|
13389
|
+
}
|
|
13390
|
+
const exp = value.toExponential();
|
|
13391
|
+
const [base, exponent] = exp.split('e');
|
|
13392
|
+
const floatLength = base.split('.')[1]?.length || 0;
|
|
13393
|
+
const finalizedExp = `${base.replace('.', '')}e${parseInt(exponent) - floatLength}`;
|
|
13394
|
+
const stringifiedValue = String(value).replace('+', '');
|
|
13395
|
+
return finalizedExp.length < stringifiedValue.length ? finalizedExp : stringifiedValue;
|
|
13396
|
+
}
|
|
13397
|
+
|
|
13363
13398
|
const binaryOperators = {
|
|
13364
13399
|
'!=': (left, right) => left != right,
|
|
13365
13400
|
'!==': (left, right) => left !== right,
|
|
@@ -13386,14 +13421,25 @@ const binaryOperators = {
|
|
|
13386
13421
|
// in: () => UnknownValue,
|
|
13387
13422
|
// instanceof: () => UnknownValue,
|
|
13388
13423
|
};
|
|
13424
|
+
const UNASSIGNED$1 = Symbol('Unassigned');
|
|
13389
13425
|
class BinaryExpression extends NodeBase {
|
|
13390
|
-
|
|
13426
|
+
constructor() {
|
|
13427
|
+
super(...arguments);
|
|
13428
|
+
this.renderedLiteralValue = UNASSIGNED$1;
|
|
13429
|
+
}
|
|
13430
|
+
deoptimizeCache() {
|
|
13431
|
+
this.renderedLiteralValue = UnknownValue;
|
|
13432
|
+
}
|
|
13391
13433
|
getLiteralValueAtPath(path, recursionTracker, origin) {
|
|
13392
13434
|
if (path.length > 0)
|
|
13393
13435
|
return UnknownValue;
|
|
13394
13436
|
const leftValue = this.left.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
|
|
13395
13437
|
if (typeof leftValue === 'symbol')
|
|
13396
13438
|
return UnknownValue;
|
|
13439
|
+
// Optimize `'export' in namespace`
|
|
13440
|
+
if (this.operator === 'in' && this.right.variable?.isNamespace) {
|
|
13441
|
+
return (this.right.variable.context.traceExport(String(leftValue))[0] != null);
|
|
13442
|
+
}
|
|
13397
13443
|
const rightValue = this.right.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
|
|
13398
13444
|
if (typeof rightValue === 'symbol')
|
|
13399
13445
|
return UnknownValue;
|
|
@@ -13402,6 +13448,14 @@ class BinaryExpression extends NodeBase {
|
|
|
13402
13448
|
return UnknownValue;
|
|
13403
13449
|
return operatorFunction(leftValue, rightValue);
|
|
13404
13450
|
}
|
|
13451
|
+
getRenderedLiteralValue() {
|
|
13452
|
+
// Only optimize `'export' in ns`
|
|
13453
|
+
if (this.operator !== 'in' || !this.right.variable?.isNamespace)
|
|
13454
|
+
return UnknownValue;
|
|
13455
|
+
if (this.renderedLiteralValue !== UNASSIGNED$1)
|
|
13456
|
+
return this.renderedLiteralValue;
|
|
13457
|
+
return (this.renderedLiteralValue = getRenderedLiteralValue(this.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this)));
|
|
13458
|
+
}
|
|
13405
13459
|
hasEffects(context) {
|
|
13406
13460
|
// support some implicit type coercion runtime errors
|
|
13407
13461
|
if (this.operator === '+' &&
|
|
@@ -13414,9 +13468,15 @@ class BinaryExpression extends NodeBase {
|
|
|
13414
13468
|
hasEffectsOnInteractionAtPath(path, { type }) {
|
|
13415
13469
|
return type !== INTERACTION_ACCESSED || path.length > 1;
|
|
13416
13470
|
}
|
|
13471
|
+
include(context, includeChildrenRecursively, _options) {
|
|
13472
|
+
this.included = true;
|
|
13473
|
+
if (typeof this.getRenderedLiteralValue() === 'symbol') {
|
|
13474
|
+
super.include(context, includeChildrenRecursively, _options);
|
|
13475
|
+
}
|
|
13476
|
+
}
|
|
13417
13477
|
includeNode(context) {
|
|
13418
13478
|
this.included = true;
|
|
13419
|
-
if (this.operator === 'in') {
|
|
13479
|
+
if (this.operator === 'in' && typeof this.getRenderedLiteralValue() === 'symbol') {
|
|
13420
13480
|
this.right.includePath(UNKNOWN_PATH, context);
|
|
13421
13481
|
}
|
|
13422
13482
|
}
|
|
@@ -13424,8 +13484,14 @@ class BinaryExpression extends NodeBase {
|
|
|
13424
13484
|
this.left.removeAnnotations(code);
|
|
13425
13485
|
}
|
|
13426
13486
|
render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
|
|
13427
|
-
this.
|
|
13428
|
-
|
|
13487
|
+
const renderedLiteralValue = this.getRenderedLiteralValue();
|
|
13488
|
+
if (typeof renderedLiteralValue !== 'symbol') {
|
|
13489
|
+
code.overwrite(this.start, this.end, renderedLiteralValue);
|
|
13490
|
+
}
|
|
13491
|
+
else {
|
|
13492
|
+
this.left.render(code, options, { renderedSurroundingElement });
|
|
13493
|
+
this.right.render(code, options);
|
|
13494
|
+
}
|
|
13429
13495
|
}
|
|
13430
13496
|
}
|
|
13431
13497
|
BinaryExpression.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
@@ -16765,33 +16831,6 @@ class UnaryExpression extends NodeBase {
|
|
|
16765
16831
|
}
|
|
16766
16832
|
}
|
|
16767
16833
|
const CHARACTERS_THAT_DO_NOT_REQUIRE_SPACE = /[\s([=%&*+-/<>^|,?:;]/;
|
|
16768
|
-
function getRenderedLiteralValue(value) {
|
|
16769
|
-
if (value === undefined) {
|
|
16770
|
-
// At the moment, the undefined only happens when the operator is void
|
|
16771
|
-
return 'void 0';
|
|
16772
|
-
}
|
|
16773
|
-
if (typeof value === 'boolean') {
|
|
16774
|
-
return String(value);
|
|
16775
|
-
}
|
|
16776
|
-
if (typeof value === 'string') {
|
|
16777
|
-
return JSON.stringify(value);
|
|
16778
|
-
}
|
|
16779
|
-
if (typeof value === 'number') {
|
|
16780
|
-
return getSimplifiedNumber(value);
|
|
16781
|
-
}
|
|
16782
|
-
return UnknownValue;
|
|
16783
|
-
}
|
|
16784
|
-
function getSimplifiedNumber(value) {
|
|
16785
|
-
if (Object.is(-0, value)) {
|
|
16786
|
-
return '-0';
|
|
16787
|
-
}
|
|
16788
|
-
const exp = value.toExponential();
|
|
16789
|
-
const [base, exponent] = exp.split('e');
|
|
16790
|
-
const floatLength = base.split('.')[1]?.length || 0;
|
|
16791
|
-
const finalizedExp = `${base.replace('.', '')}e${parseInt(exponent) - floatLength}`;
|
|
16792
|
-
const stringifiedValue = String(value).replace('+', '');
|
|
16793
|
-
return finalizedExp.length < stringifiedValue.length ? finalizedExp : stringifiedValue;
|
|
16794
|
-
}
|
|
16795
16834
|
UnaryExpression.prototype.includeNode = onlyIncludeSelf;
|
|
16796
16835
|
|
|
16797
16836
|
class UpdateExpression extends NodeBase {
|
|
@@ -18591,9 +18630,9 @@ class Module {
|
|
|
18591
18630
|
// export { foo } from './other'
|
|
18592
18631
|
const reexportDeclaration = this.reexportDescriptions.get(name);
|
|
18593
18632
|
if (reexportDeclaration) {
|
|
18594
|
-
const [variable] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
|
|
18633
|
+
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
|
|
18595
18634
|
if (!variable) {
|
|
18596
|
-
return this.error(parseAst_js.logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id), reexportDeclaration.start);
|
|
18635
|
+
return this.error(parseAst_js.logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id, !!options?.missingButExportExists), reexportDeclaration.start);
|
|
18597
18636
|
}
|
|
18598
18637
|
if (importerForSideEffects) {
|
|
18599
18638
|
setAlternativeExporterIfCyclic(variable, importerForSideEffects, this);
|
|
@@ -18613,6 +18652,9 @@ class Module {
|
|
|
18613
18652
|
importerForSideEffects,
|
|
18614
18653
|
searchedNamesAndModules
|
|
18615
18654
|
});
|
|
18655
|
+
if (!variable) {
|
|
18656
|
+
return [null, { missingButExportExists: true }];
|
|
18657
|
+
}
|
|
18616
18658
|
if (importerForSideEffects) {
|
|
18617
18659
|
setAlternativeExporterIfCyclic(variable, importerForSideEffects, this);
|
|
18618
18660
|
getOrCreate(importerForSideEffects.sideEffectDependenciesByVariable, variable, (getNewSet)).add(this);
|
|
@@ -18803,7 +18845,7 @@ class Module {
|
|
|
18803
18845
|
newlyIncludedVariableInits: this.graph.newlyIncludedVariableInits,
|
|
18804
18846
|
options: this.options,
|
|
18805
18847
|
requestTreeshakingPass: () => (this.graph.needsTreeshakingPass = true),
|
|
18806
|
-
traceExport: (name) => this.getVariableForExportName(name)
|
|
18848
|
+
traceExport: (name) => this.getVariableForExportName(name),
|
|
18807
18849
|
traceVariable: this.traceVariable.bind(this),
|
|
18808
18850
|
usesTopLevelAwait: false
|
|
18809
18851
|
};
|
|
@@ -18876,9 +18918,9 @@ class Module {
|
|
|
18876
18918
|
if (otherModule instanceof Module && importDescription.name === '*') {
|
|
18877
18919
|
return otherModule.namespace;
|
|
18878
18920
|
}
|
|
18879
|
-
const [declaration] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
|
|
18921
|
+
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
|
|
18880
18922
|
if (!declaration) {
|
|
18881
|
-
return this.error(parseAst_js.logMissingExport(importDescription.name, this.id, otherModule.id), importDescription.start);
|
|
18923
|
+
return this.error(parseAst_js.logMissingExport(importDescription.name, this.id, otherModule.id, !!options?.missingButExportExists), importDescription.start);
|
|
18882
18924
|
}
|
|
18883
18925
|
return declaration;
|
|
18884
18926
|
}
|
|
@@ -19096,11 +19138,11 @@ class Module {
|
|
|
19096
19138
|
if (module.info.syntheticNamedExports === name) {
|
|
19097
19139
|
continue;
|
|
19098
19140
|
}
|
|
19099
|
-
const [variable,
|
|
19141
|
+
const [variable, options] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true,
|
|
19100
19142
|
// We are creating a copy to handle the case where the same binding is
|
|
19101
19143
|
// imported through different namespace reexports gracefully
|
|
19102
19144
|
copyNameToModulesMap(searchedNamesAndModules));
|
|
19103
|
-
if (module instanceof ExternalModule || indirectExternal) {
|
|
19145
|
+
if (module instanceof ExternalModule || options?.indirectExternal) {
|
|
19104
19146
|
foundExternalDeclarations.add(variable);
|
|
19105
19147
|
}
|
|
19106
19148
|
else if (variable instanceof SyntheticNamedExportVariable) {
|
|
@@ -19128,7 +19170,7 @@ class Module {
|
|
|
19128
19170
|
if (foundDeclarationList.length > 1) {
|
|
19129
19171
|
this.options.onLog(parseAst_js.LOGLEVEL_WARN, parseAst_js.logAmbiguousExternalNamespaces(name, this.id, usedDeclaration.module.id, foundDeclarationList.map(declaration => declaration.module.id)));
|
|
19130
19172
|
}
|
|
19131
|
-
return [usedDeclaration, true];
|
|
19173
|
+
return [usedDeclaration, { indirectExternal: true }];
|
|
19132
19174
|
}
|
|
19133
19175
|
if (foundSyntheticDeclaration) {
|
|
19134
19176
|
return [foundSyntheticDeclaration];
|
|
@@ -22973,9 +23015,11 @@ class Graph {
|
|
|
22973
23015
|
warnForMissingExports() {
|
|
22974
23016
|
for (const module of this.modules) {
|
|
22975
23017
|
for (const importDescription of module.importDescriptions.values()) {
|
|
22976
|
-
if (importDescription.name !== '*'
|
|
22977
|
-
|
|
22978
|
-
|
|
23018
|
+
if (importDescription.name !== '*') {
|
|
23019
|
+
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name);
|
|
23020
|
+
if (!variable) {
|
|
23021
|
+
module.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);
|
|
23022
|
+
}
|
|
22979
23023
|
}
|
|
22980
23024
|
}
|
|
22981
23025
|
}
|
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.
|
|
3
|
+
"version": "4.46.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -9,40 +9,35 @@
|
|
|
9
9
|
"rollup": "dist/bin/rollup"
|
|
10
10
|
},
|
|
11
11
|
"napi": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"x86_64-unknown-freebsd",
|
|
37
|
-
"x86_64-unknown-linux-gnu",
|
|
38
|
-
"x86_64-unknown-linux-musl"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
12
|
+
"binaryName": "rollup",
|
|
13
|
+
"packageName": "@rollup/rollup",
|
|
14
|
+
"targets": [
|
|
15
|
+
"aarch64-apple-darwin",
|
|
16
|
+
"aarch64-linux-android",
|
|
17
|
+
"aarch64-pc-windows-msvc",
|
|
18
|
+
"aarch64-unknown-freebsd",
|
|
19
|
+
"aarch64-unknown-linux-gnu",
|
|
20
|
+
"aarch64-unknown-linux-musl",
|
|
21
|
+
"armv7-linux-androideabi",
|
|
22
|
+
"armv7-unknown-linux-gnueabihf",
|
|
23
|
+
"armv7-unknown-linux-musleabihf",
|
|
24
|
+
"i686-pc-windows-msvc",
|
|
25
|
+
"loongarch64-unknown-linux-gnu",
|
|
26
|
+
"riscv64gc-unknown-linux-gnu",
|
|
27
|
+
"riscv64gc-unknown-linux-musl",
|
|
28
|
+
"powerpc64le-unknown-linux-gnu",
|
|
29
|
+
"s390x-unknown-linux-gnu",
|
|
30
|
+
"x86_64-apple-darwin",
|
|
31
|
+
"x86_64-pc-windows-msvc",
|
|
32
|
+
"x86_64-unknown-freebsd",
|
|
33
|
+
"x86_64-unknown-linux-gnu",
|
|
34
|
+
"x86_64-unknown-linux-musl"
|
|
35
|
+
]
|
|
41
36
|
},
|
|
42
37
|
"scripts": {
|
|
43
38
|
"build": "concurrently -c green,blue \"npm run build:wasm\" \"npm:build:ast-converters\" && concurrently -c green,blue \"npm run build:napi -- --release\" \"npm:build:js\" && npm run build:copy-native",
|
|
44
39
|
"build:quick": "concurrently -c green,blue 'npm:build:napi' 'npm:build:cjs' && npm run build:copy-native",
|
|
45
|
-
"build:napi": "napi build --platform --dts native.d.ts --js
|
|
40
|
+
"build:napi": "napi build --platform --dts native.d.ts --no-js --output-dir . --manifest-path rust/bindings_napi/Cargo.toml",
|
|
46
41
|
"build:wasm": "cross-env RUSTFLAGS=\"-C opt-level=z\" wasm-pack build rust/bindings_wasm --out-dir ../../wasm --target web --no-pack && shx rm wasm/.gitignore",
|
|
47
42
|
"build:wasm:node": "wasm-pack build rust/bindings_wasm --out-dir ../../wasm-node --target nodejs --no-pack && shx rm wasm-node/.gitignore",
|
|
48
43
|
"update:napi": "npm run build:napi && npm run build:copy-native",
|
|
@@ -75,7 +70,7 @@
|
|
|
75
70
|
"prepare": "husky && node scripts/check-release.js || npm run build:prepare",
|
|
76
71
|
"prepublishOnly": "node scripts/check-release.js && node scripts/prepublish.js",
|
|
77
72
|
"postpublish": "node scripts/postpublish.js",
|
|
78
|
-
"prepublish:napi": "napi prepublish --
|
|
73
|
+
"prepublish:napi": "napi prepublish --no-gh-release",
|
|
79
74
|
"release": "node scripts/prepare-release.js",
|
|
80
75
|
"release:docs": "git fetch --update-head-ok origin master:master && git branch --force documentation-published master && git push origin documentation-published",
|
|
81
76
|
"test": "npm run build && npm run test:all",
|
|
@@ -109,26 +104,26 @@
|
|
|
109
104
|
"homepage": "https://rollupjs.org/",
|
|
110
105
|
"optionalDependencies": {
|
|
111
106
|
"fsevents": "~2.3.2",
|
|
112
|
-
"@rollup/rollup-darwin-arm64": "4.
|
|
113
|
-
"@rollup/rollup-android-arm64": "4.
|
|
114
|
-
"@rollup/rollup-win32-arm64-msvc": "4.
|
|
115
|
-
"@rollup/rollup-freebsd-arm64": "4.
|
|
116
|
-
"@rollup/rollup-linux-arm64-gnu": "4.
|
|
117
|
-
"@rollup/rollup-linux-arm64-musl": "4.
|
|
118
|
-
"@rollup/rollup-android-arm-eabi": "4.
|
|
119
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.
|
|
120
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.
|
|
121
|
-
"@rollup/rollup-win32-ia32-msvc": "4.
|
|
122
|
-
"@rollup/rollup-linux-loongarch64-gnu": "4.
|
|
123
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.
|
|
124
|
-
"@rollup/rollup-linux-riscv64-musl": "4.
|
|
125
|
-
"@rollup/rollup-linux-
|
|
126
|
-
"@rollup/rollup-linux-s390x-gnu": "4.
|
|
127
|
-
"@rollup/rollup-darwin-x64": "4.
|
|
128
|
-
"@rollup/rollup-win32-x64-msvc": "4.
|
|
129
|
-
"@rollup/rollup-freebsd-x64": "4.
|
|
130
|
-
"@rollup/rollup-linux-x64-gnu": "4.
|
|
131
|
-
"@rollup/rollup-linux-x64-musl": "4.
|
|
107
|
+
"@rollup/rollup-darwin-arm64": "4.46.0",
|
|
108
|
+
"@rollup/rollup-android-arm64": "4.46.0",
|
|
109
|
+
"@rollup/rollup-win32-arm64-msvc": "4.46.0",
|
|
110
|
+
"@rollup/rollup-freebsd-arm64": "4.46.0",
|
|
111
|
+
"@rollup/rollup-linux-arm64-gnu": "4.46.0",
|
|
112
|
+
"@rollup/rollup-linux-arm64-musl": "4.46.0",
|
|
113
|
+
"@rollup/rollup-android-arm-eabi": "4.46.0",
|
|
114
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.46.0",
|
|
115
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.46.0",
|
|
116
|
+
"@rollup/rollup-win32-ia32-msvc": "4.46.0",
|
|
117
|
+
"@rollup/rollup-linux-loongarch64-gnu": "4.46.0",
|
|
118
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.46.0",
|
|
119
|
+
"@rollup/rollup-linux-riscv64-musl": "4.46.0",
|
|
120
|
+
"@rollup/rollup-linux-ppc64-gnu": "4.46.0",
|
|
121
|
+
"@rollup/rollup-linux-s390x-gnu": "4.46.0",
|
|
122
|
+
"@rollup/rollup-darwin-x64": "4.46.0",
|
|
123
|
+
"@rollup/rollup-win32-x64-msvc": "4.46.0",
|
|
124
|
+
"@rollup/rollup-freebsd-x64": "4.46.0",
|
|
125
|
+
"@rollup/rollup-linux-x64-gnu": "4.46.0",
|
|
126
|
+
"@rollup/rollup-linux-x64-musl": "4.46.0"
|
|
132
127
|
},
|
|
133
128
|
"dependencies": {
|
|
134
129
|
"@types/estree": "1.0.8"
|
|
@@ -142,12 +137,12 @@
|
|
|
142
137
|
"@codemirror/language": "^6.11.2",
|
|
143
138
|
"@codemirror/search": "^6.5.11",
|
|
144
139
|
"@codemirror/state": "^6.5.2",
|
|
145
|
-
"@codemirror/view": "^6.38.
|
|
146
|
-
"@eslint/js": "^9.
|
|
147
|
-
"@inquirer/prompts": "^7.
|
|
148
|
-
"@jridgewell/sourcemap-codec": "^1.5.
|
|
140
|
+
"@codemirror/view": "^6.38.1",
|
|
141
|
+
"@eslint/js": "^9.31.0",
|
|
142
|
+
"@inquirer/prompts": "^7.7.1",
|
|
143
|
+
"@jridgewell/sourcemap-codec": "^1.5.4",
|
|
149
144
|
"@mermaid-js/mermaid-cli": "^11.6.0",
|
|
150
|
-
"@napi-rs/cli": "^
|
|
145
|
+
"@napi-rs/cli": "^3.0.1",
|
|
151
146
|
"@rollup/plugin-alias": "^5.1.1",
|
|
152
147
|
"@rollup/plugin-buble": "^1.0.3",
|
|
153
148
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
@@ -157,13 +152,13 @@
|
|
|
157
152
|
"@rollup/plugin-terser": "^0.4.4",
|
|
158
153
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
159
154
|
"@rollup/pluginutils": "^5.2.0",
|
|
160
|
-
"@shikijs/vitepress-twoslash": "^3.
|
|
155
|
+
"@shikijs/vitepress-twoslash": "^3.8.1",
|
|
161
156
|
"@types/mocha": "^10.0.10",
|
|
162
|
-
"@types/node": "^20.19.
|
|
163
|
-
"@types/picomatch": "^4.0.
|
|
157
|
+
"@types/node": "^20.19.9",
|
|
158
|
+
"@types/picomatch": "^4.0.1",
|
|
164
159
|
"@types/semver": "^7.7.0",
|
|
165
160
|
"@types/yargs-parser": "^21.0.3",
|
|
166
|
-
"@vue/language-server": "^
|
|
161
|
+
"@vue/language-server": "^3.0.3",
|
|
167
162
|
"acorn": "^8.15.0",
|
|
168
163
|
"acorn-import-assertions": "^1.9.0",
|
|
169
164
|
"acorn-jsx": "^5.3.2",
|
|
@@ -176,16 +171,16 @@
|
|
|
176
171
|
"date-time": "^4.0.0",
|
|
177
172
|
"es5-shim": "^4.6.7",
|
|
178
173
|
"es6-shim": "^0.35.8",
|
|
179
|
-
"eslint": "^9.
|
|
180
|
-
"eslint-config-prettier": "^10.1.
|
|
181
|
-
"eslint-plugin-prettier": "^5.5.
|
|
182
|
-
"eslint-plugin-unicorn": "^
|
|
183
|
-
"eslint-plugin-vue": "^10.
|
|
174
|
+
"eslint": "^9.31.0",
|
|
175
|
+
"eslint-config-prettier": "^10.1.8",
|
|
176
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
177
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
178
|
+
"eslint-plugin-vue": "^10.3.0",
|
|
184
179
|
"fixturify": "^3.0.0",
|
|
185
180
|
"flru": "^1.0.2",
|
|
186
181
|
"fs-extra": "^11.3.0",
|
|
187
182
|
"github-api": "^3.4.0",
|
|
188
|
-
"globals": "^16.
|
|
183
|
+
"globals": "^16.3.0",
|
|
189
184
|
"husky": "^9.1.7",
|
|
190
185
|
"is-reference": "^3.0.3",
|
|
191
186
|
"lint-staged": "^16.1.2",
|
|
@@ -196,14 +191,14 @@
|
|
|
196
191
|
"nodemon": "^3.1.10",
|
|
197
192
|
"nyc": "^17.1.0",
|
|
198
193
|
"picocolors": "^1.1.1",
|
|
199
|
-
"picomatch": "^4.0.
|
|
194
|
+
"picomatch": "^4.0.3",
|
|
200
195
|
"pinia": "^3.0.3",
|
|
201
196
|
"prettier": "^3.6.2",
|
|
202
|
-
"prettier-plugin-organize-imports": "^4.
|
|
197
|
+
"prettier-plugin-organize-imports": "^4.2.0",
|
|
203
198
|
"pretty-bytes": "^7.0.0",
|
|
204
199
|
"pretty-ms": "^9.2.0",
|
|
205
200
|
"requirejs": "^2.3.7",
|
|
206
|
-
"rollup": "^4.
|
|
201
|
+
"rollup": "^4.45.1",
|
|
207
202
|
"rollup-plugin-license": "^3.6.0",
|
|
208
203
|
"rollup-plugin-string": "^3.0.0",
|
|
209
204
|
"semver": "^7.7.2",
|
|
@@ -215,12 +210,12 @@
|
|
|
215
210
|
"terser": "^5.43.1",
|
|
216
211
|
"tslib": "^2.8.1",
|
|
217
212
|
"typescript": "^5.8.3",
|
|
218
|
-
"typescript-eslint": "^8.
|
|
219
|
-
"vite": "^7.0.
|
|
213
|
+
"typescript-eslint": "^8.38.0",
|
|
214
|
+
"vite": "^7.0.5",
|
|
220
215
|
"vitepress": "^1.6.3",
|
|
221
|
-
"vue": "^3.5.
|
|
216
|
+
"vue": "^3.5.18",
|
|
222
217
|
"vue-eslint-parser": "^10.2.0",
|
|
223
|
-
"vue-tsc": "^2.2.
|
|
218
|
+
"vue-tsc": "^2.2.12",
|
|
224
219
|
"wasm-pack": "^0.13.1",
|
|
225
220
|
"yargs-parser": "^21.1.1"
|
|
226
221
|
},
|