rollup 2.64.0 → 2.67.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/CHANGELOG.md +77 -0
- package/LICENSE.md +0 -7
- package/dist/bin/rollup +13 -55
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +8624 -8592
- package/dist/es/shared/watch.js +26 -18
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +8 -4
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +26 -18
- package/dist/shared/loadConfigFile.js +4 -4
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +321 -289
- package/dist/shared/watch-cli.js +15 -16
- package/dist/shared/watch.js +2 -2
- package/package.json +21 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 2.67.0
|
|
4
|
+
|
|
5
|
+
_2022-02-02_
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- Improve side effect detection when using Array.prototype.groupBy/groupByToMap (#4360)
|
|
10
|
+
- Allow changing `moduleSideEffects` at any time during the build (#4379)
|
|
11
|
+
- Soft-deprecate `ModuleInfo.hasModuleSideEffects` in favour of `ModuleInfo.moduleSideEffects` (#4379)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- Do not include queries and hashes in generated file names when preserving modules (#4374)
|
|
16
|
+
|
|
17
|
+
### Pull Requests
|
|
18
|
+
|
|
19
|
+
- [#4319](https://github.com/rollup/rollup/pull/4319): refactor: use fs, fs-extra, remove sander (@dnalborczyk)
|
|
20
|
+
- [#4360](https://github.com/rollup/rollup/pull/4360): feat: add Array.prototype.groupBy/groupByToMap (@dnalborczyk)
|
|
21
|
+
- [#4361](https://github.com/rollup/rollup/pull/4361): fix: more types (@dnalborczyk)
|
|
22
|
+
- [#4369](https://github.com/rollup/rollup/pull/4369): fix: remove acorn-walk patch (@dnalborczyk)
|
|
23
|
+
- [#4371](https://github.com/rollup/rollup/pull/4371): refactor: use fs.promises in cli/run (@dnalborczyk)
|
|
24
|
+
- [#4372](https://github.com/rollup/rollup/pull/4372): refactor: use fs.promises in module loader (@dnalborczyk)
|
|
25
|
+
- [#4374](https://github.com/rollup/rollup/pull/4374): Ignore queries and hashes in file names when preserving modules (@lukastaegert)
|
|
26
|
+
- [#4375](https://github.com/rollup/rollup/pull/4375): Fix typo in \_config.js (@eltociear)
|
|
27
|
+
- [#4376](https://github.com/rollup/rollup/pull/4376): refactor: fs.promises, move mkdir to writeoutputfile, Part 3 (@dnalborczyk)
|
|
28
|
+
- [#4379](https://github.com/rollup/rollup/pull/4379): Deprecate hasModuleSideEffects in favor of moduleSideEffects and ensure it is mutable on ModuleInfo (@lukastaegert)
|
|
29
|
+
|
|
30
|
+
## 2.66.1
|
|
31
|
+
|
|
32
|
+
_2022-01-25_
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
- Only warn for conflicting names in namespace reexports if it actually causes problems (#4363)
|
|
37
|
+
- Only allow explicit exports or reexports as synthetic namespaces and hide them from namespace reexports (#4364)
|
|
38
|
+
|
|
39
|
+
### Pull Requests
|
|
40
|
+
|
|
41
|
+
- [#4362](https://github.com/rollup/rollup/pull/4362): refactor: convert exportsByName object to map (@dnalborczyk)
|
|
42
|
+
- [#4363](https://github.com/rollup/rollup/pull/4363): Do not warn unnecessarily for namespace conflicts (@lukastaegert)
|
|
43
|
+
- [#4364](https://github.com/rollup/rollup/pull/4364): Do not expose synthetic namespace export in entries and namespaces (@lukastaegert)
|
|
44
|
+
|
|
45
|
+
## 2.66.0
|
|
46
|
+
|
|
47
|
+
_2022-01-22_
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
- Note if a module has a default export in ModuleInfo to allow writing better proxy modules (#4356)
|
|
52
|
+
- Add option to wait until all imported ids have been resolved when awaiting `this.load` (#4358)
|
|
53
|
+
|
|
54
|
+
### Pull Requests
|
|
55
|
+
|
|
56
|
+
- [#4356](https://github.com/rollup/rollup/pull/4356): Add hasDefaultExport to ModuleInfo (@lukastaegert)
|
|
57
|
+
- [#4358](https://github.com/rollup/rollup/pull/4358): Add "resolveDependencies" option to "this.load" (@lukastaegert)
|
|
58
|
+
|
|
59
|
+
## 2.65.0
|
|
60
|
+
|
|
61
|
+
_2022-01-21_
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
- Add complete import resolution objects to ModuleInfo for use in `this.load` (#4354)
|
|
66
|
+
|
|
67
|
+
### Bug Fixes
|
|
68
|
+
|
|
69
|
+
- Use correct context in plugin hooks with `perf: true` (#4357)
|
|
70
|
+
|
|
71
|
+
### Pull Requests
|
|
72
|
+
|
|
73
|
+
- [#4351](https://github.com/rollup/rollup/pull/4351): refactor: re-use source mapping url (@dnalborczyk)
|
|
74
|
+
- [#4352](https://github.com/rollup/rollup/pull/4352): refactor: replace require-relative with built-in require.resolve (@dnalborczyk)
|
|
75
|
+
- [#4353](https://github.com/rollup/rollup/pull/4353): chore: bump deps (@dnalborczyk)
|
|
76
|
+
- [#4354](https://github.com/rollup/rollup/pull/4354): Add importedIdResolutions to moduleInfo (@lukastaegert)
|
|
77
|
+
- [#4355](https://github.com/rollup/rollup/pull/4355): chore: remove external from config (@dnalborczyk)
|
|
78
|
+
- [#4357](https://github.com/rollup/rollup/pull/4357): fix: timed plugin context (@dnalborczyk)
|
|
79
|
+
|
|
3
80
|
## 2.64.0
|
|
4
81
|
|
|
5
82
|
_2022-01-14_
|
package/LICENSE.md
CHANGED
|
@@ -583,13 +583,6 @@ Repository: git://github.com/paulmillr/readdirp.git
|
|
|
583
583
|
|
|
584
584
|
---------------------------------------
|
|
585
585
|
|
|
586
|
-
## require-relative
|
|
587
|
-
License: MIT
|
|
588
|
-
By: Valerio Proietti
|
|
589
|
-
Repository: git://github.com/kamicane/require-relative.git
|
|
590
|
-
|
|
591
|
-
---------------------------------------
|
|
592
|
-
|
|
593
586
|
## signal-exit
|
|
594
587
|
License: ISC
|
|
595
588
|
By: Ben Coe
|
package/dist/bin/rollup
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
@license
|
|
5
|
-
Rollup.js v2.
|
|
6
|
-
|
|
5
|
+
Rollup.js v2.67.0
|
|
6
|
+
Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
https://github.com/rollup/rollup
|
|
@@ -16,12 +16,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
16
16
|
|
|
17
17
|
const rollup = require('../shared/rollup.js');
|
|
18
18
|
const require$$2 = require('util');
|
|
19
|
-
const
|
|
19
|
+
const require$$0$1 = require('fs');
|
|
20
20
|
const require$$0 = require('path');
|
|
21
21
|
const mergeOptions = require('../shared/mergeOptions.js');
|
|
22
22
|
const loadConfigFile_js = require('../shared/loadConfigFile.js');
|
|
23
|
-
const
|
|
24
|
-
require('process');
|
|
23
|
+
const process$1 = require('process');
|
|
25
24
|
require('perf_hooks');
|
|
26
25
|
require('crypto');
|
|
27
26
|
require('events');
|
|
@@ -1218,7 +1217,7 @@ const parser = new YargsParser({
|
|
|
1218
1217
|
return require(path);
|
|
1219
1218
|
}
|
|
1220
1219
|
else if (path.match(/\.json$/)) {
|
|
1221
|
-
return
|
|
1220
|
+
return require$$0$1.readFileSync(path, 'utf8');
|
|
1222
1221
|
}
|
|
1223
1222
|
else {
|
|
1224
1223
|
throw Error('only .json config files are supported in ESM');
|
|
@@ -1382,10 +1381,6 @@ var prettyMs = (milliseconds, options = {}) => {
|
|
|
1382
1381
|
|
|
1383
1382
|
const ms = prettyMs;
|
|
1384
1383
|
|
|
1385
|
-
let SOURCEMAPPING_URL = 'sourceMa';
|
|
1386
|
-
SOURCEMAPPING_URL += 'ppingURL';
|
|
1387
|
-
const SOURCEMAPPING_URL$1 = SOURCEMAPPING_URL;
|
|
1388
|
-
|
|
1389
1384
|
const BYTE_UNITS = [
|
|
1390
1385
|
'B',
|
|
1391
1386
|
'kB',
|
|
@@ -1550,7 +1545,7 @@ async function build(inputOptions, warnings, silent = false) {
|
|
|
1550
1545
|
else {
|
|
1551
1546
|
source = file.code;
|
|
1552
1547
|
if (output.sourcemap === 'inline') {
|
|
1553
|
-
source += `\n//# ${SOURCEMAPPING_URL
|
|
1548
|
+
source += `\n//# ${rollup.SOURCEMAPPING_URL}=${file.map.toUrl()}\n`;
|
|
1554
1549
|
}
|
|
1555
1550
|
}
|
|
1556
1551
|
if (outputs.length > 1)
|
|
@@ -1573,56 +1568,19 @@ async function build(inputOptions, warnings, silent = false) {
|
|
|
1573
1568
|
}
|
|
1574
1569
|
}
|
|
1575
1570
|
|
|
1576
|
-
/*
|
|
1577
|
-
relative require
|
|
1578
|
-
*/
|
|
1579
|
-
|
|
1580
|
-
var path = require$$0;
|
|
1581
|
-
var Module = require$$1;
|
|
1582
|
-
|
|
1583
|
-
var modules = {};
|
|
1584
|
-
|
|
1585
|
-
var getModule = function(dir) {
|
|
1586
|
-
var rootPath = dir ? path.resolve(dir) : process.cwd();
|
|
1587
|
-
var rootName = path.join(rootPath, '@root');
|
|
1588
|
-
var root = modules[rootName];
|
|
1589
|
-
if (!root) {
|
|
1590
|
-
root = new Module(rootName);
|
|
1591
|
-
root.filename = rootName;
|
|
1592
|
-
root.paths = Module._nodeModulePaths(rootPath);
|
|
1593
|
-
modules[rootName] = root;
|
|
1594
|
-
}
|
|
1595
|
-
return root;
|
|
1596
|
-
};
|
|
1597
|
-
|
|
1598
|
-
var requireRelative = function(requested, relativeTo) {
|
|
1599
|
-
var root = getModule(relativeTo);
|
|
1600
|
-
return root.require(requested);
|
|
1601
|
-
};
|
|
1602
|
-
|
|
1603
|
-
requireRelative.resolve = function(requested, relativeTo) {
|
|
1604
|
-
var root = getModule(relativeTo);
|
|
1605
|
-
return Module._resolveFilename(requested, root);
|
|
1606
|
-
};
|
|
1607
|
-
|
|
1608
|
-
var requireRelative_1 = requireRelative;
|
|
1609
|
-
|
|
1610
|
-
const relative = requireRelative_1;
|
|
1611
|
-
|
|
1612
1571
|
const DEFAULT_CONFIG_BASE = 'rollup.config';
|
|
1613
|
-
function getConfigPath(commandConfig) {
|
|
1614
|
-
const cwd = process.cwd();
|
|
1572
|
+
async function getConfigPath(commandConfig) {
|
|
1615
1573
|
if (commandConfig === true) {
|
|
1616
|
-
return require$$0.resolve(findConfigFileNameInCwd());
|
|
1574
|
+
return require$$0.resolve(await findConfigFileNameInCwd());
|
|
1617
1575
|
}
|
|
1618
1576
|
if (commandConfig.slice(0, 5) === 'node:') {
|
|
1619
1577
|
const pkgName = commandConfig.slice(5);
|
|
1620
1578
|
try {
|
|
1621
|
-
return
|
|
1579
|
+
return require.resolve(`rollup-config-${pkgName}`, { paths: [process$1.cwd()] });
|
|
1622
1580
|
}
|
|
1623
1581
|
catch (_a) {
|
|
1624
1582
|
try {
|
|
1625
|
-
return
|
|
1583
|
+
return require.resolve(pkgName, { paths: [process$1.cwd()] });
|
|
1626
1584
|
}
|
|
1627
1585
|
catch (err) {
|
|
1628
1586
|
if (err.code === 'MODULE_NOT_FOUND') {
|
|
@@ -1637,8 +1595,8 @@ function getConfigPath(commandConfig) {
|
|
|
1637
1595
|
}
|
|
1638
1596
|
return require$$0.resolve(commandConfig);
|
|
1639
1597
|
}
|
|
1640
|
-
function findConfigFileNameInCwd() {
|
|
1641
|
-
const filesInWorkingDir = new Set(
|
|
1598
|
+
async function findConfigFileNameInCwd() {
|
|
1599
|
+
const filesInWorkingDir = new Set(await require$$0$1.promises.readdir(process$1.cwd()));
|
|
1642
1600
|
for (const extension of ['mjs', 'cjs', 'ts']) {
|
|
1643
1601
|
const fileName = `${DEFAULT_CONFIG_BASE}.${extension}`;
|
|
1644
1602
|
if (filesInWorkingDir.has(fileName))
|
|
@@ -1738,7 +1696,7 @@ async function runRollup(command) {
|
|
|
1738
1696
|
}
|
|
1739
1697
|
async function getConfigs(command) {
|
|
1740
1698
|
if (command.config) {
|
|
1741
|
-
const configFile = getConfigPath(command.config);
|
|
1699
|
+
const configFile = await getConfigPath(command.config);
|
|
1742
1700
|
const { options, warnings } = await loadConfigFile_js.loadAndParseConfigFile(configFile, command);
|
|
1743
1701
|
return { options, warnings };
|
|
1744
1702
|
}
|