rollup 2.65.0 → 2.67.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/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # rollup changelog
2
2
 
3
+ ## 2.67.1
4
+
5
+ _2022-02-07_
6
+
7
+ ### Bug Fixes
8
+
9
+ - Make chunk file and variable names more deterministic when emitting chunks (#4386)
10
+ - Improve default module resolver performance by using non-blocking IO (#4386)
11
+
12
+ ### Pull Requests
13
+
14
+ - [#4373](https://github.com/rollup/rollup/pull/4373): fix: even more types (@dnalborczyk)
15
+ - [#4382](https://github.com/rollup/rollup/pull/4382): Update contribution tut link desc (@lemredd)
16
+ - [#4383](https://github.com/rollup/rollup/pull/4383): chore: bump deps (@dnalborczyk)
17
+ - [#4384](https://github.com/rollup/rollup/pull/4384): chore: move "wait" to utils + re-use (@dnalborczyk)
18
+ - [#4385](https://github.com/rollup/rollup/pull/4385): refactor: convert watch tests to async functions (@dnalborczyk)
19
+ - [#4386](https://github.com/rollup/rollup/pull/4386): refactor: use fs.promises in resolve id, Part 4 (@dnalborczyk and @lukastaegert)
20
+ - [#4389](https://github.com/rollup/rollup/pull/4389): refactor: use fs.promises in generate license file, rollup config, Part 5 (@dnalborczyk)
21
+
22
+ ## 2.67.0
23
+
24
+ _2022-02-02_
25
+
26
+ ### Features
27
+
28
+ - Improve side effect detection when using Array.prototype.groupBy/groupByToMap (#4360)
29
+ - Allow changing `moduleSideEffects` at any time during the build (#4379)
30
+ - Soft-deprecate `ModuleInfo.hasModuleSideEffects` in favour of `ModuleInfo.moduleSideEffects` (#4379)
31
+
32
+ ### Bug Fixes
33
+
34
+ - Do not include queries and hashes in generated file names when preserving modules (#4374)
35
+
36
+ ### Pull Requests
37
+
38
+ - [#4319](https://github.com/rollup/rollup/pull/4319): refactor: use fs, fs-extra, remove sander (@dnalborczyk)
39
+ - [#4360](https://github.com/rollup/rollup/pull/4360): feat: add Array.prototype.groupBy/groupByToMap (@dnalborczyk)
40
+ - [#4361](https://github.com/rollup/rollup/pull/4361): fix: more types (@dnalborczyk)
41
+ - [#4369](https://github.com/rollup/rollup/pull/4369): fix: remove acorn-walk patch (@dnalborczyk)
42
+ - [#4371](https://github.com/rollup/rollup/pull/4371): refactor: use fs.promises in cli/run (@dnalborczyk)
43
+ - [#4372](https://github.com/rollup/rollup/pull/4372): refactor: use fs.promises in module loader (@dnalborczyk)
44
+ - [#4374](https://github.com/rollup/rollup/pull/4374): Ignore queries and hashes in file names when preserving modules (@lukastaegert)
45
+ - [#4375](https://github.com/rollup/rollup/pull/4375): Fix typo in \_config.js (@eltociear)
46
+ - [#4376](https://github.com/rollup/rollup/pull/4376): refactor: fs.promises, move mkdir to writeoutputfile, Part 3 (@dnalborczyk)
47
+ - [#4379](https://github.com/rollup/rollup/pull/4379): Deprecate hasModuleSideEffects in favor of moduleSideEffects and ensure it is mutable on ModuleInfo (@lukastaegert)
48
+
49
+ ## 2.66.1
50
+
51
+ _2022-01-25_
52
+
53
+ ### Bug Fixes
54
+
55
+ - Only warn for conflicting names in namespace reexports if it actually causes problems (#4363)
56
+ - Only allow explicit exports or reexports as synthetic namespaces and hide them from namespace reexports (#4364)
57
+
58
+ ### Pull Requests
59
+
60
+ - [#4362](https://github.com/rollup/rollup/pull/4362): refactor: convert exportsByName object to map (@dnalborczyk)
61
+ - [#4363](https://github.com/rollup/rollup/pull/4363): Do not warn unnecessarily for namespace conflicts (@lukastaegert)
62
+ - [#4364](https://github.com/rollup/rollup/pull/4364): Do not expose synthetic namespace export in entries and namespaces (@lukastaegert)
63
+
64
+ ## 2.66.0
65
+
66
+ _2022-01-22_
67
+
68
+ ### Features
69
+
70
+ - Note if a module has a default export in ModuleInfo to allow writing better proxy modules (#4356)
71
+ - Add option to wait until all imported ids have been resolved when awaiting `this.load` (#4358)
72
+
73
+ ### Pull Requests
74
+
75
+ - [#4356](https://github.com/rollup/rollup/pull/4356): Add hasDefaultExport to ModuleInfo (@lukastaegert)
76
+ - [#4358](https://github.com/rollup/rollup/pull/4358): Add "resolveDependencies" option to "this.load" (@lukastaegert)
77
+
3
78
  ## 2.65.0
4
79
 
5
80
  _2022-01-21_
package/dist/bin/rollup CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v2.65.0
6
- Fri, 21 Jan 2022 07:42:35 GMT - commit bebc50ddb613d240a03988d51787fd71b1a3914f
5
+ Rollup.js v2.67.1
6
+ Mon, 07 Feb 2022 05:29:30 GMT - commit efd71e930e86ab30f4911ed8caa7f78aca005729
7
7
 
8
8
 
9
9
  https://github.com/rollup/rollup
@@ -14,13 +14,13 @@
14
14
 
15
15
  Object.defineProperty(exports, '__esModule', { value: true });
16
16
 
17
+ const process$1 = require('process');
17
18
  const rollup = require('../shared/rollup.js');
18
19
  const require$$2 = require('util');
19
- const fs = require('fs');
20
+ const require$$0$1 = require('fs');
20
21
  const require$$0 = require('path');
21
22
  const mergeOptions = require('../shared/mergeOptions.js');
22
23
  const loadConfigFile_js = require('../shared/loadConfigFile.js');
23
- const process$1 = require('process');
24
24
  require('perf_hooks');
25
25
  require('crypto');
26
26
  require('events');
@@ -1217,7 +1217,7 @@ const parser = new YargsParser({
1217
1217
  return require(path);
1218
1218
  }
1219
1219
  else if (path.match(/\.json$/)) {
1220
- return fs.readFileSync(path, 'utf8');
1220
+ return require$$0$1.readFileSync(path, 'utf8');
1221
1221
  }
1222
1222
  else {
1223
1223
  throw Error('only .json config files are supported in ESM');
@@ -1549,8 +1549,8 @@ async function build(inputOptions, warnings, silent = false) {
1549
1549
  }
1550
1550
  }
1551
1551
  if (outputs.length > 1)
1552
- process.stdout.write(`\n${loadConfigFile_js.cyan(loadConfigFile_js.bold(`//→ ${file.fileName}:`))}\n`);
1553
- process.stdout.write(source);
1552
+ process$1.stdout.write(`\n${loadConfigFile_js.cyan(loadConfigFile_js.bold(`//→ ${file.fileName}:`))}\n`);
1553
+ process$1.stdout.write(source);
1554
1554
  }
1555
1555
  if (!silent) {
1556
1556
  warnings.flush();
@@ -1569,9 +1569,9 @@ async function build(inputOptions, warnings, silent = false) {
1569
1569
  }
1570
1570
 
1571
1571
  const DEFAULT_CONFIG_BASE = 'rollup.config';
1572
- function getConfigPath(commandConfig) {
1572
+ async function getConfigPath(commandConfig) {
1573
1573
  if (commandConfig === true) {
1574
- return require$$0.resolve(findConfigFileNameInCwd());
1574
+ return require$$0.resolve(await findConfigFileNameInCwd());
1575
1575
  }
1576
1576
  if (commandConfig.slice(0, 5) === 'node:') {
1577
1577
  const pkgName = commandConfig.slice(5);
@@ -1595,8 +1595,8 @@ function getConfigPath(commandConfig) {
1595
1595
  }
1596
1596
  return require$$0.resolve(commandConfig);
1597
1597
  }
1598
- function findConfigFileNameInCwd() {
1599
- const filesInWorkingDir = new Set(fs.readdirSync(process$1.cwd()));
1598
+ async function findConfigFileNameInCwd() {
1599
+ const filesInWorkingDir = new Set(await require$$0$1.promises.readdir(process$1.cwd()));
1600
1600
  for (const extension of ['mjs', 'cjs', 'ts']) {
1601
1601
  const fileName = `${DEFAULT_CONFIG_BASE}.${extension}`;
1602
1602
  if (filesInWorkingDir.has(fileName))
@@ -1607,7 +1607,7 @@ function findConfigFileNameInCwd() {
1607
1607
 
1608
1608
  async function loadConfigFromCommand(command) {
1609
1609
  const warnings = loadConfigFile_js.batchWarnings();
1610
- if (!command.input && (command.stdin || !process.stdin.isTTY)) {
1610
+ if (!command.input && (command.stdin || !process$1.stdin.isTTY)) {
1611
1611
  command.input = loadConfigFile_js.stdinName;
1612
1612
  }
1613
1613
  const options = mergeOptions.mergeOptions({ input: [] }, command, warnings.add);
@@ -1696,18 +1696,18 @@ async function runRollup(command) {
1696
1696
  }
1697
1697
  async function getConfigs(command) {
1698
1698
  if (command.config) {
1699
- const configFile = getConfigPath(command.config);
1699
+ const configFile = await getConfigPath(command.config);
1700
1700
  const { options, warnings } = await loadConfigFile_js.loadAndParseConfigFile(configFile, command);
1701
1701
  return { options, warnings };
1702
1702
  }
1703
1703
  return await loadConfigFromCommand(command);
1704
1704
  }
1705
1705
 
1706
- const command = argParser(process.argv.slice(2), {
1706
+ const command = argParser(process$1.argv.slice(2), {
1707
1707
  alias: mergeOptions.commandAliases,
1708
1708
  configuration: { 'camel-case-expansion': false }
1709
1709
  });
1710
- if (command.help || (process.argv.length <= 2 && process.stdin.isTTY)) {
1710
+ if (command.help || (process$1.argv.length <= 2 && process$1.stdin.isTTY)) {
1711
1711
  console.log(`\n${help.replace('__VERSION__', rollup.version)}\n`);
1712
1712
  }
1713
1713
  else if (command.version) {