rollup 2.48.0 → 2.50.0

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
@@ -9,8 +9,8 @@ export interface RollupError extends RollupLogProps {
9
9
  export interface RollupWarning extends RollupLogProps {
10
10
  chunkName?: string;
11
11
  cycle?: string[];
12
- exporter?: string;
13
12
  exportName?: string;
13
+ exporter?: string;
14
14
  guess?: string;
15
15
  importer?: string;
16
16
  missing?: string;
@@ -160,8 +160,8 @@ export type EmitFile = (emittedFile: EmittedFile) => string;
160
160
  interface ModuleInfo {
161
161
  ast: AcornNode | null;
162
162
  code: string | null;
163
- dynamicallyImportedIds: readonly string[];
164
163
  dynamicImporters: readonly string[];
164
+ dynamicallyImportedIds: readonly string[];
165
165
  hasModuleSideEffects: boolean | 'no-treeshake';
166
166
  id: string;
167
167
  implicitlyLoadedAfterOneOf: readonly string[];
@@ -337,6 +337,7 @@ export type WatchChangeHook = (
337
337
  * const myPlugin: PluginImpl<Options> = (options = {}) => { ... }
338
338
  * ```
339
339
  */
340
+ // eslint-disable-next-line @typescript-eslint/ban-types
340
341
  export type PluginImpl<O extends object = object> = (options?: O) => Plugin;
341
342
 
342
343
  export interface OutputBundle {
@@ -519,8 +520,8 @@ export type SourcemapPathTransformOption = (
519
520
  ) => string;
520
521
 
521
522
  export interface InputOptions {
522
- acorn?: Object;
523
- acornInjectPlugins?: Function | Function[];
523
+ acorn?: Record<string, unknown>;
524
+ acornInjectPlugins?: (() => unknown)[] | (() => unknown);
524
525
  cache?: false | RollupCache;
525
526
  context?: string;
526
527
  experimentalCacheExpiry?: number;
@@ -546,8 +547,8 @@ export interface InputOptions {
546
547
  }
547
548
 
548
549
  export interface NormalizedInputOptions {
549
- acorn: Object;
550
- acornInjectPlugins: Function[];
550
+ acorn: Record<string, unknown>;
551
+ acornInjectPlugins: (() => unknown)[];
551
552
  cache: false | undefined | RollupCache;
552
553
  context: string;
553
554
  experimentalCacheExpiry: number;
@@ -727,11 +728,11 @@ export interface OutputAsset extends PreRenderedAsset {
727
728
  }
728
729
 
729
730
  export interface RenderedModule {
731
+ code: string | null;
730
732
  originalLength: number;
731
733
  removedExports: string[];
732
734
  renderedExports: string[];
733
735
  renderedLength: number;
734
- code: string | null;
735
736
  }
736
737
 
737
738
  export interface PreRenderedChunk {
@@ -812,9 +813,9 @@ export interface ChokidarOptions {
812
813
  depth?: number;
813
814
  disableGlobbing?: boolean;
814
815
  followSymlinks?: boolean;
815
- ignored?: any;
816
816
  ignoreInitial?: boolean;
817
817
  ignorePermissionErrors?: boolean;
818
+ ignored?: any;
818
819
  interval?: number;
819
820
  persistent?: boolean;
820
821
  useFsEvents?: boolean;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.48.0
4
- Sat, 15 May 2021 04:50:11 GMT - commit 07b3a02069594147665daa95d3fa3e041a82b2d0
3
+ Rollup.js v2.50.0
4
+ Tue, 25 May 2021 10:57:41 GMT - commit 2febefa277d1c2c149df1df5ccc43796059a624b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.48.0
4
- Sat, 15 May 2021 04:50:11 GMT - commit 07b3a02069594147665daa95d3fa3e041a82b2d0
3
+ Rollup.js v2.50.0
4
+ Tue, 25 May 2021 10:57:41 GMT - commit 2febefa277d1c2c149df1df5ccc43796059a624b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.48.0
4
- Sat, 15 May 2021 04:50:11 GMT - commit 07b3a02069594147665daa95d3fa3e041a82b2d0
3
+ Rollup.js v2.50.0
4
+ Tue, 25 May 2021 10:57:41 GMT - commit 2febefa277d1c2c149df1df5ccc43796059a624b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -108,12 +108,6 @@ function batchWarnings() {
108
108
  let deferredWarnings = new Map();
109
109
  let warningOccurred = false;
110
110
  return {
111
- get count() {
112
- return count;
113
- },
114
- get warningOccurred() {
115
- return warningOccurred;
116
- },
117
111
  add: (warning) => {
118
112
  count += 1;
119
113
  warningOccurred = true;
@@ -138,6 +132,9 @@ function batchWarnings() {
138
132
  info(warning.frame);
139
133
  }
140
134
  },
135
+ get count() {
136
+ return count;
137
+ },
141
138
  flush: () => {
142
139
  if (count === 0)
143
140
  return;
@@ -147,17 +144,20 @@ function batchWarnings() {
147
144
  }
148
145
  deferredWarnings = new Map();
149
146
  count = 0;
147
+ },
148
+ get warningOccurred() {
149
+ return warningOccurred;
150
150
  }
151
151
  };
152
152
  }
153
153
  const immediateHandlers = {
154
- UNKNOWN_OPTION: warning => {
155
- title(`You have passed an unrecognized option`);
156
- stderr(warning.message);
157
- },
158
154
  MISSING_NODE_BUILTINS: warning => {
159
155
  title(`Missing shims for Node.js built-ins`);
160
156
  stderr(`Creating a browser bundle that depends on ${rollup.printQuotedStringList(warning.modules)}. You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills`);
157
+ },
158
+ UNKNOWN_OPTION: warning => {
159
+ title(`You have passed an unrecognized option`);
160
+ stderr(warning.message);
161
161
  }
162
162
  };
163
163
  const deferredHandlers = {
@@ -318,16 +318,16 @@ let stdinResult = null;
318
318
  function stdinPlugin(arg) {
319
319
  const suffix = typeof arg == 'string' && arg.length ? '.' + arg : '';
320
320
  return {
321
+ load(id) {
322
+ if (id === stdinName || id.startsWith(stdinName + '.')) {
323
+ return stdinResult || (stdinResult = readStdin());
324
+ }
325
+ },
321
326
  name: 'stdin',
322
327
  resolveId(id) {
323
328
  if (id === stdinName) {
324
329
  return id + suffix;
325
330
  }
326
- },
327
- load(id) {
328
- if (id === stdinName || id.startsWith(stdinName + '.')) {
329
- return stdinResult || (stdinResult = readStdin());
330
- }
331
331
  }
332
332
  };
333
333
  }
@@ -349,7 +349,6 @@ function readStdin() {
349
349
 
350
350
  function waitForInputPlugin() {
351
351
  return {
352
- name: 'wait-for-input',
353
352
  async buildStart(options) {
354
353
  const inputSpecifiers = Array.isArray(options.input)
355
354
  ? options.input
@@ -368,7 +367,8 @@ function waitForInputPlugin() {
368
367
  }
369
368
  break;
370
369
  }
371
- }
370
+ },
371
+ name: 'wait-for-input'
372
372
  };
373
373
  }
374
374
 
@@ -404,7 +404,7 @@ function loadAndRegisterPlugin(inputOptions, pluginText) {
404
404
  plugin = new Function('return ' + pluginText);
405
405
  }
406
406
  else {
407
- const match = pluginText.match(/^([@.\/\\\w|^{}-]+)(=(.*))?$/);
407
+ const match = pluginText.match(/^([@./\\\w|^{}-]+)(=(.*))?$/);
408
408
  if (match) {
409
409
  // -p plugin
410
410
  // -p plugin=arg
@@ -414,7 +414,7 @@ function loadAndRegisterPlugin(inputOptions, pluginText) {
414
414
  else {
415
415
  throw new Error(`Invalid --plugin argument format: ${JSON.stringify(pluginText)}`);
416
416
  }
417
- if (!/^\.|^rollup-plugin-|[@\/\\]/.test(pluginText)) {
417
+ if (!/^\.|^rollup-plugin-|[@/\\]/.test(pluginText)) {
418
418
  // Try using plugin prefix variations first if applicable.
419
419
  // Prefix order is significant - left has higher precedence.
420
420
  for (const prefix of ['@rollup/plugin-', 'rollup-plugin-']) {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.48.0
4
- Sat, 15 May 2021 04:50:11 GMT - commit 07b3a02069594147665daa95d3fa3e041a82b2d0
3
+ Rollup.js v2.50.0
4
+ Tue, 25 May 2021 10:57:41 GMT - commit 2febefa277d1c2c149df1df5ccc43796059a624b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup