rollup 2.68.0 → 2.69.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/dist/rollup.d.ts CHANGED
@@ -608,6 +608,7 @@ interface NormalizedGeneratedCodeOptions {
608
608
  constBindings: boolean;
609
609
  objectShorthand: boolean;
610
610
  reservedNamesAsProps: boolean;
611
+ symbols: boolean;
611
612
  }
612
613
 
613
614
  interface GeneratedCodeOptions extends Partial<NormalizedGeneratedCodeOptions> {
@@ -681,12 +682,13 @@ export interface OutputOptions {
681
682
  manualChunks?: ManualChunksOption;
682
683
  minifyInternalExports?: boolean;
683
684
  name?: string;
685
+ /** @deprecated Use "generatedCode.symbols" instead. */
684
686
  namespaceToStringTag?: boolean;
685
687
  noConflict?: boolean;
686
688
  outro?: string | (() => string | Promise<string>);
687
689
  paths?: OptionsPaths;
688
690
  plugins?: (OutputPlugin | null | false | undefined)[];
689
- /** @deprecated Use the "generatedCode.constBindings" instead. */
691
+ /** @deprecated Use "generatedCode.constBindings" instead. */
690
692
  preferConst?: boolean;
691
693
  preserveModules?: boolean;
692
694
  preserveModulesRoot?: string;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.68.0
4
- Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -10,7 +10,7 @@
10
10
  */
11
11
  'use strict';
12
12
 
13
- Object.defineProperty(exports, '__esModule', { value: true });
13
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
14
14
 
15
15
  const rollup = require('./shared/rollup.js');
16
16
  require('path');
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.68.0
4
- Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.68.0
4
- Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -19,7 +19,7 @@ const rollup = require('./rollup.js');
19
19
  const mergeOptions = require('./mergeOptions.js');
20
20
 
21
21
  function _interopNamespaceDefault(e) {
22
- const n = Object.create(null);
22
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
23
23
  if (e) {
24
24
  for (const k in e) {
25
25
  n[k] = e[k];
@@ -171,10 +171,10 @@ function handleError(err, recover = false) {
171
171
 
172
172
  function batchWarnings() {
173
173
  let count = 0;
174
- let deferredWarnings = new Map();
174
+ const deferredWarnings = new Map();
175
175
  let warningOccurred = false;
176
176
  return {
177
- add: (warning) => {
177
+ add(warning) {
178
178
  count += 1;
179
179
  warningOccurred = true;
180
180
  if (warning.code in deferredHandlers) {
@@ -201,14 +201,14 @@ function batchWarnings() {
201
201
  get count() {
202
202
  return count;
203
203
  },
204
- flush: () => {
204
+ flush() {
205
205
  if (count === 0)
206
206
  return;
207
207
  const codes = Array.from(deferredWarnings.keys()).sort((a, b) => deferredWarnings.get(b).length - deferredWarnings.get(a).length);
208
208
  for (const code of codes) {
209
209
  deferredHandlers[code](deferredWarnings.get(code));
210
210
  }
211
- deferredWarnings = new Map();
211
+ deferredWarnings.clear();
212
212
  count = 0;
213
213
  },
214
214
  get warningOccurred() {
@@ -217,11 +217,11 @@ function batchWarnings() {
217
217
  };
218
218
  }
219
219
  const immediateHandlers = {
220
- MISSING_NODE_BUILTINS: warning => {
220
+ MISSING_NODE_BUILTINS(warning) {
221
221
  title(`Missing shims for Node.js built-ins`);
222
222
  stderr(`Creating a browser bundle that depends on ${rollup.printQuotedStringList(warning.modules)}. You might need to include https://github.com/snowpackjs/rollup-plugin-polyfill-node`);
223
223
  },
224
- UNKNOWN_OPTION: warning => {
224
+ UNKNOWN_OPTION(warning) {
225
225
  title(`You have passed an unrecognized option`);
226
226
  stderr(warning.message);
227
227
  }
@@ -262,7 +262,7 @@ const deferredHandlers = {
262
262
  stderr(`${bold(warning.source)} (guessing '${warning.guess}')`);
263
263
  }
264
264
  },
265
- MIXED_EXPORTS: warnings => {
265
+ MIXED_EXPORTS(warnings) {
266
266
  title('Mixing named and default exports');
267
267
  info(`https://rollupjs.org/guide/en/#outputexports`);
268
268
  stderr(bold('The following entry modules are using named and default exports together:'));
@@ -314,9 +314,7 @@ const deferredHandlers = {
314
314
  SOURCEMAP_BROKEN(warnings) {
315
315
  title(`Broken sourcemap`);
316
316
  info('https://rollupjs.org/guide/en/#warning-sourcemap-is-likely-to-be-incorrect');
317
- const plugins = [
318
- ...new Set(warnings.map(warning => warning.plugin).filter(Boolean))
319
- ];
317
+ const plugins = [...new Set(warnings.map(({ plugin }) => plugin).filter(Boolean))];
320
318
  stderr(`Plugins that transform code (such as ${rollup.printQuotedStringList(plugins)}) should generate accompanying sourcemaps`);
321
319
  },
322
320
  THIS_IS_UNDEFINED(warnings) {
@@ -331,8 +329,7 @@ const deferredHandlers = {
331
329
  for (const warning of warnings) {
332
330
  rollup.getOrCreate(dependencies, warning.source, () => []).push(warning.importer);
333
331
  }
334
- for (const dependency of dependencies.keys()) {
335
- const importers = dependencies.get(dependency);
332
+ for (const [dependency, importers] of dependencies) {
336
333
  stderr(`${bold(dependency)} (imported by ${importers.join(', ')})`);
337
334
  }
338
335
  },
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.68.0
4
- Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup