rollup 4.40.0 → 4.40.2
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 +107 -56
- 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.js +31 -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 +77 -55
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +42 -41
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.40.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.40.2
|
|
5
|
+
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
|
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,13 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.40.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.40.2
|
|
4
|
+
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
-
import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, ExpressionStatement as ExpressionStatement$1, logMissingExport, normalize, getImportPath, logMissingNodeBuiltins, logReservedNamespace, error, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, ArrowFunctionExpression as ArrowFunctionExpression$1, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption,
|
|
10
|
+
import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, ExpressionStatement as ExpressionStatement$1, logMissingExport, normalize, getImportPath, logMissingNodeBuiltins, logReservedNamespace, error, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, ArrowFunctionExpression as ArrowFunctionExpression$1, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logCannotAssignModuleToChunk, logAnonymousPluginCache, logDuplicatePluginName, logUnknownOption, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, warnDeprecation, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_GENERATEDCODE, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_MANUALCHUNKS, logInvalidExportOptionValue, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_INTEROP, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
|
|
11
11
|
import { relative, dirname, basename, extname, resolve as resolve$1 } from 'node:path';
|
|
12
12
|
import { posix, isAbsolute, resolve, win32 } from 'path';
|
|
13
13
|
import { parseAsync, xxhashBase16, xxhashBase64Url, xxhashBase36 } from '../../native.js';
|
|
@@ -15,7 +15,7 @@ import process$1, { env } from 'node:process';
|
|
|
15
15
|
import { performance } from 'node:perf_hooks';
|
|
16
16
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
17
17
|
|
|
18
|
-
var version = "4.40.
|
|
18
|
+
var version = "4.40.2";
|
|
19
19
|
|
|
20
20
|
const comma = ','.charCodeAt(0);
|
|
21
21
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -2192,8 +2192,7 @@ function createInclusionContext() {
|
|
|
2192
2192
|
hasBreak: false,
|
|
2193
2193
|
hasContinue: false,
|
|
2194
2194
|
includedCallArguments: new Set(),
|
|
2195
|
-
includedLabels: new Set()
|
|
2196
|
-
withinTopLevelAwait: false
|
|
2195
|
+
includedLabels: new Set()
|
|
2197
2196
|
};
|
|
2198
2197
|
}
|
|
2199
2198
|
function createHasEffectsContext() {
|
|
@@ -8424,7 +8423,7 @@ function amd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
|
|
|
8424
8423
|
const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
|
|
8425
8424
|
const parameters = dependencies.map(m => m.name);
|
|
8426
8425
|
const { n, getNonArrowFunctionIntro, _ } = snippets;
|
|
8427
|
-
if (
|
|
8426
|
+
if (hasExports && (namedExportsMode || exports[0]?.local === 'exports.default')) {
|
|
8428
8427
|
parameters.unshift(`exports`);
|
|
8429
8428
|
deps.unshift(`'exports'`);
|
|
8430
8429
|
}
|
|
@@ -8683,7 +8682,7 @@ function iife(magicString, { accessedGlobals, dependencies, exports, hasDefaultE
|
|
|
8683
8682
|
if (hasExports && !name) {
|
|
8684
8683
|
log(LOGLEVEL_WARN, logMissingNameOptionForIifeExport());
|
|
8685
8684
|
}
|
|
8686
|
-
if (
|
|
8685
|
+
if (hasExports && (namedExportsMode || exports[0]?.local === 'exports.default')) {
|
|
8687
8686
|
if (extend) {
|
|
8688
8687
|
deps.unshift(`this${keypath(name, getPropertyAccess)}${_}=${_}this${keypath(name, getPropertyAccess)}${_}||${_}{}`);
|
|
8689
8688
|
parameters.unshift('exports');
|
|
@@ -8902,7 +8901,8 @@ function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
|
|
|
8902
8901
|
const trimmedImports = trimEmptyImports(dependencies);
|
|
8903
8902
|
const globalDeps = trimmedImports.map(module => globalProperty(module.globalName, globalVariable, getPropertyAccess));
|
|
8904
8903
|
const factoryParameters = trimmedImports.map(m => m.name);
|
|
8905
|
-
if (
|
|
8904
|
+
if ((hasExports || noConflict) &&
|
|
8905
|
+
(namedExportsMode || (hasExports && exports[0]?.local === 'exports.default'))) {
|
|
8906
8906
|
amdDeps.unshift(`'exports'`);
|
|
8907
8907
|
cjsDeps.unshift(`exports`);
|
|
8908
8908
|
globalDeps.unshift(assignToDeepVariable(name, globalVariable, globals, `${extend ? `${globalProperty(name, globalVariable, getPropertyAccess)}${_}||${_}` : ''}{}`, snippets, log));
|
|
@@ -11658,44 +11658,38 @@ class AssignmentPattern extends NodeBase {
|
|
|
11658
11658
|
}
|
|
11659
11659
|
|
|
11660
11660
|
class AwaitExpression extends NodeBase {
|
|
11661
|
-
get isTopLevelAwait() {
|
|
11662
|
-
return isFlagSet(this.flags, 134217728 /* Flag.isTopLevelAwait */);
|
|
11663
|
-
}
|
|
11664
|
-
set isTopLevelAwait(value) {
|
|
11665
|
-
this.flags = setFlag(this.flags, 134217728 /* Flag.isTopLevelAwait */, value);
|
|
11666
|
-
}
|
|
11667
11661
|
hasEffects() {
|
|
11668
11662
|
if (!this.deoptimized)
|
|
11669
11663
|
this.applyDeoptimizations();
|
|
11670
11664
|
return true;
|
|
11671
11665
|
}
|
|
11666
|
+
initialise() {
|
|
11667
|
+
super.initialise();
|
|
11668
|
+
let parent = this.parent;
|
|
11669
|
+
do {
|
|
11670
|
+
if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
|
|
11671
|
+
return;
|
|
11672
|
+
} while ((parent = parent.parent));
|
|
11673
|
+
this.scope.context.usesTopLevelAwait = true;
|
|
11674
|
+
}
|
|
11672
11675
|
include(context, includeChildrenRecursively) {
|
|
11673
11676
|
if (!this.included)
|
|
11674
11677
|
this.includeNode(context);
|
|
11675
|
-
this.argument.include(
|
|
11678
|
+
this.argument.include(context, includeChildrenRecursively);
|
|
11676
11679
|
}
|
|
11677
11680
|
includeNode(context) {
|
|
11678
11681
|
this.included = true;
|
|
11679
11682
|
if (!this.deoptimized)
|
|
11680
11683
|
this.applyDeoptimizations();
|
|
11681
|
-
checkTopLevelAwait: {
|
|
11682
|
-
let parent = this.parent;
|
|
11683
|
-
do {
|
|
11684
|
-
if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
|
|
11685
|
-
break checkTopLevelAwait;
|
|
11686
|
-
} while ((parent = parent.parent));
|
|
11687
|
-
this.scope.context.usesTopLevelAwait = true;
|
|
11688
|
-
this.isTopLevelAwait = true;
|
|
11689
|
-
}
|
|
11690
11684
|
// Thenables need to be included
|
|
11691
|
-
this.argument.includePath(THEN_PATH,
|
|
11685
|
+
this.argument.includePath(THEN_PATH, context);
|
|
11692
11686
|
}
|
|
11693
11687
|
includePath(path, context) {
|
|
11694
11688
|
if (!this.deoptimized)
|
|
11695
11689
|
this.applyDeoptimizations();
|
|
11696
11690
|
if (!this.included)
|
|
11697
11691
|
this.includeNode(context);
|
|
11698
|
-
this.argument.includePath(path,
|
|
11692
|
+
this.argument.includePath(path, context);
|
|
11699
11693
|
}
|
|
11700
11694
|
}
|
|
11701
11695
|
const THEN_PATH = ['then'];
|
|
@@ -11920,10 +11914,10 @@ class CallExpressionBase extends NodeBase {
|
|
|
11920
11914
|
|
|
11921
11915
|
class CallExpression extends CallExpressionBase {
|
|
11922
11916
|
get hasCheckedForWarnings() {
|
|
11923
|
-
return isFlagSet(this.flags,
|
|
11917
|
+
return isFlagSet(this.flags, 268435456 /* Flag.checkedForWarnings */);
|
|
11924
11918
|
}
|
|
11925
11919
|
set hasCheckedForWarnings(value) {
|
|
11926
|
-
this.flags = setFlag(this.flags,
|
|
11920
|
+
this.flags = setFlag(this.flags, 268435456 /* Flag.checkedForWarnings */, value);
|
|
11927
11921
|
}
|
|
11928
11922
|
get optional() {
|
|
11929
11923
|
return isFlagSet(this.flags, 128 /* Flag.optional */);
|
|
@@ -12929,10 +12923,10 @@ class ImportExpression extends NodeBase {
|
|
|
12929
12923
|
this.resolutionString = null;
|
|
12930
12924
|
}
|
|
12931
12925
|
get withinTopLevelAwait() {
|
|
12932
|
-
return isFlagSet(this.flags,
|
|
12926
|
+
return isFlagSet(this.flags, 134217728 /* Flag.withinTopLevelAwait */);
|
|
12933
12927
|
}
|
|
12934
12928
|
set withinTopLevelAwait(value) {
|
|
12935
|
-
this.flags = setFlag(this.flags,
|
|
12929
|
+
this.flags = setFlag(this.flags, 134217728 /* Flag.withinTopLevelAwait */, value);
|
|
12936
12930
|
}
|
|
12937
12931
|
// Do not bind attributes
|
|
12938
12932
|
bind() {
|
|
@@ -13039,18 +13033,17 @@ class ImportExpression extends NodeBase {
|
|
|
13039
13033
|
}
|
|
13040
13034
|
include(context, includeChildrenRecursively) {
|
|
13041
13035
|
if (!this.included)
|
|
13042
|
-
this.includeNode(
|
|
13036
|
+
this.includeNode();
|
|
13043
13037
|
this.source.include(context, includeChildrenRecursively);
|
|
13044
13038
|
}
|
|
13045
|
-
includeNode(
|
|
13039
|
+
includeNode() {
|
|
13046
13040
|
this.included = true;
|
|
13047
|
-
this.withinTopLevelAwait = context.withinTopLevelAwait;
|
|
13048
13041
|
this.scope.context.includeDynamicImport(this);
|
|
13049
13042
|
this.scope.addAccessedDynamicImport(this);
|
|
13050
13043
|
}
|
|
13051
|
-
includePath(path
|
|
13044
|
+
includePath(path) {
|
|
13052
13045
|
if (!this.included)
|
|
13053
|
-
this.includeNode(
|
|
13046
|
+
this.includeNode();
|
|
13054
13047
|
// Technically, this is not correct as dynamic imports return a Promise.
|
|
13055
13048
|
if (this.hasUnknownAccessedKey)
|
|
13056
13049
|
return;
|
|
@@ -13066,6 +13059,22 @@ class ImportExpression extends NodeBase {
|
|
|
13066
13059
|
initialise() {
|
|
13067
13060
|
super.initialise();
|
|
13068
13061
|
this.scope.context.addDynamicImport(this);
|
|
13062
|
+
let parent = this.parent;
|
|
13063
|
+
let withinAwaitExpression = false;
|
|
13064
|
+
let withinTopLevelAwait = false;
|
|
13065
|
+
do {
|
|
13066
|
+
if (withinAwaitExpression &&
|
|
13067
|
+
(parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)) {
|
|
13068
|
+
withinTopLevelAwait = false;
|
|
13069
|
+
}
|
|
13070
|
+
if (parent instanceof AwaitExpression) {
|
|
13071
|
+
withinAwaitExpression = true;
|
|
13072
|
+
withinTopLevelAwait = true;
|
|
13073
|
+
}
|
|
13074
|
+
} while ((parent = parent.parent));
|
|
13075
|
+
if (withinAwaitExpression && withinTopLevelAwait) {
|
|
13076
|
+
this.withinTopLevelAwait = true;
|
|
13077
|
+
}
|
|
13069
13078
|
}
|
|
13070
13079
|
parseNode(esTreeNode) {
|
|
13071
13080
|
this.sourceAstNode = esTreeNode.source;
|
|
@@ -14696,10 +14705,10 @@ SwitchStatement.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
|
14696
14705
|
|
|
14697
14706
|
class TaggedTemplateExpression extends CallExpressionBase {
|
|
14698
14707
|
get hasCheckedForWarnings() {
|
|
14699
|
-
return isFlagSet(this.flags,
|
|
14708
|
+
return isFlagSet(this.flags, 268435456 /* Flag.checkedForWarnings */);
|
|
14700
14709
|
}
|
|
14701
14710
|
set hasCheckedForWarnings(value) {
|
|
14702
|
-
this.flags = setFlag(this.flags,
|
|
14711
|
+
this.flags = setFlag(this.flags, 268435456 /* Flag.checkedForWarnings */, value);
|
|
14703
14712
|
}
|
|
14704
14713
|
bind() {
|
|
14705
14714
|
super.bind();
|
|
@@ -18136,7 +18145,9 @@ class Chunk {
|
|
|
18136
18145
|
for (const module of entryModules) {
|
|
18137
18146
|
if (module.preserveSignature === 'allow-extension') {
|
|
18138
18147
|
const canPreserveExports = this.canPreserveModuleExports(module);
|
|
18139
|
-
if (canPreserveExports
|
|
18148
|
+
if (canPreserveExports &&
|
|
18149
|
+
!module.chunkFileNames.size &&
|
|
18150
|
+
module.chunkNames.every(({ isUserDefined }) => !isUserDefined)) {
|
|
18140
18151
|
this.allowExtensionModules.add(module);
|
|
18141
18152
|
if (!this.facadeModule) {
|
|
18142
18153
|
this.facadeModule = module;
|
|
@@ -19244,12 +19255,12 @@ function analyzeModuleGraph(entries) {
|
|
|
19244
19255
|
const awaitedDynamicImportsForCurrentEntry = new Set();
|
|
19245
19256
|
dynamicImportModulesByEntry[entryIndex] = dynamicImportsForCurrentEntry;
|
|
19246
19257
|
awaitedDynamicImportModulesByEntry[entryIndex] = awaitedDynamicImportsForCurrentEntry;
|
|
19247
|
-
const
|
|
19248
|
-
for (const module of
|
|
19258
|
+
const staticDependencies = new Set([currentEntry]);
|
|
19259
|
+
for (const module of staticDependencies) {
|
|
19249
19260
|
getOrCreate(dependentEntriesByModule, module, (getNewSet)).add(entryIndex);
|
|
19250
19261
|
for (const dependency of module.getDependenciesToBeIncluded()) {
|
|
19251
19262
|
if (!(dependency instanceof ExternalModule)) {
|
|
19252
|
-
|
|
19263
|
+
staticDependencies.add(dependency);
|
|
19253
19264
|
}
|
|
19254
19265
|
}
|
|
19255
19266
|
for (const { resolution } of module.dynamicImports) {
|
|
@@ -19259,9 +19270,12 @@ function analyzeModuleGraph(entries) {
|
|
|
19259
19270
|
dynamicEntryModules.add(resolution);
|
|
19260
19271
|
allEntriesSet.add(resolution);
|
|
19261
19272
|
dynamicImportsForCurrentEntry.add(resolution);
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
|
|
19273
|
+
for (const includedDirectTopLevelAwaitingDynamicImporter of resolution.includedDirectTopLevelAwaitingDynamicImporters) {
|
|
19274
|
+
if (staticDependencies.has(includedDirectTopLevelAwaitingDynamicImporter)) {
|
|
19275
|
+
awaitedDynamicEntryModules.add(resolution);
|
|
19276
|
+
awaitedDynamicImportsForCurrentEntry.add(resolution);
|
|
19277
|
+
break;
|
|
19278
|
+
}
|
|
19265
19279
|
}
|
|
19266
19280
|
}
|
|
19267
19281
|
}
|
|
@@ -19765,24 +19779,32 @@ function analyseModuleExecution(entryModules) {
|
|
|
19765
19779
|
const dynamicImports = new Set();
|
|
19766
19780
|
const parents = new Map();
|
|
19767
19781
|
const orderedModules = [];
|
|
19782
|
+
const handleSyncLoadedModule = (module, parent) => {
|
|
19783
|
+
if (parents.has(module)) {
|
|
19784
|
+
if (!analysedModules.has(module)) {
|
|
19785
|
+
cyclePaths.push(getCyclePath(module, parent, parents));
|
|
19786
|
+
}
|
|
19787
|
+
return;
|
|
19788
|
+
}
|
|
19789
|
+
parents.set(module, parent);
|
|
19790
|
+
analyseModule(module);
|
|
19791
|
+
};
|
|
19768
19792
|
const analyseModule = (module) => {
|
|
19769
19793
|
if (module instanceof Module) {
|
|
19770
19794
|
for (const dependency of module.dependencies) {
|
|
19771
|
-
|
|
19772
|
-
if (!analysedModules.has(dependency)) {
|
|
19773
|
-
cyclePaths.push(getCyclePath(dependency, module, parents));
|
|
19774
|
-
}
|
|
19775
|
-
continue;
|
|
19776
|
-
}
|
|
19777
|
-
parents.set(dependency, module);
|
|
19778
|
-
analyseModule(dependency);
|
|
19795
|
+
handleSyncLoadedModule(dependency, module);
|
|
19779
19796
|
}
|
|
19780
19797
|
for (const dependency of module.implicitlyLoadedBefore) {
|
|
19781
19798
|
dynamicImports.add(dependency);
|
|
19782
19799
|
}
|
|
19783
|
-
for (const { resolution } of module.dynamicImports) {
|
|
19800
|
+
for (const { resolution, node } of module.dynamicImports) {
|
|
19784
19801
|
if (resolution instanceof Module) {
|
|
19785
|
-
|
|
19802
|
+
if (node.withinTopLevelAwait) {
|
|
19803
|
+
handleSyncLoadedModule(resolution, module);
|
|
19804
|
+
}
|
|
19805
|
+
else {
|
|
19806
|
+
dynamicImports.add(resolution);
|
|
19807
|
+
}
|
|
19786
19808
|
}
|
|
19787
19809
|
}
|
|
19788
19810
|
orderedModules.push(module);
|
|
@@ -21441,7 +21463,7 @@ function generateAssetFileName(name, names, source, originalFileName, originalFi
|
|
|
21441
21463
|
: outputOptions.assetFileNames, 'output.assetFileNames', {
|
|
21442
21464
|
ext: () => extname(emittedName).slice(1),
|
|
21443
21465
|
extname: () => extname(emittedName),
|
|
21444
|
-
hash: size => sourceHash.slice(0, Math.max(0, size || DEFAULT_HASH_SIZE)),
|
|
21466
|
+
hash: size => sourceHash.slice(0, Math.min(Math.max(0, size || DEFAULT_HASH_SIZE), MAX_HASH_SIZE)),
|
|
21445
21467
|
name: () => emittedName.slice(0, Math.max(0, emittedName.length - extname(emittedName).length))
|
|
21446
21468
|
}), bundle);
|
|
21447
21469
|
}
|
|
@@ -23630,12 +23652,41 @@ function watch(configs) {
|
|
|
23630
23652
|
});
|
|
23631
23653
|
return emitter;
|
|
23632
23654
|
}
|
|
23655
|
+
function withTrailingSlash(path) {
|
|
23656
|
+
if (path[path.length - 1] !== '/') {
|
|
23657
|
+
return `${path}/`;
|
|
23658
|
+
}
|
|
23659
|
+
return path;
|
|
23660
|
+
}
|
|
23661
|
+
function checkWatchConfig(config) {
|
|
23662
|
+
for (const item of config) {
|
|
23663
|
+
if (item.input && item.output) {
|
|
23664
|
+
const input = typeof item.input === 'string' ? ensureArray(item.input) : item.input;
|
|
23665
|
+
const output = ensureArray(item.output);
|
|
23666
|
+
for (const index in input) {
|
|
23667
|
+
const inputPath = input[index];
|
|
23668
|
+
const subPath = output.find(o => {
|
|
23669
|
+
if (!o.dir || typeof inputPath !== 'string') {
|
|
23670
|
+
return false;
|
|
23671
|
+
}
|
|
23672
|
+
const _outPath = withTrailingSlash(o.dir);
|
|
23673
|
+
const _inputPath = withTrailingSlash(inputPath);
|
|
23674
|
+
return _inputPath.startsWith(_outPath);
|
|
23675
|
+
});
|
|
23676
|
+
if (subPath) {
|
|
23677
|
+
error(logInvalidOption('watch', URL_WATCH, `the input "${inputPath}" is a subpath of the output "${subPath.dir}"`));
|
|
23678
|
+
}
|
|
23679
|
+
}
|
|
23680
|
+
}
|
|
23681
|
+
}
|
|
23682
|
+
}
|
|
23633
23683
|
async function watchInternal(configs, emitter) {
|
|
23634
23684
|
const optionsList = await Promise.all(ensureArray(configs).map(config => mergeOptions(config, true)));
|
|
23635
23685
|
const watchOptionsList = optionsList.filter(config => config.watch !== false);
|
|
23636
23686
|
if (watchOptionsList.length === 0) {
|
|
23637
23687
|
return error(logInvalidOption('watch', URL_WATCH, 'there must be at least one config where "watch" is not set to "false"'));
|
|
23638
23688
|
}
|
|
23689
|
+
checkWatchConfig(watchOptionsList);
|
|
23639
23690
|
await loadFsEvents();
|
|
23640
23691
|
const { Watcher } = await import('./watch.js');
|
|
23641
23692
|
new Watcher(watchOptionsList, emitter);
|
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.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.40.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.40.2
|
|
4
|
+
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -81,12 +81,41 @@ function watch(configs) {
|
|
|
81
81
|
});
|
|
82
82
|
return emitter;
|
|
83
83
|
}
|
|
84
|
+
function withTrailingSlash(path) {
|
|
85
|
+
if (path[path.length - 1] !== '/') {
|
|
86
|
+
return `${path}/`;
|
|
87
|
+
}
|
|
88
|
+
return path;
|
|
89
|
+
}
|
|
90
|
+
function checkWatchConfig(config) {
|
|
91
|
+
for (const item of config) {
|
|
92
|
+
if (item.input && item.output) {
|
|
93
|
+
const input = typeof item.input === 'string' ? rollup.ensureArray(item.input) : item.input;
|
|
94
|
+
const output = rollup.ensureArray(item.output);
|
|
95
|
+
for (const index in input) {
|
|
96
|
+
const inputPath = input[index];
|
|
97
|
+
const subPath = output.find(o => {
|
|
98
|
+
if (!o.dir || typeof inputPath !== 'string') {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
const _outPath = withTrailingSlash(o.dir);
|
|
102
|
+
const _inputPath = withTrailingSlash(inputPath);
|
|
103
|
+
return _inputPath.startsWith(_outPath);
|
|
104
|
+
});
|
|
105
|
+
if (subPath) {
|
|
106
|
+
parseAst_js.error(parseAst_js.logInvalidOption('watch', parseAst_js.URL_WATCH, `the input "${inputPath}" is a subpath of the output "${subPath.dir}"`));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
84
112
|
async function watchInternal(configs, emitter) {
|
|
85
113
|
const optionsList = await Promise.all(rollup.ensureArray(configs).map(config => rollup.mergeOptions(config, true)));
|
|
86
114
|
const watchOptionsList = optionsList.filter(config => config.watch !== false);
|
|
87
115
|
if (watchOptionsList.length === 0) {
|
|
88
116
|
return parseAst_js.error(parseAst_js.logInvalidOption('watch', parseAst_js.URL_WATCH, 'there must be at least one config where "watch" is not set to "false"'));
|
|
89
117
|
}
|
|
118
|
+
checkWatchConfig(watchOptionsList);
|
|
90
119
|
await fseventsImporter.loadFsEvents();
|
|
91
120
|
const { Watcher } = await Promise.resolve().then(() => require('./shared/watch.js'));
|
|
92
121
|
new Watcher(watchOptionsList, emitter);
|
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.40.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.40.2
|
|
4
|
+
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ const native_js = require('../native.js');
|
|
|
17
17
|
const node_perf_hooks = require('node:perf_hooks');
|
|
18
18
|
const promises = require('node:fs/promises');
|
|
19
19
|
|
|
20
|
-
var version = "4.40.
|
|
20
|
+
var version = "4.40.2";
|
|
21
21
|
|
|
22
22
|
function ensureArray$1(items) {
|
|
23
23
|
if (Array.isArray(items)) {
|
|
@@ -215,7 +215,7 @@ function generateAssetFileName(name, names, source, originalFileName, originalFi
|
|
|
215
215
|
: outputOptions.assetFileNames, 'output.assetFileNames', {
|
|
216
216
|
ext: () => path.extname(emittedName).slice(1),
|
|
217
217
|
extname: () => path.extname(emittedName),
|
|
218
|
-
hash: size => sourceHash.slice(0, Math.max(0, size || DEFAULT_HASH_SIZE)),
|
|
218
|
+
hash: size => sourceHash.slice(0, Math.min(Math.max(0, size || DEFAULT_HASH_SIZE), MAX_HASH_SIZE)),
|
|
219
219
|
name: () => emittedName.slice(0, Math.max(0, emittedName.length - path.extname(emittedName).length))
|
|
220
220
|
}), bundle);
|
|
221
221
|
}
|
|
@@ -5962,8 +5962,7 @@ function createInclusionContext() {
|
|
|
5962
5962
|
hasBreak: false,
|
|
5963
5963
|
hasContinue: false,
|
|
5964
5964
|
includedCallArguments: new Set(),
|
|
5965
|
-
includedLabels: new Set()
|
|
5966
|
-
withinTopLevelAwait: false
|
|
5965
|
+
includedLabels: new Set()
|
|
5967
5966
|
};
|
|
5968
5967
|
}
|
|
5969
5968
|
function createHasEffectsContext() {
|
|
@@ -12180,7 +12179,7 @@ function amd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
|
|
|
12180
12179
|
const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
|
|
12181
12180
|
const parameters = dependencies.map(m => m.name);
|
|
12182
12181
|
const { n, getNonArrowFunctionIntro, _ } = snippets;
|
|
12183
|
-
if (
|
|
12182
|
+
if (hasExports && (namedExportsMode || exports[0]?.local === 'exports.default')) {
|
|
12184
12183
|
parameters.unshift(`exports`);
|
|
12185
12184
|
deps.unshift(`'exports'`);
|
|
12186
12185
|
}
|
|
@@ -12439,7 +12438,7 @@ function iife(magicString, { accessedGlobals, dependencies, exports, hasDefaultE
|
|
|
12439
12438
|
if (hasExports && !name) {
|
|
12440
12439
|
log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingNameOptionForIifeExport());
|
|
12441
12440
|
}
|
|
12442
|
-
if (
|
|
12441
|
+
if (hasExports && (namedExportsMode || exports[0]?.local === 'exports.default')) {
|
|
12443
12442
|
if (extend) {
|
|
12444
12443
|
deps.unshift(`this${keypath(name, getPropertyAccess)}${_}=${_}this${keypath(name, getPropertyAccess)}${_}||${_}{}`);
|
|
12445
12444
|
parameters.unshift('exports');
|
|
@@ -12658,7 +12657,8 @@ function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
|
|
|
12658
12657
|
const trimmedImports = trimEmptyImports(dependencies);
|
|
12659
12658
|
const globalDeps = trimmedImports.map(module => globalProperty(module.globalName, globalVariable, getPropertyAccess));
|
|
12660
12659
|
const factoryParameters = trimmedImports.map(m => m.name);
|
|
12661
|
-
if (
|
|
12660
|
+
if ((hasExports || noConflict) &&
|
|
12661
|
+
(namedExportsMode || (hasExports && exports[0]?.local === 'exports.default'))) {
|
|
12662
12662
|
amdDeps.unshift(`'exports'`);
|
|
12663
12663
|
cjsDeps.unshift(`exports`);
|
|
12664
12664
|
globalDeps.unshift(assignToDeepVariable(name, globalVariable, globals, `${extend ? `${globalProperty(name, globalVariable, getPropertyAccess)}${_}||${_}` : ''}{}`, snippets, log));
|
|
@@ -13252,44 +13252,38 @@ class AssignmentPattern extends NodeBase {
|
|
|
13252
13252
|
}
|
|
13253
13253
|
|
|
13254
13254
|
class AwaitExpression extends NodeBase {
|
|
13255
|
-
get isTopLevelAwait() {
|
|
13256
|
-
return isFlagSet(this.flags, 134217728 /* Flag.isTopLevelAwait */);
|
|
13257
|
-
}
|
|
13258
|
-
set isTopLevelAwait(value) {
|
|
13259
|
-
this.flags = setFlag(this.flags, 134217728 /* Flag.isTopLevelAwait */, value);
|
|
13260
|
-
}
|
|
13261
13255
|
hasEffects() {
|
|
13262
13256
|
if (!this.deoptimized)
|
|
13263
13257
|
this.applyDeoptimizations();
|
|
13264
13258
|
return true;
|
|
13265
13259
|
}
|
|
13260
|
+
initialise() {
|
|
13261
|
+
super.initialise();
|
|
13262
|
+
let parent = this.parent;
|
|
13263
|
+
do {
|
|
13264
|
+
if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
|
|
13265
|
+
return;
|
|
13266
|
+
} while ((parent = parent.parent));
|
|
13267
|
+
this.scope.context.usesTopLevelAwait = true;
|
|
13268
|
+
}
|
|
13266
13269
|
include(context, includeChildrenRecursively) {
|
|
13267
13270
|
if (!this.included)
|
|
13268
13271
|
this.includeNode(context);
|
|
13269
|
-
this.argument.include(
|
|
13272
|
+
this.argument.include(context, includeChildrenRecursively);
|
|
13270
13273
|
}
|
|
13271
13274
|
includeNode(context) {
|
|
13272
13275
|
this.included = true;
|
|
13273
13276
|
if (!this.deoptimized)
|
|
13274
13277
|
this.applyDeoptimizations();
|
|
13275
|
-
checkTopLevelAwait: {
|
|
13276
|
-
let parent = this.parent;
|
|
13277
|
-
do {
|
|
13278
|
-
if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
|
|
13279
|
-
break checkTopLevelAwait;
|
|
13280
|
-
} while ((parent = parent.parent));
|
|
13281
|
-
this.scope.context.usesTopLevelAwait = true;
|
|
13282
|
-
this.isTopLevelAwait = true;
|
|
13283
|
-
}
|
|
13284
13278
|
// Thenables need to be included
|
|
13285
|
-
this.argument.includePath(THEN_PATH,
|
|
13279
|
+
this.argument.includePath(THEN_PATH, context);
|
|
13286
13280
|
}
|
|
13287
13281
|
includePath(path, context) {
|
|
13288
13282
|
if (!this.deoptimized)
|
|
13289
13283
|
this.applyDeoptimizations();
|
|
13290
13284
|
if (!this.included)
|
|
13291
13285
|
this.includeNode(context);
|
|
13292
|
-
this.argument.includePath(path,
|
|
13286
|
+
this.argument.includePath(path, context);
|
|
13293
13287
|
}
|
|
13294
13288
|
}
|
|
13295
13289
|
const THEN_PATH = ['then'];
|
|
@@ -13514,10 +13508,10 @@ class CallExpressionBase extends NodeBase {
|
|
|
13514
13508
|
|
|
13515
13509
|
class CallExpression extends CallExpressionBase {
|
|
13516
13510
|
get hasCheckedForWarnings() {
|
|
13517
|
-
return isFlagSet(this.flags,
|
|
13511
|
+
return isFlagSet(this.flags, 268435456 /* Flag.checkedForWarnings */);
|
|
13518
13512
|
}
|
|
13519
13513
|
set hasCheckedForWarnings(value) {
|
|
13520
|
-
this.flags = setFlag(this.flags,
|
|
13514
|
+
this.flags = setFlag(this.flags, 268435456 /* Flag.checkedForWarnings */, value);
|
|
13521
13515
|
}
|
|
13522
13516
|
get optional() {
|
|
13523
13517
|
return isFlagSet(this.flags, 128 /* Flag.optional */);
|
|
@@ -14523,10 +14517,10 @@ class ImportExpression extends NodeBase {
|
|
|
14523
14517
|
this.resolutionString = null;
|
|
14524
14518
|
}
|
|
14525
14519
|
get withinTopLevelAwait() {
|
|
14526
|
-
return isFlagSet(this.flags,
|
|
14520
|
+
return isFlagSet(this.flags, 134217728 /* Flag.withinTopLevelAwait */);
|
|
14527
14521
|
}
|
|
14528
14522
|
set withinTopLevelAwait(value) {
|
|
14529
|
-
this.flags = setFlag(this.flags,
|
|
14523
|
+
this.flags = setFlag(this.flags, 134217728 /* Flag.withinTopLevelAwait */, value);
|
|
14530
14524
|
}
|
|
14531
14525
|
// Do not bind attributes
|
|
14532
14526
|
bind() {
|
|
@@ -14633,18 +14627,17 @@ class ImportExpression extends NodeBase {
|
|
|
14633
14627
|
}
|
|
14634
14628
|
include(context, includeChildrenRecursively) {
|
|
14635
14629
|
if (!this.included)
|
|
14636
|
-
this.includeNode(
|
|
14630
|
+
this.includeNode();
|
|
14637
14631
|
this.source.include(context, includeChildrenRecursively);
|
|
14638
14632
|
}
|
|
14639
|
-
includeNode(
|
|
14633
|
+
includeNode() {
|
|
14640
14634
|
this.included = true;
|
|
14641
|
-
this.withinTopLevelAwait = context.withinTopLevelAwait;
|
|
14642
14635
|
this.scope.context.includeDynamicImport(this);
|
|
14643
14636
|
this.scope.addAccessedDynamicImport(this);
|
|
14644
14637
|
}
|
|
14645
|
-
includePath(path
|
|
14638
|
+
includePath(path) {
|
|
14646
14639
|
if (!this.included)
|
|
14647
|
-
this.includeNode(
|
|
14640
|
+
this.includeNode();
|
|
14648
14641
|
// Technically, this is not correct as dynamic imports return a Promise.
|
|
14649
14642
|
if (this.hasUnknownAccessedKey)
|
|
14650
14643
|
return;
|
|
@@ -14660,6 +14653,22 @@ class ImportExpression extends NodeBase {
|
|
|
14660
14653
|
initialise() {
|
|
14661
14654
|
super.initialise();
|
|
14662
14655
|
this.scope.context.addDynamicImport(this);
|
|
14656
|
+
let parent = this.parent;
|
|
14657
|
+
let withinAwaitExpression = false;
|
|
14658
|
+
let withinTopLevelAwait = false;
|
|
14659
|
+
do {
|
|
14660
|
+
if (withinAwaitExpression &&
|
|
14661
|
+
(parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)) {
|
|
14662
|
+
withinTopLevelAwait = false;
|
|
14663
|
+
}
|
|
14664
|
+
if (parent instanceof AwaitExpression) {
|
|
14665
|
+
withinAwaitExpression = true;
|
|
14666
|
+
withinTopLevelAwait = true;
|
|
14667
|
+
}
|
|
14668
|
+
} while ((parent = parent.parent));
|
|
14669
|
+
if (withinAwaitExpression && withinTopLevelAwait) {
|
|
14670
|
+
this.withinTopLevelAwait = true;
|
|
14671
|
+
}
|
|
14663
14672
|
}
|
|
14664
14673
|
parseNode(esTreeNode) {
|
|
14665
14674
|
this.sourceAstNode = esTreeNode.source;
|
|
@@ -16290,10 +16299,10 @@ SwitchStatement.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
|
16290
16299
|
|
|
16291
16300
|
class TaggedTemplateExpression extends CallExpressionBase {
|
|
16292
16301
|
get hasCheckedForWarnings() {
|
|
16293
|
-
return isFlagSet(this.flags,
|
|
16302
|
+
return isFlagSet(this.flags, 268435456 /* Flag.checkedForWarnings */);
|
|
16294
16303
|
}
|
|
16295
16304
|
set hasCheckedForWarnings(value) {
|
|
16296
|
-
this.flags = setFlag(this.flags,
|
|
16305
|
+
this.flags = setFlag(this.flags, 268435456 /* Flag.checkedForWarnings */, value);
|
|
16297
16306
|
}
|
|
16298
16307
|
bind() {
|
|
16299
16308
|
super.bind();
|
|
@@ -19614,7 +19623,9 @@ class Chunk {
|
|
|
19614
19623
|
for (const module of entryModules) {
|
|
19615
19624
|
if (module.preserveSignature === 'allow-extension') {
|
|
19616
19625
|
const canPreserveExports = this.canPreserveModuleExports(module);
|
|
19617
|
-
if (canPreserveExports
|
|
19626
|
+
if (canPreserveExports &&
|
|
19627
|
+
!module.chunkFileNames.size &&
|
|
19628
|
+
module.chunkNames.every(({ isUserDefined }) => !isUserDefined)) {
|
|
19618
19629
|
this.allowExtensionModules.add(module);
|
|
19619
19630
|
if (!this.facadeModule) {
|
|
19620
19631
|
this.facadeModule = module;
|
|
@@ -20722,12 +20733,12 @@ function analyzeModuleGraph(entries) {
|
|
|
20722
20733
|
const awaitedDynamicImportsForCurrentEntry = new Set();
|
|
20723
20734
|
dynamicImportModulesByEntry[entryIndex] = dynamicImportsForCurrentEntry;
|
|
20724
20735
|
awaitedDynamicImportModulesByEntry[entryIndex] = awaitedDynamicImportsForCurrentEntry;
|
|
20725
|
-
const
|
|
20726
|
-
for (const module of
|
|
20736
|
+
const staticDependencies = new Set([currentEntry]);
|
|
20737
|
+
for (const module of staticDependencies) {
|
|
20727
20738
|
getOrCreate(dependentEntriesByModule, module, (getNewSet)).add(entryIndex);
|
|
20728
20739
|
for (const dependency of module.getDependenciesToBeIncluded()) {
|
|
20729
20740
|
if (!(dependency instanceof ExternalModule)) {
|
|
20730
|
-
|
|
20741
|
+
staticDependencies.add(dependency);
|
|
20731
20742
|
}
|
|
20732
20743
|
}
|
|
20733
20744
|
for (const { resolution } of module.dynamicImports) {
|
|
@@ -20737,9 +20748,12 @@ function analyzeModuleGraph(entries) {
|
|
|
20737
20748
|
dynamicEntryModules.add(resolution);
|
|
20738
20749
|
allEntriesSet.add(resolution);
|
|
20739
20750
|
dynamicImportsForCurrentEntry.add(resolution);
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20751
|
+
for (const includedDirectTopLevelAwaitingDynamicImporter of resolution.includedDirectTopLevelAwaitingDynamicImporters) {
|
|
20752
|
+
if (staticDependencies.has(includedDirectTopLevelAwaitingDynamicImporter)) {
|
|
20753
|
+
awaitedDynamicEntryModules.add(resolution);
|
|
20754
|
+
awaitedDynamicImportsForCurrentEntry.add(resolution);
|
|
20755
|
+
break;
|
|
20756
|
+
}
|
|
20743
20757
|
}
|
|
20744
20758
|
}
|
|
20745
20759
|
}
|
|
@@ -21243,24 +21257,32 @@ function analyseModuleExecution(entryModules) {
|
|
|
21243
21257
|
const dynamicImports = new Set();
|
|
21244
21258
|
const parents = new Map();
|
|
21245
21259
|
const orderedModules = [];
|
|
21260
|
+
const handleSyncLoadedModule = (module, parent) => {
|
|
21261
|
+
if (parents.has(module)) {
|
|
21262
|
+
if (!analysedModules.has(module)) {
|
|
21263
|
+
cyclePaths.push(getCyclePath(module, parent, parents));
|
|
21264
|
+
}
|
|
21265
|
+
return;
|
|
21266
|
+
}
|
|
21267
|
+
parents.set(module, parent);
|
|
21268
|
+
analyseModule(module);
|
|
21269
|
+
};
|
|
21246
21270
|
const analyseModule = (module) => {
|
|
21247
21271
|
if (module instanceof Module) {
|
|
21248
21272
|
for (const dependency of module.dependencies) {
|
|
21249
|
-
|
|
21250
|
-
if (!analysedModules.has(dependency)) {
|
|
21251
|
-
cyclePaths.push(getCyclePath(dependency, module, parents));
|
|
21252
|
-
}
|
|
21253
|
-
continue;
|
|
21254
|
-
}
|
|
21255
|
-
parents.set(dependency, module);
|
|
21256
|
-
analyseModule(dependency);
|
|
21273
|
+
handleSyncLoadedModule(dependency, module);
|
|
21257
21274
|
}
|
|
21258
21275
|
for (const dependency of module.implicitlyLoadedBefore) {
|
|
21259
21276
|
dynamicImports.add(dependency);
|
|
21260
21277
|
}
|
|
21261
|
-
for (const { resolution } of module.dynamicImports) {
|
|
21278
|
+
for (const { resolution, node } of module.dynamicImports) {
|
|
21262
21279
|
if (resolution instanceof Module) {
|
|
21263
|
-
|
|
21280
|
+
if (node.withinTopLevelAwait) {
|
|
21281
|
+
handleSyncLoadedModule(resolution, module);
|
|
21282
|
+
}
|
|
21283
|
+
else {
|
|
21284
|
+
dynamicImports.add(resolution);
|
|
21285
|
+
}
|
|
21264
21286
|
}
|
|
21265
21287
|
}
|
|
21266
21288
|
orderedModules.push(module);
|
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.40.
|
|
3
|
+
"version": "4.40.2",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -109,26 +109,26 @@
|
|
|
109
109
|
"homepage": "https://rollupjs.org/",
|
|
110
110
|
"optionalDependencies": {
|
|
111
111
|
"fsevents": "~2.3.2",
|
|
112
|
-
"@rollup/rollup-darwin-arm64": "4.40.
|
|
113
|
-
"@rollup/rollup-android-arm64": "4.40.
|
|
114
|
-
"@rollup/rollup-win32-arm64-msvc": "4.40.
|
|
115
|
-
"@rollup/rollup-freebsd-arm64": "4.40.
|
|
116
|
-
"@rollup/rollup-linux-arm64-gnu": "4.40.
|
|
117
|
-
"@rollup/rollup-linux-arm64-musl": "4.40.
|
|
118
|
-
"@rollup/rollup-android-arm-eabi": "4.40.
|
|
119
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.40.
|
|
120
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.40.
|
|
121
|
-
"@rollup/rollup-win32-ia32-msvc": "4.40.
|
|
122
|
-
"@rollup/rollup-linux-loongarch64-gnu": "4.40.
|
|
123
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.40.
|
|
124
|
-
"@rollup/rollup-linux-riscv64-musl": "4.40.
|
|
125
|
-
"@rollup/rollup-linux-powerpc64le-gnu": "4.40.
|
|
126
|
-
"@rollup/rollup-linux-s390x-gnu": "4.40.
|
|
127
|
-
"@rollup/rollup-darwin-x64": "4.40.
|
|
128
|
-
"@rollup/rollup-win32-x64-msvc": "4.40.
|
|
129
|
-
"@rollup/rollup-freebsd-x64": "4.40.
|
|
130
|
-
"@rollup/rollup-linux-x64-gnu": "4.40.
|
|
131
|
-
"@rollup/rollup-linux-x64-musl": "4.40.
|
|
112
|
+
"@rollup/rollup-darwin-arm64": "4.40.2",
|
|
113
|
+
"@rollup/rollup-android-arm64": "4.40.2",
|
|
114
|
+
"@rollup/rollup-win32-arm64-msvc": "4.40.2",
|
|
115
|
+
"@rollup/rollup-freebsd-arm64": "4.40.2",
|
|
116
|
+
"@rollup/rollup-linux-arm64-gnu": "4.40.2",
|
|
117
|
+
"@rollup/rollup-linux-arm64-musl": "4.40.2",
|
|
118
|
+
"@rollup/rollup-android-arm-eabi": "4.40.2",
|
|
119
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.40.2",
|
|
120
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.40.2",
|
|
121
|
+
"@rollup/rollup-win32-ia32-msvc": "4.40.2",
|
|
122
|
+
"@rollup/rollup-linux-loongarch64-gnu": "4.40.2",
|
|
123
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.40.2",
|
|
124
|
+
"@rollup/rollup-linux-riscv64-musl": "4.40.2",
|
|
125
|
+
"@rollup/rollup-linux-powerpc64le-gnu": "4.40.2",
|
|
126
|
+
"@rollup/rollup-linux-s390x-gnu": "4.40.2",
|
|
127
|
+
"@rollup/rollup-darwin-x64": "4.40.2",
|
|
128
|
+
"@rollup/rollup-win32-x64-msvc": "4.40.2",
|
|
129
|
+
"@rollup/rollup-freebsd-x64": "4.40.2",
|
|
130
|
+
"@rollup/rollup-linux-x64-gnu": "4.40.2",
|
|
131
|
+
"@rollup/rollup-linux-x64-musl": "4.40.2"
|
|
132
132
|
},
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"@types/estree": "1.0.7"
|
|
@@ -142,9 +142,9 @@
|
|
|
142
142
|
"@codemirror/language": "^6.11.0",
|
|
143
143
|
"@codemirror/search": "^6.5.10",
|
|
144
144
|
"@codemirror/state": "^6.5.2",
|
|
145
|
-
"@codemirror/view": "^6.36.
|
|
146
|
-
"@eslint/js": "^9.
|
|
147
|
-
"@inquirer/prompts": "^7.
|
|
145
|
+
"@codemirror/view": "^6.36.6",
|
|
146
|
+
"@eslint/js": "^9.25.1",
|
|
147
|
+
"@inquirer/prompts": "^7.5.0",
|
|
148
148
|
"@jridgewell/sourcemap-codec": "^1.5.0",
|
|
149
149
|
"@mermaid-js/mermaid-cli": "^11.4.2",
|
|
150
150
|
"@napi-rs/cli": "^2.18.4",
|
|
@@ -157,13 +157,13 @@
|
|
|
157
157
|
"@rollup/plugin-terser": "^0.4.4",
|
|
158
158
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
159
159
|
"@rollup/pluginutils": "^5.1.4",
|
|
160
|
-
"@shikijs/vitepress-twoslash": "^3.
|
|
160
|
+
"@shikijs/vitepress-twoslash": "^3.3.0",
|
|
161
161
|
"@types/mocha": "^10.0.10",
|
|
162
|
-
"@types/node": "^18.19.
|
|
162
|
+
"@types/node": "^18.19.87",
|
|
163
163
|
"@types/picomatch": "^4.0.0",
|
|
164
164
|
"@types/semver": "^7.7.0",
|
|
165
165
|
"@types/yargs-parser": "^21.0.3",
|
|
166
|
-
"@vue/language-server": "^2.2.
|
|
166
|
+
"@vue/language-server": "^2.2.10",
|
|
167
167
|
"acorn": "^8.14.1",
|
|
168
168
|
"acorn-import-assertions": "^1.9.0",
|
|
169
169
|
"acorn-jsx": "^5.3.2",
|
|
@@ -176,11 +176,11 @@
|
|
|
176
176
|
"date-time": "^4.0.0",
|
|
177
177
|
"es5-shim": "^4.6.7",
|
|
178
178
|
"es6-shim": "^0.35.8",
|
|
179
|
-
"eslint": "^9.
|
|
180
|
-
"eslint-config-prettier": "^10.1.
|
|
179
|
+
"eslint": "^9.25.1",
|
|
180
|
+
"eslint-config-prettier": "^10.1.2",
|
|
181
181
|
"eslint-plugin-prettier": "^5.2.6",
|
|
182
|
-
"eslint-plugin-unicorn": "^
|
|
183
|
-
"eslint-plugin-vue": "^10.0.
|
|
182
|
+
"eslint-plugin-unicorn": "^59.0.0",
|
|
183
|
+
"eslint-plugin-vue": "^10.0.1",
|
|
184
184
|
"fixturify": "^3.0.0",
|
|
185
185
|
"flru": "^1.0.2",
|
|
186
186
|
"fs-extra": "^11.3.0",
|
|
@@ -188,21 +188,21 @@
|
|
|
188
188
|
"globals": "^16.0.0",
|
|
189
189
|
"husky": "^9.1.7",
|
|
190
190
|
"is-reference": "^3.0.3",
|
|
191
|
-
"lint-staged": "^15.5.
|
|
191
|
+
"lint-staged": "^15.5.1",
|
|
192
192
|
"locate-character": "^3.0.0",
|
|
193
193
|
"magic-string": "^0.30.17",
|
|
194
|
-
"mocha": "^11.
|
|
195
|
-
"nodemon": "^3.1.
|
|
194
|
+
"mocha": "^11.2.2",
|
|
195
|
+
"nodemon": "^3.1.10",
|
|
196
196
|
"nyc": "^17.1.0",
|
|
197
197
|
"picocolors": "^1.1.1",
|
|
198
198
|
"picomatch": "^4.0.2",
|
|
199
|
-
"pinia": "^3.0.
|
|
199
|
+
"pinia": "^3.0.2",
|
|
200
200
|
"prettier": "^3.5.3",
|
|
201
201
|
"prettier-plugin-organize-imports": "^4.1.0",
|
|
202
202
|
"pretty-bytes": "^6.1.1",
|
|
203
203
|
"pretty-ms": "^9.2.0",
|
|
204
204
|
"requirejs": "^2.3.7",
|
|
205
|
-
"rollup": "^4.
|
|
205
|
+
"rollup": "^4.40.1",
|
|
206
206
|
"rollup-plugin-license": "^3.6.0",
|
|
207
207
|
"rollup-plugin-string": "^3.0.0",
|
|
208
208
|
"semver": "^7.7.1",
|
|
@@ -214,16 +214,16 @@
|
|
|
214
214
|
"terser": "^5.39.0",
|
|
215
215
|
"tslib": "^2.8.1",
|
|
216
216
|
"typescript": "^5.8.3",
|
|
217
|
-
"typescript-eslint": "^8.
|
|
218
|
-
"vite": "^6.
|
|
217
|
+
"typescript-eslint": "^8.31.1",
|
|
218
|
+
"vite": "^6.3.3",
|
|
219
219
|
"vitepress": "^1.6.3",
|
|
220
220
|
"vue": "^3.5.13",
|
|
221
|
-
"vue-tsc": "^2.2.
|
|
221
|
+
"vue-tsc": "^2.2.10",
|
|
222
222
|
"wasm-pack": "^0.13.1",
|
|
223
223
|
"yargs-parser": "^21.1.1"
|
|
224
224
|
},
|
|
225
225
|
"overrides": {
|
|
226
|
-
"axios": "^1.
|
|
226
|
+
"axios": "^1.9.0",
|
|
227
227
|
"semver": "^7.7.1",
|
|
228
228
|
"readable-stream": "npm:@built-in/readable-stream@1",
|
|
229
229
|
"esbuild": ">0.24.2"
|
|
@@ -263,6 +263,7 @@
|
|
|
263
263
|
"require": "./dist/parseAst.js",
|
|
264
264
|
"import": "./dist/es/parseAst.js"
|
|
265
265
|
},
|
|
266
|
-
"./dist/*": "./dist/*"
|
|
266
|
+
"./dist/*": "./dist/*",
|
|
267
|
+
"./package.json": "./package.json"
|
|
267
268
|
}
|
|
268
269
|
}
|