rollup 4.12.0 → 4.12.1
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 +24 -32
- package/dist/es/shared/parseAst.js +7 -7
- 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 +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 +7 -7
- package/dist/shared/rollup.js +23 -31
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +28 -28
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.12.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.12.1
|
|
5
|
+
Wed, 06 Mar 2024 06:02:59 GMT - commit f44dac3170a671b0978afa3af43818617904f544
|
|
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.12.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.12.1
|
|
4
|
+
Wed, 06 Mar 2024 06:02:59 GMT - commit f44dac3170a671b0978afa3af43818617904f544
|
|
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, Program as Program$1, logRedeclarationError, CatchClause as CatchClause$1, logDuplicateArgumentNameError, CallExpression as CallExpression$1, logIllegalImportReassignment, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, Property as Property$1, logConstVariableReassignError, ExpressionStatement as ExpressionStatement$1, ArrowFunctionExpression as ArrowFunctionExpression$1, logMissingExport, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1,
|
|
10
|
+
import { normalize, getImportPath, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, Program as Program$1, logRedeclarationError, CatchClause as CatchClause$1, logDuplicateArgumentNameError, CallExpression as CallExpression$1, logIllegalImportReassignment, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, Property as Property$1, logConstVariableReassignError, ExpressionStatement as ExpressionStatement$1, ArrowFunctionExpression as ArrowFunctionExpression$1, logMissingExport, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logParseError, logModuleParseError, error, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getReadStringFunction, convertString, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logInvalidFormatForTopLevelAwait, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logCircularReexport, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, 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 { parseAsync, xxhashBase64Url, xxhashBase36, xxhashBase16 } from '../../native.js';
|
|
@@ -16,7 +16,7 @@ import { performance } from 'node:perf_hooks';
|
|
|
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.12.
|
|
19
|
+
var version = "4.12.1";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -10984,18 +10984,18 @@ const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
|
|
|
10984
10984
|
: 'undefined';
|
|
10985
10985
|
};
|
|
10986
10986
|
const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
|
|
10987
|
-
const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${path}'`);
|
|
10987
|
+
const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
|
|
10988
10988
|
const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
|
|
10989
10989
|
const relativeUrlMechanisms = {
|
|
10990
10990
|
amd: relativePath => {
|
|
10991
10991
|
if (relativePath[0] !== '.')
|
|
10992
10992
|
relativePath = './' + relativePath;
|
|
10993
|
-
return getResolveUrl(`require.toUrl('${relativePath}'), document.baseURI`);
|
|
10993
|
+
return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`);
|
|
10994
10994
|
},
|
|
10995
10995
|
cjs: relativePath => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath)})`,
|
|
10996
|
-
es: relativePath => getResolveUrl(`'${relativePath}', import.meta.url`),
|
|
10996
|
+
es: relativePath => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`),
|
|
10997
10997
|
iife: relativePath => getRelativeUrlFromDocument(relativePath),
|
|
10998
|
-
system: relativePath => getResolveUrl(`'${relativePath}', module.meta.url`),
|
|
10998
|
+
system: relativePath => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`),
|
|
10999
10999
|
umd: relativePath => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath, true)})`
|
|
11000
11000
|
};
|
|
11001
11001
|
const importMetaMechanisms = {
|
|
@@ -11140,7 +11140,7 @@ class PanicError extends NodeBase {
|
|
|
11140
11140
|
const id = this.scope.context.module.id;
|
|
11141
11141
|
// This simulates the current nested error structure. We could also just
|
|
11142
11142
|
// replace it with a flat error.
|
|
11143
|
-
const parseError =
|
|
11143
|
+
const parseError = getRollupError(logParseError(this.message));
|
|
11144
11144
|
const moduleParseError = logModuleParseError(parseError, id);
|
|
11145
11145
|
return error(moduleParseError);
|
|
11146
11146
|
}
|
|
@@ -11152,7 +11152,7 @@ class ParseError extends NodeBase {
|
|
|
11152
11152
|
const id = this.scope.context.module.id;
|
|
11153
11153
|
// This simulates the current nested error structure. We could also just
|
|
11154
11154
|
// replace it with a flat error.
|
|
11155
|
-
const parseError =
|
|
11155
|
+
const parseError = getRollupError(logParseError(this.message, pos));
|
|
11156
11156
|
const moduleParseError = logModuleParseError(parseError, id);
|
|
11157
11157
|
this.scope.context.error(moduleParseError, pos);
|
|
11158
11158
|
}
|
|
@@ -16758,13 +16758,10 @@ function* concatLazy(iterables) {
|
|
|
16758
16758
|
*
|
|
16759
16759
|
* One non-trivial optimization we can apply is that dynamic entries are
|
|
16760
16760
|
* different from static entries in so far as when a dynamic import occurs,
|
|
16761
|
-
* some
|
|
16762
|
-
*
|
|
16763
|
-
*
|
|
16764
|
-
*
|
|
16765
|
-
* for them. Instead, the dynamic import target can load them from the
|
|
16766
|
-
* importing
|
|
16767
|
-
* chunk.
|
|
16761
|
+
* some modules are already in memory. If some of these modules are also
|
|
16762
|
+
* dependencies of the dynamic entry, then it does not make sense to create a
|
|
16763
|
+
* separate chunk for them. Instead, the dynamic import target can load them
|
|
16764
|
+
* from the importing chunk.
|
|
16768
16765
|
*
|
|
16769
16766
|
* With regard to chunking, if B is implicitly loaded after A, then this can be
|
|
16770
16767
|
* handled the same way as if there was a dynamic import A => B.
|
|
@@ -16773,8 +16770,7 @@ function* concatLazy(iterables) {
|
|
|
16773
16770
|
* Assume A -> B (A imports B), A => C (A dynamically imports C) and C -> B.
|
|
16774
16771
|
* Then the initial algorithm would assign A into the A chunk, C into the C
|
|
16775
16772
|
* chunk and B into the AC chunk, i.e. the chunk with the dependent entry
|
|
16776
|
-
* points
|
|
16777
|
-
* A and C.
|
|
16773
|
+
* points A and C.
|
|
16778
16774
|
* However we know that C can only be loaded from A, so A and its dependency B
|
|
16779
16775
|
* must already be in memory when C is loaded. So it is enough to create only
|
|
16780
16776
|
* two chunks A containing [AB] and C containing [C].
|
|
@@ -16789,15 +16785,13 @@ function* concatLazy(iterables) {
|
|
|
16789
16785
|
* A => D,
|
|
16790
16786
|
* D -> B, D -> C
|
|
16791
16787
|
* So without dynamic import optimization, the dependent entry points are
|
|
16792
|
-
* A: XY, B: DXY, C: DX, D: D, X: X, Y: Y,
|
|
16793
|
-
*
|
|
16788
|
+
* A: XY, B: DXY, C: DX, D: D, X: X, Y: Y, so we would for now create six
|
|
16789
|
+
* chunks.
|
|
16794
16790
|
*
|
|
16795
16791
|
* Now D is loaded only after A is loaded. But A is loaded if either X is
|
|
16796
|
-
* loaded
|
|
16797
|
-
*
|
|
16798
|
-
*
|
|
16799
|
-
* Y
|
|
16800
|
-
* depends on, which in this case are the modules A and B.
|
|
16792
|
+
* loaded or Y is loaded. So the modules that are already in memory when D is
|
|
16793
|
+
* loaded are the intersection of all modules that X depends on with all
|
|
16794
|
+
* modules that Y depends on, which in this case are the modules A and B.
|
|
16801
16795
|
* We could also say they are all modules that have both X and Y as dependent
|
|
16802
16796
|
* entry points.
|
|
16803
16797
|
*
|
|
@@ -16806,8 +16800,7 @@ function* concatLazy(iterables) {
|
|
|
16806
16800
|
* same chunk.
|
|
16807
16801
|
*
|
|
16808
16802
|
* Now let us extend this to the most general case where we have several
|
|
16809
|
-
* dynamic
|
|
16810
|
-
* importers for one dynamic entry point.
|
|
16803
|
+
* dynamic importers for one dynamic entry point.
|
|
16811
16804
|
*
|
|
16812
16805
|
* In the most general form, it works like this:
|
|
16813
16806
|
* For each dynamic entry point, we have a number of dynamic importers, which
|
|
@@ -16820,9 +16813,8 @@ function* concatLazy(iterables) {
|
|
|
16820
16813
|
* each dynamic importer.
|
|
16821
16814
|
*
|
|
16822
16815
|
* Assuming that A => D and B => D and A has dependent entry points XY and B
|
|
16823
|
-
* has
|
|
16824
|
-
*
|
|
16825
|
-
* all modules that have at least XYZ as dependent entry points.
|
|
16816
|
+
* has dependent entry points YZ, then the modules guaranteed to be in memory
|
|
16817
|
+
* are all modules that have at least XYZ as dependent entry points.
|
|
16826
16818
|
* We call XYZ the *dynamically dependent entry points* of D.
|
|
16827
16819
|
*
|
|
16828
16820
|
* Now there is one last case to consider: If one of the dynamically dependent
|
|
@@ -16849,7 +16841,7 @@ function* concatLazy(iterables) {
|
|
|
16849
16841
|
*
|
|
16850
16842
|
* For efficient operations, we assign each entry a numerical index and
|
|
16851
16843
|
* represent Sets of Chunks as BigInt values where each chunk corresponds to a
|
|
16852
|
-
* bit index. Then
|
|
16844
|
+
* bit index. Then the last two maps can be represented as arrays of BigInt
|
|
16853
16845
|
* values.
|
|
16854
16846
|
*
|
|
16855
16847
|
* Then we iterate through each dynamic entry. We set the already loaded modules
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.12.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.12.1
|
|
4
|
+
Wed, 06 Mar 2024 06:02:59 GMT - commit f44dac3170a671b0978afa3af43818617904f544
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -369,9 +369,9 @@ const URL_TREESHAKE_MODULESIDEEFFECTS = 'configuration-options/#treeshake-module
|
|
|
369
369
|
const URL_WATCH = 'configuration-options/#watch';
|
|
370
370
|
|
|
371
371
|
function error(base) {
|
|
372
|
-
throw base instanceof Error ? base :
|
|
372
|
+
throw base instanceof Error ? base : getRollupError(base);
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function getRollupError(base) {
|
|
375
375
|
const errorInstance = Object.assign(new Error(base.message), base);
|
|
376
376
|
Object.defineProperty(errorInstance, 'name', { value: 'RollupError', writable: true });
|
|
377
377
|
return errorInstance;
|
|
@@ -1006,10 +1006,10 @@ function convertProgram(buffer, readString) {
|
|
|
1006
1006
|
const node = convertNode(0, new Uint32Array(buffer), readString);
|
|
1007
1007
|
switch (node.type) {
|
|
1008
1008
|
case PanicError: {
|
|
1009
|
-
return error(
|
|
1009
|
+
return error(getRollupError(logParseError(node.message)));
|
|
1010
1010
|
}
|
|
1011
1011
|
case ParseError: {
|
|
1012
|
-
return error(
|
|
1012
|
+
return error(getRollupError(logParseError(node.message, node.start)));
|
|
1013
1013
|
}
|
|
1014
1014
|
default: {
|
|
1015
1015
|
return node;
|
|
@@ -2158,4 +2158,4 @@ const parseAstAsync = async (input, { allowReturnOutsideFunction = false, signal
|
|
|
2158
2158
|
return convertProgram(astBuffer.buffer, getReadStringFunction(astBuffer));
|
|
2159
2159
|
};
|
|
2160
2160
|
|
|
2161
|
-
export { ANNOTATION_KEY, ArrowFunctionExpression, BlockStatement, CallExpression, CatchClause, ExpressionStatement, FIXED_STRINGS, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, Program, Property, ReturnStatement, TemplateLiteral, 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, convertAnnotations, convertNode, convertString, error, getAliasName, getImportPath, getReadStringFunction,
|
|
2161
|
+
export { ANNOTATION_KEY, ArrowFunctionExpression, BlockStatement, CallExpression, CatchClause, ExpressionStatement, FIXED_STRINGS, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, Program, Property, ReturnStatement, TemplateLiteral, 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, convertAnnotations, convertNode, convertString, error, getAliasName, getImportPath, getReadStringFunction, getRollupError, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, 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, logParseError, 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
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
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.12.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.12.1
|
|
4
|
+
Wed, 06 Mar 2024 06:02:59 GMT - commit f44dac3170a671b0978afa3af43818617904f544
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -275,9 +275,9 @@ const URL_BUNDLE_CONFIG_AS_CJS = 'command-line-interface/#bundleconfigascjs';
|
|
|
275
275
|
const URL_CONFIGURATION_FILES = 'command-line-interface/#configuration-files';
|
|
276
276
|
|
|
277
277
|
function error(base) {
|
|
278
|
-
throw base instanceof Error ? base :
|
|
278
|
+
throw base instanceof Error ? base : getRollupError(base);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function getRollupError(base) {
|
|
281
281
|
const errorInstance = Object.assign(new Error(base.message), base);
|
|
282
282
|
Object.defineProperty(errorInstance, 'name', { value: 'RollupError', writable: true });
|
|
283
283
|
return errorInstance;
|
|
@@ -1069,10 +1069,10 @@ function convertProgram(buffer, readString) {
|
|
|
1069
1069
|
const node = convertNode(0, new Uint32Array(buffer), readString);
|
|
1070
1070
|
switch (node.type) {
|
|
1071
1071
|
case PanicError: {
|
|
1072
|
-
return error(
|
|
1072
|
+
return error(getRollupError(logParseError(node.message)));
|
|
1073
1073
|
}
|
|
1074
1074
|
case ParseError: {
|
|
1075
|
-
return error(
|
|
1075
|
+
return error(getRollupError(logParseError(node.message, node.start)));
|
|
1076
1076
|
}
|
|
1077
1077
|
default: {
|
|
1078
1078
|
return node;
|
|
@@ -2270,7 +2270,7 @@ exports.error = error;
|
|
|
2270
2270
|
exports.getAliasName = getAliasName;
|
|
2271
2271
|
exports.getImportPath = getImportPath;
|
|
2272
2272
|
exports.getReadStringFunction = getReadStringFunction;
|
|
2273
|
-
exports.
|
|
2273
|
+
exports.getRollupError = getRollupError;
|
|
2274
2274
|
exports.getRollupUrl = getRollupUrl;
|
|
2275
2275
|
exports.isAbsolute = isAbsolute;
|
|
2276
2276
|
exports.isPathFragment = isPathFragment;
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.12.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.12.1
|
|
4
|
+
Wed, 06 Mar 2024 06:02:59 GMT - commit f44dac3170a671b0978afa3af43818617904f544
|
|
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.12.
|
|
34
|
+
var version = "4.12.1";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -12422,18 +12422,18 @@ const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
|
|
|
12422
12422
|
: 'undefined';
|
|
12423
12423
|
};
|
|
12424
12424
|
const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
|
|
12425
|
-
const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${path}'`);
|
|
12425
|
+
const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
|
|
12426
12426
|
const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
|
|
12427
12427
|
const relativeUrlMechanisms = {
|
|
12428
12428
|
amd: relativePath => {
|
|
12429
12429
|
if (relativePath[0] !== '.')
|
|
12430
12430
|
relativePath = './' + relativePath;
|
|
12431
|
-
return getResolveUrl(`require.toUrl('${relativePath}'), document.baseURI`);
|
|
12431
|
+
return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`);
|
|
12432
12432
|
},
|
|
12433
12433
|
cjs: relativePath => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath)})`,
|
|
12434
|
-
es: relativePath => getResolveUrl(`'${relativePath}', import.meta.url`),
|
|
12434
|
+
es: relativePath => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`),
|
|
12435
12435
|
iife: relativePath => getRelativeUrlFromDocument(relativePath),
|
|
12436
|
-
system: relativePath => getResolveUrl(`'${relativePath}', module.meta.url`),
|
|
12436
|
+
system: relativePath => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`),
|
|
12437
12437
|
umd: relativePath => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath, true)})`
|
|
12438
12438
|
};
|
|
12439
12439
|
const importMetaMechanisms = {
|
|
@@ -12578,7 +12578,7 @@ class PanicError extends NodeBase {
|
|
|
12578
12578
|
const id = this.scope.context.module.id;
|
|
12579
12579
|
// This simulates the current nested error structure. We could also just
|
|
12580
12580
|
// replace it with a flat error.
|
|
12581
|
-
const parseError = parseAst_js.
|
|
12581
|
+
const parseError = parseAst_js.getRollupError(parseAst_js.logParseError(this.message));
|
|
12582
12582
|
const moduleParseError = parseAst_js.logModuleParseError(parseError, id);
|
|
12583
12583
|
return parseAst_js.error(moduleParseError);
|
|
12584
12584
|
}
|
|
@@ -12590,7 +12590,7 @@ class ParseError extends NodeBase {
|
|
|
12590
12590
|
const id = this.scope.context.module.id;
|
|
12591
12591
|
// This simulates the current nested error structure. We could also just
|
|
12592
12592
|
// replace it with a flat error.
|
|
12593
|
-
const parseError = parseAst_js.
|
|
12593
|
+
const parseError = parseAst_js.getRollupError(parseAst_js.logParseError(this.message, pos));
|
|
12594
12594
|
const moduleParseError = parseAst_js.logModuleParseError(parseError, id);
|
|
12595
12595
|
this.scope.context.error(moduleParseError, pos);
|
|
12596
12596
|
}
|
|
@@ -18084,13 +18084,10 @@ function* concatLazy(iterables) {
|
|
|
18084
18084
|
*
|
|
18085
18085
|
* One non-trivial optimization we can apply is that dynamic entries are
|
|
18086
18086
|
* different from static entries in so far as when a dynamic import occurs,
|
|
18087
|
-
* some
|
|
18088
|
-
*
|
|
18089
|
-
*
|
|
18090
|
-
*
|
|
18091
|
-
* for them. Instead, the dynamic import target can load them from the
|
|
18092
|
-
* importing
|
|
18093
|
-
* chunk.
|
|
18087
|
+
* some modules are already in memory. If some of these modules are also
|
|
18088
|
+
* dependencies of the dynamic entry, then it does not make sense to create a
|
|
18089
|
+
* separate chunk for them. Instead, the dynamic import target can load them
|
|
18090
|
+
* from the importing chunk.
|
|
18094
18091
|
*
|
|
18095
18092
|
* With regard to chunking, if B is implicitly loaded after A, then this can be
|
|
18096
18093
|
* handled the same way as if there was a dynamic import A => B.
|
|
@@ -18099,8 +18096,7 @@ function* concatLazy(iterables) {
|
|
|
18099
18096
|
* Assume A -> B (A imports B), A => C (A dynamically imports C) and C -> B.
|
|
18100
18097
|
* Then the initial algorithm would assign A into the A chunk, C into the C
|
|
18101
18098
|
* chunk and B into the AC chunk, i.e. the chunk with the dependent entry
|
|
18102
|
-
* points
|
|
18103
|
-
* A and C.
|
|
18099
|
+
* points A and C.
|
|
18104
18100
|
* However we know that C can only be loaded from A, so A and its dependency B
|
|
18105
18101
|
* must already be in memory when C is loaded. So it is enough to create only
|
|
18106
18102
|
* two chunks A containing [AB] and C containing [C].
|
|
@@ -18115,15 +18111,13 @@ function* concatLazy(iterables) {
|
|
|
18115
18111
|
* A => D,
|
|
18116
18112
|
* D -> B, D -> C
|
|
18117
18113
|
* So without dynamic import optimization, the dependent entry points are
|
|
18118
|
-
* A: XY, B: DXY, C: DX, D: D, X: X, Y: Y,
|
|
18119
|
-
*
|
|
18114
|
+
* A: XY, B: DXY, C: DX, D: D, X: X, Y: Y, so we would for now create six
|
|
18115
|
+
* chunks.
|
|
18120
18116
|
*
|
|
18121
18117
|
* Now D is loaded only after A is loaded. But A is loaded if either X is
|
|
18122
|
-
* loaded
|
|
18123
|
-
*
|
|
18124
|
-
*
|
|
18125
|
-
* Y
|
|
18126
|
-
* depends on, which in this case are the modules A and B.
|
|
18118
|
+
* loaded or Y is loaded. So the modules that are already in memory when D is
|
|
18119
|
+
* loaded are the intersection of all modules that X depends on with all
|
|
18120
|
+
* modules that Y depends on, which in this case are the modules A and B.
|
|
18127
18121
|
* We could also say they are all modules that have both X and Y as dependent
|
|
18128
18122
|
* entry points.
|
|
18129
18123
|
*
|
|
@@ -18132,8 +18126,7 @@ function* concatLazy(iterables) {
|
|
|
18132
18126
|
* same chunk.
|
|
18133
18127
|
*
|
|
18134
18128
|
* Now let us extend this to the most general case where we have several
|
|
18135
|
-
* dynamic
|
|
18136
|
-
* importers for one dynamic entry point.
|
|
18129
|
+
* dynamic importers for one dynamic entry point.
|
|
18137
18130
|
*
|
|
18138
18131
|
* In the most general form, it works like this:
|
|
18139
18132
|
* For each dynamic entry point, we have a number of dynamic importers, which
|
|
@@ -18146,9 +18139,8 @@ function* concatLazy(iterables) {
|
|
|
18146
18139
|
* each dynamic importer.
|
|
18147
18140
|
*
|
|
18148
18141
|
* Assuming that A => D and B => D and A has dependent entry points XY and B
|
|
18149
|
-
* has
|
|
18150
|
-
*
|
|
18151
|
-
* all modules that have at least XYZ as dependent entry points.
|
|
18142
|
+
* has dependent entry points YZ, then the modules guaranteed to be in memory
|
|
18143
|
+
* are all modules that have at least XYZ as dependent entry points.
|
|
18152
18144
|
* We call XYZ the *dynamically dependent entry points* of D.
|
|
18153
18145
|
*
|
|
18154
18146
|
* Now there is one last case to consider: If one of the dynamically dependent
|
|
@@ -18175,7 +18167,7 @@ function* concatLazy(iterables) {
|
|
|
18175
18167
|
*
|
|
18176
18168
|
* For efficient operations, we assign each entry a numerical index and
|
|
18177
18169
|
* represent Sets of Chunks as BigInt values where each chunk corresponds to a
|
|
18178
|
-
* bit index. Then
|
|
18170
|
+
* bit index. Then the last two maps can be represented as arrays of BigInt
|
|
18179
18171
|
* values.
|
|
18180
18172
|
*
|
|
18181
18173
|
* Then we iterate through each dynamic entry. We set the already loaded modules
|
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.12.
|
|
3
|
+
"version": "4.12.1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -101,19 +101,19 @@
|
|
|
101
101
|
"homepage": "https://rollupjs.org/",
|
|
102
102
|
"optionalDependencies": {
|
|
103
103
|
"fsevents": "~2.3.2",
|
|
104
|
-
"@rollup/rollup-darwin-arm64": "4.12.
|
|
105
|
-
"@rollup/rollup-android-arm64": "4.12.
|
|
106
|
-
"@rollup/rollup-win32-arm64-msvc": "4.12.
|
|
107
|
-
"@rollup/rollup-linux-arm64-gnu": "4.12.
|
|
108
|
-
"@rollup/rollup-linux-arm64-musl": "4.12.
|
|
109
|
-
"@rollup/rollup-android-arm-eabi": "4.12.
|
|
110
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.12.
|
|
111
|
-
"@rollup/rollup-win32-ia32-msvc": "4.12.
|
|
112
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.12.
|
|
113
|
-
"@rollup/rollup-darwin-x64": "4.12.
|
|
114
|
-
"@rollup/rollup-win32-x64-msvc": "4.12.
|
|
115
|
-
"@rollup/rollup-linux-x64-gnu": "4.12.
|
|
116
|
-
"@rollup/rollup-linux-x64-musl": "4.12.
|
|
104
|
+
"@rollup/rollup-darwin-arm64": "4.12.1",
|
|
105
|
+
"@rollup/rollup-android-arm64": "4.12.1",
|
|
106
|
+
"@rollup/rollup-win32-arm64-msvc": "4.12.1",
|
|
107
|
+
"@rollup/rollup-linux-arm64-gnu": "4.12.1",
|
|
108
|
+
"@rollup/rollup-linux-arm64-musl": "4.12.1",
|
|
109
|
+
"@rollup/rollup-android-arm-eabi": "4.12.1",
|
|
110
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.12.1",
|
|
111
|
+
"@rollup/rollup-win32-ia32-msvc": "4.12.1",
|
|
112
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.12.1",
|
|
113
|
+
"@rollup/rollup-darwin-x64": "4.12.1",
|
|
114
|
+
"@rollup/rollup-win32-x64-msvc": "4.12.1",
|
|
115
|
+
"@rollup/rollup-linux-x64-gnu": "4.12.1",
|
|
116
|
+
"@rollup/rollup-linux-x64-musl": "4.12.1"
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"@types/estree": "1.0.5"
|
|
@@ -125,11 +125,11 @@
|
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@codemirror/commands": "^6.3.3",
|
|
128
|
-
"@codemirror/lang-javascript": "^6.2.
|
|
128
|
+
"@codemirror/lang-javascript": "^6.2.2",
|
|
129
129
|
"@codemirror/language": "^6.10.1",
|
|
130
130
|
"@codemirror/search": "^6.5.6",
|
|
131
|
-
"@codemirror/state": "^6.4.
|
|
132
|
-
"@codemirror/view": "^6.24.
|
|
131
|
+
"@codemirror/state": "^6.4.1",
|
|
132
|
+
"@codemirror/view": "^6.24.1",
|
|
133
133
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
134
134
|
"@mermaid-js/mermaid-cli": "^10.8.0",
|
|
135
135
|
"@napi-rs/cli": "^2.18.0",
|
|
@@ -142,13 +142,13 @@
|
|
|
142
142
|
"@rollup/plugin-terser": "^0.4.4",
|
|
143
143
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
144
144
|
"@rollup/pluginutils": "^5.1.0",
|
|
145
|
-
"@types/eslint": "^8.56.
|
|
145
|
+
"@types/eslint": "^8.56.3",
|
|
146
146
|
"@types/inquirer": "^9.0.7",
|
|
147
147
|
"@types/mocha": "^10.0.6",
|
|
148
148
|
"@types/node": "~18.18.14",
|
|
149
149
|
"@types/yargs-parser": "^21.0.3",
|
|
150
|
-
"@typescript-eslint/eslint-plugin": "^7.0
|
|
151
|
-
"@typescript-eslint/parser": "^7.0
|
|
150
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
151
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
152
152
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
153
153
|
"@vue/eslint-config-typescript": "^12.0.0",
|
|
154
154
|
"acorn": "^8.11.3",
|
|
@@ -162,18 +162,18 @@
|
|
|
162
162
|
"date-time": "^4.0.0",
|
|
163
163
|
"es5-shim": "^4.6.7",
|
|
164
164
|
"es6-shim": "^0.35.8",
|
|
165
|
-
"eslint": "^8.
|
|
165
|
+
"eslint": "^8.57.0",
|
|
166
166
|
"eslint-config-prettier": "^9.1.0",
|
|
167
167
|
"eslint-plugin-import": "^2.29.1",
|
|
168
168
|
"eslint-plugin-prettier": "^5.1.3",
|
|
169
169
|
"eslint-plugin-unicorn": "^51.0.1",
|
|
170
|
-
"eslint-plugin-vue": "^9.
|
|
170
|
+
"eslint-plugin-vue": "^9.22.0",
|
|
171
171
|
"fixturify": "^3.0.0",
|
|
172
172
|
"flru": "^1.0.2",
|
|
173
173
|
"fs-extra": "^11.2.0",
|
|
174
174
|
"github-api": "^3.4.0",
|
|
175
|
-
"husky": "^9.0.
|
|
176
|
-
"inquirer": "^9.2.
|
|
175
|
+
"husky": "^9.0.11",
|
|
176
|
+
"inquirer": "^9.2.15",
|
|
177
177
|
"is-reference": "^3.0.2",
|
|
178
178
|
"lint-staged": "^15.2.2",
|
|
179
179
|
"locate-character": "^3.0.0",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"pretty-bytes": "^6.1.1",
|
|
186
186
|
"pretty-ms": "^9.0.0",
|
|
187
187
|
"requirejs": "^2.3.6",
|
|
188
|
-
"rollup": "^4.
|
|
188
|
+
"rollup": "^4.12.0",
|
|
189
189
|
"rollup-plugin-license": "^3.2.0",
|
|
190
190
|
"rollup-plugin-string": "^3.0.0",
|
|
191
191
|
"semver": "^7.6.0",
|
|
@@ -194,12 +194,12 @@
|
|
|
194
194
|
"source-map": "^0.7.4",
|
|
195
195
|
"source-map-support": "^0.5.21",
|
|
196
196
|
"systemjs": "^6.14.3",
|
|
197
|
-
"terser": "^5.
|
|
197
|
+
"terser": "^5.28.1",
|
|
198
198
|
"tslib": "^2.6.2",
|
|
199
199
|
"typescript": "^5.3.3",
|
|
200
|
-
"vite": "^5.1.
|
|
200
|
+
"vite": "^5.1.4",
|
|
201
201
|
"vitepress": "1.0.0-rc.39",
|
|
202
|
-
"vue": "^3.4.
|
|
202
|
+
"vue": "^3.4.20",
|
|
203
203
|
"wasm-pack": "^0.12.1",
|
|
204
204
|
"weak-napi": "^2.0.2",
|
|
205
205
|
"yargs-parser": "^21.1.1"
|