rollup 1.27.13 → 1.29.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/CHANGELOG.md +60 -0
- package/README.md +2 -2
- package/dist/bin/rollup +59 -26
- package/dist/rollup.browser.es.js +3 -3
- package/dist/rollup.browser.js +5 -4
- package/dist/rollup.d.ts +44 -6
- package/dist/rollup.es.js +360 -252
- package/dist/rollup.js +356 -290
- package/dist/shared/index.js +52 -8
- package/package.json +16 -16
package/dist/rollup.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ export interface SourceDescription {
|
|
|
93
93
|
code: string;
|
|
94
94
|
map?: SourceMapInput;
|
|
95
95
|
moduleSideEffects?: boolean | null;
|
|
96
|
+
syntheticNamedExports?: boolean;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
export interface TransformSourceDescription extends SourceDescription {
|
|
@@ -109,6 +110,7 @@ export interface TransformModuleJSON {
|
|
|
109
110
|
originalSourcemap: ExistingDecodedSourceMap | null;
|
|
110
111
|
resolvedIds?: ResolvedIdMap;
|
|
111
112
|
sourcemapChain: DecodedSourceMapOrMissing[];
|
|
113
|
+
syntheticNamedExports: boolean | null;
|
|
112
114
|
transformDependencies: string[];
|
|
113
115
|
}
|
|
114
116
|
|
|
@@ -199,6 +201,7 @@ export interface ResolvedId {
|
|
|
199
201
|
external: boolean;
|
|
200
202
|
id: string;
|
|
201
203
|
moduleSideEffects: boolean;
|
|
204
|
+
syntheticNamedExports: boolean;
|
|
202
205
|
}
|
|
203
206
|
|
|
204
207
|
export interface ResolvedIdMap {
|
|
@@ -209,6 +212,7 @@ interface PartialResolvedId {
|
|
|
209
212
|
external?: boolean;
|
|
210
213
|
id: string;
|
|
211
214
|
moduleSideEffects?: boolean | null;
|
|
215
|
+
syntheticNamedExports?: boolean;
|
|
212
216
|
}
|
|
213
217
|
|
|
214
218
|
export type ResolveIdResult = string | false | null | undefined | PartialResolvedId;
|
|
@@ -229,10 +233,9 @@ export type IsPureModule = (id: string) => boolean | null | undefined;
|
|
|
229
233
|
|
|
230
234
|
export type HasModuleSideEffects = (id: string, external: boolean) => boolean;
|
|
231
235
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
) => Promise<SourceDescription | string | null> | SourceDescription | string | null;
|
|
236
|
+
type LoadResult = SourceDescription | string | null | undefined;
|
|
237
|
+
|
|
238
|
+
export type LoadHook = (this: PluginContext, id: string) => Promise<LoadResult> | LoadResult;
|
|
236
239
|
|
|
237
240
|
export type TransformResult = string | null | undefined | TransformSourceDescription;
|
|
238
241
|
|
|
@@ -427,7 +430,6 @@ export interface InputOptions {
|
|
|
427
430
|
context?: string;
|
|
428
431
|
experimentalCacheExpiry?: number;
|
|
429
432
|
experimentalOptimizeChunks?: boolean;
|
|
430
|
-
experimentalTopLevelAwait?: boolean;
|
|
431
433
|
external?: ExternalOption;
|
|
432
434
|
inlineDynamicImports?: boolean;
|
|
433
435
|
input?: InputOption;
|
|
@@ -611,7 +613,43 @@ export interface RollupWatchOptions extends InputOptions {
|
|
|
611
613
|
watch?: WatcherOptions;
|
|
612
614
|
}
|
|
613
615
|
|
|
614
|
-
|
|
616
|
+
interface TypedEventEmitter<T> {
|
|
617
|
+
addListener<K extends keyof T>(event: K, listener: T[K]): this;
|
|
618
|
+
emit<K extends keyof T>(event: K, ...args: any[]): boolean;
|
|
619
|
+
eventNames(): Array<keyof T>;
|
|
620
|
+
getMaxListeners(): number;
|
|
621
|
+
listenerCount(type: keyof T): number;
|
|
622
|
+
listeners<K extends keyof T>(event: K): Array<T[K]>;
|
|
623
|
+
off<K extends keyof T>(event: K, listener: T[K]): this;
|
|
624
|
+
on<K extends keyof T>(event: K, listener: T[K]): this;
|
|
625
|
+
once<K extends keyof T>(event: K, listener: T[K]): this;
|
|
626
|
+
prependListener<K extends keyof T>(event: K, listener: T[K]): this;
|
|
627
|
+
prependOnceListener<K extends keyof T>(event: K, listener: T[K]): this;
|
|
628
|
+
rawListeners<K extends keyof T>(event: K): Array<T[K]>;
|
|
629
|
+
removeAllListeners<K extends keyof T>(event?: K): this;
|
|
630
|
+
removeListener<K extends keyof T>(event: K, listener: T[K]): this;
|
|
631
|
+
setMaxListeners(n: number): this;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export type RollupWatcherEvent =
|
|
635
|
+
| { code: 'START' }
|
|
636
|
+
| { code: 'BUNDLE_START'; input: InputOption; output: readonly string[] }
|
|
637
|
+
| {
|
|
638
|
+
code: 'BUNDLE_END';
|
|
639
|
+
duration: number;
|
|
640
|
+
input: InputOption;
|
|
641
|
+
output: readonly string[];
|
|
642
|
+
result: RollupBuild;
|
|
643
|
+
}
|
|
644
|
+
| { code: 'END' }
|
|
645
|
+
| { code: 'ERROR'; error: RollupError };
|
|
646
|
+
|
|
647
|
+
export interface RollupWatcher
|
|
648
|
+
extends TypedEventEmitter<{
|
|
649
|
+
change: (id: string) => void;
|
|
650
|
+
event: (event: RollupWatcherEvent) => void;
|
|
651
|
+
restart: () => void;
|
|
652
|
+
}> {
|
|
615
653
|
close(): void;
|
|
616
654
|
}
|
|
617
655
|
|