rollup 2.66.1 → 2.67.3

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
@@ -156,13 +156,14 @@ export type EmitChunk = (id: string, options?: { name?: string }) => string;
156
156
 
157
157
  export type EmitFile = (emittedFile: EmittedFile) => string;
158
158
 
159
- interface ModuleInfo {
159
+ interface ModuleInfo extends ModuleOptions {
160
160
  ast: AcornNode | null;
161
161
  code: string | null;
162
162
  dynamicImporters: readonly string[];
163
163
  dynamicallyImportedIdResolutions: readonly ResolvedId[];
164
164
  dynamicallyImportedIds: readonly string[];
165
165
  hasDefaultExport: boolean | null;
166
+ /** @deprecated Use `moduleSideEffects` instead */
166
167
  hasModuleSideEffects: boolean | 'no-treeshake';
167
168
  id: string;
168
169
  implicitlyLoadedAfterOneOf: readonly string[];
@@ -173,8 +174,6 @@ interface ModuleInfo {
173
174
  isEntry: boolean;
174
175
  isExternal: boolean;
175
176
  isIncluded: boolean | null;
176
- meta: CustomPluginOptions;
177
- syntheticNamedExports: boolean | string;
178
177
  }
179
178
 
180
179
  export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.66.1
4
- Tue, 25 Jan 2022 07:58:28 GMT - commit f523f0098d3e98f87abef54f48f39d06a7cc7eec
3
+ Rollup.js v2.67.3
4
+ Fri, 18 Feb 2022 05:29:45 GMT - commit fa4e1b720f64ffae24fcbf99a44b605842ac7f23
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.66.1
4
- Tue, 25 Jan 2022 07:58:28 GMT - commit f523f0098d3e98f87abef54f48f39d06a7cc7eec
3
+ Rollup.js v2.67.3
4
+ Fri, 18 Feb 2022 05:29:45 GMT - commit fa4e1b720f64ffae24fcbf99a44b605842ac7f23
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -10,9 +10,9 @@
10
10
  */
11
11
  'use strict';
12
12
 
13
- const require$$0$2 = require('events');
14
- const fs$4 = require('fs');
15
- const require$$0$1 = require('path');
13
+ const require$$0$3 = require('events');
14
+ const require$$0$1 = require('fs');
15
+ const require$$0$2 = require('path');
16
16
  const require$$2 = require('util');
17
17
  const require$$1 = require('stream');
18
18
  const rollup = require('./rollup.js');
@@ -20,9 +20,9 @@ const require$$2$1 = require('os');
20
20
 
21
21
  var chokidar$1 = {};
22
22
 
23
- const fs$3 = fs$4;
23
+ const fs$3 = require$$0$1;
24
24
  const { Readable } = require$$1;
25
- const sysPath$3 = require$$0$1;
25
+ const sysPath$3 = require$$0$2;
26
26
  const { promisify: promisify$3 } = require$$2;
27
27
  const picomatch$1 = rollup.picomatch;
28
28
 
@@ -620,7 +620,7 @@ var isGlob$2 = function isGlob(str, options) {
620
620
  };
621
621
 
622
622
  var isGlob$1 = isGlob$2;
623
- var pathPosixDirname = require$$0$1.posix.dirname;
623
+ var pathPosixDirname = require$$0$2.posix.dirname;
624
624
  var isWin32 = require$$2$1.platform() === 'win32';
625
625
 
626
626
  var slash = '/';
@@ -2343,7 +2343,7 @@ const require$$0 = [
2343
2343
 
2344
2344
  var binaryExtensions$1 = require$$0;
2345
2345
 
2346
- const path = require$$0$1;
2346
+ const path = require$$0$2;
2347
2347
  const binaryExtensions = binaryExtensions$1;
2348
2348
 
2349
2349
  const extensions = new Set(binaryExtensions);
@@ -2354,7 +2354,7 @@ var constants = {};
2354
2354
 
2355
2355
  (function (exports) {
2356
2356
 
2357
- const {sep} = require$$0$1;
2357
+ const {sep} = require$$0$2;
2358
2358
  const {platform} = process;
2359
2359
  const os = require$$2$1;
2360
2360
 
@@ -2419,8 +2419,8 @@ exports.isLinux = platform === 'linux';
2419
2419
  exports.isIBMi = os.type() === 'OS400';
2420
2420
  }(constants));
2421
2421
 
2422
- const fs$2 = fs$4;
2423
- const sysPath$2 = require$$0$1;
2422
+ const fs$2 = require$$0$1;
2423
+ const sysPath$2 = require$$0$2;
2424
2424
  const { promisify: promisify$2 } = require$$2;
2425
2425
  const isBinaryPath = isBinaryPath$1;
2426
2426
  const {
@@ -3066,8 +3066,8 @@ var fseventsHandler = {exports: {}};
3066
3066
 
3067
3067
  const require$$3 = /*@__PURE__*/rollup.getAugmentedNamespace(rollup.fseventsImporter);
3068
3068
 
3069
- const fs$1 = fs$4;
3070
- const sysPath$1 = require$$0$1;
3069
+ const fs$1 = require$$0$1;
3070
+ const sysPath$1 = require$$0$2;
3071
3071
  const { promisify: promisify$1 } = require$$2;
3072
3072
 
3073
3073
  let fsevents;
@@ -3589,9 +3589,9 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
3589
3589
  fseventsHandler.exports = FsEventsHandler$1;
3590
3590
  fseventsHandler.exports.canUse = canUse;
3591
3591
 
3592
- const { EventEmitter } = require$$0$2;
3593
- const fs = fs$4;
3594
- const sysPath = require$$0$1;
3592
+ const { EventEmitter } = require$$0$3;
3593
+ const fs = require$$0$1;
3594
+ const sysPath = require$$0$2;
3595
3595
  const { promisify } = require$$2;
3596
3596
  const readdirp = readdirp_1;
3597
3597
  const anymatch = anymatch$2.exports.default;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.66.1
4
- Tue, 25 Jan 2022 07:58:28 GMT - commit f523f0098d3e98f87abef54f48f39d06a7cc7eec
3
+ Rollup.js v2.67.3
4
+ Fri, 18 Feb 2022 05:29:45 GMT - commit fa4e1b720f64ffae24fcbf99a44b605842ac7f23
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -10,10 +10,10 @@
10
10
  */
11
11
  'use strict';
12
12
 
13
- const fs = require('fs');
13
+ const require$$0$1 = require('fs');
14
14
  const require$$0 = require('path');
15
- const url = require('url');
16
15
  const process$1 = require('process');
16
+ const url = require('url');
17
17
  const tty = require('tty');
18
18
  const rollup = require('./rollup.js');
19
19
  const mergeOptions = require('./mergeOptions.js');
@@ -29,7 +29,6 @@ function _interopNamespaceDefault(e) {
29
29
  return n;
30
30
  }
31
31
 
32
- const require$$0__namespace = /*#__PURE__*/_interopNamespaceDefault(require$$0);
33
32
  const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
34
33
 
35
34
  const env = process.env || {};
@@ -143,7 +142,7 @@ const { bold, cyan, dim, gray, green, red, underline, yellow } = createColors({
143
142
  });
144
143
 
145
144
  // log to stderr to keep `rollup main.js > bundle.js` from breaking
146
- const stderr = (...args) => process.stderr.write(`${args.join('')}\n`);
145
+ const stderr = (...args) => process$1.stderr.write(`${args.join('')}\n`);
147
146
  function handleError(err, recover = false) {
148
147
  let description = err.message || err;
149
148
  if (err.name)
@@ -167,7 +166,7 @@ function handleError(err, recover = false) {
167
166
  }
168
167
  stderr('');
169
168
  if (!recover)
170
- process.exit(1);
169
+ process$1.exit(1);
171
170
  }
172
171
 
173
172
  function batchWarnings() {
@@ -267,6 +266,7 @@ const deferredHandlers = {
267
266
  title('Mixing named and default exports');
268
267
  info(`https://rollupjs.org/guide/en/#outputexports`);
269
268
  stderr(bold('The following entry modules are using named and default exports together:'));
269
+ warnings.sort((a, b) => (a.id < b.id ? -1 : 1));
270
270
  const displayedWarnings = warnings.length > 5 ? warnings.slice(0, 3) : warnings;
271
271
  for (const warning of displayedWarnings) {
272
272
  stderr(rollup.relativeId(warning.id));
@@ -405,8 +405,8 @@ function stdinPlugin(arg) {
405
405
  function readStdin() {
406
406
  return new Promise((resolve, reject) => {
407
407
  const chunks = [];
408
- process.stdin.setEncoding('utf8');
409
- process.stdin
408
+ process$1.stdin.setEncoding('utf8');
409
+ process$1.stdin
410
410
  .on('data', chunk => chunks.push(chunk))
411
411
  .on('end', () => {
412
412
  const result = chunks.join('');
@@ -505,7 +505,7 @@ async function loadAndRegisterPlugin(inputOptions, pluginText) {
505
505
  if (!plugin) {
506
506
  try {
507
507
  if (pluginText[0] == '.')
508
- pluginText = require$$0__namespace.resolve(pluginText);
508
+ pluginText = require$$0.resolve(pluginText);
509
509
  plugin = await requireOrImport(pluginText);
510
510
  }
511
511
  catch (err) {
@@ -543,7 +543,7 @@ async function requireOrImport(pluginPath) {
543
543
  }
544
544
 
545
545
  function supportsNativeESM() {
546
- return Number(/^v(\d+)/.exec(process.version)[1]) >= 13;
546
+ return Number(/^v(\d+)/.exec(process$1.version)[1]) >= 13;
547
547
  }
548
548
  async function loadAndParseConfigFile(fileName, commandOptions = {}) {
549
549
  const configs = await loadConfigFile(fileName, commandOptions);
@@ -610,7 +610,7 @@ async function getDefaultFromTranspiledConfigFile(fileName, commandOptions) {
610
610
  return loadConfigFromBundledFile(fileName, code);
611
611
  }
612
612
  async function loadConfigFromBundledFile(fileName, bundledCode) {
613
- const resolvedFileName = fs.realpathSync(fileName);
613
+ const resolvedFileName = await require$$0$1.promises.realpath(fileName);
614
614
  const extension = require$$0.extname(resolvedFileName);
615
615
  const defaultLoader = require.extensions[extension];
616
616
  require.extensions[extension] = (module, requiredFileName) => {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.66.1
4
- Tue, 25 Jan 2022 07:58:28 GMT - commit f523f0098d3e98f87abef54f48f39d06a7cc7eec
3
+ Rollup.js v2.67.3
4
+ Fri, 18 Feb 2022 05:29:45 GMT - commit fa4e1b720f64ffae24fcbf99a44b605842ac7f23
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup