@rollup/wasm-node 4.20.0 → 4.21.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/rollup.d.ts CHANGED
@@ -211,9 +211,7 @@ interface ModuleInfo extends ModuleOptions {
211
211
 
212
212
  export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
213
213
 
214
- export interface CustomPluginOptions {
215
- [plugin: string]: any;
216
- }
214
+ export type CustomPluginOptions = Record<string, any>;
217
215
 
218
216
  type LoggingFunctionWithPosition = (
219
217
  log: RollupLog | string | (() => RollupLog | string),
@@ -227,6 +225,7 @@ export type ParseAst = (
227
225
 
228
226
  // declare AbortSignal here for environments without DOM lib or @types/node
229
227
  declare global {
228
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
230
229
  interface AbortSignal {}
231
230
  }
232
231
 
@@ -275,9 +274,7 @@ export interface ResolvedId extends ModuleOptions {
275
274
  resolvedBy: string;
276
275
  }
277
276
 
278
- export interface ResolvedIdMap {
279
- [key: string]: ResolvedId;
280
- }
277
+ export type ResolvedIdMap = Record<string, ResolvedId>;
281
278
 
282
279
  interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
283
280
  external?: boolean | 'absolute' | 'relative';
@@ -395,12 +392,9 @@ export type WatchChangeHook = (
395
392
  * const myPlugin: PluginImpl<Options> = (options = {}) => { ... }
396
393
  * ```
397
394
  */
398
- // eslint-disable-next-line @typescript-eslint/ban-types
399
395
  export type PluginImpl<O extends object = object, A = any> = (options?: O) => Plugin<A>;
400
396
 
401
- export interface OutputBundle {
402
- [fileName: string]: OutputAsset | OutputChunk;
403
- }
397
+ export type OutputBundle = Record<string, OutputAsset | OutputChunk>;
404
398
 
405
399
  export interface FunctionPluginHooks {
406
400
  augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void;
@@ -505,13 +499,13 @@ type MakeAsync<Function_> = Function_ extends (
505
499
  ? (this: This, ...parameters: Arguments) => Return | Promise<Return>
506
500
  : never;
507
501
 
508
- // eslint-disable-next-line @typescript-eslint/ban-types
502
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
509
503
  type ObjectHook<T, O = {}> = T | ({ handler: T; order?: 'pre' | 'post' | null } & O);
510
504
 
511
505
  export type PluginHooks = {
512
506
  [K in keyof FunctionPluginHooks]: ObjectHook<
513
507
  K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K],
514
- // eslint-disable-next-line @typescript-eslint/ban-types
508
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
515
509
  K extends ParallelPluginHooks ? { sequential?: boolean } : {}
516
510
  >;
517
511
  };
@@ -559,11 +553,11 @@ export type ExternalOption =
559
553
  | RegExp
560
554
  | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue);
561
555
 
562
- export type GlobalsOption = { [name: string]: string } | ((name: string) => string);
556
+ export type GlobalsOption = Record<string, string> | ((name: string) => string);
563
557
 
564
- export type InputOption = string | string[] | { [entryAlias: string]: string };
558
+ export type InputOption = string | string[] | Record<string, string>;
565
559
 
566
- export type ManualChunksOption = { [chunkAlias: string]: string[] } | GetManualChunk;
560
+ export type ManualChunksOption = Record<string, string[]> | GetManualChunk;
567
561
 
568
562
  export type LogHandlerWithDefault = (
569
563
  level: LogLevel,
@@ -601,7 +595,7 @@ export interface InputOptions {
601
595
  logLevel?: LogLevelOption;
602
596
  makeAbsoluteExternalsRelative?: boolean | 'ifRelativeSource';
603
597
  maxParallelFileOps?: number;
604
- moduleContext?: ((id: string) => string | NullValue) | { [id: string]: string };
598
+ moduleContext?: ((id: string) => string | NullValue) | Record<string, string>;
605
599
  onLog?: LogHandlerWithDefault;
606
600
  onwarn?: WarningHandlerWithDefault;
607
601
  perf?: boolean;
@@ -624,7 +618,7 @@ export interface NormalizedInputOptions {
624
618
  experimentalCacheExpiry: number;
625
619
  experimentalLogSideEffects: boolean;
626
620
  external: IsExternal;
627
- input: string[] | { [entryAlias: string]: string };
621
+ input: string[] | Record<string, string>;
628
622
  logLevel: LogLevelOption;
629
623
  makeAbsoluteExternalsRelative: boolean | 'ifRelativeSource';
630
624
  maxParallelFileOps: number;
@@ -756,6 +750,7 @@ export interface OutputOptions {
756
750
  strict?: boolean;
757
751
  systemNullSetters?: boolean;
758
752
  validate?: boolean;
753
+ virtualDirname?: string;
759
754
  }
760
755
 
761
756
  export interface NormalizedOutputOptions {
@@ -809,6 +804,7 @@ export interface NormalizedOutputOptions {
809
804
  strict: boolean;
810
805
  systemNullSetters: boolean;
811
806
  validate: boolean;
807
+ virtualDirname: string;
812
808
  }
813
809
 
814
810
  export type WarningHandlerWithDefault = (
@@ -816,9 +812,7 @@ export type WarningHandlerWithDefault = (
816
812
  defaultHandler: LoggingFunction
817
813
  ) => void;
818
814
 
819
- export interface SerializedTimings {
820
- [label: string]: [number, number, number];
821
- }
815
+ export type SerializedTimings = Record<string, [number, number, number]>;
822
816
 
823
817
  export interface PreRenderedAsset {
824
818
  name: string | undefined;
@@ -855,13 +849,9 @@ export interface RenderedChunk extends PreRenderedChunk {
855
849
  dynamicImports: string[];
856
850
  fileName: string;
857
851
  implicitlyLoadedBefore: string[];
858
- importedBindings: {
859
- [imported: string]: string[];
860
- };
852
+ importedBindings: Record<string, string[]>;
861
853
  imports: string[];
862
- modules: {
863
- [id: string]: RenderedModule;
864
- };
854
+ modules: Record<string, RenderedModule>;
865
855
  referencedFiles: string[];
866
856
  }
867
857
 
@@ -872,9 +862,7 @@ export interface OutputChunk extends RenderedChunk {
872
862
  preliminaryFileName: string;
873
863
  }
874
864
 
875
- export interface SerializablePluginCache {
876
- [key: string]: [number, any];
877
- }
865
+ export type SerializablePluginCache = Record<string, [number, any]>;
878
866
 
879
867
  export interface RollupCache {
880
868
  modules: ModuleJSON[];
@@ -946,11 +934,11 @@ export interface RollupWatchOptions extends InputOptions {
946
934
  }
947
935
 
948
936
  export type AwaitedEventListener<
949
- T extends { [event: string]: (...parameters: any) => any },
937
+ T extends Record<string, (...parameters: any) => any>,
950
938
  K extends keyof T
951
939
  > = (...parameters: Parameters<T[K]>) => void | Promise<void>;
952
940
 
953
- export interface AwaitingEventEmitter<T extends { [event: string]: (...parameters: any) => any }> {
941
+ export interface AwaitingEventEmitter<T extends Record<string, (...parameters: any) => any>> {
954
942
  close(): Promise<void>;
955
943
  emit<K extends keyof T>(event: K, ...parameters: Parameters<T[K]>): Promise<unknown>;
956
944
  /**
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.20.0
4
- Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
3
+ Rollup.js v4.21.1
4
+ Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.20.0
4
- Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
3
+ Rollup.js v4.21.1
4
+ Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.20.0
4
- Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
3
+ Rollup.js v4.21.1
4
+ Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.20.0
4
- Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
3
+ Rollup.js v4.21.1
4
+ Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -418,7 +418,7 @@ function getCamelizedPluginBaseName(pluginText) {
418
418
  }
419
419
  async function requireOrImport(pluginPath) {
420
420
  try {
421
- // eslint-disable-next-line unicorn/prefer-module
421
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
422
422
  return require(pluginPath);
423
423
  }
424
424
  catch {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.20.0
4
- Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
3
+ Rollup.js v4.21.1
4
+ Mon, 26 Aug 2024 15:53:42 GMT - commit c33c6ceb7da712c3d14b67b81febf9303fbbd96c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -750,7 +750,6 @@ function logMissingNodeBuiltins(externalBuiltins) {
750
750
  message: `Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(externalBuiltins)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`
751
751
  };
752
752
  }
753
- // eslint-disable-next-line unicorn/prevent-abbreviations
754
753
  function logMissingFileOrDirOption() {
755
754
  return {
756
755
  code: MISSING_OPTION,