@rollup/wasm-node 4.0.0-12 → 4.0.0-14

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.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-12
4
- Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
3
+ Rollup.js v4.0.0-14
4
+ Fri, 15 Sep 2023 12:33:30 GMT - commit ec2f8ec863d8d896aef0dd0097f2d73f59e8213a
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-12
4
- Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
3
+ Rollup.js v4.0.0-14
4
+ Fri, 15 Sep 2023 12:33:30 GMT - commit ec2f8ec863d8d896aef0dd0097f2d73f59e8213a
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-12
4
- Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
3
+ Rollup.js v4.0.0-14
4
+ Fri, 15 Sep 2023 12:33:30 GMT - commit ec2f8ec863d8d896aef0dd0097f2d73f59e8213a
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.d.ts CHANGED
@@ -93,20 +93,20 @@ export interface SourceMap {
93
93
  export type SourceMapInput = ExistingRawSourceMap | string | null | { mappings: '' };
94
94
 
95
95
  interface ModuleOptions {
96
- assertions: Record<string, string>;
96
+ attributes: Record<string, string>;
97
97
  meta: CustomPluginOptions;
98
98
  moduleSideEffects: boolean | 'no-treeshake';
99
99
  syntheticNamedExports: boolean | string;
100
100
  }
101
101
 
102
102
  export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
103
- ast?: AcornNode;
103
+ ast?: AstNode;
104
104
  code: string;
105
105
  map?: SourceMapInput;
106
106
  }
107
107
 
108
108
  export interface TransformModuleJSON {
109
- ast?: AcornNode;
109
+ ast?: AstNode;
110
110
  code: string;
111
111
  // note if plugins use new this.cache to opt-out auto transform cache
112
112
  customTransformCache: boolean;
@@ -117,7 +117,7 @@ export interface TransformModuleJSON {
117
117
  }
118
118
 
119
119
  export interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
120
- ast: AcornNode;
120
+ ast: AstNode;
121
121
  dependencies: string[];
122
122
  id: string;
123
123
  resolvedIds: ResolvedIdMap;
@@ -164,6 +164,7 @@ export interface EmittedPrebuiltChunk {
164
164
  exports?: string[];
165
165
  fileName: string;
166
166
  map?: SourceMap;
167
+ sourcemapFileName?: string;
167
168
  type: 'prebuilt-chunk';
168
169
  }
169
170
 
@@ -172,7 +173,7 @@ export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
172
173
  export type EmitFile = (emittedFile: EmittedFile) => string;
173
174
 
174
175
  interface ModuleInfo extends ModuleOptions {
175
- ast: AcornNode | null;
176
+ ast: AstNode | null;
176
177
  code: string | null;
177
178
  dynamicImporters: readonly string[];
178
179
  dynamicallyImportedIdResolutions: readonly ResolvedId[];
@@ -220,13 +221,12 @@ export interface PluginContext extends MinimalPluginContext {
220
221
  ) => Promise<ModuleInfo>;
221
222
  /** @deprecated Use `this.getModuleIds` instead */
222
223
  moduleIds: IterableIterator<string>;
223
- // TODO SWC remove acorn options from this.parse
224
- parse: (input: string, options?: any) => AcornNode;
224
+ parse: (input: string) => AstNode;
225
225
  resolve: (
226
226
  source: string,
227
227
  importer?: string,
228
228
  options?: {
229
- assertions?: Record<string, string>;
229
+ attributes?: Record<string, string>;
230
230
  custom?: CustomPluginOptions;
231
231
  isEntry?: boolean;
232
232
  skipSelf?: boolean;
@@ -265,13 +265,13 @@ export type ResolveIdHook = (
265
265
  this: PluginContext,
266
266
  source: string,
267
267
  importer: string | undefined,
268
- options: { assertions: Record<string, string>; custom?: CustomPluginOptions; isEntry: boolean }
268
+ options: { attributes: Record<string, string>; custom?: CustomPluginOptions; isEntry: boolean }
269
269
  ) => ResolveIdResult;
270
270
 
271
271
  export type ShouldTransformCachedModuleHook = (
272
272
  this: PluginContext,
273
273
  options: {
274
- ast: AcornNode;
274
+ ast: AstNode;
275
275
  code: string;
276
276
  id: string;
277
277
  meta: CustomPluginOptions;
@@ -323,9 +323,9 @@ export type RenderChunkHook = (
323
323
 
324
324
  export type ResolveDynamicImportHook = (
325
325
  this: PluginContext,
326
- specifier: string | AcornNode,
326
+ specifier: string | AstNode,
327
327
  importer: string,
328
- options: { assertions: Record<string, string> }
328
+ options: { attributes: Record<string, string> }
329
329
  ) => ResolveIdResult;
330
330
 
331
331
  export type ResolveImportMetaHook = (
@@ -370,7 +370,7 @@ export type WatchChangeHook = (
370
370
  * ```
371
371
  */
372
372
  // eslint-disable-next-line @typescript-eslint/ban-types
373
- export type PluginImpl<O extends object = object> = (options?: O) => Plugin;
373
+ export type PluginImpl<O extends object = object, A = any> = (options?: O) => Plugin<A>;
374
374
 
375
375
  export interface OutputBundle {
376
376
  [fileName: string]: OutputAsset | OutputChunk;
@@ -498,9 +498,9 @@ export interface OutputPlugin
498
498
  version?: string;
499
499
  }
500
500
 
501
- export interface Plugin extends OutputPlugin, Partial<PluginHooks> {
501
+ export interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
502
502
  // for inter-plugin communication
503
- api?: any;
503
+ api?: A;
504
504
  }
505
505
 
506
506
  type TreeshakingPreset = 'smallest' | 'safest' | 'recommended';
@@ -566,8 +566,6 @@ export type SourcemapIgnoreListOption = (
566
566
  export type InputPluginOption = MaybePromise<Plugin | NullValue | false | InputPluginOption[]>;
567
567
 
568
568
  export interface InputOptions {
569
- acorn?: Record<string, unknown>;
570
- acornInjectPlugins?: ((...arguments_: any[]) => unknown)[] | ((...arguments_: any[]) => unknown);
571
569
  cache?: boolean | RollupCache;
572
570
  context?: string;
573
571
  experimentalCacheExpiry?: number;
@@ -603,8 +601,6 @@ export interface InputOptionsWithPlugins extends InputOptions {
603
601
  }
604
602
 
605
603
  export interface NormalizedInputOptions {
606
- acorn: Record<string, unknown>;
607
- acornInjectPlugins: (() => unknown)[];
608
604
  cache: false | undefined | RollupCache;
609
605
  context: string;
610
606
  experimentalCacheExpiry: number;
@@ -713,7 +709,9 @@ export interface OutputOptions {
713
709
  experimentalMinChunkSize?: number;
714
710
  exports?: 'default' | 'named' | 'none' | 'auto';
715
711
  extend?: boolean;
712
+ /** @deprecated Use "externalImportAttributes" instead. */
716
713
  externalImportAssertions?: boolean;
714
+ externalImportAttributes?: boolean;
717
715
  externalLiveBindings?: boolean;
718
716
  // only required for bundle.write
719
717
  file?: string;
@@ -745,6 +743,7 @@ export interface OutputOptions {
745
743
  sourcemapBaseUrl?: string;
746
744
  sourcemapExcludeSources?: boolean;
747
745
  sourcemapFile?: string;
746
+ sourcemapFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
748
747
  sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption;
749
748
  sourcemapPathTransform?: SourcemapPathTransformOption;
750
749
  strict?: boolean;
@@ -769,7 +768,9 @@ export interface NormalizedOutputOptions {
769
768
  experimentalMinChunkSize: number;
770
769
  exports: 'default' | 'named' | 'none' | 'auto';
771
770
  extend: boolean;
771
+ /** @deprecated Use "externalImportAttributes" instead. */
772
772
  externalImportAssertions: boolean;
773
+ externalImportAttributes: boolean;
773
774
  externalLiveBindings: boolean;
774
775
  file: string | undefined;
775
776
  footer: AddonFunction;
@@ -800,6 +801,7 @@ export interface NormalizedOutputOptions {
800
801
  sourcemapBaseUrl: string | undefined;
801
802
  sourcemapExcludeSources: boolean;
802
803
  sourcemapFile: string | undefined;
804
+ sourcemapFileNames: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
803
805
  sourcemapIgnoreList: SourcemapIgnoreListOption;
804
806
  sourcemapPathTransform: SourcemapPathTransformOption | undefined;
805
807
  strict: boolean;
@@ -863,6 +865,7 @@ export interface RenderedChunk extends PreRenderedChunk {
863
865
  export interface OutputChunk extends RenderedChunk {
864
866
  code: string;
865
867
  map: SourceMap | null;
868
+ sourcemapFileName: string | null;
866
869
  preliminaryFileName: string;
867
870
  }
868
871
 
@@ -994,7 +997,7 @@ export type RollupWatcher = AwaitingEventEmitter<{
994
997
 
995
998
  export function watch(config: RollupWatchOptions | RollupWatchOptions[]): RollupWatcher;
996
999
 
997
- interface AcornNode {
1000
+ interface AstNode {
998
1001
  end: number;
999
1002
  start: number;
1000
1003
  type: string;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-12
4
- Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
3
+ Rollup.js v4.0.0-14
4
+ Fri, 15 Sep 2023 12:33:30 GMT - commit ec2f8ec863d8d896aef0dd0097f2d73f59e8213a
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-12
4
- Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
3
+ Rollup.js v4.0.0-14
4
+ Fri, 15 Sep 2023 12:33:30 GMT - commit ec2f8ec863d8d896aef0dd0097f2d73f59e8213a
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-12
4
- Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
3
+ Rollup.js v4.0.0-14
4
+ Fri, 15 Sep 2023 12:33:30 GMT - commit ec2f8ec863d8d896aef0dd0097f2d73f59e8213a
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-12
4
- Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
3
+ Rollup.js v4.0.0-14
4
+ Fri, 15 Sep 2023 12:33:30 GMT - commit ec2f8ec863d8d896aef0dd0097f2d73f59e8213a
5
5
 
6
6
  https://github.com/rollup/rollup
7
7