rollup 2.69.2 → 2.70.2
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 +42 -0
- package/dist/bin/rollup +2 -3
- package/dist/es/rollup.browser.js +3 -4
- package/dist/es/rollup.js +2 -3
- package/dist/es/shared/rollup.js +1098 -1043
- package/dist/es/shared/watch.js +22 -11
- package/dist/loadConfigFile.js +2 -3
- package/dist/rollup.browser.js +3 -4
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +46 -33
- package/dist/rollup.js +2 -3
- package/dist/shared/index.js +2 -3
- package/dist/shared/loadConfigFile.js +2 -3
- package/dist/shared/mergeOptions.js +2 -3
- package/dist/shared/rollup.js +1090 -1035
- package/dist/shared/watch-cli.js +5 -6
- package/dist/shared/watch.js +22 -11
- package/package.json +23 -25
package/dist/shared/watch-cli.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Rollup.js v2.70.2
|
|
4
|
+
Fri, 15 Apr 2022 05:14:21 GMT - commit 030c56fd6b186a0ddfd57d143ad703f34fd2c17a
|
|
6
5
|
|
|
7
6
|
https://github.com/rollup/rollup
|
|
8
7
|
|
|
@@ -389,7 +388,7 @@ async function watch(command) {
|
|
|
389
388
|
return;
|
|
390
389
|
}
|
|
391
390
|
if (watcher) {
|
|
392
|
-
watcher.close();
|
|
391
|
+
await watcher.close();
|
|
393
392
|
}
|
|
394
393
|
start(options, warnings);
|
|
395
394
|
}
|
|
@@ -455,12 +454,12 @@ async function watch(command) {
|
|
|
455
454
|
}
|
|
456
455
|
});
|
|
457
456
|
}
|
|
458
|
-
function close(code) {
|
|
457
|
+
async function close(code) {
|
|
459
458
|
process$2.removeListener('uncaughtException', close);
|
|
460
459
|
// removing a non-existent listener is a no-op
|
|
461
460
|
process$2.stdin.removeListener('end', close);
|
|
462
461
|
if (watcher)
|
|
463
|
-
watcher.close();
|
|
462
|
+
await watcher.close();
|
|
464
463
|
if (configWatcher)
|
|
465
464
|
configWatcher.close();
|
|
466
465
|
if (code) {
|
package/dist/shared/watch.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Rollup.js v2.70.2
|
|
4
|
+
Fri, 15 Apr 2022 05:14:21 GMT - commit 030c56fd6b186a0ddfd57d143ad703f34fd2c17a
|
|
6
5
|
|
|
7
6
|
https://github.com/rollup/rollup
|
|
8
7
|
|
|
@@ -113,13 +112,13 @@ class Watcher {
|
|
|
113
112
|
: buildDelay, this.buildDelay);
|
|
114
113
|
process.nextTick(() => this.run());
|
|
115
114
|
}
|
|
116
|
-
close() {
|
|
115
|
+
async close() {
|
|
117
116
|
if (this.buildTimeout)
|
|
118
117
|
clearTimeout(this.buildTimeout);
|
|
119
118
|
for (const task of this.tasks) {
|
|
120
119
|
task.close();
|
|
121
120
|
}
|
|
122
|
-
this.emitter.
|
|
121
|
+
await this.emitter.emitAndAwait('close');
|
|
123
122
|
this.emitter.removeAllListeners();
|
|
124
123
|
}
|
|
125
124
|
invalidate(file) {
|
|
@@ -143,14 +142,26 @@ class Watcher {
|
|
|
143
142
|
}
|
|
144
143
|
if (this.buildTimeout)
|
|
145
144
|
clearTimeout(this.buildTimeout);
|
|
146
|
-
this.buildTimeout = setTimeout(() => {
|
|
145
|
+
this.buildTimeout = setTimeout(async () => {
|
|
147
146
|
this.buildTimeout = null;
|
|
148
|
-
|
|
149
|
-
this.emitter.
|
|
147
|
+
try {
|
|
148
|
+
await Promise.all([...this.invalidatedIds].map(([id, event]) => this.emitter.emitAndAwait('change', id, { event })));
|
|
149
|
+
this.invalidatedIds.clear();
|
|
150
|
+
this.emitter.emit('restart');
|
|
151
|
+
this.emitter.removeAwaited();
|
|
152
|
+
this.run();
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
this.invalidatedIds.clear();
|
|
156
|
+
this.emitter.emit('event', {
|
|
157
|
+
code: 'ERROR',
|
|
158
|
+
error,
|
|
159
|
+
result: null
|
|
160
|
+
});
|
|
161
|
+
this.emitter.emit('event', {
|
|
162
|
+
code: 'END'
|
|
163
|
+
});
|
|
150
164
|
}
|
|
151
|
-
this.invalidatedIds.clear();
|
|
152
|
-
this.emitter.emit('restart');
|
|
153
|
-
this.run();
|
|
154
165
|
}, this.buildDelay);
|
|
155
166
|
}
|
|
156
167
|
async run() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.70.2",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"rollup": "dist/bin/rollup"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "shx rm -rf dist &&
|
|
12
|
+
"build": "shx rm -rf dist && node scripts/update-git-commit.js && rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
|
|
13
13
|
"build:cjs": "shx rm -rf dist && rollup --config rollup.config.ts --configPlugin typescript --configTest && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
|
|
14
14
|
"build:bootstrap": "node dist/bin/rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
|
|
15
15
|
"ci:lint": "npm run lint:nofix",
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
"perf": "npm run build:cjs && node --expose-gc scripts/perf.js",
|
|
23
23
|
"perf:debug": "node --inspect-brk scripts/perf-debug.js",
|
|
24
24
|
"perf:init": "node scripts/perf-init.js",
|
|
25
|
-
"
|
|
26
|
-
"postpublish": "pinst --enable && git push && git push --tags",
|
|
25
|
+
"postpublish": "git push && git push --tags",
|
|
27
26
|
"prepare": "husky install && npm run build",
|
|
28
|
-
"prepublishOnly": "
|
|
27
|
+
"prepublishOnly": "npm ci && npm run lint:nofix && npm run security && npm run build:bootstrap && npm run test:all",
|
|
29
28
|
"security": "npm audit",
|
|
30
29
|
"test": "npm run build && npm run test:all",
|
|
31
30
|
"test:cjs": "npm run build:cjs && npm run test:only",
|
|
@@ -60,31 +59,31 @@
|
|
|
60
59
|
"devDependencies": {
|
|
61
60
|
"@rollup/plugin-alias": "^3.1.9",
|
|
62
61
|
"@rollup/plugin-buble": "^0.21.3",
|
|
63
|
-
"@rollup/plugin-commonjs": "^21.0.
|
|
62
|
+
"@rollup/plugin-commonjs": "^21.0.3",
|
|
64
63
|
"@rollup/plugin-json": "^4.1.0",
|
|
65
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
64
|
+
"@rollup/plugin-node-resolve": "^13.2.0",
|
|
66
65
|
"@rollup/plugin-replace": "^4.0.0",
|
|
67
|
-
"@rollup/plugin-typescript": "^8.3.
|
|
68
|
-
"@rollup/pluginutils": "^4.1
|
|
66
|
+
"@rollup/plugin-typescript": "^8.3.2",
|
|
67
|
+
"@rollup/pluginutils": "^4.2.1",
|
|
69
68
|
"@types/estree": "0.0.51",
|
|
70
69
|
"@types/node": "^10.17.60",
|
|
71
70
|
"@types/signal-exit": "^3.0.1",
|
|
72
|
-
"@types/yargs-parser": "^20.2.
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
74
|
-
"@typescript-eslint/parser": "^5.
|
|
71
|
+
"@types/yargs-parser": "^20.2.2",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^5.19.0",
|
|
73
|
+
"@typescript-eslint/parser": "^5.19.0",
|
|
75
74
|
"acorn": "^8.7.0",
|
|
76
75
|
"acorn-jsx": "^5.3.2",
|
|
77
76
|
"acorn-walk": "^8.2.0",
|
|
78
77
|
"buble": "^0.20.0",
|
|
79
78
|
"chokidar": "^3.5.3",
|
|
80
79
|
"colorette": "^2.0.16",
|
|
81
|
-
"core-js": "^3.
|
|
80
|
+
"core-js": "^3.22.0",
|
|
82
81
|
"date-time": "^4.0.0",
|
|
83
82
|
"es5-shim": "^4.6.5",
|
|
84
83
|
"es6-shim": "^0.35.6",
|
|
85
|
-
"eslint": "^8.
|
|
86
|
-
"eslint-config-prettier": "^8.
|
|
87
|
-
"eslint-plugin-import": "^2.
|
|
84
|
+
"eslint": "^8.13.0",
|
|
85
|
+
"eslint-config-prettier": "^8.5.0",
|
|
86
|
+
"eslint-plugin-import": "^2.26.0",
|
|
88
87
|
"eslint-plugin-prettier": "^4.0.0",
|
|
89
88
|
"execa": "^5.1.1",
|
|
90
89
|
"fixturify": "^2.1.1",
|
|
@@ -94,16 +93,15 @@
|
|
|
94
93
|
"is-reference": "^3.0.0",
|
|
95
94
|
"lint-staged": "^10.5.4",
|
|
96
95
|
"locate-character": "^2.0.5",
|
|
97
|
-
"magic-string": "^0.
|
|
98
|
-
"mocha": "^9.2.
|
|
96
|
+
"magic-string": "^0.26.1",
|
|
97
|
+
"mocha": "^9.2.2",
|
|
99
98
|
"nyc": "^15.1.0",
|
|
100
|
-
"
|
|
101
|
-
"prettier": "^2.5.1",
|
|
99
|
+
"prettier": "^2.6.2",
|
|
102
100
|
"pretty-bytes": "^5.6.0",
|
|
103
101
|
"pretty-ms": "^7.0.1",
|
|
104
102
|
"requirejs": "^2.3.6",
|
|
105
|
-
"rollup": "^2.
|
|
106
|
-
"rollup-plugin-license": "^2.
|
|
103
|
+
"rollup": "^2.70.1",
|
|
104
|
+
"rollup-plugin-license": "^2.7.0",
|
|
107
105
|
"rollup-plugin-string": "^3.0.0",
|
|
108
106
|
"rollup-plugin-terser": "^7.0.2",
|
|
109
107
|
"rollup-plugin-thatworks": "^1.0.4",
|
|
@@ -113,9 +111,9 @@
|
|
|
113
111
|
"source-map-support": "^0.5.21",
|
|
114
112
|
"sourcemap-codec": "^1.4.8",
|
|
115
113
|
"systemjs": "^6.12.1",
|
|
116
|
-
"terser": "^5.
|
|
114
|
+
"terser": "^5.12.1",
|
|
117
115
|
"tslib": "^2.3.1",
|
|
118
|
-
"typescript": "^4.
|
|
116
|
+
"typescript": "^4.6.3",
|
|
119
117
|
"weak-napi": "^2.0.2",
|
|
120
118
|
"yargs-parser": "^20.2.9"
|
|
121
119
|
},
|
|
@@ -138,6 +136,6 @@
|
|
|
138
136
|
},
|
|
139
137
|
"default": "./dist/es/rollup.browser.js"
|
|
140
138
|
},
|
|
141
|
-
"./dist
|
|
139
|
+
"./dist/*": "./dist/*"
|
|
142
140
|
}
|
|
143
141
|
}
|