rollup 2.48.0 → 2.50.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 +29 -0
- package/dist/bin/rollup +3 -5
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +6230 -5814
- package/dist/es/shared/watch.js +5 -5
- package/dist/loadConfigFile.js +3 -3
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +9 -8
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +21 -21
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +6231 -5815
- package/dist/shared/watch-cli.js +8 -8
- package/dist/shared/watch.js +4 -4
- package/package.json +10 -9
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.50.0
|
|
4
|
+
Tue, 25 May 2021 10:57:41 GMT - commit 2febefa277d1c2c149df1df5ccc43796059a624b
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
var fs = require('fs');
|
|
13
14
|
var index = require('./index.js');
|
|
14
15
|
var loadConfigFile_js = require('./loadConfigFile.js');
|
|
15
|
-
var fs = require('fs');
|
|
16
16
|
var cli = require('../bin/rollup');
|
|
17
17
|
var require$$0 = require('assert');
|
|
18
18
|
var require$$0$1 = require('events');
|
|
@@ -325,7 +325,7 @@ async function watch(command) {
|
|
|
325
325
|
process.stdin.on('end', close);
|
|
326
326
|
process.stdin.resume();
|
|
327
327
|
}
|
|
328
|
-
|
|
328
|
+
async function loadConfigFromFileAndTrack(configFile) {
|
|
329
329
|
let reloadingConfig = false;
|
|
330
330
|
let aborted = false;
|
|
331
331
|
let configFileData = null;
|
|
@@ -366,11 +366,13 @@ async function watch(command) {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
+
if (configFile) {
|
|
370
|
+
await loadConfigFromFileAndTrack(configFile);
|
|
371
|
+
}
|
|
369
372
|
else {
|
|
370
373
|
({ options: configs, warnings } = await cli.loadConfigFromCommand(command));
|
|
371
374
|
start(configs);
|
|
372
375
|
}
|
|
373
|
-
// tslint:disable-next-line:no-unnecessary-type-assertion
|
|
374
376
|
const resetScreen = getResetScreen(configs, isTTY);
|
|
375
377
|
function start(configs) {
|
|
376
378
|
try {
|
|
@@ -396,9 +398,7 @@ async function watch(command) {
|
|
|
396
398
|
if (typeof input !== 'string') {
|
|
397
399
|
input = Array.isArray(input)
|
|
398
400
|
? input.join(', ')
|
|
399
|
-
: Object.
|
|
400
|
-
.map(key => input[key])
|
|
401
|
-
.join(', ');
|
|
401
|
+
: Object.values(input).join(', ');
|
|
402
402
|
}
|
|
403
403
|
loadConfigFile_js.stderr(loadConfigFile_js.cyan(`bundles ${loadConfigFile_js.bold(input)} → ${loadConfigFile_js.bold(event.output.map(rollup.relativeId).join(', '))}...`));
|
|
404
404
|
}
|
package/dist/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.50.0
|
|
4
|
+
Tue, 25 May 2021 10:57:41 GMT - commit 2febefa277d1c2c149df1df5ccc43796059a624b
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -591,7 +591,7 @@ class FileWatcher {
|
|
|
591
591
|
watcher.unwatch(changedId);
|
|
592
592
|
watcher.add(changedId);
|
|
593
593
|
}
|
|
594
|
-
task.invalidate(changedId, {
|
|
594
|
+
task.invalidate(changedId, { event, isTransformDependency });
|
|
595
595
|
};
|
|
596
596
|
const watcher = index.chokidar
|
|
597
597
|
.watch([], this.chokidarOptions)
|
|
@@ -730,7 +730,7 @@ class Task {
|
|
|
730
730
|
module.originalCode = null;
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
this.watcher.invalidate({
|
|
733
|
+
this.watcher.invalidate({ event: details.event, id });
|
|
734
734
|
}
|
|
735
735
|
async run() {
|
|
736
736
|
if (!this.invalidated)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -16,17 +16,15 @@
|
|
|
16
16
|
"ci:test": "npm run build:cjs && npm run build:bootstrap && npm run test:all",
|
|
17
17
|
"ci:test:only": "npm run build:cjs && npm run build:bootstrap && npm run test:only",
|
|
18
18
|
"ci:coverage": "npm run build:cjs && nyc --reporter lcovonly mocha",
|
|
19
|
-
"lint": "
|
|
20
|
-
"lint:nofix": "
|
|
21
|
-
"lint:ts": "tslint --project .",
|
|
22
|
-
"lint:js": "eslint test/test.js test/*/index.js test/utils.js test/**/_config.js",
|
|
19
|
+
"lint": "npx eslint . --fix --cache && npm run lint:markdown",
|
|
20
|
+
"lint:nofix": "npx eslint . && npm run lint:markdown",
|
|
23
21
|
"lint:markdown": "markdownlint --config markdownlint.json docs/**/*.md",
|
|
24
22
|
"perf": "npm run build:cjs && node --expose-gc scripts/perf.js",
|
|
25
23
|
"perf:debug": "node --inspect-brk scripts/perf-debug.js",
|
|
26
24
|
"perf:init": "node scripts/perf-init.js",
|
|
27
25
|
"_postinstall": "husky install",
|
|
28
26
|
"postpublish": "pinst --enable && git push && git push --tags",
|
|
29
|
-
"prepare": "npm run build",
|
|
27
|
+
"prepare": "husky install && npm run build",
|
|
30
28
|
"prepublishOnly": "pinst --disable && npm ci && npm run lint:nofix && npm run security && npm run build:bootstrap && npm run test:all",
|
|
31
29
|
"security": "npm audit",
|
|
32
30
|
"test": "npm run build && npm run test:all",
|
|
@@ -71,6 +69,8 @@
|
|
|
71
69
|
"@types/require-relative": "^0.8.0",
|
|
72
70
|
"@types/signal-exit": "^3.0.0",
|
|
73
71
|
"@types/yargs-parser": "^20.2.0",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^4.24.0",
|
|
73
|
+
"@typescript-eslint/parser": "^4.24.0",
|
|
74
74
|
"acorn": "^8.2.4",
|
|
75
75
|
"acorn-jsx": "^5.3.1",
|
|
76
76
|
"acorn-walk": "^8.1.0",
|
|
@@ -81,8 +81,10 @@
|
|
|
81
81
|
"date-time": "^4.0.0",
|
|
82
82
|
"es5-shim": "^4.5.15",
|
|
83
83
|
"es6-shim": "^0.35.6",
|
|
84
|
-
"eslint": "^7.
|
|
85
|
-
"eslint-
|
|
84
|
+
"eslint": "^7.26.0",
|
|
85
|
+
"eslint-config-prettier": "^8.3.0",
|
|
86
|
+
"eslint-plugin-import": "^2.23.2",
|
|
87
|
+
"eslint-plugin-prettier": "^3.4.0",
|
|
86
88
|
"execa": "^5.0.0",
|
|
87
89
|
"fixturify": "^2.1.1",
|
|
88
90
|
"hash.js": "^1.1.7",
|
|
@@ -117,7 +119,6 @@
|
|
|
117
119
|
"systemjs": "^6.8.3",
|
|
118
120
|
"terser": "^5.7.0",
|
|
119
121
|
"tslib": "^2.2.0",
|
|
120
|
-
"tslint": "^6.1.3",
|
|
121
122
|
"typescript": "^4.2.4",
|
|
122
123
|
"weak-napi": "^2.0.2",
|
|
123
124
|
"yargs-parser": "^20.2.7"
|