@rollup/browser 3.0.0-6 → 3.0.0-8

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 = (
@@ -326,14 +333,6 @@ export interface OutputBundle {
326
333
  [fileName: string]: OutputAsset | OutputChunk;
327
334
  }
328
335
 
329
- export interface FilePlaceholder {
330
- type: 'placeholder';
331
- }
332
-
333
- export interface OutputBundleWithPlaceholders {
334
- [fileName: string]: OutputAsset | OutputChunk | FilePlaceholder;
335
- }
336
-
337
336
  export interface FunctionPluginHooks {
338
337
  augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void;
339
338
  buildEnd: (this: PluginContext, err?: Error) => void;
@@ -621,10 +620,12 @@ export interface OutputOptions {
621
620
  dir?: string;
622
621
  /** @deprecated Use the "renderDynamicImport" plugin hook instead. */
623
622
  dynamicImportFunction?: string;
623
+ dynamicImportInCjs?: boolean;
624
624
  entryFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
625
625
  esModule?: boolean | 'if-default-prop';
626
626
  exports?: 'default' | 'named' | 'none' | 'auto';
627
627
  extend?: boolean;
628
+ externalImportAssertions?: boolean;
628
629
  externalLiveBindings?: boolean;
629
630
  // only required for bundle.write
630
631
  file?: string;
@@ -671,10 +672,12 @@ export interface NormalizedOutputOptions {
671
672
  dir: string | undefined;
672
673
  /** @deprecated Use the "renderDynamicImport" plugin hook instead. */
673
674
  dynamicImportFunction: string | undefined;
675
+ dynamicImportInCjs: boolean;
674
676
  entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
675
677
  esModule: boolean | 'if-default-prop';
676
678
  exports: 'default' | 'named' | 'none' | 'auto';
677
679
  extend: boolean;
680
+ externalImportAssertions: boolean;
678
681
  externalLiveBindings: boolean;
679
682
  file: string | undefined;
680
683
  footer: AddonFunction;