rollup 2.70.1 → 2.70.2
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/CHANGELOG.md +12 -0
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +996 -952
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +13 -17
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +996 -952
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +19 -19
package/dist/rollup.d.ts
CHANGED
|
@@ -237,7 +237,7 @@ interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
|
|
|
237
237
|
id: string;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
export type ResolveIdResult = string | false | null |
|
|
240
|
+
export type ResolveIdResult = string | false | null | void | PartialResolvedId;
|
|
241
241
|
|
|
242
242
|
export type ResolveIdHook = (
|
|
243
243
|
this: PluginContext,
|
|
@@ -265,11 +265,11 @@ export type IsExternal = (
|
|
|
265
265
|
isResolved: boolean
|
|
266
266
|
) => boolean;
|
|
267
267
|
|
|
268
|
-
export type IsPureModule = (id: string) => boolean | null |
|
|
268
|
+
export type IsPureModule = (id: string) => boolean | null | void;
|
|
269
269
|
|
|
270
270
|
export type HasModuleSideEffects = (id: string, external: boolean) => boolean;
|
|
271
271
|
|
|
272
|
-
type LoadResult = SourceDescription | string | null |
|
|
272
|
+
type LoadResult = SourceDescription | string | null | void;
|
|
273
273
|
|
|
274
274
|
export type LoadHook = (this: PluginContext, id: string) => Promise<LoadResult> | LoadResult;
|
|
275
275
|
|
|
@@ -277,7 +277,7 @@ export interface TransformPluginContext extends PluginContext {
|
|
|
277
277
|
getCombinedSourcemap: () => SourceMap;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
export type TransformResult = string | null |
|
|
280
|
+
export type TransformResult = string | null | void | Partial<SourceDescription>;
|
|
281
281
|
|
|
282
282
|
export type TransformHook = (
|
|
283
283
|
this: TransformPluginContext,
|
|
@@ -309,7 +309,7 @@ export type ResolveImportMetaHook = (
|
|
|
309
309
|
this: PluginContext,
|
|
310
310
|
prop: string | null,
|
|
311
311
|
options: { chunkId: string; format: InternalModuleFormat; moduleId: string }
|
|
312
|
-
) => string | null |
|
|
312
|
+
) => string | null | void;
|
|
313
313
|
|
|
314
314
|
export type ResolveAssetUrlHook = (
|
|
315
315
|
this: PluginContext,
|
|
@@ -320,7 +320,7 @@ export type ResolveAssetUrlHook = (
|
|
|
320
320
|
moduleId: string;
|
|
321
321
|
relativeAssetPath: string;
|
|
322
322
|
}
|
|
323
|
-
) => string | null |
|
|
323
|
+
) => string | null | void;
|
|
324
324
|
|
|
325
325
|
export type ResolveFileUrlHook = (
|
|
326
326
|
this: PluginContext,
|
|
@@ -334,7 +334,7 @@ export type ResolveFileUrlHook = (
|
|
|
334
334
|
referenceId: string;
|
|
335
335
|
relativePath: string;
|
|
336
336
|
}
|
|
337
|
-
) => string | null |
|
|
337
|
+
) => string | null | void;
|
|
338
338
|
|
|
339
339
|
export type AddonHookFunction = (this: PluginContext) => string | Promise<string>;
|
|
340
340
|
export type AddonHook = string | AddonHookFunction;
|
|
@@ -381,7 +381,7 @@ export interface PluginHooks extends OutputPluginHooks {
|
|
|
381
381
|
options: (
|
|
382
382
|
this: MinimalPluginContext,
|
|
383
383
|
options: InputOptions
|
|
384
|
-
) => Promise<InputOptions | null |
|
|
384
|
+
) => Promise<InputOptions | null | void> | InputOptions | null | void;
|
|
385
385
|
resolveDynamicImport: ResolveDynamicImportHook;
|
|
386
386
|
resolveId: ResolveIdHook;
|
|
387
387
|
shouldTransformCachedModule: ShouldTransformCachedModuleHook;
|
|
@@ -397,7 +397,7 @@ interface OutputPluginHooks {
|
|
|
397
397
|
bundle: OutputBundle,
|
|
398
398
|
isWrite: boolean
|
|
399
399
|
) => void | Promise<void>;
|
|
400
|
-
outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | null |
|
|
400
|
+
outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | null | void;
|
|
401
401
|
renderChunk: RenderChunkHook;
|
|
402
402
|
renderDynamicImport: (
|
|
403
403
|
this: PluginContext,
|
|
@@ -407,7 +407,7 @@ interface OutputPluginHooks {
|
|
|
407
407
|
moduleId: string;
|
|
408
408
|
targetModuleId: string | null;
|
|
409
409
|
}
|
|
410
|
-
) => { left: string; right: string } | null |
|
|
410
|
+
) => { left: string; right: string } | null | void;
|
|
411
411
|
renderError: (this: PluginContext, err?: Error) => Promise<void> | void;
|
|
412
412
|
renderStart: (
|
|
413
413
|
this: PluginContext,
|
|
@@ -522,17 +522,13 @@ interface GetManualChunkApi {
|
|
|
522
522
|
getModuleIds: () => IterableIterator<string>;
|
|
523
523
|
getModuleInfo: GetModuleInfo;
|
|
524
524
|
}
|
|
525
|
-
export type GetManualChunk = (id: string, api: GetManualChunkApi) => string | null |
|
|
525
|
+
export type GetManualChunk = (id: string, api: GetManualChunkApi) => string | null | void;
|
|
526
526
|
|
|
527
527
|
export type ExternalOption =
|
|
528
528
|
| (string | RegExp)[]
|
|
529
529
|
| string
|
|
530
530
|
| RegExp
|
|
531
|
-
| ((
|
|
532
|
-
source: string,
|
|
533
|
-
importer: string | undefined,
|
|
534
|
-
isResolved: boolean
|
|
535
|
-
) => boolean | null | undefined);
|
|
531
|
+
| ((source: string, importer: string | undefined, isResolved: boolean) => boolean | null | void);
|
|
536
532
|
export type PureModulesOption = boolean | string[] | IsPureModule;
|
|
537
533
|
export type GlobalsOption = { [name: string]: string } | ((name: string) => string);
|
|
538
534
|
export type InputOption = string | string[] | { [entryAlias: string]: string };
|
|
@@ -558,7 +554,7 @@ export interface InputOptions {
|
|
|
558
554
|
/** @deprecated Use the "manualChunks" output option instead. */
|
|
559
555
|
manualChunks?: ManualChunksOption;
|
|
560
556
|
maxParallelFileReads?: number;
|
|
561
|
-
moduleContext?: ((id: string) => string | null |
|
|
557
|
+
moduleContext?: ((id: string) => string | null | void) | { [id: string]: string };
|
|
562
558
|
onwarn?: WarningHandlerWithDefault;
|
|
563
559
|
perf?: boolean;
|
|
564
560
|
plugins?: (Plugin | null | false | undefined)[];
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED