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/dist/shared/watch-cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.71.0
|
|
4
|
+
Sat, 30 Apr 2022 06:02:30 GMT - commit edd971efcaf5ebdb29448b1d2daa436f6d05f04a
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -18,10 +18,10 @@ const cli = require('../bin/rollup');
|
|
|
18
18
|
const rollup = require('./rollup.js');
|
|
19
19
|
const require$$0 = require('assert');
|
|
20
20
|
const require$$0$1 = require('events');
|
|
21
|
-
const
|
|
22
|
-
require('path');
|
|
21
|
+
const loadConfigFile = require('./loadConfigFile.js');
|
|
23
22
|
require('util');
|
|
24
23
|
require('stream');
|
|
24
|
+
require('path');
|
|
25
25
|
require('os');
|
|
26
26
|
require('./mergeOptions.js');
|
|
27
27
|
require('perf_hooks');
|
|
@@ -71,62 +71,69 @@ var signalExit = {exports: {}};
|
|
|
71
71
|
|
|
72
72
|
var signals$1 = {exports: {}};
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
74
|
+
var hasRequiredSignals;
|
|
75
|
+
|
|
76
|
+
function requireSignals () {
|
|
77
|
+
if (hasRequiredSignals) return signals$1.exports;
|
|
78
|
+
hasRequiredSignals = 1;
|
|
79
|
+
(function (module) {
|
|
80
|
+
// This is not the set of all possible signals.
|
|
81
|
+
//
|
|
82
|
+
// It IS, however, the set of all signals that trigger
|
|
83
|
+
// an exit on either Linux or BSD systems. Linux is a
|
|
84
|
+
// superset of the signal names supported on BSD, and
|
|
85
|
+
// the unknown signals just fail to register, so we can
|
|
86
|
+
// catch that easily enough.
|
|
87
|
+
//
|
|
88
|
+
// Don't bother with SIGKILL. It's uncatchable, which
|
|
89
|
+
// means that we can't fire any callbacks anyway.
|
|
90
|
+
//
|
|
91
|
+
// If a user does happen to register a handler on a non-
|
|
92
|
+
// fatal signal like SIGWINCH or something, and then
|
|
93
|
+
// exit, it'll end up firing `process.emit('exit')`, so
|
|
94
|
+
// the handler will be fired anyway.
|
|
95
|
+
//
|
|
96
|
+
// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
|
97
|
+
// artificially, inherently leave the process in a
|
|
98
|
+
// state from which it is not safe to try and enter JS
|
|
99
|
+
// listeners.
|
|
100
|
+
module.exports = [
|
|
101
|
+
'SIGABRT',
|
|
102
|
+
'SIGALRM',
|
|
103
|
+
'SIGHUP',
|
|
104
|
+
'SIGINT',
|
|
105
|
+
'SIGTERM'
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
if (process.platform !== 'win32') {
|
|
109
|
+
module.exports.push(
|
|
110
|
+
'SIGVTALRM',
|
|
111
|
+
'SIGXCPU',
|
|
112
|
+
'SIGXFSZ',
|
|
113
|
+
'SIGUSR2',
|
|
114
|
+
'SIGTRAP',
|
|
115
|
+
'SIGSYS',
|
|
116
|
+
'SIGQUIT',
|
|
117
|
+
'SIGIOT'
|
|
118
|
+
// should detect profiler and enable/disable accordingly.
|
|
119
|
+
// see #21
|
|
120
|
+
// 'SIGPROF'
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (process.platform === 'linux') {
|
|
125
|
+
module.exports.push(
|
|
126
|
+
'SIGIO',
|
|
127
|
+
'SIGPOLL',
|
|
128
|
+
'SIGPWR',
|
|
129
|
+
'SIGSTKFLT',
|
|
130
|
+
'SIGUNUSED'
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
} (signals$1));
|
|
134
|
+
return signals$1.exports;
|
|
117
135
|
}
|
|
118
136
|
|
|
119
|
-
if (process.platform === 'linux') {
|
|
120
|
-
module.exports.push(
|
|
121
|
-
'SIGIO',
|
|
122
|
-
'SIGPOLL',
|
|
123
|
-
'SIGPWR',
|
|
124
|
-
'SIGSTKFLT',
|
|
125
|
-
'SIGUNUSED'
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
}(signals$1));
|
|
129
|
-
|
|
130
137
|
// Note: since nyc uses this module to output coverage, any lines
|
|
131
138
|
// that are in the direct sync flow of nyc's outputCoverage are
|
|
132
139
|
// ignored, since we can never get coverage for them.
|
|
@@ -153,7 +160,7 @@ if (!processOk(process$1)) {
|
|
|
153
160
|
};
|
|
154
161
|
} else {
|
|
155
162
|
var assert = require$$0;
|
|
156
|
-
var signals =
|
|
163
|
+
var signals = requireSignals();
|
|
157
164
|
var isWin = /^win/i.test(process$1.platform);
|
|
158
165
|
|
|
159
166
|
var EE = require$$0$1;
|
|
@@ -330,8 +337,6 @@ if (!processOk(process$1)) {
|
|
|
330
337
|
};
|
|
331
338
|
}
|
|
332
339
|
|
|
333
|
-
const onExit = signalExit.exports;
|
|
334
|
-
|
|
335
340
|
const CLEAR_SCREEN = '\u001Bc';
|
|
336
341
|
function getResetScreen(configs, allowClearScreen) {
|
|
337
342
|
let clearScreen = allowClearScreen;
|
|
@@ -341,12 +346,12 @@ function getResetScreen(configs, allowClearScreen) {
|
|
|
341
346
|
}
|
|
342
347
|
}
|
|
343
348
|
if (clearScreen) {
|
|
344
|
-
return (heading) =>
|
|
349
|
+
return (heading) => loadConfigFile.stderr(CLEAR_SCREEN + heading);
|
|
345
350
|
}
|
|
346
351
|
let firstRun = true;
|
|
347
352
|
return (heading) => {
|
|
348
353
|
if (firstRun) {
|
|
349
|
-
|
|
354
|
+
loadConfigFile.stderr(heading);
|
|
350
355
|
firstRun = false;
|
|
351
356
|
}
|
|
352
357
|
};
|
|
@@ -360,7 +365,7 @@ async function watch(command) {
|
|
|
360
365
|
let configWatcher;
|
|
361
366
|
let resetScreen;
|
|
362
367
|
const configFile = command.config ? await cli.getConfigPath(command.config) : null;
|
|
363
|
-
|
|
368
|
+
signalExit.exports(close);
|
|
364
369
|
process$2.on('uncaughtException', close);
|
|
365
370
|
if (!process$2.stdin.isTTY) {
|
|
366
371
|
process$2.stdin.on('end', close);
|
|
@@ -380,10 +385,10 @@ async function watch(command) {
|
|
|
380
385
|
configFileRevision++;
|
|
381
386
|
const currentConfigFileRevision = configFileRevision;
|
|
382
387
|
if (configFileData) {
|
|
383
|
-
|
|
388
|
+
loadConfigFile.stderr(`\nReloading updated config...`);
|
|
384
389
|
}
|
|
385
390
|
configFileData = newConfigFileData;
|
|
386
|
-
const { options, warnings } = await
|
|
391
|
+
const { options, warnings } = await loadConfigFile.loadAndParseConfigFile(configFile, command);
|
|
387
392
|
if (currentConfigFileRevision !== configFileRevision) {
|
|
388
393
|
return;
|
|
389
394
|
}
|
|
@@ -393,7 +398,7 @@ async function watch(command) {
|
|
|
393
398
|
start(options, warnings);
|
|
394
399
|
}
|
|
395
400
|
catch (err) {
|
|
396
|
-
|
|
401
|
+
loadConfigFile.handleError(err, true);
|
|
397
402
|
}
|
|
398
403
|
}
|
|
399
404
|
}
|
|
@@ -409,20 +414,20 @@ async function watch(command) {
|
|
|
409
414
|
watcher = rollup.watch(configs);
|
|
410
415
|
}
|
|
411
416
|
catch (err) {
|
|
412
|
-
return
|
|
417
|
+
return loadConfigFile.handleError(err);
|
|
413
418
|
}
|
|
414
419
|
watcher.on('event', event => {
|
|
415
420
|
switch (event.code) {
|
|
416
421
|
case 'ERROR':
|
|
417
422
|
warnings.flush();
|
|
418
|
-
|
|
423
|
+
loadConfigFile.handleError(event.error, true);
|
|
419
424
|
break;
|
|
420
425
|
case 'START':
|
|
421
426
|
if (!silent) {
|
|
422
427
|
if (!resetScreen) {
|
|
423
428
|
resetScreen = getResetScreen(configs, isTTY);
|
|
424
429
|
}
|
|
425
|
-
resetScreen(
|
|
430
|
+
resetScreen(loadConfigFile.underline(`rollup v${rollup.version}`));
|
|
426
431
|
}
|
|
427
432
|
break;
|
|
428
433
|
case 'BUNDLE_START':
|
|
@@ -433,24 +438,24 @@ async function watch(command) {
|
|
|
433
438
|
? input.join(', ')
|
|
434
439
|
: Object.values(input).join(', ');
|
|
435
440
|
}
|
|
436
|
-
|
|
441
|
+
loadConfigFile.stderr(loadConfigFile.cyan(`bundles ${loadConfigFile.bold(input)} → ${loadConfigFile.bold(event.output.map(rollup.relativeId).join(', '))}...`));
|
|
437
442
|
}
|
|
438
443
|
break;
|
|
439
444
|
case 'BUNDLE_END':
|
|
440
445
|
warnings.flush();
|
|
441
446
|
if (!silent)
|
|
442
|
-
|
|
447
|
+
loadConfigFile.stderr(loadConfigFile.green(`created ${loadConfigFile.bold(event.output.map(rollup.relativeId).join(', '))} in ${loadConfigFile.bold(cli.ms(event.duration))}`));
|
|
443
448
|
if (event.result && event.result.getTimings) {
|
|
444
449
|
cli.printTimings(event.result.getTimings());
|
|
445
450
|
}
|
|
446
451
|
break;
|
|
447
452
|
case 'END':
|
|
448
453
|
if (!silent && isTTY) {
|
|
449
|
-
|
|
454
|
+
loadConfigFile.stderr(`\n[${dateTime()}] waiting for changes...`);
|
|
450
455
|
}
|
|
451
456
|
}
|
|
452
457
|
if ('result' in event && event.result) {
|
|
453
|
-
event.result.close().catch(error =>
|
|
458
|
+
event.result.close().catch(error => loadConfigFile.handleError(error, true));
|
|
454
459
|
}
|
|
455
460
|
});
|
|
456
461
|
}
|
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.71.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"perf:init": "node scripts/perf-init.js",
|
|
25
25
|
"postpublish": "git push && git push --tags",
|
|
26
26
|
"prepare": "husky install && npm run build",
|
|
27
|
-
"prepublishOnly": "npm ci && npm run
|
|
27
|
+
"prepublishOnly": "npm ci && npm run build:bootstrap",
|
|
28
28
|
"security": "npm audit",
|
|
29
29
|
"test": "npm run build && npm run test:all",
|
|
30
30
|
"test:cjs": "npm run build:cjs && npm run test:only",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@rollup/plugin-alias": "^3.1.9",
|
|
61
61
|
"@rollup/plugin-buble": "^0.21.3",
|
|
62
|
-
"@rollup/plugin-commonjs": "^
|
|
62
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
|
63
63
|
"@rollup/plugin-json": "^4.1.0",
|
|
64
|
-
"@rollup/plugin-node-resolve": "^13.2.
|
|
64
|
+
"@rollup/plugin-node-resolve": "^13.2.1",
|
|
65
65
|
"@rollup/plugin-replace": "^4.0.0",
|
|
66
66
|
"@rollup/plugin-typescript": "^8.3.2",
|
|
67
67
|
"@rollup/pluginutils": "^4.2.1",
|
|
@@ -69,25 +69,25 @@
|
|
|
69
69
|
"@types/node": "^10.17.60",
|
|
70
70
|
"@types/signal-exit": "^3.0.1",
|
|
71
71
|
"@types/yargs-parser": "^20.2.2",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
73
|
-
"@typescript-eslint/parser": "^5.
|
|
74
|
-
"acorn": "^8.7.
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
73
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
74
|
+
"acorn": "^8.7.1",
|
|
75
75
|
"acorn-jsx": "^5.3.2",
|
|
76
76
|
"acorn-walk": "^8.2.0",
|
|
77
77
|
"buble": "^0.20.0",
|
|
78
78
|
"chokidar": "^3.5.3",
|
|
79
79
|
"colorette": "^2.0.16",
|
|
80
|
-
"core-js": "^3.22.
|
|
80
|
+
"core-js": "^3.22.3",
|
|
81
81
|
"date-time": "^4.0.0",
|
|
82
|
-
"es5-shim": "^4.6.
|
|
82
|
+
"es5-shim": "^4.6.6",
|
|
83
83
|
"es6-shim": "^0.35.6",
|
|
84
|
-
"eslint": "^8.
|
|
84
|
+
"eslint": "^8.14.0",
|
|
85
85
|
"eslint-config-prettier": "^8.5.0",
|
|
86
86
|
"eslint-plugin-import": "^2.26.0",
|
|
87
87
|
"eslint-plugin-prettier": "^4.0.0",
|
|
88
88
|
"execa": "^5.1.1",
|
|
89
89
|
"fixturify": "^2.1.1",
|
|
90
|
-
"fs-extra": "^10.0
|
|
90
|
+
"fs-extra": "^10.1.0",
|
|
91
91
|
"hash.js": "^1.1.7",
|
|
92
92
|
"husky": "^7.0.4",
|
|
93
93
|
"is-reference": "^3.0.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"pretty-bytes": "^5.6.0",
|
|
101
101
|
"pretty-ms": "^7.0.1",
|
|
102
102
|
"requirejs": "^2.3.6",
|
|
103
|
-
"rollup": "^2.70.
|
|
103
|
+
"rollup": "^2.70.2",
|
|
104
104
|
"rollup-plugin-license": "^2.7.0",
|
|
105
105
|
"rollup-plugin-string": "^3.0.0",
|
|
106
106
|
"rollup-plugin-terser": "^7.0.2",
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
"source-map-support": "^0.5.21",
|
|
112
112
|
"sourcemap-codec": "^1.4.8",
|
|
113
113
|
"systemjs": "^6.12.1",
|
|
114
|
-
"terser": "^5.
|
|
115
|
-
"tslib": "^2.
|
|
116
|
-
"typescript": "^4.6.
|
|
114
|
+
"terser": "^5.13.0",
|
|
115
|
+
"tslib": "^2.4.0",
|
|
116
|
+
"typescript": "^4.6.4",
|
|
117
117
|
"weak-napi": "^2.0.2",
|
|
118
118
|
"yargs-parser": "^20.2.9"
|
|
119
119
|
},
|