rollup 4.63.6 → 5.0.0-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.
Files changed (50) hide show
  1. package/LICENSE.md +3 -304
  2. package/dist/ast-types.d.ts +896 -0
  3. package/dist/bin/rollup +169 -65
  4. package/dist/es/getLogFilter.js +2 -2
  5. package/dist/es/parseAst.js +3 -3
  6. package/dist/es/rollup.js +2 -2
  7. package/dist/es/shared/node-entry.js +2064 -2077
  8. package/dist/es/shared/parseAst.js +3542 -276
  9. package/dist/es/shared/watch.js +1765 -9600
  10. package/dist/getLogFilter.js +2 -2
  11. package/dist/loadConfigFile.js +3 -3
  12. package/dist/native.js +3 -1
  13. package/dist/parseAst.d.ts +13 -1
  14. package/dist/parseAst.js +8 -2
  15. package/dist/rollup.android-arm-eabi.node +0 -0
  16. package/dist/rollup.android-arm64.node +0 -0
  17. package/dist/rollup.d.ts +157 -105
  18. package/dist/rollup.darwin-arm64.node +0 -0
  19. package/dist/rollup.darwin-x64.node +0 -0
  20. package/dist/rollup.freebsd-arm64.node +0 -0
  21. package/dist/rollup.freebsd-x64.node +0 -0
  22. package/dist/rollup.js +2 -3
  23. package/dist/rollup.linux-arm-gnueabihf.node +0 -0
  24. package/dist/rollup.linux-arm-musleabihf.node +0 -0
  25. package/dist/rollup.linux-arm64-gnu.node +0 -0
  26. package/dist/rollup.linux-arm64-musl.node +0 -0
  27. package/dist/rollup.linux-loong64-gnu.node +0 -0
  28. package/dist/rollup.linux-loong64-musl.node +0 -0
  29. package/dist/rollup.linux-ppc64-gnu.node +0 -0
  30. package/dist/rollup.linux-ppc64-musl.node +0 -0
  31. package/dist/rollup.linux-riscv64-gnu.node +0 -0
  32. package/dist/rollup.linux-riscv64-musl.node +0 -0
  33. package/dist/rollup.linux-s390x-gnu.node +0 -0
  34. package/dist/rollup.linux-x64-gnu.node +0 -0
  35. package/dist/rollup.linux-x64-musl.node +0 -0
  36. package/dist/rollup.openbsd-x64.node +0 -0
  37. package/dist/rollup.openharmony-arm64.node +0 -0
  38. package/dist/rollup.win32-arm64-msvc.node +0 -0
  39. package/dist/rollup.win32-ia32-msvc.node +0 -0
  40. package/dist/rollup.win32-x64-gnu.node +0 -0
  41. package/dist/rollup.win32-x64-msvc.node +0 -0
  42. package/dist/shared/index.js +1775 -9597
  43. package/dist/shared/loadConfigFile.js +9 -9
  44. package/dist/shared/node-entry.js +2 -4
  45. package/dist/shared/parseAst.js +3579 -303
  46. package/dist/shared/rollup.js +1811 -1802
  47. package/dist/shared/watch-cli.js +10 -9
  48. package/dist/shared/watch.js +7 -11
  49. package/package.json +76 -79
  50. package/dist/shared/fsevents-importer.js +0 -37
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.6
4
- Thu, 01 Oct 2026 06:50:26 GMT - commit 966ac85d64887ed38abd4eef67c3813633cbc2f6
3
+ Rollup.js v5.0.0-0
4
+ Tue, 06 Oct 2026 08:24:44 GMT - commit d78bf6bee48e411672e05d8977473f76e6758c35
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.6
4
- Thu, 01 Oct 2026 06:50:26 GMT - commit 966ac85d64887ed38abd4eef67c3813633cbc2f6
3
+ Rollup.js v5.0.0-0
4
+ Tue, 06 Oct 2026 08:24:44 GMT - commit d78bf6bee48e411672e05d8977473f76e6758c35
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -19,8 +19,8 @@ require('./shared/rollup.js');
19
19
  require('./shared/parseAst.js');
20
20
  const loadConfigFile_js = require('./shared/loadConfigFile.js');
21
21
  require('path');
22
- require('./native.js');
23
22
  require('node:perf_hooks');
23
+ require('./native.js');
24
24
  require('./getLogFilter.js');
25
25
 
26
26
 
package/dist/native.js CHANGED
@@ -131,7 +131,8 @@ const nativeModule = requireWithFriendlyError(
131
131
  existsSync(path.join(__dirname, localName)) ? localName : `@rollup/rollup-${packageBase}`
132
132
  );
133
133
 
134
- const { parse, parseAsync, xxhashBase64Url, xxhashBase36, xxhashBase16 } = nativeModule;
134
+ const { parse, parseAsync, parseAndWalk, xxhashBase64Url, xxhashBase36, xxhashBase16 } =
135
+ nativeModule;
135
136
 
136
137
  function getPackageBase() {
137
138
  const imported = bindingsByPlatformAndArch[platform]?.[arch];
@@ -164,6 +165,7 @@ If this is important to you, please consider supporting Rollup to make a native
164
165
 
165
166
  module.exports.parse = parse;
166
167
  module.exports.parseAsync = parseAsync;
168
+ module.exports.parseAndWalk = parseAndWalk;
167
169
  module.exports.xxhashBase64Url = xxhashBase64Url;
168
170
  module.exports.xxhashBase36 = xxhashBase36;
169
171
  module.exports.xxhashBase16 = xxhashBase16;
@@ -1,4 +1,16 @@
1
- import type { ParseAst, ParseAstAsync } from './rollup';
1
+ import type {
2
+ DeserializeAst,
3
+ ParseAndWalk,
4
+ ParseAst,
5
+ ParseAstAsync,
6
+ SerializeAst
7
+ } from './rollup';
2
8
 
3
9
  export const parseAst: ParseAst;
4
10
  export const parseAstAsync: ParseAstAsync;
11
+ export const parseLazyAst: ParseAst;
12
+ export const parseLazyAstAsync: ParseAstAsync;
13
+ export const deserializeLazyAst: DeserializeAst;
14
+ export const deserializeAst: DeserializeAst;
15
+ export const serializeAst: SerializeAst;
16
+ export const parseAndWalk: ParseAndWalk;
package/dist/parseAst.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.6
4
- Thu, 01 Oct 2026 06:50:26 GMT - commit 966ac85d64887ed38abd4eef67c3813633cbc2f6
3
+ Rollup.js v5.0.0-0
4
+ Tue, 06 Oct 2026 08:24:44 GMT - commit d78bf6bee48e411672e05d8977473f76e6758c35
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -17,6 +17,12 @@ require('node:path');
17
17
 
18
18
 
19
19
 
20
+ exports.deserializeAst = parseAst_js.deserializeAst;
21
+ exports.deserializeLazyAst = parseAst_js.deserializeLazyAst;
22
+ exports.parseAndWalk = parseAst_js.parseAndWalk;
20
23
  exports.parseAst = parseAst_js.parseAst;
21
24
  exports.parseAstAsync = parseAst_js.parseAstAsync;
25
+ exports.parseLazyAst = parseAst_js.parseLazyAst;
26
+ exports.parseLazyAstAsync = parseAst_js.parseLazyAstAsync;
27
+ exports.serializeAst = parseAst_js.serializeAst;
22
28
  //# sourceMappingURL=parseAst.js.map
Binary file
package/dist/rollup.d.ts CHANGED
@@ -1,29 +1,14 @@
1
- import type * as estree from 'estree';
2
-
3
- declare module 'estree' {
4
- export interface Decorator extends estree.BaseNode {
5
- type: 'Decorator';
6
- expression: estree.Expression;
7
- }
8
- interface PropertyDefinition {
9
- decorators: estree.Decorator[];
10
- }
11
- interface MethodDefinition {
12
- decorators: estree.Decorator[];
13
- }
14
- interface BaseClass {
15
- decorators: estree.Decorator[];
16
- }
17
- }
1
+ import type * as ast from './ast-types';
18
2
 
3
+ export type { ast };
19
4
  export const VERSION: string;
20
5
 
21
6
  // utils
22
- type NullValue = null | undefined | void;
23
- type MaybeArray<T> = T | T[];
7
+ export type NullValue = null | undefined | void;
8
+ export type MaybeArray<T> = T | T[];
24
9
  type MaybePromise<T> = T | Promise<T>;
25
10
 
26
- type PartialNull<T> = {
11
+ export type PartialNull<T> = {
27
12
  [P in keyof T]: T[P] | null;
28
13
  };
29
14
 
@@ -107,38 +92,40 @@ export interface SourceMap {
107
92
 
108
93
  export type SourceMapInput = ExistingRawSourceMap | string | null | { mappings: '' };
109
94
 
110
- interface ModuleOptions {
111
- attributes: Record<string, string>;
95
+ export type UniqueModuleId = string | { rawId: string; attributes?: Record<string, string> };
96
+
97
+ export interface ModuleOptions {
112
98
  meta: CustomPluginOptions;
113
99
  moduleSideEffects: boolean | 'no-treeshake';
114
100
  syntheticNamedExports: boolean | string;
115
101
  }
116
102
 
117
103
  export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
118
- ast?: ProgramNode | undefined;
104
+ ast?: ast.Program | undefined;
119
105
  code: string;
120
106
  map?: SourceMapInput | undefined;
121
107
  }
122
108
 
123
- export interface TransformModuleJSON {
124
- ast?: ProgramNode | undefined;
109
+ export interface ModuleSource {
110
+ astBuffer: Uint8Array;
125
111
  code: string;
126
- safeVariableNames: Record<string, string> | null;
127
- // note if plugins use new this.cache to opt-out auto transform cache
112
+ // note if plugins use this.cache to opt-out of transform caching
128
113
  customTransformCache: boolean;
129
114
  originalCode: string;
130
115
  originalSourcemap: ExistingDecodedSourceMap | null;
116
+ resolvedIds?: ResolvedIdMap;
117
+ safeVariableNames: Record<string, string> | null;
131
118
  sourcemapChain: DecodedSourceMapOrMissing[];
132
119
  transformDependencies: string[];
120
+ transformFiles?: EmittedFile[] | undefined;
133
121
  }
134
122
 
135
- export interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
136
- safeVariableNames: Record<string, string> | null;
137
- ast: ProgramNode;
123
+ export interface CachedModule extends ModuleSource, ModuleOptions {
124
+ attributes: Record<string, string>;
138
125
  dependencies: string[];
139
126
  id: string;
127
+ rawId: string;
140
128
  resolvedIds: ResolvedIdMap;
141
- transformFiles: EmittedFile[] | undefined;
142
129
  }
143
130
 
144
131
  export interface PluginCache {
@@ -170,8 +157,9 @@ export interface EmittedAsset {
170
157
  export interface EmittedChunk {
171
158
  fileName?: string | undefined;
172
159
  id: string;
173
- implicitlyLoadedAfterOneOf?: string[] | undefined;
174
- importer?: string | undefined;
160
+ attributes?: Record<string, string>;
161
+ implicitlyLoadedAfterOneOf?: UniqueModuleId[] | undefined;
162
+ importer?: UniqueModuleId | undefined;
175
163
  name?: string | undefined;
176
164
  preserveSignature?: PreserveEntrySignaturesOption | undefined;
177
165
  type: 'chunk';
@@ -191,7 +179,8 @@ export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
191
179
  export type EmitFile = (emittedFile: EmittedFile) => string;
192
180
 
193
181
  export interface ModuleInfo extends ModuleOptions {
194
- ast: ProgramNode | null;
182
+ attributes: Record<string, string>;
183
+ ast: ast.Program | null;
195
184
  code: string | null;
196
185
  dynamicImporters: readonly string[];
197
186
  dynamicallyImportedIdResolutions: readonly ResolvedId[];
@@ -209,35 +198,83 @@ export interface ModuleInfo extends ModuleOptions {
209
198
  isEntry: boolean;
210
199
  isExternal: boolean;
211
200
  isIncluded: boolean | null;
201
+ rawId: string;
212
202
  }
213
203
 
214
- export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
204
+ export type GetModuleInfo = (moduleId: UniqueModuleId) => ModuleInfo | null;
215
205
 
216
206
  // eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style -- this is an interface so that it can be extended by plugins
217
207
  export interface CustomPluginOptions {
218
208
  [plugin: string]: any;
219
209
  }
220
210
 
221
- type LoggingFunctionWithPosition = (
211
+ export type LoggingFunctionWithPosition = (
222
212
  log: RollupLog | string | (() => RollupLog | string),
223
213
  pos?: number | { column: number; line: number }
224
214
  ) => void;
225
215
 
226
- export type ParseAst = (
227
- input: string,
228
- options?: { allowReturnOutsideFunction?: boolean; jsx?: boolean }
229
- ) => ProgramNode;
230
-
231
216
  // declare AbortSignal here for environments without DOM lib or @types/node
232
217
  declare global {
233
218
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
234
219
  interface AbortSignal {}
235
220
  }
236
221
 
222
+ export type ParseAst = (
223
+ input: string,
224
+ options?: { allowReturnOutsideFunction?: boolean; jsx?: boolean }
225
+ ) => ast.Program;
226
+
237
227
  export type ParseAstAsync = (
238
228
  input: string,
239
- options?: { allowReturnOutsideFunction?: boolean; jsx?: boolean; signal?: AbortSignal }
240
- ) => Promise<ProgramNode>;
229
+ options?: { allowReturnOutsideFunction?: boolean; jsx?: boolean }
230
+ ) => Promise<ast.Program>;
231
+
232
+ export type DeserializeAst = (
233
+ buffer: Buffer | Uint8Array,
234
+ position?: number
235
+ ) => ast.AstNode;
236
+
237
+ export type SerializeAst = (node: ast.AstNode) => Buffer;
238
+
239
+ export interface ParseAndWalkApi {
240
+ /**
241
+ * Call this function to parse all child nodes of the current node.
242
+ * This function returns once all children are parsed and their callbacks
243
+ * have been executed.
244
+ */
245
+ parseChildren: () => void;
246
+ /**
247
+ * Call this function to skip parsing the children of the current node.
248
+ */
249
+ skipChildren: () => void;
250
+ /**
251
+ * The scope the current node lives in. Only present when parseAndWalk is
252
+ * called with `{ collectScopes: true }`.
253
+ */
254
+ scope?: ParseAndWalkScope;
255
+ }
256
+
257
+ export interface ParseAndWalkScope {
258
+ /**
259
+ * Returns true if the name is declared in this scope or any parent scope.
260
+ */
261
+ contains: (name: string) => boolean;
262
+ }
263
+
264
+ export type ParseAndWalkHandler<T extends ast.AstNode = ast.AstNode> = (
265
+ node: T,
266
+ api: ParseAndWalkApi
267
+ ) => void;
268
+
269
+ export type ParseAndWalkVisitors = {
270
+ [K in keyof ast.AstNodeTypeMap]?: ParseAndWalkHandler<ast.AstNodeTypeMap[K]>;
271
+ };
272
+
273
+ export type ParseAndWalk = (
274
+ input: string,
275
+ visitors: ParseAndWalkVisitors,
276
+ options?: { allowReturnOutsideFunction?: boolean; collectScopes?: boolean; jsx?: boolean }
277
+ ) => Promise<void>;
241
278
 
242
279
  export interface PluginContext extends MinimalPluginContext {
243
280
  addWatchFile: (id: string) => void;
@@ -252,16 +289,21 @@ export interface PluginContext extends MinimalPluginContext {
252
289
  getWatchFiles: () => string[];
253
290
  info: LoggingFunction;
254
291
  load: (
255
- options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>>
292
+ options: {
293
+ id: UniqueModuleId;
294
+ resolveDependencies?: boolean;
295
+ } & Partial<PartialNull<ModuleOptions>>
256
296
  ) => Promise<ModuleInfo>;
257
297
  parse: ParseAst;
298
+ parseAndWalk: ParseAndWalk;
258
299
  resolve: (
259
300
  source: string,
260
- importer?: string,
301
+ importer?: UniqueModuleId,
261
302
  options?: {
262
- importerAttributes?: Record<string, string>;
263
303
  attributes?: Record<string, string>;
264
304
  custom?: CustomPluginOptions;
305
+ /** @deprecated Provide a UniqueModuleId for importer instead. */
306
+ importerAttributes?: Record<string, string>;
265
307
  isEntry?: boolean;
266
308
  skipSelf?: boolean;
267
309
  }
@@ -292,12 +334,14 @@ export interface HookFilter {
292
334
  export interface ResolvedId extends ModuleOptions {
293
335
  external: boolean | 'absolute';
294
336
  id: string;
337
+ attributes: Record<string, string>;
295
338
  resolvedBy: string;
296
339
  }
297
340
 
298
- export type ResolvedIdMap = Record<string, ResolvedId>;
341
+ export type ResolvedIdMap = Record<string, ResolvedId & { rawId: string }>;
299
342
 
300
343
  export interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
344
+ attributes?: Record<string, string>;
301
345
  external?: boolean | 'absolute' | 'relative' | undefined;
302
346
  id: string;
303
347
  resolvedBy?: string | undefined;
@@ -305,8 +349,6 @@ export interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
305
349
 
306
350
  export type ResolveIdResult = string | NullValue | false | PartialResolvedId;
307
351
 
308
- export type ResolveIdResultWithoutNullValue = string | false | PartialResolvedId;
309
-
310
352
  export type ResolveIdHook = (
311
353
  this: PluginContext,
312
354
  source: string,
@@ -314,7 +356,8 @@ export type ResolveIdHook = (
314
356
  options: {
315
357
  attributes: Record<string, string>;
316
358
  custom?: CustomPluginOptions;
317
- importerAttributes?: Record<string, string> | undefined;
359
+ importerAttributes: Record<string, string>;
360
+ importerRawId?: string;
318
361
  isEntry: boolean;
319
362
  }
320
363
  ) => ResolveIdResult;
@@ -322,10 +365,11 @@ export type ResolveIdHook = (
322
365
  export type ShouldTransformCachedModuleHook = (
323
366
  this: PluginContext,
324
367
  options: {
325
- ast: ProgramNode;
368
+ ast: ast.Program;
326
369
  attributes: Record<string, string>;
327
370
  code: string;
328
371
  id: string;
372
+ rawId: string;
329
373
  meta: CustomPluginOptions;
330
374
  moduleSideEffects: boolean | 'no-treeshake';
331
375
  resolvedSources: ResolvedIdMap;
@@ -336,7 +380,12 @@ export type ShouldTransformCachedModuleHook = (
336
380
  export type IsExternal = (
337
381
  source: string,
338
382
  importer: string | undefined,
339
- isResolved: boolean
383
+ isResolved: boolean,
384
+ options: {
385
+ attributes: Record<string, string>;
386
+ importerAttributes: Record<string, string>;
387
+ importerRawId?: string;
388
+ }
340
389
  ) => boolean;
341
390
 
342
391
  export type HasModuleSideEffects = (id: string, external: boolean) => boolean;
@@ -346,15 +395,10 @@ export type LoadResult = SourceDescription | string | NullValue;
346
395
  export type LoadHook = (
347
396
  this: PluginContext,
348
397
  id: string,
349
- // temporarily marked as optional for better Vite type-compatibility
350
- options?:
351
- | {
352
- // unused, temporarily added for better Vite type-compatibility
353
- ssr?: boolean | undefined;
354
- // temporarily marked as optional for better Vite type-compatibility
355
- attributes?: Record<string, string>;
356
- }
357
- | undefined
398
+ options: {
399
+ rawId: string;
400
+ attributes: Record<string, string>;
401
+ }
358
402
  ) => LoadResult;
359
403
 
360
404
  export interface TransformPluginContext extends PluginContext {
@@ -371,15 +415,10 @@ export type TransformHook = (
371
415
  this: TransformPluginContext,
372
416
  code: string,
373
417
  id: string,
374
- // temporarily marked as optional for better Vite type-compatibility
375
- options?:
376
- | {
377
- // unused, temporarily added for better Vite type-compatibility
378
- ssr?: boolean | undefined;
379
- // temporarily marked as optional for better Vite type-compatibility
380
- attributes?: Record<string, string>;
381
- }
382
- | undefined
418
+ options: {
419
+ rawId: string;
420
+ attributes: Record<string, string>;
421
+ }
383
422
  ) => TransformResult;
384
423
 
385
424
  export type ModuleParsedHook = (this: PluginContext, info: ModuleInfo) => void;
@@ -394,30 +433,36 @@ export type RenderChunkHook = (
394
433
 
395
434
  export type ResolveDynamicImportHook = (
396
435
  this: PluginContext,
397
- specifier: string | AstNode,
436
+ specifier: string | ast.Expression,
398
437
  importer: string,
399
- options: { attributes: Record<string, string>; importerAttributes: Record<string, string> }
438
+ options: {
439
+ attributes: Record<string, string>;
440
+ importerRawId: string;
441
+ importerAttributes: Record<string, string>;
442
+ }
400
443
  ) => ResolveIdResult;
401
444
 
402
445
  export type ResolveImportMetaHook = (
403
446
  this: PluginContext,
404
447
  property: string | null,
405
448
  options: {
406
- attributes: Record<string, string>;
407
449
  chunkId: string;
408
450
  format: InternalModuleFormat;
409
451
  moduleId: string;
452
+ moduleRawId: string;
453
+ moduleAttributes: Record<string, string>;
410
454
  }
411
455
  ) => string | NullValue;
412
456
 
413
457
  export type ResolveFileUrlHook = (
414
458
  this: PluginContext,
415
459
  options: {
416
- attributes: Record<string, string>;
417
460
  chunkId: string;
418
461
  fileName: string;
419
462
  format: InternalModuleFormat;
420
463
  moduleId: string;
464
+ moduleRawId: string;
465
+ moduleAttributes: Record<string, string>;
421
466
  referenceId: string;
422
467
  relativePath: string;
423
468
  }
@@ -491,11 +536,14 @@ export interface FunctionPluginHooks {
491
536
  customResolution: string | null;
492
537
  format: InternalModuleFormat;
493
538
  moduleId: string;
539
+ moduleRawId: string;
540
+ moduleAttributes: Record<string, string>;
494
541
  targetModuleId: string | null;
542
+ targetModuleRawId: string | null;
543
+ targetModuleAttributes: Record<string, string>;
495
544
  chunk: PreRenderedChunkWithFileName;
496
545
  targetChunk: PreRenderedChunkWithFileName | null;
497
546
  getTargetChunkImports: () => DynamicImportTargetChunk[] | null;
498
- targetModuleAttributes: Record<string, string>;
499
547
  }
500
548
  ) => { left: string; right: string } | NullValue;
501
549
  renderError: (this: PluginContext, error?: Error) => void;
@@ -668,9 +716,11 @@ export type ExternalOption =
668
716
  | (string | RegExp)[]
669
717
  | string
670
718
  | RegExp
671
- | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue);
719
+ | ((...parameters: Parameters<IsExternal>) => boolean | NullValue);
672
720
 
673
- export type GlobalsOption = Record<string, string> | ((name: string) => string);
721
+ export type GlobalsOption =
722
+ | Record<string, string>
723
+ | ((name: string, options: { attributes: Record<string, string> }) => string);
674
724
 
675
725
  export type InputOption = string | string[] | Record<string, string>;
676
726
 
@@ -761,7 +811,7 @@ export type ModuleFormat = InternalModuleFormat | 'commonjs' | 'esm' | 'module'
761
811
 
762
812
  type GeneratedCodePreset = 'es5' | 'es2015';
763
813
 
764
- interface NormalizedGeneratedCodeOptions {
814
+ export interface NormalizedGeneratedCodeOptions {
765
815
  arrowFunctions: boolean;
766
816
  constBindings: boolean;
767
817
  objectShorthand: boolean;
@@ -773,7 +823,9 @@ interface GeneratedCodeOptions extends Partial<NormalizedGeneratedCodeOptions> {
773
823
  preset?: GeneratedCodePreset | undefined;
774
824
  }
775
825
 
776
- export type OptionsPaths = Record<string, string> | ((id: string) => string);
826
+ export type OptionsPaths =
827
+ | Record<string, string>
828
+ | ((id: string, options: { attributes: Record<string, string> }) => string);
777
829
 
778
830
  export type InteropType = 'compat' | 'auto' | 'esModule' | 'default' | 'defaultOnly';
779
831
 
@@ -787,11 +839,11 @@ export type AmdOptions = (
787
839
  | {
788
840
  autoId: true;
789
841
  basePath?: string | undefined;
790
- id?: undefined | undefined;
842
+ id?: undefined;
791
843
  }
792
844
  | {
793
845
  autoId?: false | undefined;
794
- id?: undefined | undefined;
846
+ id?: undefined;
795
847
  }
796
848
  ) & {
797
849
  define?: string | undefined;
@@ -814,9 +866,11 @@ export type NormalizedAmdOptions = (
814
866
 
815
867
  type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
816
868
 
817
- type OutputPluginOption = MaybePromise<OutputPlugin | NullValue | false | OutputPluginOption[]>;
869
+ export type OutputPluginOption = MaybePromise<
870
+ OutputPlugin | NullValue | false | OutputPluginOption[]
871
+ >;
818
872
 
819
- type HashCharacters = 'base64' | 'base36' | 'hex';
873
+ export type HashCharacters = 'base64' | 'base36' | 'hex';
820
874
 
821
875
  export interface OutputOptions {
822
876
  amd?: AmdOptions | undefined;
@@ -854,7 +908,6 @@ export interface OutputOptions {
854
908
  minifyInternalExports?: boolean | undefined;
855
909
  name?: string | undefined;
856
910
  noConflict?: boolean | undefined;
857
- /** @deprecated This will be the new default in Rollup 5. */
858
911
  onlyExplicitManualChunks?: boolean | undefined;
859
912
  outro?: string | AddonFunction | undefined;
860
913
  paths?: OptionsPaths | undefined;
@@ -962,11 +1015,15 @@ export interface RenderedModule {
962
1015
  removedExports: string[];
963
1016
  renderedExports: string[];
964
1017
  renderedLength: number;
1018
+ rawId: string;
1019
+ attributes: Record<string, string>;
965
1020
  }
966
1021
 
967
1022
  export interface PreRenderedChunk {
968
1023
  exports: string[];
969
1024
  facadeModuleId: string | null;
1025
+ facadeModuleRawId: string | null;
1026
+ facadeModuleAttributes: Record<string, string>;
970
1027
  isDynamicEntry: boolean;
971
1028
  isEntry: boolean;
972
1029
  isImplicitEntry: boolean;
@@ -995,7 +1052,7 @@ export interface OutputChunk extends RenderedChunk {
995
1052
  export type SerializablePluginCache = Record<string, [number, any]>;
996
1053
 
997
1054
  export interface RollupCache {
998
- modules: ModuleJSON[];
1055
+ modules: CachedModule[];
999
1056
  plugins?: Record<string, SerializablePluginCache>;
1000
1057
  }
1001
1058
 
@@ -1025,32 +1082,39 @@ export interface MergedRollupOptions extends InputOptionsWithPlugins {
1025
1082
 
1026
1083
  export function rollup(options: RollupOptions): Promise<RollupBuild>;
1027
1084
 
1085
+ export type RollupWatchHooks = 'onError' | 'onStart' | 'onBundleStart' | 'onBundleEnd' | 'onEnd';
1086
+
1087
+ export type MatchFunction = (value: string, stats?: any) => boolean;
1088
+
1089
+ export interface MatcherObject {
1090
+ path: string;
1091
+ recursive?: boolean;
1092
+ }
1093
+
1094
+ export type Matcher = string | RegExp | MatchFunction | MatcherObject;
1095
+
1028
1096
  export interface ChokidarOptions {
1029
1097
  alwaysStat?: boolean | undefined;
1030
1098
  atomic?: boolean | number | undefined;
1031
1099
  awaitWriteFinish?:
1100
+ | boolean
1032
1101
  | {
1033
1102
  pollInterval?: number | undefined;
1034
1103
  stabilityThreshold?: number | undefined;
1035
1104
  }
1036
- | boolean
1037
1105
  | undefined;
1038
1106
  binaryInterval?: number | undefined;
1039
1107
  cwd?: string | undefined;
1040
1108
  depth?: number | undefined;
1041
- disableGlobbing?: boolean | undefined;
1042
1109
  followSymlinks?: boolean | undefined;
1043
1110
  ignoreInitial?: boolean | undefined;
1044
1111
  ignorePermissionErrors?: boolean | undefined;
1045
- ignored?: any | undefined;
1112
+ ignored?: Matcher | Matcher[] | undefined;
1046
1113
  interval?: number | undefined;
1047
1114
  persistent?: boolean | undefined;
1048
- useFsEvents?: boolean | undefined;
1049
1115
  usePolling?: boolean | undefined;
1050
1116
  }
1051
1117
 
1052
- export type RollupWatchHooks = 'onError' | 'onStart' | 'onBundleStart' | 'onBundleEnd' | 'onEnd';
1053
-
1054
1118
  export interface WatcherOptions {
1055
1119
  allowInputInsideOutputPath?: boolean | undefined;
1056
1120
  buildDelay?: number | undefined;
@@ -1087,8 +1151,8 @@ export interface AwaitingEventEmitter<T extends Record<string, (...parameters: a
1087
1151
  on<K extends keyof T>(event: K, listener: AwaitedEventListener<T, K>): this;
1088
1152
  /**
1089
1153
  * Registers an event listener like `on`. Listeners are removed automatically
1090
- * when removeListenersForCurrentRun is called, which happens right before each
1091
- * rebuild, after the changes that triggered it were announced.
1154
+ * when removeListenersForCurrentRun is called, which happens right before
1155
+ * each rebuild, after the changes that triggered it were announced.
1092
1156
  */
1093
1157
  onCurrentRun<K extends keyof T>(
1094
1158
  event: K,
@@ -1120,18 +1184,6 @@ export type RollupWatcher = AwaitingEventEmitter<{
1120
1184
 
1121
1185
  export function watch(config: RollupWatchOptions | RollupWatchOptions[]): RollupWatcher;
1122
1186
 
1123
- interface AstNodeLocation {
1124
- end: number;
1125
- start: number;
1126
- }
1127
-
1128
- type OmittedEstreeKeys =
1129
- 'loc' | 'range' | 'leadingComments' | 'trailingComments' | 'innerComments' | 'comments';
1130
- type RollupAstNode<T> = Omit<T, OmittedEstreeKeys> & AstNodeLocation;
1131
-
1132
- type ProgramNode = RollupAstNode<estree.Program>;
1133
- export type AstNode = RollupAstNode<estree.Node>;
1134
-
1135
1187
  export function defineConfig(options: RollupOptions): RollupOptions;
1136
1188
  export function defineConfig(options: RollupOptions[]): RollupOptions[];
1137
1189
  export function defineConfig(optionsFunction: RollupOptionsFunction): RollupOptionsFunction;
Binary file
Binary file
Binary file
Binary file
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.6
4
- Thu, 01 Oct 2026 06:50:26 GMT - commit 966ac85d64887ed38abd4eef67c3813633cbc2f6
3
+ Rollup.js v5.0.0-0
4
+ Tue, 06 Oct 2026 08:24:44 GMT - commit d78bf6bee48e411672e05d8977473f76e6758c35
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -20,7 +20,6 @@ require('node:process');
20
20
  require('path');
21
21
  require('node:perf_hooks');
22
22
  require('node:fs/promises');
23
- require('./shared/fsevents-importer.js');
24
23
 
25
24
 
26
25
 
Binary file