rollup 2.70.2 → 2.71.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 +24 -0
- package/LICENSE.md +1 -1
- package/dist/bin/rollup +17 -17
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +149 -138
- package/dist/es/shared/watch.js +189 -187
- package/dist/loadConfigFile.js +6 -6
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +191 -189
- package/dist/shared/loadConfigFile.js +6 -4
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +149 -138
- package/dist/shared/watch-cli.js +79 -74
- package/dist/shared/watch.js +2 -2
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 2.71.0
|
|
4
|
+
|
|
5
|
+
_2022-04-30_
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Mark `Object.hasOwn` as pure (#4482)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- Prevent infinite recursion and display proper warning for recursive reexports (#4472)
|
|
14
|
+
- Fix type issue in TypeScript nightly (#4471)
|
|
15
|
+
|
|
16
|
+
### Pull Requests
|
|
17
|
+
|
|
18
|
+
- [#4467](https://github.com/rollup/rollup/pull/4467): docs: update deprecated option in tools.md (@kimjh96)
|
|
19
|
+
- [#4471](https://github.com/rollup/rollup/pull/4471): Fix: tsc did not build (@frank-dspeed)
|
|
20
|
+
- [#4472](https://github.com/rollup/rollup/pull/4472): Throw proper error when indirectly reexporting a recursive binding (@lukastaegert)
|
|
21
|
+
- [#4475](https://github.com/rollup/rollup/pull/4475): chore: bump deps (#4475) (@dnalborczyk)
|
|
22
|
+
- [#4477](https://github.com/rollup/rollup/pull/4477): chore: bump github actions (@dnalborczyk)
|
|
23
|
+
- [#4478](https://github.com/rollup/rollup/pull/4478): ci: test with node.js v18, remove v17 (@dnalborczyk)
|
|
24
|
+
- [#4479](https://github.com/rollup/rollup/pull/4479): chore(repo): replace `git.io` in the issue template (@SukkaW)
|
|
25
|
+
- [#4482](https://github.com/rollup/rollup/pull/4482): feat: add Object.hasOwn as pure function (@dnalborczyk)
|
|
26
|
+
|
|
3
27
|
## 2.70.2
|
|
4
28
|
|
|
5
29
|
_2022-04-15_
|
package/LICENSE.md
CHANGED
|
@@ -30,7 +30,7 @@ Repository: https://github.com/acornjs/acorn.git
|
|
|
30
30
|
|
|
31
31
|
> MIT License
|
|
32
32
|
>
|
|
33
|
-
> Copyright (C) 2012-
|
|
33
|
+
> Copyright (C) 2012-2022 by various contributors (see AUTHORS)
|
|
34
34
|
>
|
|
35
35
|
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
36
36
|
> of this software and associated documentation files (the "Software"), to deal
|
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.71.0
|
|
6
|
+
Sat, 30 Apr 2022 06:02:30 GMT - commit edd971efcaf5ebdb29448b1d2daa436f6d05f04a
|
|
7
7
|
|
|
8
8
|
https://github.com/rollup/rollup
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ const require$$2 = require('util');
|
|
|
19
19
|
const require$$0$1 = require('fs');
|
|
20
20
|
const require$$0 = require('path');
|
|
21
21
|
const mergeOptions = require('../shared/mergeOptions.js');
|
|
22
|
-
const
|
|
22
|
+
const loadConfigFile = require('../shared/loadConfigFile.js');
|
|
23
23
|
require('perf_hooks');
|
|
24
24
|
require('crypto');
|
|
25
25
|
require('events');
|
|
@@ -1501,7 +1501,7 @@ const prettyBytes$1 = prettyBytes;
|
|
|
1501
1501
|
|
|
1502
1502
|
function printTimings(timings) {
|
|
1503
1503
|
Object.entries(timings).forEach(([label, [time, memory, total]]) => {
|
|
1504
|
-
const appliedColor = label[0] === '#' ? (label[1] !== '#' ?
|
|
1504
|
+
const appliedColor = label[0] === '#' ? (label[1] !== '#' ? loadConfigFile.underline : loadConfigFile.bold) : (text) => text;
|
|
1505
1505
|
const row = `${label}: ${time.toFixed(0)}ms, ${prettyBytes$1(memory)} / ${prettyBytes$1(total)}`;
|
|
1506
1506
|
console.info(appliedColor(row));
|
|
1507
1507
|
});
|
|
@@ -1523,13 +1523,13 @@ async function build(inputOptions, warnings, silent = false) {
|
|
|
1523
1523
|
else if (typeof inputOptions.input === 'object' && inputOptions.input !== null) {
|
|
1524
1524
|
inputFiles = Object.values(inputOptions.input).join(', ');
|
|
1525
1525
|
}
|
|
1526
|
-
|
|
1526
|
+
loadConfigFile.stderr(loadConfigFile.cyan(`\n${loadConfigFile.bold(inputFiles)} → ${loadConfigFile.bold(files.join(', '))}...`));
|
|
1527
1527
|
}
|
|
1528
1528
|
const bundle = await rollup.rollup(inputOptions);
|
|
1529
1529
|
if (useStdout) {
|
|
1530
1530
|
const output = outputOptions[0];
|
|
1531
1531
|
if (output.sourcemap && output.sourcemap !== 'inline') {
|
|
1532
|
-
|
|
1532
|
+
loadConfigFile.handleError({
|
|
1533
1533
|
code: 'ONLY_INLINE_SOURCEMAPS',
|
|
1534
1534
|
message: 'Only inline sourcemaps are supported when bundling to stdout.'
|
|
1535
1535
|
});
|
|
@@ -1547,7 +1547,7 @@ async function build(inputOptions, warnings, silent = false) {
|
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
1549
|
if (outputs.length > 1)
|
|
1550
|
-
process$1.stdout.write(`\n${
|
|
1550
|
+
process$1.stdout.write(`\n${loadConfigFile.cyan(loadConfigFile.bold(`//→ ${file.fileName}:`))}\n`);
|
|
1551
1551
|
process$1.stdout.write(source);
|
|
1552
1552
|
}
|
|
1553
1553
|
if (!silent) {
|
|
@@ -1559,7 +1559,7 @@ async function build(inputOptions, warnings, silent = false) {
|
|
|
1559
1559
|
await bundle.close();
|
|
1560
1560
|
if (!silent) {
|
|
1561
1561
|
warnings.flush();
|
|
1562
|
-
|
|
1562
|
+
loadConfigFile.stderr(loadConfigFile.green(`created ${loadConfigFile.bold(files.join(', '))} in ${loadConfigFile.bold(ms(Date.now() - start))}`));
|
|
1563
1563
|
if (bundle && bundle.getTimings) {
|
|
1564
1564
|
printTimings(bundle.getTimings());
|
|
1565
1565
|
}
|
|
@@ -1582,7 +1582,7 @@ async function getConfigPath(commandConfig) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
catch (err) {
|
|
1584
1584
|
if (err.code === 'MODULE_NOT_FOUND') {
|
|
1585
|
-
|
|
1585
|
+
loadConfigFile.handleError({
|
|
1586
1586
|
code: 'MISSING_EXTERNAL_CONFIG',
|
|
1587
1587
|
message: `Could not resolve config file "${commandConfig}"`
|
|
1588
1588
|
});
|
|
@@ -1604,12 +1604,12 @@ async function findConfigFileNameInCwd() {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
|
|
1606
1606
|
async function loadConfigFromCommand(command) {
|
|
1607
|
-
const warnings =
|
|
1607
|
+
const warnings = loadConfigFile.batchWarnings();
|
|
1608
1608
|
if (!command.input && (command.stdin || !process$1.stdin.isTTY)) {
|
|
1609
|
-
command.input =
|
|
1609
|
+
command.input = loadConfigFile.stdinName;
|
|
1610
1610
|
}
|
|
1611
1611
|
const options = mergeOptions.mergeOptions({ input: [] }, command, warnings.add);
|
|
1612
|
-
await
|
|
1612
|
+
await loadConfigFile.addCommandPluginsToInputOptions(options, command);
|
|
1613
1613
|
return { options: [options], warnings };
|
|
1614
1614
|
}
|
|
1615
1615
|
|
|
@@ -1617,7 +1617,7 @@ async function runRollup(command) {
|
|
|
1617
1617
|
let inputSource;
|
|
1618
1618
|
if (command._.length > 0) {
|
|
1619
1619
|
if (command.input) {
|
|
1620
|
-
|
|
1620
|
+
loadConfigFile.handleError({
|
|
1621
1621
|
code: 'DUPLICATE_IMPORT_OPTIONS',
|
|
1622
1622
|
message: 'Either use --input, or pass input path as argument'
|
|
1623
1623
|
});
|
|
@@ -1669,7 +1669,7 @@ async function runRollup(command) {
|
|
|
1669
1669
|
}
|
|
1670
1670
|
if (command.failAfterWarnings && warnings.warningOccurred) {
|
|
1671
1671
|
warnings.flush();
|
|
1672
|
-
|
|
1672
|
+
loadConfigFile.handleError({
|
|
1673
1673
|
code: 'FAIL_AFTER_WARNINGS',
|
|
1674
1674
|
message: 'Warnings occurred and --failAfterWarnings flag present'
|
|
1675
1675
|
});
|
|
@@ -1677,18 +1677,18 @@ async function runRollup(command) {
|
|
|
1677
1677
|
}
|
|
1678
1678
|
catch (err) {
|
|
1679
1679
|
warnings.flush();
|
|
1680
|
-
|
|
1680
|
+
loadConfigFile.handleError(err);
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
1683
|
catch (err) {
|
|
1684
|
-
|
|
1684
|
+
loadConfigFile.handleError(err);
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
async function getConfigs(command) {
|
|
1689
1689
|
if (command.config) {
|
|
1690
1690
|
const configFile = await getConfigPath(command.config);
|
|
1691
|
-
const { options, warnings } = await
|
|
1691
|
+
const { options, warnings } = await loadConfigFile.loadAndParseConfigFile(configFile, command);
|
|
1692
1692
|
return { options, warnings };
|
|
1693
1693
|
}
|
|
1694
1694
|
return await loadConfigFromCommand(command);
|