rollup 3.28.0 → 4.0.0-10
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 +0 -29
- package/dist/bin/rollup +3 -2
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/native.cjs +257 -0
- package/dist/es/rollup.js +3 -2
- package/dist/es/shared/node-entry.js +1409 -513
- package/dist/es/shared/watch.js +3 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +3 -2
- package/dist/native.cjs +257 -0
- package/dist/rollup.d.ts +1 -0
- package/dist/rollup.js +3 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/rollup.js +1412 -516
- package/dist/shared/watch-cli.js +22 -14
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +3 -2
- package/package.json +81 -31
package/dist/shared/watch-cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.0.0-10
|
|
4
|
+
Mon, 21 Aug 2023 15:29:18 GMT - commit 2c7e3e32f5d56c60d92907a9ceacd338aa99ca82
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -30,6 +30,7 @@ require('node:path');
|
|
|
30
30
|
require('tty');
|
|
31
31
|
require('node:perf_hooks');
|
|
32
32
|
require('node:crypto');
|
|
33
|
+
require('../native.cjs');
|
|
33
34
|
require('node:url');
|
|
34
35
|
require('../getLogFilter.js');
|
|
35
36
|
|
|
@@ -126,7 +127,7 @@ const processOk = (process) => !!process &&
|
|
|
126
127
|
const kExitEmitter = Symbol.for('signal-exit emitter');
|
|
127
128
|
const global = globalThis;
|
|
128
129
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
129
|
-
// teeny
|
|
130
|
+
// teeny special purpose ee
|
|
130
131
|
class Emitter {
|
|
131
132
|
emitted = {
|
|
132
133
|
afterExit: false,
|
|
@@ -169,12 +170,17 @@ class Emitter {
|
|
|
169
170
|
}
|
|
170
171
|
emit(ev, code, signal) {
|
|
171
172
|
if (this.emitted[ev]) {
|
|
172
|
-
return;
|
|
173
|
+
return false;
|
|
173
174
|
}
|
|
174
175
|
this.emitted[ev] = true;
|
|
176
|
+
let ret = false;
|
|
175
177
|
for (const fn of this.listeners[ev]) {
|
|
176
|
-
fn(code, signal);
|
|
178
|
+
ret = fn(code, signal) === true || ret;
|
|
179
|
+
}
|
|
180
|
+
if (ev === 'exit') {
|
|
181
|
+
ret = this.emit('afterExit', code, signal) || ret;
|
|
177
182
|
}
|
|
183
|
+
return ret;
|
|
178
184
|
}
|
|
179
185
|
}
|
|
180
186
|
class SignalExitBase {
|
|
@@ -228,18 +234,22 @@ class SignalExit extends SignalExitBase {
|
|
|
228
234
|
// exit v4 are not aware of each other, and each will attempt to let
|
|
229
235
|
// the other handle it, so neither of them do. To correct this, we
|
|
230
236
|
// detect if we're the only handler *except* for previous versions
|
|
231
|
-
// of signal-exit
|
|
237
|
+
// of signal-exit, and increment by the count of listeners it has
|
|
238
|
+
// created.
|
|
232
239
|
/* c8 ignore start */
|
|
233
|
-
|
|
234
|
-
if (typeof
|
|
235
|
-
count
|
|
240
|
+
const p = process;
|
|
241
|
+
if (typeof p.__signal_exit_emitter__ === 'object' &&
|
|
242
|
+
typeof p.__signal_exit_emitter__.count === 'number') {
|
|
243
|
+
count += p.__signal_exit_emitter__.count;
|
|
244
|
+
}
|
|
236
245
|
/* c8 ignore stop */
|
|
237
246
|
if (listeners.length === count) {
|
|
238
247
|
this.unload();
|
|
239
|
-
this.#emitter.emit('exit', null, sig);
|
|
240
|
-
this.#emitter.emit('afterExit', null, sig);
|
|
248
|
+
const ret = this.#emitter.emit('exit', null, sig);
|
|
241
249
|
/* c8 ignore start */
|
|
242
|
-
|
|
250
|
+
const s = sig === 'SIGHUP' ? this.#hupSig : sig;
|
|
251
|
+
if (!ret)
|
|
252
|
+
process.kill(process.pid, s);
|
|
243
253
|
/* c8 ignore stop */
|
|
244
254
|
}
|
|
245
255
|
};
|
|
@@ -322,7 +332,6 @@ class SignalExit extends SignalExitBase {
|
|
|
322
332
|
this.#process.exitCode = code || 0;
|
|
323
333
|
/* c8 ignore stop */
|
|
324
334
|
this.#emitter.emit('exit', this.#process.exitCode, null);
|
|
325
|
-
this.#emitter.emit('afterExit', this.#process.exitCode, null);
|
|
326
335
|
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
327
336
|
}
|
|
328
337
|
#processEmit(ev, ...args) {
|
|
@@ -336,7 +345,6 @@ class SignalExit extends SignalExitBase {
|
|
|
336
345
|
const ret = og.call(this.#process, ev, ...args);
|
|
337
346
|
/* c8 ignore start */
|
|
338
347
|
this.#emitter.emit('exit', this.#process.exitCode, null);
|
|
339
|
-
this.#emitter.emit('afterExit', this.#process.exitCode, null);
|
|
340
348
|
/* c8 ignore stop */
|
|
341
349
|
return ret;
|
|
342
350
|
}
|
package/dist/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.0.0-10
|
|
4
|
+
Mon, 21 Aug 2023 15:29:18 GMT - commit 2c7e3e32f5d56c60d92907a9ceacd338aa99ca82
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -20,6 +20,7 @@ require('tty');
|
|
|
20
20
|
require('path');
|
|
21
21
|
require('node:perf_hooks');
|
|
22
22
|
require('node:crypto');
|
|
23
|
+
require('../native.cjs');
|
|
23
24
|
require('node:fs/promises');
|
|
24
25
|
require('fs');
|
|
25
26
|
require('util');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-10",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -8,26 +8,61 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"rollup": "dist/bin/rollup"
|
|
10
10
|
},
|
|
11
|
+
"napi": {
|
|
12
|
+
"name": "rollup",
|
|
13
|
+
"package": {
|
|
14
|
+
"name": "@rollup/rollup"
|
|
15
|
+
},
|
|
16
|
+
"triples": {
|
|
17
|
+
"defaults": false,
|
|
18
|
+
"additional": [
|
|
19
|
+
"aarch64-apple-darwin",
|
|
20
|
+
"aarch64-linux-android",
|
|
21
|
+
"aarch64-pc-windows-msvc",
|
|
22
|
+
"aarch64-unknown-linux-gnu",
|
|
23
|
+
"armv7-linux-androideabi",
|
|
24
|
+
"armv7-unknown-linux-gnueabihf",
|
|
25
|
+
"i686-pc-windows-msvc",
|
|
26
|
+
"x86_64-apple-darwin",
|
|
27
|
+
"x86_64-pc-windows-msvc",
|
|
28
|
+
"x86_64-unknown-linux-gnu",
|
|
29
|
+
"x86_64-unknown-linux-musl"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
11
33
|
"scripts": {
|
|
12
|
-
"build": "
|
|
34
|
+
"build": "npm run build:wasm && concurrently -c green,blue 'npm run build:napi -- --release' 'npm:build:js' && npm run build:copy-native",
|
|
35
|
+
"build:quick": "concurrently -c green,blue 'npm:build:napi' 'npm:build:cjs' && npm run build:copy-native",
|
|
36
|
+
"build:napi": "napi build --platform --dts native.d.ts --js native.cjs --cargo-cwd rust -p bindings_napi --cargo-name bindings_napi",
|
|
37
|
+
"build:wasm": "wasm-pack build rust/bindings_wasm --out-dir ../../wasm --target web --no-pack && shx rm wasm/.gitignore",
|
|
38
|
+
"build:wasm:node": "wasm-pack build rust/bindings_wasm --out-dir ../../wasm-node --target nodejs --no-pack && shx rm wasm-node/.gitignore",
|
|
39
|
+
"update:napi": "npm run build:napi && npm run build:copy-native",
|
|
40
|
+
"build:js": "rollup --config rollup.config.ts --configPlugin typescript",
|
|
41
|
+
"update:js": "npm run build:js && npm run build:copy-native",
|
|
42
|
+
"build:copy-native": "shx mkdir -p dist && shx cp rollup.*.node dist/",
|
|
13
43
|
"dev": "vitepress dev docs",
|
|
14
44
|
"build:cjs": "rollup --config rollup.config.ts --configPlugin typescript --configTest",
|
|
15
|
-
"build:bootstrap": "node dist/bin/rollup --config rollup.config.ts --configPlugin typescript",
|
|
45
|
+
"build:bootstrap": "shx mv dist dist-build && node dist-build/bin/rollup --config rollup.config.ts --configPlugin typescript && shx rm -rf dist-build",
|
|
16
46
|
"build:docs": "vitepress build docs",
|
|
17
47
|
"preview:docs": "vitepress preview docs",
|
|
18
|
-
"ci:
|
|
19
|
-
"ci:
|
|
20
|
-
"ci:
|
|
21
|
-
"ci:
|
|
22
|
-
"
|
|
48
|
+
"ci:copy-wasm-node": "node scripts/copy-wasm-node.js",
|
|
49
|
+
"ci:artifacts": "npm run ci:copy-wasm-node && napi artifacts",
|
|
50
|
+
"ci:lint": "concurrently -c red,green,blue 'npm:lint:js:nofix' 'npm:lint:markdown:nofix' 'npm:lint:rust:nofix'",
|
|
51
|
+
"ci:test:only": "npm run build:cjs && npm run build:copy-native && npm run build:bootstrap && npm run build:copy-native && npm run test:only",
|
|
52
|
+
"ci:test:all": "npm run build:cjs && npm run build:copy-native && npm run build:bootstrap && npm run build:copy-native && concurrently --kill-others-on-fail -c green,blue,magenta,cyan 'npm:test:only' 'npm:test:typescript' 'npm:test:leak' 'npm:test:browser'",
|
|
53
|
+
"ci:coverage": "npm run build:cjs && npm run build:copy-native && npm run build:bootstrap && npm run build:copy-native && nyc --reporter lcovonly mocha",
|
|
54
|
+
"lint": "concurrently -c red,green,blue 'npm:lint:js' 'npm:lint:markdown' 'npm:lint:rust'",
|
|
23
55
|
"lint:js": "eslint . --fix --cache",
|
|
24
56
|
"lint:js:nofix": "eslint . --cache",
|
|
25
57
|
"lint:markdown": "prettier --write \"**/*.md\"",
|
|
26
58
|
"lint:markdown:nofix": "prettier --check \"**/*.md\"",
|
|
59
|
+
"lint:rust": "cd rust && cargo fmt",
|
|
60
|
+
"lint:rust:nofix": "cd rust && cargo fmt --check",
|
|
27
61
|
"perf": "npm run build:cjs && node --expose-gc scripts/perf.js",
|
|
28
62
|
"perf:init": "node scripts/perf-init.js",
|
|
29
63
|
"prepare": "husky install && node scripts/check-release.js || npm run build",
|
|
30
|
-
"prepublishOnly": "node scripts/check-release.js",
|
|
64
|
+
"prepublishOnly": "node scripts/check-release.js && node scripts/prepublish.js",
|
|
65
|
+
"prepublish:napi": "napi prepublish --skip-gh-release",
|
|
31
66
|
"release": "node scripts/release.js",
|
|
32
67
|
"release:docs": "git fetch --update-head-ok origin master:master && git branch --force documentation-published master && git push origin documentation-published",
|
|
33
68
|
"test": "npm run build && npm run test:all",
|
|
@@ -60,17 +95,29 @@
|
|
|
60
95
|
},
|
|
61
96
|
"homepage": "https://rollupjs.org/",
|
|
62
97
|
"optionalDependencies": {
|
|
63
|
-
"fsevents": "~2.3.2"
|
|
98
|
+
"fsevents": "~2.3.2",
|
|
99
|
+
"@rollup/rollup-darwin-arm64": "4.0.0-10",
|
|
100
|
+
"@rollup/rollup-android-arm64": "4.0.0-10",
|
|
101
|
+
"@rollup/rollup-win32-arm64-msvc": "4.0.0-10",
|
|
102
|
+
"@rollup/rollup-linux-arm64-gnu": "4.0.0-10",
|
|
103
|
+
"@rollup/rollup-android-arm-eabi": "4.0.0-10",
|
|
104
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.0.0-10",
|
|
105
|
+
"@rollup/rollup-win32-ia32-msvc": "4.0.0-10",
|
|
106
|
+
"@rollup/rollup-darwin-x64": "4.0.0-10",
|
|
107
|
+
"@rollup/rollup-win32-x64-msvc": "4.0.0-10",
|
|
108
|
+
"@rollup/rollup-linux-x64-gnu": "4.0.0-10",
|
|
109
|
+
"@rollup/rollup-linux-x64-musl": "4.0.0-10"
|
|
64
110
|
},
|
|
65
111
|
"devDependencies": {
|
|
66
112
|
"@codemirror/commands": "^6.2.4",
|
|
67
113
|
"@codemirror/lang-javascript": "^6.1.9",
|
|
68
114
|
"@codemirror/language": "^6.8.0",
|
|
69
|
-
"@codemirror/search": "^6.5.
|
|
115
|
+
"@codemirror/search": "^6.5.1",
|
|
70
116
|
"@codemirror/state": "^6.2.1",
|
|
71
|
-
"@codemirror/view": "^6.
|
|
117
|
+
"@codemirror/view": "^6.16.0",
|
|
72
118
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
73
|
-
"@mermaid-js/mermaid-cli": "^10.
|
|
119
|
+
"@mermaid-js/mermaid-cli": "^10.3.0",
|
|
120
|
+
"@napi-rs/cli": "^2.16.2",
|
|
74
121
|
"@rollup/plugin-alias": "^5.0.0",
|
|
75
122
|
"@rollup/plugin-buble": "^1.0.2",
|
|
76
123
|
"@rollup/plugin-commonjs": "^25.0.3",
|
|
@@ -79,13 +126,14 @@
|
|
|
79
126
|
"@rollup/plugin-replace": "^5.0.2",
|
|
80
127
|
"@rollup/plugin-terser": "^0.4.3",
|
|
81
128
|
"@rollup/plugin-typescript": "^11.1.2",
|
|
129
|
+
"@rollup/plugin-wasm": "^6.1.3",
|
|
82
130
|
"@rollup/pluginutils": "^5.0.2",
|
|
83
131
|
"@types/estree": "1.0.1",
|
|
84
132
|
"@types/mocha": "^10.0.1",
|
|
85
|
-
"@types/node": "~
|
|
133
|
+
"@types/node": "~18.17.5",
|
|
86
134
|
"@types/yargs-parser": "^21.0.0",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
88
|
-
"@typescript-eslint/parser": "^6.
|
|
135
|
+
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
|
136
|
+
"@typescript-eslint/parser": "^6.3.0",
|
|
89
137
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
90
138
|
"@vue/eslint-config-typescript": "^11.0.3",
|
|
91
139
|
"acorn": "^8.10.0",
|
|
@@ -97,50 +145,51 @@
|
|
|
97
145
|
"chokidar": "^3.5.3",
|
|
98
146
|
"colorette": "^2.0.20",
|
|
99
147
|
"concurrently": "^8.2.0",
|
|
100
|
-
"core-js": "^3.
|
|
148
|
+
"core-js": "^3.32.0",
|
|
101
149
|
"date-time": "^4.0.0",
|
|
102
150
|
"es5-shim": "^4.6.7",
|
|
103
151
|
"es6-shim": "^0.35.8",
|
|
104
|
-
"eslint": "^8.
|
|
105
|
-
"eslint-config-prettier": "^
|
|
106
|
-
"eslint-plugin-import": "^2.
|
|
152
|
+
"eslint": "^8.46.0",
|
|
153
|
+
"eslint-config-prettier": "^9.0.0",
|
|
154
|
+
"eslint-plugin-import": "^2.28.0",
|
|
107
155
|
"eslint-plugin-prettier": "^5.0.0",
|
|
108
|
-
"eslint-plugin-unicorn": "^48.0.
|
|
109
|
-
"eslint-plugin-vue": "^9.
|
|
156
|
+
"eslint-plugin-unicorn": "^48.0.1",
|
|
157
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
110
158
|
"fixturify": "^3.0.0",
|
|
111
159
|
"flru": "^1.0.2",
|
|
112
160
|
"fs-extra": "^11.1.1",
|
|
113
161
|
"github-api": "^3.4.0",
|
|
114
162
|
"hash.js": "^1.1.7",
|
|
115
163
|
"husky": "^8.0.3",
|
|
116
|
-
"inquirer": "^9.2.
|
|
164
|
+
"inquirer": "^9.2.10",
|
|
117
165
|
"is-reference": "^3.0.1",
|
|
118
166
|
"lint-staged": "^13.2.3",
|
|
119
167
|
"locate-character": "^3.0.0",
|
|
120
|
-
"magic-string": "^0.30.
|
|
168
|
+
"magic-string": "^0.30.2",
|
|
121
169
|
"mocha": "^10.2.0",
|
|
122
170
|
"nyc": "^15.1.0",
|
|
123
|
-
"pinia": "^2.1.
|
|
124
|
-
"prettier": "^3.0.
|
|
171
|
+
"pinia": "^2.1.6",
|
|
172
|
+
"prettier": "^3.0.1",
|
|
125
173
|
"pretty-bytes": "^6.1.1",
|
|
126
174
|
"pretty-ms": "^8.0.0",
|
|
127
175
|
"requirejs": "^2.3.6",
|
|
128
|
-
"rollup": "^3.
|
|
176
|
+
"rollup": "^3.28.0",
|
|
129
177
|
"rollup-plugin-license": "^3.0.1",
|
|
130
178
|
"rollup-plugin-string": "^3.0.0",
|
|
131
179
|
"rollup-plugin-thatworks": "^1.0.4",
|
|
132
180
|
"semver": "^7.5.4",
|
|
133
181
|
"shx": "^0.3.4",
|
|
134
|
-
"signal-exit": "^4.0
|
|
182
|
+
"signal-exit": "^4.1.0",
|
|
135
183
|
"source-map": "^0.7.4",
|
|
136
184
|
"source-map-support": "^0.5.21",
|
|
137
185
|
"systemjs": "^6.14.1",
|
|
138
186
|
"terser": "^5.19.2",
|
|
139
187
|
"tslib": "^2.6.1",
|
|
140
188
|
"typescript": "^5.1.6",
|
|
141
|
-
"vite": "^4.4.
|
|
142
|
-
"vitepress": "^1.0.0-beta.
|
|
189
|
+
"vite": "^4.4.9",
|
|
190
|
+
"vitepress": "^1.0.0-beta.7",
|
|
143
191
|
"vue": "^3.3.4",
|
|
192
|
+
"wasm-pack": "^0.12.1",
|
|
144
193
|
"weak-napi": "^2.0.2",
|
|
145
194
|
"yargs-parser": "^21.1.1"
|
|
146
195
|
},
|
|
@@ -148,6 +197,7 @@
|
|
|
148
197
|
"semver": "^7.5.4"
|
|
149
198
|
},
|
|
150
199
|
"files": [
|
|
200
|
+
"dist/**/*.cjs",
|
|
151
201
|
"dist/**/*.js",
|
|
152
202
|
"dist/*.d.ts",
|
|
153
203
|
"dist/bin/rollup",
|
|
@@ -175,4 +225,4 @@
|
|
|
175
225
|
},
|
|
176
226
|
"./dist/*": "./dist/*"
|
|
177
227
|
}
|
|
178
|
-
}
|
|
228
|
+
}
|