rollup 2.29.0 → 2.32.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/dist/rollup.d.ts CHANGED
@@ -158,6 +158,8 @@ export type EmitChunk = (id: string, options?: { name?: string }) => string;
158
158
  export type EmitFile = (emittedFile: EmittedFile) => string;
159
159
 
160
160
  interface ModuleInfo {
161
+ ast: AcornNode | null;
162
+ code: string | null;
161
163
  dynamicallyImportedIds: readonly string[];
162
164
  dynamicImporters: readonly string[];
163
165
  hasModuleSideEffects: boolean | 'no-treeshake';
@@ -263,6 +265,8 @@ export type TransformHook = (
263
265
  id: string
264
266
  ) => Promise<TransformResult> | TransformResult;
265
267
 
268
+ export type ModuleParsedHook = (this: PluginContext, info: ModuleInfo) => Promise<void> | void;
269
+
266
270
  export type RenderChunkHook = (
267
271
  this: PluginContext,
268
272
  code: string,
@@ -342,6 +346,7 @@ export interface PluginHooks extends OutputPluginHooks {
342
346
  buildEnd: (this: PluginContext, err?: Error) => Promise<void> | void;
343
347
  buildStart: (this: PluginContext, options: NormalizedInputOptions) => Promise<void> | void;
344
348
  load: LoadHook;
349
+ moduleParsed: ModuleParsedHook;
345
350
  options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | null | undefined;
346
351
  resolveDynamicImport: ResolveDynamicImportHook;
347
352
  resolveId: ResolveIdHook;
@@ -390,6 +395,7 @@ export type AsyncPluginHooks =
390
395
  | 'buildStart'
391
396
  | 'generateBundle'
392
397
  | 'load'
398
+ | 'moduleParsed'
393
399
  | 'renderChunk'
394
400
  | 'renderError'
395
401
  | 'renderStart'
@@ -426,6 +432,7 @@ export type ParallelPluginHooks =
426
432
  | 'buildStart'
427
433
  | 'footer'
428
434
  | 'intro'
435
+ | 'moduleParsed'
429
436
  | 'outro'
430
437
  | 'renderError'
431
438
  | 'renderStart'
@@ -487,7 +494,7 @@ export type GlobalsOption = { [name: string]: string } | ((name: string) => stri
487
494
  export type InputOption = string | string[] | { [entryAlias: string]: string };
488
495
  export type ManualChunksOption = { [chunkAlias: string]: string[] } | GetManualChunk;
489
496
  export type ModuleSideEffectsOption = boolean | 'no-external' | string[] | HasModuleSideEffects;
490
- export type PreserveEntrySignaturesOption = false | 'strict' | 'allow-extension';
497
+ export type PreserveEntrySignaturesOption = false | 'strict' | 'allow-extension' | 'exports-only';
491
498
  export type SourcemapPathTransformOption = (
492
499
  relativeSourcePath: string,
493
500
  sourcemapPath: string
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.29.0
4
- Thu, 08 Oct 2020 04:24:04 GMT - commit 0b02e52bc7816c473784794670a2c3047ac62a07
3
+ Rollup.js v2.32.1
4
+ Wed, 21 Oct 2020 07:32:18 GMT - commit 51e727c99bfc67a6bc46087c63950cec2a7fe12f
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.29.0
4
- Thu, 08 Oct 2020 04:24:04 GMT - commit 0b02e52bc7816c473784794670a2c3047ac62a07
3
+ Rollup.js v2.32.1
4
+ Wed, 21 Oct 2020 07:32:18 GMT - commit 51e727c99bfc67a6bc46087c63950cec2a7fe12f
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.29.0
4
- Thu, 08 Oct 2020 04:24:04 GMT - commit 0b02e52bc7816c473784794670a2c3047ac62a07
3
+ Rollup.js v2.32.1
4
+ Wed, 21 Oct 2020 07:32:18 GMT - commit 51e727c99bfc67a6bc46087c63950cec2a7fe12f
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -212,6 +212,7 @@ const deferredHandlers = {
212
212
  showTruncatedWarnings(warnings);
213
213
  },
214
214
  PLUGIN_WARNING(warnings) {
215
+ var _a;
215
216
  const nestedByPlugin = nest(warnings, 'plugin');
216
217
  for (const { key: plugin, items } of nestedByPlugin) {
217
218
  const nestedByMessage = nest(items, 'message');
@@ -221,8 +222,9 @@ const deferredHandlers = {
221
222
  for (const warning of items) {
222
223
  if (warning.url && warning.url !== lastUrl)
223
224
  info((lastUrl = warning.url));
224
- if (warning.id) {
225
- let loc = rollup.relativeId(warning.id);
225
+ const id = warning.id || ((_a = warning.loc) === null || _a === void 0 ? void 0 : _a.file);
226
+ if (id) {
227
+ let loc = rollup.relativeId(id);
226
228
  if (warning.loc) {
227
229
  loc += `: (${warning.loc.line}:${warning.loc.column})`;
228
230
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.29.0
4
- Thu, 08 Oct 2020 04:24:04 GMT - commit 0b02e52bc7816c473784794670a2c3047ac62a07
3
+ Rollup.js v2.32.1
4
+ Wed, 21 Oct 2020 07:32:18 GMT - commit 51e727c99bfc67a6bc46087c63950cec2a7fe12f
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup