rolldown 0.10.5 → 0.11.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/dist/cjs/cli.cjs +631 -69
- package/dist/cjs/index.cjs +16 -15
- package/dist/cjs/parallel-plugin-worker.cjs +17 -19
- package/dist/cjs/parallel-plugin.cjs +2 -4
- package/dist/esm/cli.mjs +630 -66
- package/dist/esm/index.mjs +13 -10
- package/dist/esm/parallel-plugin-worker.mjs +16 -18
- package/dist/shared/{chunk-eib2uzZZ.cjs → chunk-IY9XHjk1.cjs} +11 -17
- package/dist/shared/consola_36c0034f-5LhwiLE2.mjs +897 -0
- package/dist/shared/consola_36c0034f-WXb1k8ME.cjs +902 -0
- package/dist/shared/prompt-qKiYiowG.mjs +807 -0
- package/dist/shared/prompt-v8IJTptZ.cjs +810 -0
- package/dist/shared/rolldown-Jq_CbZp4.cjs +49 -0
- package/dist/shared/rolldown-RjvHfXoR.mjs +48 -0
- package/dist/shared/utils_index-DAvBTBzR.mjs +1532 -0
- package/dist/shared/utils_index-PYoHCZRc.cjs +1507 -0
- package/dist/types/binding.d.ts +72 -2
- package/dist/types/cli/colors.d.ts +0 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/log/logger.d.ts +1 -1
- package/dist/types/options/output-options.d.ts +4 -4
- package/dist/types/plugin/bindingify-builtin-plugin.d.ts +5 -2
- package/dist/types/plugin/plugin-context.d.ts +5 -0
- package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -1
- package/package.json +18 -18
- package/dist/shared/bindingify_plugin-gPrr_HPR.mjs +0 -1053
- package/dist/shared/bindingify_plugin-sRZqfDBJ.cjs +0 -1032
- package/dist/shared/rolldown-1SJPa4fg.cjs +0 -547
- package/dist/shared/rolldown-bgokD9pg.mjs +0 -544
package/dist/esm/index.mjs
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import "../shared/
|
|
4
|
-
import {
|
|
3
|
+
import { BuiltinGlobImportPlugin, BuiltinWasmPlugin, __toESM, require_binding } from "../shared/utils_index-DAvBTBzR.mjs";
|
|
4
|
+
import { experimental_scan, rolldown } from "../shared/rolldown-RjvHfXoR.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
7
7
|
//#region src/plugin/index.ts
|
|
8
8
|
function defineParallelPlugin(pluginPath) {
|
|
9
|
-
return options => {
|
|
10
|
-
return {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
};
|
|
9
|
+
return (options) => {
|
|
10
|
+
return {_parallel: {
|
|
11
|
+
fileUrl: pathToFileURL(pluginPath).href,
|
|
12
|
+
options
|
|
13
|
+
}};
|
|
16
14
|
};
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -23,4 +21,9 @@ function defineConfig(config) {
|
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
//#endregion
|
|
26
|
-
|
|
24
|
+
//#region src/index.ts
|
|
25
|
+
var import_binding = __toESM(require_binding());
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
var transform = import_binding.transform;
|
|
29
|
+
export { BuiltinGlobImportPlugin, BuiltinWasmPlugin, defineConfig, defineParallelPlugin, experimental_scan, rolldown, transform };
|
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { __toESM, bindingifyPlugin, require_binding } from "../shared/
|
|
3
|
+
import { __toESM, bindingifyPlugin, require_binding } from "../shared/utils_index-DAvBTBzR.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
6
6
|
//#region src/parallel-plugin-worker.ts
|
|
7
7
|
var import_binding = __toESM(require_binding());
|
|
8
|
-
const {registryId, pluginInfos, threadNumber} = workerData;
|
|
9
|
-
(async() => {
|
|
10
|
-
try{
|
|
11
|
-
const plugins = await Promise.all(pluginInfos.map(async pluginInfo => {
|
|
8
|
+
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
9
|
+
(async () => {
|
|
10
|
+
try {
|
|
11
|
+
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
12
12
|
const pluginModule = await import(pluginInfo.fileUrl);
|
|
13
13
|
const definePluginImpl = pluginModule.default;
|
|
14
|
-
const plugin = await definePluginImpl(pluginInfo.options, {
|
|
15
|
-
threadNumber
|
|
16
|
-
});
|
|
14
|
+
const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
|
|
17
15
|
return {
|
|
18
|
-
index:pluginInfo.index,
|
|
19
|
-
plugin:bindingifyPlugin(plugin, {}, {})
|
|
16
|
+
index: pluginInfo.index,
|
|
17
|
+
plugin: bindingifyPlugin(plugin, {}, {})
|
|
20
18
|
};
|
|
21
19
|
}));
|
|
22
|
-
(0,import_binding.registerPlugins)(registryId, plugins);
|
|
20
|
+
(0, import_binding.registerPlugins)(registryId, plugins);
|
|
21
|
+
parentPort.postMessage({type: 'success'});
|
|
22
|
+
} catch (error) {
|
|
23
23
|
parentPort.postMessage({
|
|
24
|
-
type:'
|
|
25
|
-
});
|
|
26
|
-
}catch(error){
|
|
27
|
-
parentPort.postMessage({
|
|
28
|
-
type:'error',
|
|
24
|
+
type: 'error',
|
|
29
25
|
error
|
|
30
26
|
});
|
|
31
|
-
}
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
32
29
|
parentPort.unref();
|
|
33
|
-
}
|
|
30
|
+
}
|
|
31
|
+
})();
|
|
34
32
|
|
|
35
33
|
//#endregion
|
|
@@ -7,34 +7,28 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
7
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = {
|
|
11
|
-
exports:{}
|
|
12
|
-
}).exports, mod),mod.exports);
|
|
10
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = {exports: {}}).exports, mod), mod.exports);
|
|
13
11
|
var __export = (target, all) => {
|
|
14
|
-
for (var name in all)
|
|
15
|
-
get:all[name],
|
|
16
|
-
enumerable:true
|
|
12
|
+
for (var name in all) __defProp(target, name, {
|
|
13
|
+
get: all[name],
|
|
14
|
+
enumerable: true
|
|
17
15
|
});
|
|
18
16
|
};
|
|
19
17
|
var __copyProps = (to, from, except, desc) => {
|
|
20
|
-
if (from && typeof from === 'object' || typeof from === 'function')
|
|
18
|
+
if (from && typeof from === 'object' || typeof from === 'function') for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
21
19
|
key = keys[i];
|
|
22
|
-
if (
|
|
23
|
-
get:(k => from[k]).bind(null, key),
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
24
22
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
25
23
|
});
|
|
26
|
-
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
return to;
|
|
30
26
|
};
|
|
31
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {},__copyProps(isNodeMode ||
|
|
32
|
-
value:mod,
|
|
33
|
-
enumerable:true
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, 'default', {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
34
30
|
}) : target, mod));
|
|
35
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, '__esModule', {
|
|
36
|
-
value:true
|
|
37
|
-
}), mod);
|
|
31
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, '__esModule', {value: true}), mod);
|
|
38
32
|
|
|
39
33
|
//#endregion
|
|
40
34
|
|