rollup 4.67.5 → 4.68.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 +3 -3
- 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 +357 -258
- package/dist/es/shared/parseAst.js +16 -3
- 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/node-entry.js +2 -2
- package/dist/shared/parseAst.js +21 -2
- package/dist/shared/rollup.js +344 -245
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +41 -41
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.68.1
|
|
4
|
+
Mon, 09 Nov 2026 05:27:12 GMT - commit d1728b6a134c3a70f53a6961b20b19d4a148d236
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -63,11 +63,14 @@ const EMPTY_SET = Object.freeze(new (class extends Set {
|
|
|
63
63
|
|
|
64
64
|
// This file is generated by scripts/generate-node-types.js.
|
|
65
65
|
// Do not edit this file directly.
|
|
66
|
+
const ArrayPattern = 'ArrayPattern';
|
|
66
67
|
const ArrowFunctionExpression = 'ArrowFunctionExpression';
|
|
68
|
+
const AssignmentPattern = 'AssignmentPattern';
|
|
67
69
|
const AwaitExpression = 'AwaitExpression';
|
|
68
70
|
const BlockStatement = 'BlockStatement';
|
|
69
71
|
const CallExpression = 'CallExpression';
|
|
70
72
|
const CatchClause = 'CatchClause';
|
|
73
|
+
const ChainExpression = 'ChainExpression';
|
|
71
74
|
const ExportDefaultDeclaration = 'ExportDefaultDeclaration';
|
|
72
75
|
const ExpressionStatement = 'ExpressionStatement';
|
|
73
76
|
const FunctionExpression = 'FunctionExpression';
|
|
@@ -75,6 +78,7 @@ const Identifier = 'Identifier';
|
|
|
75
78
|
const Literal = 'Literal';
|
|
76
79
|
const MemberExpression = 'MemberExpression';
|
|
77
80
|
const ObjectExpression = 'ObjectExpression';
|
|
81
|
+
const ObjectPattern = 'ObjectPattern';
|
|
78
82
|
const PanicError = 'PanicError';
|
|
79
83
|
const ParseError = 'ParseError';
|
|
80
84
|
const Program = 'Program';
|
|
@@ -83,6 +87,7 @@ const RestElement = 'RestElement';
|
|
|
83
87
|
const ReturnStatement = 'ReturnStatement';
|
|
84
88
|
const StaticBlock = 'StaticBlock';
|
|
85
89
|
const TemplateLiteral = 'TemplateLiteral';
|
|
90
|
+
const UnaryExpression = 'UnaryExpression';
|
|
86
91
|
const VariableDeclarator = 'VariableDeclarator';
|
|
87
92
|
|
|
88
93
|
/** @typedef {import('./types').Location} Location */
|
|
@@ -246,6 +251,14 @@ function getAliasName(id) {
|
|
|
246
251
|
const base = basename(id);
|
|
247
252
|
return base.slice(0, Math.max(0, base.length - extname(id).length));
|
|
248
253
|
}
|
|
254
|
+
function getDynamicAliasName(id) {
|
|
255
|
+
const aliasName = getAliasName(id);
|
|
256
|
+
if (aliasName !== 'index')
|
|
257
|
+
return aliasName;
|
|
258
|
+
const directoryName = basename(dirname(id));
|
|
259
|
+
// with the separator, a bare drive letter and the empty name of a root path count too
|
|
260
|
+
return isPathFragment(directoryName + '/') ? aliasName : directoryName;
|
|
261
|
+
}
|
|
249
262
|
function relativeId(id) {
|
|
250
263
|
if (!isAbsolute(id))
|
|
251
264
|
return id;
|
|
@@ -2150,4 +2163,4 @@ function getAstBuffer(astBuffer) {
|
|
|
2150
2163
|
const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(parse(input, allowReturnOutsideFunction, jsx)));
|
|
2151
2164
|
const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
|
|
2152
2165
|
|
|
2153
|
-
export { ANNOTATION_KEY, ArrowFunctionExpression, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, FunctionExpression, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, URL_LOAD, 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_TRANSFORM, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, VariableDeclarator, addTrailingSlashIfMissed, augmentCodeLocation, augmentLogMessage, convertAnnotations, convertNode, error, getAliasName, getAstBuffer, getImportPath, getRollupError, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularChunk, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logErrorInHook, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileNameOutsideOutputDirectory, 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, logMissingJsxExport, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logNonExternalSourcePhaseImport, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, logSourcePhaseFormatUnsupported, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
|
|
2166
|
+
export { ANNOTATION_KEY, ArrayPattern, ArrowFunctionExpression, AssignmentPattern, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, ChainExpression, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, FunctionExpression, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, ObjectPattern, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, URL_LOAD, 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_TRANSFORM, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, UnaryExpression, VariableDeclarator, addTrailingSlashIfMissed, augmentCodeLocation, augmentLogMessage, convertAnnotations, convertNode, error, getAliasName, getAstBuffer, getDynamicAliasName, getImportPath, getRollupError, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularChunk, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logErrorInHook, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileNameOutsideOutputDirectory, 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, logMissingJsxExport, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logNonExternalSourcePhaseImport, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, logSourcePhaseFormatUnsupported, 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.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.68.1
|
|
4
|
+
Mon, 09 Nov 2026 05:27:12 GMT - commit d1728b6a134c3a70f53a6961b20b19d4a148d236
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -224,6 +224,14 @@ function getAliasName(id) {
|
|
|
224
224
|
const base = path.basename(id);
|
|
225
225
|
return base.slice(0, Math.max(0, base.length - path.extname(id).length));
|
|
226
226
|
}
|
|
227
|
+
function getDynamicAliasName(id) {
|
|
228
|
+
const aliasName = getAliasName(id);
|
|
229
|
+
if (aliasName !== 'index')
|
|
230
|
+
return aliasName;
|
|
231
|
+
const directoryName = path.basename(path.dirname(id));
|
|
232
|
+
// with the separator, a bare drive letter and the empty name of a root path count too
|
|
233
|
+
return isPathFragment(directoryName + '/') ? aliasName : directoryName;
|
|
234
|
+
}
|
|
227
235
|
function relativeId(id) {
|
|
228
236
|
if (!isAbsolute$1(id))
|
|
229
237
|
return id;
|
|
@@ -1101,11 +1109,14 @@ function warnDeprecationWithOptions(deprecation, urlSnippet, activeDeprecation,
|
|
|
1101
1109
|
|
|
1102
1110
|
// This file is generated by scripts/generate-node-types.js.
|
|
1103
1111
|
// Do not edit this file directly.
|
|
1112
|
+
const ArrayPattern = 'ArrayPattern';
|
|
1104
1113
|
const ArrowFunctionExpression = 'ArrowFunctionExpression';
|
|
1114
|
+
const AssignmentPattern = 'AssignmentPattern';
|
|
1105
1115
|
const AwaitExpression = 'AwaitExpression';
|
|
1106
1116
|
const BlockStatement = 'BlockStatement';
|
|
1107
1117
|
const CallExpression = 'CallExpression';
|
|
1108
1118
|
const CatchClause = 'CatchClause';
|
|
1119
|
+
const ChainExpression = 'ChainExpression';
|
|
1109
1120
|
const ExportDefaultDeclaration = 'ExportDefaultDeclaration';
|
|
1110
1121
|
const ExpressionStatement = 'ExpressionStatement';
|
|
1111
1122
|
const FunctionExpression = 'FunctionExpression';
|
|
@@ -1113,6 +1124,7 @@ const Identifier = 'Identifier';
|
|
|
1113
1124
|
const Literal = 'Literal';
|
|
1114
1125
|
const MemberExpression = 'MemberExpression';
|
|
1115
1126
|
const ObjectExpression = 'ObjectExpression';
|
|
1127
|
+
const ObjectPattern = 'ObjectPattern';
|
|
1116
1128
|
const PanicError = 'PanicError';
|
|
1117
1129
|
const ParseError = 'ParseError';
|
|
1118
1130
|
const Program = 'Program';
|
|
@@ -1121,6 +1133,7 @@ const RestElement = 'RestElement';
|
|
|
1121
1133
|
const ReturnStatement = 'ReturnStatement';
|
|
1122
1134
|
const StaticBlock = 'StaticBlock';
|
|
1123
1135
|
const TemplateLiteral = 'TemplateLiteral';
|
|
1136
|
+
const UnaryExpression = 'UnaryExpression';
|
|
1124
1137
|
const VariableDeclarator = 'VariableDeclarator';
|
|
1125
1138
|
|
|
1126
1139
|
// This file is generated by scripts/generate-string-constants.js.
|
|
@@ -2214,12 +2227,15 @@ const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {
|
|
|
2214
2227
|
const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await native_js.parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
|
|
2215
2228
|
|
|
2216
2229
|
exports.ANNOTATION_KEY = ANNOTATION_KEY;
|
|
2230
|
+
exports.ArrayPattern = ArrayPattern;
|
|
2217
2231
|
exports.ArrowFunctionExpression = ArrowFunctionExpression;
|
|
2232
|
+
exports.AssignmentPattern = AssignmentPattern;
|
|
2218
2233
|
exports.AwaitExpression = AwaitExpression;
|
|
2219
2234
|
exports.BLANK = BLANK;
|
|
2220
2235
|
exports.BlockStatement = BlockStatement;
|
|
2221
2236
|
exports.CallExpression = CallExpression;
|
|
2222
2237
|
exports.CatchClause = CatchClause;
|
|
2238
|
+
exports.ChainExpression = ChainExpression;
|
|
2223
2239
|
exports.EMPTY_ARRAY = EMPTY_ARRAY;
|
|
2224
2240
|
exports.EMPTY_OBJECT = EMPTY_OBJECT;
|
|
2225
2241
|
exports.EMPTY_SET = EMPTY_SET;
|
|
@@ -2236,6 +2252,7 @@ exports.LOGLEVEL_WARN = LOGLEVEL_WARN;
|
|
|
2236
2252
|
exports.Literal = Literal;
|
|
2237
2253
|
exports.MemberExpression = MemberExpression;
|
|
2238
2254
|
exports.ObjectExpression = ObjectExpression;
|
|
2255
|
+
exports.ObjectPattern = ObjectPattern;
|
|
2239
2256
|
exports.Program = Program;
|
|
2240
2257
|
exports.Property = Property;
|
|
2241
2258
|
exports.RestElement = RestElement;
|
|
@@ -2268,6 +2285,7 @@ exports.URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY = URL_TREATING_MODULE_AS_EXTE
|
|
|
2268
2285
|
exports.URL_TREESHAKE = URL_TREESHAKE;
|
|
2269
2286
|
exports.URL_TREESHAKE_MODULESIDEEFFECTS = URL_TREESHAKE_MODULESIDEEFFECTS;
|
|
2270
2287
|
exports.URL_WATCH = URL_WATCH;
|
|
2288
|
+
exports.UnaryExpression = UnaryExpression;
|
|
2271
2289
|
exports.VariableDeclarator = VariableDeclarator;
|
|
2272
2290
|
exports.addTrailingSlashIfMissed = addTrailingSlashIfMissed;
|
|
2273
2291
|
exports.augmentCodeLocation = augmentCodeLocation;
|
|
@@ -2277,6 +2295,7 @@ exports.convertNode = convertNode;
|
|
|
2277
2295
|
exports.error = error;
|
|
2278
2296
|
exports.getAliasName = getAliasName;
|
|
2279
2297
|
exports.getAstBuffer = getAstBuffer;
|
|
2298
|
+
exports.getDynamicAliasName = getDynamicAliasName;
|
|
2280
2299
|
exports.getImportPath = getImportPath;
|
|
2281
2300
|
exports.getRollupError = getRollupError;
|
|
2282
2301
|
exports.getRollupUrl = getRollupUrl;
|