rollup 4.5.1 → 4.6.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 +19 -19
- package/dist/es/shared/parseAst.js +3 -9
- package/dist/es/shared/watch.js +10 -4
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/native.js +14 -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 +2 -9
- package/dist/shared/rollup.js +18 -18
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +10 -4
- package/package.json +22 -22
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.6.0
|
|
5
|
+
Sun, 26 Nov 2023 13:38:46 GMT - commit 020774d0c7b1371865b20878e59dd3a6a45d3b31
|
|
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.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.6.0
|
|
4
|
+
Sun, 26 Nov 2023 13:38:46 GMT - commit 020774d0c7b1371865b20878e59dd3a6a45d3b31
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
-
import { normalize, getImportPath, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, logInvalidAnnotation, logRedeclarationError, logDuplicateArgumentNameError, logIllegalImportReassignment, logModuleLevelDirective, logMissingExport, logCannotCallNamespace, logEval, LOGLEVEL_INFO, logFirstSideEffect, locate, logThisIsUndefined, logImportAttributeIsInvalid, logImportOptionsAreInvalid, error, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logInvalidFormatForTopLevelAwait, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logModuleParseError, parseAstAsync, logCircularReexport, logMissingNodeBuiltins, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, 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, LOGLEVEL_ERROR, logLevelPriority, relativeId, LOGLEVEL_DEBUG, logUnknownOption, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logFileNameConflict, logAssetNotFinalisedForFileName, logChunkNotGeneratedForFileName, logInvalidLogPosition,
|
|
10
|
+
import { normalize, getImportPath, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, logInvalidAnnotation, logRedeclarationError, logDuplicateArgumentNameError, logIllegalImportReassignment, logModuleLevelDirective, logMissingExport, logCannotCallNamespace, logEval, LOGLEVEL_INFO, logFirstSideEffect, locate, logThisIsUndefined, logImportAttributeIsInvalid, logImportOptionsAreInvalid, error, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logInvalidFormatForTopLevelAwait, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logModuleParseError, parseAstAsync, logCircularReexport, logMissingNodeBuiltins, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, 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, LOGLEVEL_ERROR, logLevelPriority, relativeId, LOGLEVEL_DEBUG, logUnknownOption, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logFileNameConflict, logAssetNotFinalisedForFileName, logChunkNotGeneratedForFileName, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidFunctionPluginHook, logInvalidAddonPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_AMD_BASEPATH, logInvalidExportOptionValue, warnDeprecation, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_GENERATEDCODE, 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 require$$0$1, { win32, posix, isAbsolute, resolve } from 'path';
|
|
13
13
|
import process$1, { env as env$1 } from 'node:process';
|
|
@@ -16,7 +16,7 @@ import { xxhashBase64Url } from '../../native.js';
|
|
|
16
16
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version = "4.
|
|
19
|
+
var version = "4.6.0";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -4531,7 +4531,7 @@ const literalStringMembers = assembleMemberDescriptions({
|
|
|
4531
4531
|
toLocaleLowerCase: returnsString,
|
|
4532
4532
|
toLocaleUpperCase: returnsString,
|
|
4533
4533
|
toLowerCase: returnsString,
|
|
4534
|
-
toString: returnsString,
|
|
4534
|
+
toString: returnsString, // overrides the toString() method of the Object object; it does not inherit Object.prototype.toString()
|
|
4535
4535
|
toUpperCase: returnsString,
|
|
4536
4536
|
trim: returnsString,
|
|
4537
4537
|
trimEnd: returnsString,
|
|
@@ -13057,10 +13057,6 @@ class Module {
|
|
|
13057
13057
|
const shebangEndPosition = code.indexOf('\n');
|
|
13058
13058
|
this.shebang = code.slice(2, shebangEndPosition);
|
|
13059
13059
|
}
|
|
13060
|
-
/* eslint-disable-next-line unicorn/number-literal-case */
|
|
13061
|
-
if (code.charCodeAt(0) === 65279) {
|
|
13062
|
-
code = code.slice(1);
|
|
13063
|
-
}
|
|
13064
13060
|
timeStart('generate ast', 3);
|
|
13065
13061
|
this.info.code = code;
|
|
13066
13062
|
this.originalCode = originalCode;
|
|
@@ -13085,7 +13081,7 @@ class Module {
|
|
|
13085
13081
|
// can change that, but it makes sense to use it for the source file name
|
|
13086
13082
|
const fileName = this.id;
|
|
13087
13083
|
this.magicString = new MagicString(code, {
|
|
13088
|
-
filename: (this.excludeFromSourcemap ? null : fileName),
|
|
13084
|
+
filename: (this.excludeFromSourcemap ? null : fileName), // don't include plugin helpers in sourcemap
|
|
13089
13085
|
indentExclusionRanges: []
|
|
13090
13086
|
});
|
|
13091
13087
|
this.astContext = {
|
|
@@ -13093,10 +13089,10 @@ class Module {
|
|
|
13093
13089
|
addExport: this.addExport.bind(this),
|
|
13094
13090
|
addImport: this.addImport.bind(this),
|
|
13095
13091
|
addImportMeta: this.addImportMeta.bind(this),
|
|
13096
|
-
code,
|
|
13092
|
+
code, // Only needed for debugging
|
|
13097
13093
|
deoptimizationTracker: this.graph.deoptimizationTracker,
|
|
13098
13094
|
error: this.error.bind(this),
|
|
13099
|
-
fileName,
|
|
13095
|
+
fileName, // Needed for warnings
|
|
13100
13096
|
getExports: this.getExports.bind(this),
|
|
13101
13097
|
getModuleExecIndex: () => this.execIndex,
|
|
13102
13098
|
getModuleName: this.basename.bind(this),
|
|
@@ -13227,7 +13223,7 @@ class Module {
|
|
|
13227
13223
|
this.assertUniqueExportName(name, node.exported.start);
|
|
13228
13224
|
this.reexportDescriptions.set(name, {
|
|
13229
13225
|
localName: '*',
|
|
13230
|
-
module: null,
|
|
13226
|
+
module: null, // filled in later,
|
|
13231
13227
|
source,
|
|
13232
13228
|
start: node.start
|
|
13233
13229
|
});
|
|
@@ -13246,7 +13242,7 @@ class Module {
|
|
|
13246
13242
|
this.assertUniqueExportName(name, start);
|
|
13247
13243
|
this.reexportDescriptions.set(name, {
|
|
13248
13244
|
localName: local instanceof Literal ? local.value : local.name,
|
|
13249
|
-
module: null,
|
|
13245
|
+
module: null, // filled in later,
|
|
13250
13246
|
source,
|
|
13251
13247
|
start
|
|
13252
13248
|
});
|
|
@@ -13298,7 +13294,7 @@ class Module {
|
|
|
13298
13294
|
? specifier.imported.name
|
|
13299
13295
|
: specifier.imported.value;
|
|
13300
13296
|
this.importDescriptions.set(localName, {
|
|
13301
|
-
module: null,
|
|
13297
|
+
module: null, // filled in later
|
|
13302
13298
|
name,
|
|
13303
13299
|
source,
|
|
13304
13300
|
start: specifier.start
|
|
@@ -17696,6 +17692,11 @@ class ModuleLoader {
|
|
|
17696
17692
|
: source != null && typeof source === 'object' && typeof source.code === 'string'
|
|
17697
17693
|
? source
|
|
17698
17694
|
: error(logBadLoader(id));
|
|
17695
|
+
const code = sourceDescription.code;
|
|
17696
|
+
/* eslint-disable-next-line unicorn/number-literal-case */
|
|
17697
|
+
if (code.charCodeAt(0) === 65279) {
|
|
17698
|
+
sourceDescription.code = code.slice(1);
|
|
17699
|
+
}
|
|
17699
17700
|
const cachedModule = this.graph.cachedModules.get(id);
|
|
17700
17701
|
if (cachedModule &&
|
|
17701
17702
|
!cachedModule.customTransformCache &&
|
|
@@ -18410,9 +18411,6 @@ function getPluginContext(plugin, pluginCache, graph, options, fileEmitter, exis
|
|
|
18410
18411
|
}
|
|
18411
18412
|
return {
|
|
18412
18413
|
addWatchFile(id) {
|
|
18413
|
-
if (graph.phase >= BuildPhase.GENERATE) {
|
|
18414
|
-
return this.error(logInvalidRollupPhaseForAddWatchFile());
|
|
18415
|
-
}
|
|
18416
18414
|
graph.watchFiles[id] = true;
|
|
18417
18415
|
},
|
|
18418
18416
|
cache: cacheInstance,
|
|
@@ -19464,7 +19462,9 @@ async function rollupInternal(rawInputOptions, watcher) {
|
|
|
19464
19462
|
return error(logAlreadyClosed());
|
|
19465
19463
|
return handleGenerateWrite(false, inputOptions, unsetInputOptions, rawOutputOptions, graph);
|
|
19466
19464
|
},
|
|
19467
|
-
watchFiles
|
|
19465
|
+
get watchFiles() {
|
|
19466
|
+
return Object.keys(graph.watchFiles);
|
|
19467
|
+
},
|
|
19468
19468
|
async write(rawOutputOptions) {
|
|
19469
19469
|
if (result.closed)
|
|
19470
19470
|
return error(logAlreadyClosed());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.6.0
|
|
4
|
+
Sun, 26 Nov 2023 13:38:46 GMT - commit 020774d0c7b1371865b20878e59dd3a6a45d3b31
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -634,12 +634,6 @@ function logInvalidFunctionPluginHook(hook, plugin) {
|
|
|
634
634
|
plugin
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function logInvalidRollupPhaseForAddWatchFile() {
|
|
638
|
-
return {
|
|
639
|
-
code: INVALID_ROLLUP_PHASE,
|
|
640
|
-
message: `Cannot call "addWatchFile" after the build has finished.`
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
637
|
function logInvalidRollupPhaseForChunkEmission() {
|
|
644
638
|
return {
|
|
645
639
|
code: INVALID_ROLLUP_PHASE,
|
|
@@ -2157,4 +2151,4 @@ const parseAstAsync = async (input, { allowReturnOutsideFunction = false, signal
|
|
|
2157
2151
|
return result;
|
|
2158
2152
|
};
|
|
2159
2153
|
|
|
2160
|
-
export { ANNOTATION_KEY, INVALID_ANNOTATION_KEY, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, addTrailingSlashIfMissed, augmentCodeLocation, error, getAliasName, getImportPath, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption,
|
|
2154
|
+
export { ANNOTATION_KEY, INVALID_ANNOTATION_KEY, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, addTrailingSlashIfMissed, augmentCodeLocation, error, getAliasName, getImportPath, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logOptimizeChunkStatus, logPluginError, logRedeclarationError, logShimmedExport, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
|
package/dist/es/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.6.0
|
|
4
|
+
Sun, 26 Nov 2023 13:38:46 GMT - commit 020774d0c7b1371865b20878e59dd3a6a45d3b31
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -4630,7 +4630,7 @@ class FileWatcher {
|
|
|
4630
4630
|
const eventsRewrites = {
|
|
4631
4631
|
create: {
|
|
4632
4632
|
create: 'buggy',
|
|
4633
|
-
delete: null,
|
|
4633
|
+
delete: null, //delete file from map
|
|
4634
4634
|
update: 'create'
|
|
4635
4635
|
},
|
|
4636
4636
|
delete: {
|
|
@@ -4796,7 +4796,13 @@ class Task {
|
|
|
4796
4796
|
return;
|
|
4797
4797
|
}
|
|
4798
4798
|
this.updateWatchedFiles(result);
|
|
4799
|
-
|
|
4799
|
+
if (!this.skipWrite) {
|
|
4800
|
+
await Promise.all(this.outputs.map(output => result.write(output)));
|
|
4801
|
+
if (this.closed) {
|
|
4802
|
+
return;
|
|
4803
|
+
}
|
|
4804
|
+
this.updateWatchedFiles(result);
|
|
4805
|
+
}
|
|
4800
4806
|
await this.watcher.emitter.emit('event', {
|
|
4801
4807
|
code: 'BUNDLE_END',
|
|
4802
4808
|
duration: Date.now() - start,
|
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/native.js
CHANGED
|
@@ -57,7 +57,20 @@ function getPackageBase() {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
const localName = `./rollup.${packageBase}.node`;
|
|
60
|
-
const
|
|
60
|
+
const requireWithFriendlyError = id => {
|
|
61
|
+
try {
|
|
62
|
+
return require(id);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
throw new Error(
|
|
65
|
+
`Cannot find module ${id}. ` +
|
|
66
|
+
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
|
67
|
+
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
|
68
|
+
{ cause: error }
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const { parse, parseAsync, xxhashBase64Url } = requireWithFriendlyError(
|
|
61
74
|
existsSync(join(__dirname, localName)) ? localName : `@rollup/rollup-${packageBase}`
|
|
62
75
|
);
|
|
63
76
|
|
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.6.0
|
|
4
|
+
Sun, 26 Nov 2023 13:38:46 GMT - commit 020774d0c7b1371865b20878e59dd3a6a45d3b31
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -615,12 +615,6 @@ function logInvalidFunctionPluginHook(hook, plugin) {
|
|
|
615
615
|
plugin
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
|
-
function logInvalidRollupPhaseForAddWatchFile() {
|
|
619
|
-
return {
|
|
620
|
-
code: INVALID_ROLLUP_PHASE,
|
|
621
|
-
message: `Cannot call "addWatchFile" after the build has finished.`
|
|
622
|
-
};
|
|
623
|
-
}
|
|
624
618
|
function logInvalidRollupPhaseForChunkEmission() {
|
|
625
619
|
return {
|
|
626
620
|
code: INVALID_ROLLUP_PHASE,
|
|
@@ -2311,7 +2305,6 @@ exports.logInvalidFormatForTopLevelAwait = logInvalidFormatForTopLevelAwait;
|
|
|
2311
2305
|
exports.logInvalidFunctionPluginHook = logInvalidFunctionPluginHook;
|
|
2312
2306
|
exports.logInvalidLogPosition = logInvalidLogPosition;
|
|
2313
2307
|
exports.logInvalidOption = logInvalidOption;
|
|
2314
|
-
exports.logInvalidRollupPhaseForAddWatchFile = logInvalidRollupPhaseForAddWatchFile;
|
|
2315
2308
|
exports.logInvalidRollupPhaseForChunkEmission = logInvalidRollupPhaseForChunkEmission;
|
|
2316
2309
|
exports.logInvalidSetAssetSourceCall = logInvalidSetAssetSourceCall;
|
|
2317
2310
|
exports.logInvalidSourcemapForError = logInvalidSourcemapForError;
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.6.0
|
|
4
|
+
Sun, 26 Nov 2023 13:38:46 GMT - commit 020774d0c7b1371865b20878e59dd3a6a45d3b31
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
|
|
32
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
33
33
|
|
|
34
|
-
var version = "4.
|
|
34
|
+
var version = "4.6.0";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -811,9 +811,6 @@ function getPluginContext(plugin, pluginCache, graph, options, fileEmitter, exis
|
|
|
811
811
|
}
|
|
812
812
|
return {
|
|
813
813
|
addWatchFile(id) {
|
|
814
|
-
if (graph.phase >= BuildPhase.GENERATE) {
|
|
815
|
-
return this.error(parseAst_js.logInvalidRollupPhaseForAddWatchFile());
|
|
816
|
-
}
|
|
817
814
|
graph.watchFiles[id] = true;
|
|
818
815
|
},
|
|
819
816
|
cache: cacheInstance,
|
|
@@ -5980,7 +5977,7 @@ const literalStringMembers = assembleMemberDescriptions({
|
|
|
5980
5977
|
toLocaleLowerCase: returnsString,
|
|
5981
5978
|
toLocaleUpperCase: returnsString,
|
|
5982
5979
|
toLowerCase: returnsString,
|
|
5983
|
-
toString: returnsString,
|
|
5980
|
+
toString: returnsString, // overrides the toString() method of the Object object; it does not inherit Object.prototype.toString()
|
|
5984
5981
|
toUpperCase: returnsString,
|
|
5985
5982
|
trim: returnsString,
|
|
5986
5983
|
trimEnd: returnsString,
|
|
@@ -14485,10 +14482,6 @@ class Module {
|
|
|
14485
14482
|
const shebangEndPosition = code.indexOf('\n');
|
|
14486
14483
|
this.shebang = code.slice(2, shebangEndPosition);
|
|
14487
14484
|
}
|
|
14488
|
-
/* eslint-disable-next-line unicorn/number-literal-case */
|
|
14489
|
-
if (code.charCodeAt(0) === 65279) {
|
|
14490
|
-
code = code.slice(1);
|
|
14491
|
-
}
|
|
14492
14485
|
timeStart('generate ast', 3);
|
|
14493
14486
|
this.info.code = code;
|
|
14494
14487
|
this.originalCode = originalCode;
|
|
@@ -14513,7 +14506,7 @@ class Module {
|
|
|
14513
14506
|
// can change that, but it makes sense to use it for the source file name
|
|
14514
14507
|
const fileName = this.id;
|
|
14515
14508
|
this.magicString = new MagicString(code, {
|
|
14516
|
-
filename: (this.excludeFromSourcemap ? null : fileName),
|
|
14509
|
+
filename: (this.excludeFromSourcemap ? null : fileName), // don't include plugin helpers in sourcemap
|
|
14517
14510
|
indentExclusionRanges: []
|
|
14518
14511
|
});
|
|
14519
14512
|
this.astContext = {
|
|
@@ -14521,10 +14514,10 @@ class Module {
|
|
|
14521
14514
|
addExport: this.addExport.bind(this),
|
|
14522
14515
|
addImport: this.addImport.bind(this),
|
|
14523
14516
|
addImportMeta: this.addImportMeta.bind(this),
|
|
14524
|
-
code,
|
|
14517
|
+
code, // Only needed for debugging
|
|
14525
14518
|
deoptimizationTracker: this.graph.deoptimizationTracker,
|
|
14526
14519
|
error: this.error.bind(this),
|
|
14527
|
-
fileName,
|
|
14520
|
+
fileName, // Needed for warnings
|
|
14528
14521
|
getExports: this.getExports.bind(this),
|
|
14529
14522
|
getModuleExecIndex: () => this.execIndex,
|
|
14530
14523
|
getModuleName: this.basename.bind(this),
|
|
@@ -14655,7 +14648,7 @@ class Module {
|
|
|
14655
14648
|
this.assertUniqueExportName(name, node.exported.start);
|
|
14656
14649
|
this.reexportDescriptions.set(name, {
|
|
14657
14650
|
localName: '*',
|
|
14658
|
-
module: null,
|
|
14651
|
+
module: null, // filled in later,
|
|
14659
14652
|
source,
|
|
14660
14653
|
start: node.start
|
|
14661
14654
|
});
|
|
@@ -14674,7 +14667,7 @@ class Module {
|
|
|
14674
14667
|
this.assertUniqueExportName(name, start);
|
|
14675
14668
|
this.reexportDescriptions.set(name, {
|
|
14676
14669
|
localName: local instanceof Literal ? local.value : local.name,
|
|
14677
|
-
module: null,
|
|
14670
|
+
module: null, // filled in later,
|
|
14678
14671
|
source,
|
|
14679
14672
|
start
|
|
14680
14673
|
});
|
|
@@ -14726,7 +14719,7 @@ class Module {
|
|
|
14726
14719
|
? specifier.imported.name
|
|
14727
14720
|
: specifier.imported.value;
|
|
14728
14721
|
this.importDescriptions.set(localName, {
|
|
14729
|
-
module: null,
|
|
14722
|
+
module: null, // filled in later
|
|
14730
14723
|
name,
|
|
14731
14724
|
source,
|
|
14732
14725
|
start: specifier.start
|
|
@@ -18771,6 +18764,11 @@ class ModuleLoader {
|
|
|
18771
18764
|
: source != null && typeof source === 'object' && typeof source.code === 'string'
|
|
18772
18765
|
? source
|
|
18773
18766
|
: parseAst_js.error(parseAst_js.logBadLoader(id));
|
|
18767
|
+
const code = sourceDescription.code;
|
|
18768
|
+
/* eslint-disable-next-line unicorn/number-literal-case */
|
|
18769
|
+
if (code.charCodeAt(0) === 65279) {
|
|
18770
|
+
sourceDescription.code = code.slice(1);
|
|
18771
|
+
}
|
|
18774
18772
|
const cachedModule = this.graph.cachedModules.get(id);
|
|
18775
18773
|
if (cachedModule &&
|
|
18776
18774
|
!cachedModule.customTransformCache &&
|
|
@@ -19842,7 +19840,9 @@ async function rollupInternal(rawInputOptions, watcher) {
|
|
|
19842
19840
|
return parseAst_js.error(parseAst_js.logAlreadyClosed());
|
|
19843
19841
|
return handleGenerateWrite(false, inputOptions, unsetInputOptions, rawOutputOptions, graph);
|
|
19844
19842
|
},
|
|
19845
|
-
watchFiles
|
|
19843
|
+
get watchFiles() {
|
|
19844
|
+
return Object.keys(graph.watchFiles);
|
|
19845
|
+
},
|
|
19846
19846
|
async write(rawOutputOptions) {
|
|
19847
19847
|
if (result.closed)
|
|
19848
19848
|
return parseAst_js.error(parseAst_js.logAlreadyClosed());
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.6.0
|
|
4
|
+
Sun, 26 Nov 2023 13:38:46 GMT - commit 020774d0c7b1371865b20878e59dd3a6a45d3b31
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -87,7 +87,7 @@ class FileWatcher {
|
|
|
87
87
|
const eventsRewrites = {
|
|
88
88
|
create: {
|
|
89
89
|
create: 'buggy',
|
|
90
|
-
delete: null,
|
|
90
|
+
delete: null, //delete file from map
|
|
91
91
|
update: 'create'
|
|
92
92
|
},
|
|
93
93
|
delete: {
|
|
@@ -253,7 +253,13 @@ class Task {
|
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
255
|
this.updateWatchedFiles(result);
|
|
256
|
-
|
|
256
|
+
if (!this.skipWrite) {
|
|
257
|
+
await Promise.all(this.outputs.map(output => result.write(output)));
|
|
258
|
+
if (this.closed) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
this.updateWatchedFiles(result);
|
|
262
|
+
}
|
|
257
263
|
await this.watcher.emitter.emit('event', {
|
|
258
264
|
code: 'BUNDLE_END',
|
|
259
265
|
duration: Date.now() - start,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -100,18 +100,18 @@
|
|
|
100
100
|
"homepage": "https://rollupjs.org/",
|
|
101
101
|
"optionalDependencies": {
|
|
102
102
|
"fsevents": "~2.3.2",
|
|
103
|
-
"@rollup/rollup-darwin-arm64": "4.
|
|
104
|
-
"@rollup/rollup-android-arm64": "4.
|
|
105
|
-
"@rollup/rollup-win32-arm64-msvc": "4.
|
|
106
|
-
"@rollup/rollup-linux-arm64-gnu": "4.
|
|
107
|
-
"@rollup/rollup-linux-arm64-musl": "4.
|
|
108
|
-
"@rollup/rollup-android-arm-eabi": "4.
|
|
109
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.
|
|
110
|
-
"@rollup/rollup-win32-ia32-msvc": "4.
|
|
111
|
-
"@rollup/rollup-darwin-x64": "4.
|
|
112
|
-
"@rollup/rollup-win32-x64-msvc": "4.
|
|
113
|
-
"@rollup/rollup-linux-x64-gnu": "4.
|
|
114
|
-
"@rollup/rollup-linux-x64-musl": "4.
|
|
103
|
+
"@rollup/rollup-darwin-arm64": "4.6.0",
|
|
104
|
+
"@rollup/rollup-android-arm64": "4.6.0",
|
|
105
|
+
"@rollup/rollup-win32-arm64-msvc": "4.6.0",
|
|
106
|
+
"@rollup/rollup-linux-arm64-gnu": "4.6.0",
|
|
107
|
+
"@rollup/rollup-linux-arm64-musl": "4.6.0",
|
|
108
|
+
"@rollup/rollup-android-arm-eabi": "4.6.0",
|
|
109
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.6.0",
|
|
110
|
+
"@rollup/rollup-win32-ia32-msvc": "4.6.0",
|
|
111
|
+
"@rollup/rollup-darwin-x64": "4.6.0",
|
|
112
|
+
"@rollup/rollup-win32-x64-msvc": "4.6.0",
|
|
113
|
+
"@rollup/rollup-linux-x64-gnu": "4.6.0",
|
|
114
|
+
"@rollup/rollup-linux-x64-musl": "4.6.0"
|
|
115
115
|
},
|
|
116
116
|
"devDependenciesComments": {
|
|
117
117
|
"@rollup/plugin-typescript": "It appears that 11.1.3 breaks sourcemaps"
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"@codemirror/state": "^6.3.1",
|
|
125
125
|
"@codemirror/view": "^6.22.0",
|
|
126
126
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
127
|
-
"@mermaid-js/mermaid-cli": "^10.6.
|
|
127
|
+
"@mermaid-js/mermaid-cli": "^10.6.1",
|
|
128
128
|
"@napi-rs/cli": "^2.16.5",
|
|
129
129
|
"@rollup/plugin-alias": "^5.0.1",
|
|
130
130
|
"@rollup/plugin-buble": "^1.0.3",
|
|
@@ -136,11 +136,11 @@
|
|
|
136
136
|
"@rollup/plugin-typescript": "11.1.5",
|
|
137
137
|
"@rollup/pluginutils": "^5.0.5",
|
|
138
138
|
"@types/estree": "1.0.5",
|
|
139
|
-
"@types/mocha": "^10.0.
|
|
139
|
+
"@types/mocha": "^10.0.5",
|
|
140
140
|
"@types/node": "18.0.0",
|
|
141
141
|
"@types/yargs-parser": "^21.0.3",
|
|
142
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
143
|
-
"@typescript-eslint/parser": "^6.
|
|
142
|
+
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
143
|
+
"@typescript-eslint/parser": "^6.12.0",
|
|
144
144
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
145
145
|
"@vue/eslint-config-typescript": "^12.0.0",
|
|
146
146
|
"acorn": "^8.11.2",
|
|
@@ -150,11 +150,11 @@
|
|
|
150
150
|
"chokidar": "^3.5.3",
|
|
151
151
|
"colorette": "^2.0.20",
|
|
152
152
|
"concurrently": "^8.2.2",
|
|
153
|
-
"core-js": "^3.33.
|
|
153
|
+
"core-js": "^3.33.3",
|
|
154
154
|
"date-time": "^4.0.0",
|
|
155
155
|
"es5-shim": "^4.6.7",
|
|
156
156
|
"es6-shim": "^0.35.8",
|
|
157
|
-
"eslint": "^8.
|
|
157
|
+
"eslint": "^8.54.0",
|
|
158
158
|
"eslint-config-prettier": "^9.0.0",
|
|
159
159
|
"eslint-plugin-import": "^2.29.0",
|
|
160
160
|
"eslint-plugin-prettier": "^5.0.1",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"pretty-bytes": "^6.1.1",
|
|
178
178
|
"pretty-ms": "^8.0.0",
|
|
179
179
|
"requirejs": "^2.3.6",
|
|
180
|
-
"rollup": "^4.
|
|
180
|
+
"rollup": "^4.5.0",
|
|
181
181
|
"rollup-plugin-license": "^3.2.0",
|
|
182
182
|
"rollup-plugin-string": "^3.0.0",
|
|
183
183
|
"rollup-plugin-thatworks": "^1.0.4",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"systemjs": "^6.14.2",
|
|
190
190
|
"terser": "^5.24.0",
|
|
191
191
|
"tslib": "^2.6.2",
|
|
192
|
-
"typescript": "^5.
|
|
192
|
+
"typescript": "^5.3.2",
|
|
193
193
|
"vite": "^5.0.0",
|
|
194
194
|
"vitepress": "^1.0.0-rc.29",
|
|
195
195
|
"vue": "^3.3.8",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"yargs-parser": "^21.1.1"
|
|
199
199
|
},
|
|
200
200
|
"overrides": {
|
|
201
|
-
"axios": "^1.6.
|
|
201
|
+
"axios": "^1.6.2",
|
|
202
202
|
"semver": "^7.5.4"
|
|
203
203
|
},
|
|
204
204
|
"files": [
|