rollup 0.51.4 → 0.51.8
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 +17 -0
- package/bin/rollup +67 -54
- package/dist/rollup.browser.js +2604 -374
- package/dist/rollup.es.js +2608 -398
- package/dist/rollup.js +2608 -398
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 0.51.8
|
|
4
|
+
|
|
5
|
+
* Fix speed problems by simplifying treeshaking reassignment handling ([#1740](https://github.com/rollup/rollup/pull/1740))
|
|
6
|
+
* Update dependencies ([#1742](https://github.com/rollup/rollup/pull/1742))
|
|
7
|
+
|
|
8
|
+
## 0.51.7
|
|
9
|
+
|
|
10
|
+
* Keep "this"-context when calling sequence expressions ([#1724](https://github.com/rollup/rollup/pull/1724))
|
|
11
|
+
|
|
12
|
+
## 0.51.6
|
|
13
|
+
|
|
14
|
+
* Use sourcemaps to determine error locations ([#1728](https://github.com/rollup/rollup/pull/1728))
|
|
15
|
+
|
|
16
|
+
## 0.51.5
|
|
17
|
+
|
|
18
|
+
* Fix regressions with uninitialised conditional expressions ([#1720](https://github.com/rollup/rollup/pull/1720))
|
|
19
|
+
|
|
3
20
|
## 0.51.4
|
|
4
21
|
|
|
5
22
|
* Fix regressions preventing builds ([#1725](https://github.com/rollup/rollup/pull/1725))
|
package/bin/rollup
CHANGED
|
@@ -250,7 +250,7 @@ function isNumber (x) {
|
|
|
250
250
|
|
|
251
251
|
var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-v, --version Show version number\n-h, --help Show this help message\n-c, --config Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-w, --watch Watch files in bundle and rebuild on changes\n-i, --input Input (alternative to <entry file>)\n-o, --output.file <output> Output (if absent, prints to stdout)\n-f, --output.format [es] Type of output (amd, cjs, es, iife, umd)\n-e, --external Comma-separate list of module IDs to exclude\n-g, --globals Comma-separate list of `module ID:Global` pairs\n Any module IDs defined here are added to external\n-n, --name Name for UMD export\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n--amd.id ID for AMD module (default is anonymous)\n--amd.define Function to use in place of `define`\n--no-strict Don't emit a `\"use strict\";` in the generated modules.\n--no-indent Don't indent result\n--environment <values> Settings passed to config file (see example)\n--no-conflict Generate a noConflict method for UMD globals\n--silent Don't print warnings\n--intro Content to insert at top of bundle (inside wrapper)\n--outro Content to insert at end of bundle (inside wrapper)\n--banner Content to insert at top of bundle (outside wrapper)\n--footer Content to insert at end of bundle (outside wrapper)\n--interop Include interop block (true by default)\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --output=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://github.com/rollup/rollup/wiki\n";
|
|
252
252
|
|
|
253
|
-
var version = "0.51.
|
|
253
|
+
var version = "0.51.8";
|
|
254
254
|
|
|
255
255
|
var modules = {};
|
|
256
256
|
|
|
@@ -279,6 +279,10 @@ requireRelative.resolve = function(requested, relativeTo) {
|
|
|
279
279
|
|
|
280
280
|
var requireRelative_1 = requireRelative;
|
|
281
281
|
|
|
282
|
+
function createCommonjsModule(fn, module) {
|
|
283
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
284
|
+
}
|
|
285
|
+
|
|
282
286
|
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
283
287
|
|
|
284
288
|
var escapeStringRegexp = function (str) {
|
|
@@ -289,10 +293,6 @@ var escapeStringRegexp = function (str) {
|
|
|
289
293
|
return str.replace(matchOperatorsRe, '\\$&');
|
|
290
294
|
};
|
|
291
295
|
|
|
292
|
-
function createCommonjsModule(fn, module) {
|
|
293
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
296
|
var colorName = {
|
|
297
297
|
"aliceblue": [240, 248, 255],
|
|
298
298
|
"antiquewhite": [250, 235, 215],
|
|
@@ -1308,6 +1308,22 @@ convert.rgb.gray = function (rgb) {
|
|
|
1308
1308
|
};
|
|
1309
1309
|
});
|
|
1310
1310
|
|
|
1311
|
+
var conversions_1 = conversions.rgb;
|
|
1312
|
+
var conversions_2 = conversions.hsl;
|
|
1313
|
+
var conversions_3 = conversions.hsv;
|
|
1314
|
+
var conversions_4 = conversions.hwb;
|
|
1315
|
+
var conversions_5 = conversions.cmyk;
|
|
1316
|
+
var conversions_6 = conversions.xyz;
|
|
1317
|
+
var conversions_7 = conversions.lab;
|
|
1318
|
+
var conversions_8 = conversions.lch;
|
|
1319
|
+
var conversions_9 = conversions.hex;
|
|
1320
|
+
var conversions_10 = conversions.keyword;
|
|
1321
|
+
var conversions_11 = conversions.ansi16;
|
|
1322
|
+
var conversions_12 = conversions.ansi256;
|
|
1323
|
+
var conversions_13 = conversions.hcg;
|
|
1324
|
+
var conversions_14 = conversions.apple;
|
|
1325
|
+
var conversions_15 = conversions.gray;
|
|
1326
|
+
|
|
1311
1327
|
/*
|
|
1312
1328
|
this function routes a model to all other models.
|
|
1313
1329
|
|
|
@@ -1481,9 +1497,6 @@ models.forEach(function (fromModel) {
|
|
|
1481
1497
|
var colorConvert = convert;
|
|
1482
1498
|
|
|
1483
1499
|
var ansiStyles = createCommonjsModule(function (module) {
|
|
1484
|
-
'use strict';
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
1500
|
const wrapAnsi16 = (fn, offset) => function () {
|
|
1488
1501
|
const code = fn.apply(colorConvert, arguments);
|
|
1489
1502
|
return `\u001B[${code + offset}m`;
|
|
@@ -1646,10 +1659,6 @@ var hasFlag = function (flag, argv) {
|
|
|
1646
1659
|
};
|
|
1647
1660
|
|
|
1648
1661
|
var supportsColor = createCommonjsModule(function (module) {
|
|
1649
|
-
'use strict';
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
1662
|
const env = process.env;
|
|
1654
1663
|
|
|
1655
1664
|
const support = level => {
|
|
@@ -1741,7 +1750,7 @@ let supportLevel = (() => {
|
|
|
1741
1750
|
return 2;
|
|
1742
1751
|
}
|
|
1743
1752
|
|
|
1744
|
-
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
1753
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
1745
1754
|
return 1;
|
|
1746
1755
|
}
|
|
1747
1756
|
|
|
@@ -1764,31 +1773,30 @@ module.exports = process && support(supportLevel);
|
|
|
1764
1773
|
});
|
|
1765
1774
|
|
|
1766
1775
|
var templates = createCommonjsModule(function (module) {
|
|
1767
|
-
|
|
1768
|
-
const TEMPLATE_REGEX = /(?:\\(u[a-f0-9]{4}|x[a-f0-9]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
1776
|
+
const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
1769
1777
|
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
1770
1778
|
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
1771
|
-
const ESCAPE_REGEX = /\\(u[
|
|
1772
|
-
|
|
1773
|
-
const ESCAPES =
|
|
1774
|
-
n
|
|
1775
|
-
r
|
|
1776
|
-
t
|
|
1777
|
-
b
|
|
1778
|
-
f
|
|
1779
|
-
v
|
|
1780
|
-
0
|
|
1781
|
-
'\\'
|
|
1782
|
-
e
|
|
1783
|
-
a
|
|
1784
|
-
|
|
1779
|
+
const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
1780
|
+
|
|
1781
|
+
const ESCAPES = new Map([
|
|
1782
|
+
['n', '\n'],
|
|
1783
|
+
['r', '\r'],
|
|
1784
|
+
['t', '\t'],
|
|
1785
|
+
['b', '\b'],
|
|
1786
|
+
['f', '\f'],
|
|
1787
|
+
['v', '\v'],
|
|
1788
|
+
['0', '\0'],
|
|
1789
|
+
['\\', '\\'],
|
|
1790
|
+
['e', '\u001B'],
|
|
1791
|
+
['a', '\u0007']
|
|
1792
|
+
]);
|
|
1785
1793
|
|
|
1786
1794
|
function unescape(c) {
|
|
1787
1795
|
if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
|
|
1788
1796
|
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
1789
1797
|
}
|
|
1790
1798
|
|
|
1791
|
-
return ESCAPES
|
|
1799
|
+
return ESCAPES.get(c) || c;
|
|
1792
1800
|
}
|
|
1793
1801
|
|
|
1794
1802
|
function parseArguments(name, args) {
|
|
@@ -1894,6 +1902,7 @@ module.exports = (chalk, tmp) => {
|
|
|
1894
1902
|
};
|
|
1895
1903
|
});
|
|
1896
1904
|
|
|
1905
|
+
var chalk = createCommonjsModule(function (module) {
|
|
1897
1906
|
const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
|
|
1898
1907
|
|
|
1899
1908
|
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
|
@@ -1947,11 +1956,17 @@ for (const key of Object.keys(ansiStyles)) {
|
|
|
1947
1956
|
styles[key] = {
|
|
1948
1957
|
get() {
|
|
1949
1958
|
const codes = ansiStyles[key];
|
|
1950
|
-
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], key);
|
|
1959
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
|
|
1951
1960
|
}
|
|
1952
1961
|
};
|
|
1953
1962
|
}
|
|
1954
1963
|
|
|
1964
|
+
styles.visible = {
|
|
1965
|
+
get() {
|
|
1966
|
+
return build.call(this, this._styles || [], true, 'visible');
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1955
1970
|
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
|
|
1956
1971
|
for (const model of Object.keys(ansiStyles.color.ansi)) {
|
|
1957
1972
|
if (skipModels.has(model)) {
|
|
@@ -1968,7 +1983,7 @@ for (const model of Object.keys(ansiStyles.color.ansi)) {
|
|
|
1968
1983
|
close: ansiStyles.color.close,
|
|
1969
1984
|
closeRe: ansiStyles.color.closeRe
|
|
1970
1985
|
};
|
|
1971
|
-
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model);
|
|
1986
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
1972
1987
|
};
|
|
1973
1988
|
}
|
|
1974
1989
|
};
|
|
@@ -1991,7 +2006,7 @@ for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
|
|
|
1991
2006
|
close: ansiStyles.bgColor.close,
|
|
1992
2007
|
closeRe: ansiStyles.bgColor.closeRe
|
|
1993
2008
|
};
|
|
1994
|
-
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model);
|
|
2009
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
1995
2010
|
};
|
|
1996
2011
|
}
|
|
1997
2012
|
};
|
|
@@ -1999,12 +2014,13 @@ for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
|
|
|
1999
2014
|
|
|
2000
2015
|
const proto = Object.defineProperties(() => {}, styles);
|
|
2001
2016
|
|
|
2002
|
-
function build(_styles, key) {
|
|
2017
|
+
function build(_styles, _empty, key) {
|
|
2003
2018
|
const builder = function () {
|
|
2004
2019
|
return applyStyle.apply(builder, arguments);
|
|
2005
2020
|
};
|
|
2006
2021
|
|
|
2007
2022
|
builder._styles = _styles;
|
|
2023
|
+
builder._empty = _empty;
|
|
2008
2024
|
|
|
2009
2025
|
const self = this;
|
|
2010
2026
|
|
|
@@ -2056,7 +2072,7 @@ function applyStyle() {
|
|
|
2056
2072
|
}
|
|
2057
2073
|
|
|
2058
2074
|
if (!this.enabled || this.level <= 0 || !str) {
|
|
2059
|
-
return str;
|
|
2075
|
+
return this._empty ? '' : str;
|
|
2060
2076
|
}
|
|
2061
2077
|
|
|
2062
2078
|
// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
|
|
@@ -2105,10 +2121,12 @@ function chalkTag(chalk, strings) {
|
|
|
2105
2121
|
|
|
2106
2122
|
Object.defineProperties(Chalk.prototype, styles);
|
|
2107
2123
|
|
|
2108
|
-
|
|
2109
|
-
|
|
2124
|
+
module.exports = Chalk(); // eslint-disable-line new-cap
|
|
2125
|
+
module.exports.supportsColor = supportsColor;
|
|
2126
|
+
module.exports.default = module.exports; // For TypeScript
|
|
2127
|
+
});
|
|
2110
2128
|
|
|
2111
|
-
chalk.supportsColor
|
|
2129
|
+
var chalk_1 = chalk.supportsColor;
|
|
2112
2130
|
|
|
2113
2131
|
const absolutePath = /^(?:\/|(?:[A-Za-z]:)?[\\|/])/;
|
|
2114
2132
|
|
|
@@ -3178,10 +3196,6 @@ var plur = function (str, plural, count) {
|
|
|
3178
3196
|
};
|
|
3179
3197
|
|
|
3180
3198
|
var prettyMs = createCommonjsModule(function (module) {
|
|
3181
|
-
'use strict';
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
3199
|
module.exports = (ms, opts) => {
|
|
3186
3200
|
if (!Number.isFinite(ms)) {
|
|
3187
3201
|
throw new TypeError('Expected a finite number');
|
|
@@ -3220,7 +3234,7 @@ module.exports = (ms, opts) => {
|
|
|
3220
3234
|
|
|
3221
3235
|
const sec = ms / 1000 % 60;
|
|
3222
3236
|
const secDecimalDigits = typeof opts.secDecimalDigits === 'number' ? opts.secDecimalDigits : 1;
|
|
3223
|
-
const secStr = sec.toFixed(secDecimalDigits).replace(/\.0
|
|
3237
|
+
const secStr = sec.toFixed(secDecimalDigits).replace(/\.0+$/, '');
|
|
3224
3238
|
add(sec, 'second', 's', secStr);
|
|
3225
3239
|
|
|
3226
3240
|
return ret.join(' ');
|
|
@@ -3247,7 +3261,7 @@ SOURCEMAPPING_URL += 'ppingURL';
|
|
|
3247
3261
|
|
|
3248
3262
|
var SOURCEMAPPING_URL$1 = SOURCEMAPPING_URL;
|
|
3249
3263
|
|
|
3250
|
-
function build
|
|
3264
|
+
function build ( inputOptions, outputOptions, warnings, silent ) {
|
|
3251
3265
|
const useStdout = outputOptions.length === 1 && !outputOptions[0].file;
|
|
3252
3266
|
|
|
3253
3267
|
const start = Date.now();
|
|
@@ -3507,7 +3521,6 @@ signalExit.signals = signals_1;
|
|
|
3507
3521
|
signalExit.load = load_1;
|
|
3508
3522
|
|
|
3509
3523
|
var timeZone = createCommonjsModule(function (module) {
|
|
3510
|
-
'use strict';
|
|
3511
3524
|
module.exports = date => {
|
|
3512
3525
|
const offset = (date || new Date()).getTimezoneOffset();
|
|
3513
3526
|
const absOffset = Math.abs(offset);
|
|
@@ -3520,9 +3533,6 @@ module.exports = date => {
|
|
|
3520
3533
|
});
|
|
3521
3534
|
|
|
3522
3535
|
var dateTime = createCommonjsModule(function (module) {
|
|
3523
|
-
'use strict';
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
3536
|
module.exports = options => {
|
|
3527
3537
|
options = Object.assign({
|
|
3528
3538
|
date: new Date(),
|
|
@@ -3556,17 +3566,16 @@ module.exports = options => {
|
|
|
3556
3566
|
});
|
|
3557
3567
|
|
|
3558
3568
|
var ansiEscapes = createCommonjsModule(function (module) {
|
|
3559
|
-
'use strict';
|
|
3560
3569
|
const x = module.exports;
|
|
3561
3570
|
const ESC = '\u001B[';
|
|
3562
3571
|
const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
|
3563
3572
|
|
|
3564
|
-
x.cursorTo =
|
|
3565
|
-
if (
|
|
3566
|
-
|
|
3573
|
+
x.cursorTo = (x, y) => {
|
|
3574
|
+
if (typeof x !== 'number') {
|
|
3575
|
+
throw new TypeError('The `x` argument is required');
|
|
3567
3576
|
}
|
|
3568
3577
|
|
|
3569
|
-
if (
|
|
3578
|
+
if (typeof y !== 'number') {
|
|
3570
3579
|
return ESC + (x + 1) + 'G';
|
|
3571
3580
|
}
|
|
3572
3581
|
|
|
@@ -3574,6 +3583,10 @@ x.cursorTo = function (x, y) {
|
|
|
3574
3583
|
};
|
|
3575
3584
|
|
|
3576
3585
|
x.cursorMove = (x, y) => {
|
|
3586
|
+
if (typeof x !== 'number') {
|
|
3587
|
+
throw new TypeError('The `x` argument is required');
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3577
3590
|
let ret = '';
|
|
3578
3591
|
|
|
3579
3592
|
if (x < 0) {
|
|
@@ -3918,7 +3931,7 @@ function execute ( configFile, configs, command ) {
|
|
|
3918
3931
|
});
|
|
3919
3932
|
}
|
|
3920
3933
|
|
|
3921
|
-
return build
|
|
3934
|
+
return build( inputOptions, outputOptions, warnings, command.silent );
|
|
3922
3935
|
});
|
|
3923
3936
|
}
|
|
3924
3937
|
}
|