@rollup/browser 3.0.0-7 → 3.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.
@@ -83,6 +83,7 @@ type PartialNull<T> = {
83
83
  };
84
84
 
85
85
  interface ModuleOptions {
86
+ assertions: Record<string, string>;
86
87
  meta: CustomPluginOptions;
87
88
  moduleSideEffects: boolean | 'no-treeshake';
88
89
  syntheticNamedExports: boolean | string;
@@ -189,7 +190,12 @@ export interface PluginContext extends MinimalPluginContext {
189
190
  resolve: (
190
191
  source: string,
191
192
  importer?: string,
192
- options?: { custom?: CustomPluginOptions; isEntry?: boolean; skipSelf?: boolean }
193
+ options?: {
194
+ assertions?: Record<string, string>;
195
+ custom?: CustomPluginOptions;
196
+ isEntry?: boolean;
197
+ skipSelf?: boolean;
198
+ }
193
199
  ) => Promise<ResolvedId | null>;
194
200
  setAssetSource: (assetReferenceId: string, source: string | Uint8Array) => void;
195
201
  warn: (warning: RollupWarning | string, pos?: number | { column: number; line: number }) => void;
@@ -220,7 +226,7 @@ export type ResolveIdHook = (
220
226
  this: PluginContext,
221
227
  source: string,
222
228
  importer: string | undefined,
223
- options: { custom?: CustomPluginOptions; isEntry: boolean }
229
+ options: { assertions: Record<string, string>; custom?: CustomPluginOptions; isEntry: boolean }
224
230
  ) => ResolveIdResult;
225
231
 
226
232
  export type ShouldTransformCachedModuleHook = (
@@ -275,7 +281,8 @@ export type RenderChunkHook = (
275
281
  export type ResolveDynamicImportHook = (
276
282
  this: PluginContext,
277
283
  specifier: string | AcornNode,
278
- importer: string
284
+ importer: string,
285
+ options: { assertions: Record<string, string> }
279
286
  ) => ResolveIdResult;
280
287
 
281
288
  export type ResolveImportMetaHook = (
@@ -613,10 +620,12 @@ export interface OutputOptions {
613
620
  dir?: string;
614
621
  /** @deprecated Use the "renderDynamicImport" plugin hook instead. */
615
622
  dynamicImportFunction?: string;
623
+ dynamicImportInCjs?: boolean;
616
624
  entryFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
617
625
  esModule?: boolean | 'if-default-prop';
618
626
  exports?: 'default' | 'named' | 'none' | 'auto';
619
627
  extend?: boolean;
628
+ externalImportAssertions?: boolean;
620
629
  externalLiveBindings?: boolean;
621
630
  // only required for bundle.write
622
631
  file?: string;
@@ -663,10 +672,12 @@ export interface NormalizedOutputOptions {
663
672
  dir: string | undefined;
664
673
  /** @deprecated Use the "renderDynamicImport" plugin hook instead. */
665
674
  dynamicImportFunction: string | undefined;
675
+ dynamicImportInCjs: boolean;
666
676
  entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
667
677
  esModule: boolean | 'if-default-prop';
668
678
  exports: 'default' | 'named' | 'none' | 'auto';
669
679
  extend: boolean;
680
+ externalImportAssertions: boolean;
670
681
  externalLiveBindings: boolean;
671
682
  file: string | undefined;
672
683
  footer: AddonFunction;