rollup 2.8.0 → 2.9.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 +44 -0
- package/LICENSE.md +0 -27
- 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 +390 -275
- package/dist/es/shared/watch.js +20 -16
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.d.ts +22 -12
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +7 -7
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +390 -275
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +20 -16
- package/package.json +9 -10
package/dist/rollup.d.ts
CHANGED
|
@@ -150,6 +150,19 @@ export type EmitChunk = (id: string, options?: { name?: string }) => string;
|
|
|
150
150
|
|
|
151
151
|
export type EmitFile = (emittedFile: EmittedFile) => string;
|
|
152
152
|
|
|
153
|
+
interface ModuleInfo {
|
|
154
|
+
dynamicallyImportedIds: string[];
|
|
155
|
+
dynamicImporters: string[];
|
|
156
|
+
hasModuleSideEffects: boolean;
|
|
157
|
+
id: string;
|
|
158
|
+
importedIds: string[];
|
|
159
|
+
importers: string[];
|
|
160
|
+
isEntry: boolean;
|
|
161
|
+
isExternal: boolean;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export type GetModuleInfo = (moduleId: string) => ModuleInfo;
|
|
165
|
+
|
|
153
166
|
export interface PluginContext extends MinimalPluginContext {
|
|
154
167
|
addWatchFile: (id: string) => void;
|
|
155
168
|
cache: PluginCache;
|
|
@@ -164,18 +177,11 @@ export interface PluginContext extends MinimalPluginContext {
|
|
|
164
177
|
/** @deprecated Use `this.getFileName` instead */
|
|
165
178
|
getChunkFileName: (chunkReferenceId: string) => string;
|
|
166
179
|
getFileName: (fileReferenceId: string) => string;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
) => {
|
|
170
|
-
dynamicallyImportedIds: string[];
|
|
171
|
-
hasModuleSideEffects: boolean;
|
|
172
|
-
id: string;
|
|
173
|
-
importedIds: string[];
|
|
174
|
-
isEntry: boolean;
|
|
175
|
-
isExternal: boolean;
|
|
176
|
-
};
|
|
180
|
+
getModuleIds: () => IterableIterator<string>;
|
|
181
|
+
getModuleInfo: GetModuleInfo;
|
|
177
182
|
/** @deprecated Use `this.resolve` instead */
|
|
178
183
|
isExternal: IsExternal;
|
|
184
|
+
/** @deprecated Use `this.getModuleIds` instead */
|
|
179
185
|
moduleIds: IterableIterator<string>;
|
|
180
186
|
parse: (input: string, options: any) => AcornNode;
|
|
181
187
|
resolve: (
|
|
@@ -438,8 +444,11 @@ export interface TreeshakingOptions {
|
|
|
438
444
|
tryCatchDeoptimization?: boolean;
|
|
439
445
|
unknownGlobalSideEffects?: boolean;
|
|
440
446
|
}
|
|
441
|
-
|
|
442
|
-
|
|
447
|
+
interface GetManualChunkApi {
|
|
448
|
+
getModuleIds: () => IterableIterator<string>;
|
|
449
|
+
getModuleInfo: GetModuleInfo;
|
|
450
|
+
}
|
|
451
|
+
export type GetManualChunk = (id: string, api: GetManualChunkApi) => string | null | undefined;
|
|
443
452
|
|
|
444
453
|
export type ExternalOption = (string | RegExp)[] | string | RegExp | IsExternal;
|
|
445
454
|
export type PureModulesOption = boolean | string[] | IsPureModule;
|
|
@@ -625,6 +634,7 @@ export interface ChokidarOptions {
|
|
|
625
634
|
}
|
|
626
635
|
|
|
627
636
|
export interface WatcherOptions {
|
|
637
|
+
buildDelay?: number;
|
|
628
638
|
chokidar?: ChokidarOptions;
|
|
629
639
|
clearScreen?: boolean;
|
|
630
640
|
exclude?: string[];
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.9.1
|
|
4
|
+
Mon, 11 May 2020 05:23:48 GMT - commit 1436473192ef975ee515ede6ab90dbf832cdfab1
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -417,7 +417,7 @@ function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
417
417
|
plugin = new Function('return ' + pluginText);
|
|
418
418
|
}
|
|
419
419
|
else {
|
|
420
|
-
const match = pluginText.match(/^([@.\/\\\w|^{}
|
|
420
|
+
const match = pluginText.match(/^([@.\/\\\w|^{}-]+)(=(.*))?$/);
|
|
421
421
|
if (match) {
|
|
422
422
|
// -p plugin
|
|
423
423
|
// -p plugin=arg
|
|
@@ -451,10 +451,10 @@ function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
plugin = plugin[pluginText];
|
|
454
|
+
// some plugins do not use `module.exports` for their entry point,
|
|
455
|
+
// in which case we try the named default export and the plugin name
|
|
456
|
+
if (typeof plugin === 'object') {
|
|
457
|
+
plugin = plugin.default || plugin[pluginText];
|
|
458
458
|
}
|
|
459
459
|
inputOptions.plugins.push(typeof plugin === 'function' ? plugin.call(plugin, pluginArg) : plugin);
|
|
460
460
|
}
|