rollup 2.67.0 → 2.68.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
@@ -108,7 +108,6 @@ export interface TransformModuleJSON {
108
108
  customTransformCache: boolean;
109
109
  originalCode: string;
110
110
  originalSourcemap: ExistingDecodedSourceMap | null;
111
- resolvedIds?: ResolvedIdMap;
112
111
  sourcemapChain: DecodedSourceMapOrMissing[];
113
112
  transformDependencies: string[];
114
113
  }
@@ -117,6 +116,7 @@ export interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
117
116
  ast: AcornNode;
118
117
  dependencies: string[];
119
118
  id: string;
119
+ resolvedIds: ResolvedIdMap;
120
120
  transformFiles: EmittedFile[] | undefined;
121
121
  }
122
122
 
@@ -254,6 +254,7 @@ export type ShouldTransformCachedModuleHook = (
254
254
  id: string;
255
255
  meta: CustomPluginOptions;
256
256
  moduleSideEffects: boolean | 'no-treeshake';
257
+ resolvedSources: ResolvedIdMap;
257
258
  syntheticNamedExports: boolean | string;
258
259
  }
259
260
  ) => Promise<boolean> | boolean;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.67.0
4
- Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
3
+ Rollup.js v2.68.0
4
+ Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.67.0
4
- Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
3
+ Rollup.js v2.68.0
4
+ Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.67.0
4
- Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
3
+ Rollup.js v2.68.0
4
+ Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -12,8 +12,8 @@
12
12
 
13
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);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.67.0
4
- Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
3
+ Rollup.js v2.68.0
4
+ Tue, 22 Feb 2022 06:24:42 GMT - commit 51cab92373bcf8c844a8de2a6765869f7eb05a5d
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -53,7 +53,7 @@ function getCommandOptions(rawCommandOptions) {
53
53
  ? rawCommandOptions.globals.split(',').reduce((globals, globalDefinition) => {
54
54
  const [id, variableName] = globalDefinition.split(':');
55
55
  globals[id] = variableName;
56
- if (external.indexOf(id) === -1) {
56
+ if (!external.includes(id)) {
57
57
  external.push(id);
58
58
  }
59
59
  return globals;
@@ -93,7 +93,7 @@ function mergeInputOptions(config, overrides, defaultOnWarnHandler) {
93
93
  const getExternal = (config, overrides) => {
94
94
  const configExternal = config.external;
95
95
  return typeof configExternal === 'function'
96
- ? (source, importer, isResolved) => configExternal(source, importer, isResolved) || overrides.external.indexOf(source) !== -1
96
+ ? (source, importer, isResolved) => configExternal(source, importer, isResolved) || overrides.external.includes(source)
97
97
  : rollup.ensureArray(configExternal).concat(overrides.external);
98
98
  };
99
99
  const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn