rollup 2.75.7 → 3.0.0-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/LICENSE.md +2 -2
- package/dist/bin/rollup +92 -86
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +1608 -1517
- package/dist/es/shared/watch.js +3 -2
- package/dist/loadConfigFile.js +6 -6
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +28 -55
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +19 -10
- package/dist/shared/mergeOptions.js +3 -2
- package/dist/shared/rollup.js +1537 -1446
- package/dist/shared/watch-cli.js +17 -17
- package/dist/shared/watch.js +2 -2
- package/package.json +26 -26
- package/CHANGELOG.md +0 -6629
package/dist/shared/watch-cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.0.0-1
|
|
4
|
+
Fri, 08 Jul 2022 11:35:32 GMT - commit 48ce34db70ebc2b4c1be38e6b8b02881be90b9f1
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -18,7 +18,7 @@ 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
|
|
21
|
+
const loadConfigFile_js = require('./loadConfigFile.js');
|
|
22
22
|
const child_process = require('child_process');
|
|
23
23
|
require('util');
|
|
24
24
|
require('stream');
|
|
@@ -347,12 +347,12 @@ function getResetScreen(configs, allowClearScreen) {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
if (clearScreen) {
|
|
350
|
-
return (heading) =>
|
|
350
|
+
return (heading) => loadConfigFile_js.stderr(CLEAR_SCREEN + heading);
|
|
351
351
|
}
|
|
352
352
|
let firstRun = true;
|
|
353
353
|
return (heading) => {
|
|
354
354
|
if (firstRun) {
|
|
355
|
-
|
|
355
|
+
loadConfigFile_js.stderr(heading);
|
|
356
356
|
firstRun = false;
|
|
357
357
|
}
|
|
358
358
|
};
|
|
@@ -371,7 +371,7 @@ function createWatchHooks(command) {
|
|
|
371
371
|
if (watchHooks[hook]) {
|
|
372
372
|
const cmd = watchHooks[hook];
|
|
373
373
|
if (!command.silent) {
|
|
374
|
-
|
|
374
|
+
loadConfigFile_js.stderr(loadConfigFile_js.cyan(`watch.${hook} ${loadConfigFile_js.bold(`$ ${cmd}`)}`));
|
|
375
375
|
}
|
|
376
376
|
try {
|
|
377
377
|
// !! important - use stderr for all writes from execSync
|
|
@@ -379,7 +379,7 @@ function createWatchHooks(command) {
|
|
|
379
379
|
child_process.execSync(cmd, { stdio: command.silent ? 'ignore' : stdio });
|
|
380
380
|
}
|
|
381
381
|
catch (e) {
|
|
382
|
-
|
|
382
|
+
loadConfigFile_js.stderr(e.message);
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
};
|
|
@@ -414,10 +414,10 @@ async function watch(command) {
|
|
|
414
414
|
configFileRevision++;
|
|
415
415
|
const currentConfigFileRevision = configFileRevision;
|
|
416
416
|
if (configFileData) {
|
|
417
|
-
|
|
417
|
+
loadConfigFile_js.stderr(`\nReloading updated config...`);
|
|
418
418
|
}
|
|
419
419
|
configFileData = newConfigFileData;
|
|
420
|
-
const { options, warnings } = await
|
|
420
|
+
const { options, warnings } = await loadConfigFile_js.loadAndParseConfigFile(configFile, command);
|
|
421
421
|
if (currentConfigFileRevision !== configFileRevision) {
|
|
422
422
|
return;
|
|
423
423
|
}
|
|
@@ -427,7 +427,7 @@ async function watch(command) {
|
|
|
427
427
|
start(options, warnings);
|
|
428
428
|
}
|
|
429
429
|
catch (err) {
|
|
430
|
-
|
|
430
|
+
loadConfigFile_js.handleError(err, true);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
}
|
|
@@ -443,13 +443,13 @@ async function watch(command) {
|
|
|
443
443
|
watcher = rollup.watch(configs);
|
|
444
444
|
}
|
|
445
445
|
catch (err) {
|
|
446
|
-
return
|
|
446
|
+
return loadConfigFile_js.handleError(err);
|
|
447
447
|
}
|
|
448
448
|
watcher.on('event', event => {
|
|
449
449
|
switch (event.code) {
|
|
450
450
|
case 'ERROR':
|
|
451
451
|
warnings.flush();
|
|
452
|
-
|
|
452
|
+
loadConfigFile_js.handleError(event.error, true);
|
|
453
453
|
runWatchHook('onError');
|
|
454
454
|
break;
|
|
455
455
|
case 'START':
|
|
@@ -457,7 +457,7 @@ async function watch(command) {
|
|
|
457
457
|
if (!resetScreen) {
|
|
458
458
|
resetScreen = getResetScreen(configs, isTTY);
|
|
459
459
|
}
|
|
460
|
-
resetScreen(
|
|
460
|
+
resetScreen(loadConfigFile_js.underline(`rollup v${rollup.version}`));
|
|
461
461
|
}
|
|
462
462
|
runWatchHook('onStart');
|
|
463
463
|
break;
|
|
@@ -469,14 +469,14 @@ async function watch(command) {
|
|
|
469
469
|
? input.join(', ')
|
|
470
470
|
: Object.values(input).join(', ');
|
|
471
471
|
}
|
|
472
|
-
|
|
472
|
+
loadConfigFile_js.stderr(loadConfigFile_js.cyan(`bundles ${loadConfigFile_js.bold(input)} → ${loadConfigFile_js.bold(event.output.map(rollup.relativeId).join(', '))}...`));
|
|
473
473
|
}
|
|
474
474
|
runWatchHook('onBundleStart');
|
|
475
475
|
break;
|
|
476
476
|
case 'BUNDLE_END':
|
|
477
477
|
warnings.flush();
|
|
478
478
|
if (!silent)
|
|
479
|
-
|
|
479
|
+
loadConfigFile_js.stderr(loadConfigFile_js.green(`created ${loadConfigFile_js.bold(event.output.map(rollup.relativeId).join(', '))} in ${loadConfigFile_js.bold(cli.prettyMilliseconds(event.duration))}`));
|
|
480
480
|
runWatchHook('onBundleEnd');
|
|
481
481
|
if (event.result && event.result.getTimings) {
|
|
482
482
|
cli.printTimings(event.result.getTimings());
|
|
@@ -485,11 +485,11 @@ async function watch(command) {
|
|
|
485
485
|
case 'END':
|
|
486
486
|
runWatchHook('onEnd');
|
|
487
487
|
if (!silent && isTTY) {
|
|
488
|
-
|
|
488
|
+
loadConfigFile_js.stderr(`\n[${dateTime()}] waiting for changes...`);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
if ('result' in event && event.result) {
|
|
492
|
-
event.result.close().catch(error =>
|
|
492
|
+
event.result.close().catch(error => loadConfigFile_js.handleError(error, true));
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
}
|
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"lint:nofix": "eslint . && prettier --check \"**/*.md\"",
|
|
21
21
|
"lint:markdown": "prettier --write \"**/*.md\"",
|
|
22
22
|
"perf": "npm run build:cjs && node --expose-gc scripts/perf.js",
|
|
23
|
-
"perf:debug": "node --inspect-brk scripts/perf-debug.js",
|
|
24
23
|
"perf:init": "node scripts/perf-init.js",
|
|
25
24
|
"postpublish": "git push && git push --tags",
|
|
26
25
|
"prepare": "husky install && npm run build",
|
|
@@ -59,49 +58,49 @@
|
|
|
59
58
|
"devDependencies": {
|
|
60
59
|
"@rollup/plugin-alias": "^3.1.9",
|
|
61
60
|
"@rollup/plugin-buble": "^0.21.3",
|
|
62
|
-
"@rollup/plugin-commonjs": "^22.0.
|
|
61
|
+
"@rollup/plugin-commonjs": "^22.0.1",
|
|
63
62
|
"@rollup/plugin-json": "^4.1.0",
|
|
64
63
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
65
64
|
"@rollup/plugin-replace": "^4.0.0",
|
|
66
|
-
"@rollup/plugin-typescript": "^8.3.
|
|
65
|
+
"@rollup/plugin-typescript": "^8.3.3",
|
|
67
66
|
"@rollup/pluginutils": "^4.2.1",
|
|
68
|
-
"@types/estree": "0.0.
|
|
69
|
-
"@types/node": "^
|
|
67
|
+
"@types/estree": "0.0.52",
|
|
68
|
+
"@types/node": "^14.18.21",
|
|
70
69
|
"@types/signal-exit": "^3.0.1",
|
|
71
|
-
"@types/yargs-parser": "^
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
73
|
-
"@typescript-eslint/parser": "^5.
|
|
70
|
+
"@types/yargs-parser": "^21.0.0",
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
72
|
+
"@typescript-eslint/parser": "^5.30.5",
|
|
74
73
|
"acorn": "^8.7.1",
|
|
75
74
|
"acorn-jsx": "^5.3.2",
|
|
76
75
|
"acorn-walk": "^8.2.0",
|
|
77
76
|
"buble": "^0.20.0",
|
|
78
77
|
"chokidar": "^3.5.3",
|
|
79
|
-
"colorette": "^2.0.
|
|
80
|
-
"core-js": "^3.
|
|
78
|
+
"colorette": "^2.0.19",
|
|
79
|
+
"core-js": "^3.23.3",
|
|
81
80
|
"date-time": "^4.0.0",
|
|
82
81
|
"es5-shim": "^4.6.7",
|
|
83
82
|
"es6-shim": "^0.35.6",
|
|
84
|
-
"eslint": "^8.
|
|
83
|
+
"eslint": "^8.19.0",
|
|
85
84
|
"eslint-config-prettier": "^8.5.0",
|
|
86
85
|
"eslint-plugin-import": "^2.26.0",
|
|
87
|
-
"eslint-plugin-prettier": "^4.
|
|
88
|
-
"execa": "^
|
|
86
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
87
|
+
"execa": "^6.1.0",
|
|
89
88
|
"fixturify": "^2.1.1",
|
|
90
89
|
"fs-extra": "^10.1.0",
|
|
91
90
|
"hash.js": "^1.1.7",
|
|
92
|
-
"husky": "^
|
|
91
|
+
"husky": "^8.0.1",
|
|
93
92
|
"is-reference": "^3.0.0",
|
|
94
|
-
"lint-staged": "^
|
|
93
|
+
"lint-staged": "^13.0.3",
|
|
95
94
|
"locate-character": "^2.0.5",
|
|
96
95
|
"magic-string": "^0.26.2",
|
|
97
|
-
"mocha": "^
|
|
96
|
+
"mocha": "^10.0.0",
|
|
98
97
|
"nyc": "^15.1.0",
|
|
99
|
-
"prettier": "^2.
|
|
100
|
-
"pretty-bytes": "^
|
|
101
|
-
"pretty-ms": "^
|
|
98
|
+
"prettier": "^2.7.1",
|
|
99
|
+
"pretty-bytes": "^6.0.0",
|
|
100
|
+
"pretty-ms": "^8.0.0",
|
|
102
101
|
"requirejs": "^2.3.6",
|
|
103
|
-
"rollup": "^2.75.
|
|
104
|
-
"rollup-plugin-license": "^2.8.
|
|
102
|
+
"rollup": "^2.75.7",
|
|
103
|
+
"rollup-plugin-license": "^2.8.1",
|
|
105
104
|
"rollup-plugin-string": "^3.0.0",
|
|
106
105
|
"rollup-plugin-terser": "^7.0.2",
|
|
107
106
|
"rollup-plugin-thatworks": "^1.0.4",
|
|
@@ -111,11 +110,11 @@
|
|
|
111
110
|
"source-map-support": "^0.5.21",
|
|
112
111
|
"sourcemap-codec": "^1.4.8",
|
|
113
112
|
"systemjs": "^6.12.1",
|
|
114
|
-
"terser": "^5.14.
|
|
113
|
+
"terser": "^5.14.1",
|
|
115
114
|
"tslib": "^2.4.0",
|
|
116
|
-
"typescript": "^4.7.
|
|
115
|
+
"typescript": "^4.7.4",
|
|
117
116
|
"weak-napi": "^2.0.2",
|
|
118
|
-
"yargs-parser": "^
|
|
117
|
+
"yargs-parser": "^21.0.1"
|
|
119
118
|
},
|
|
120
119
|
"files": [
|
|
121
120
|
"dist/**/*.js",
|
|
@@ -125,7 +124,8 @@
|
|
|
125
124
|
"dist/rollup.browser.js.map"
|
|
126
125
|
],
|
|
127
126
|
"engines": {
|
|
128
|
-
"node": ">=
|
|
127
|
+
"node": ">=14.0.0",
|
|
128
|
+
"npm": ">=8.0.0"
|
|
129
129
|
},
|
|
130
130
|
"exports": {
|
|
131
131
|
".": {
|