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/cjs/index.cjs
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { __export, __toCommonJS, __toESM } = require("../shared/chunk-
|
|
4
|
-
const {
|
|
5
|
-
require("../shared/
|
|
3
|
+
const { __export, __toCommonJS, __toESM } = require("../shared/chunk-IY9XHjk1.cjs");
|
|
4
|
+
const { BuiltinGlobImportPlugin, BuiltinWasmPlugin, require_binding } = require("../shared/utils_index-PYoHCZRc.cjs");
|
|
5
|
+
const { experimental_scan, rolldown } = require("../shared/rolldown-Jq_CbZp4.cjs");
|
|
6
6
|
const { pathToFileURL } = __toESM(require("node:url"));
|
|
7
7
|
|
|
8
8
|
//#region src/plugin/index.ts
|
|
9
9
|
function defineParallelPlugin(pluginPath) {
|
|
10
|
-
return options => {
|
|
11
|
-
return {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
};
|
|
10
|
+
return (options) => {
|
|
11
|
+
return {_parallel: {
|
|
12
|
+
fileUrl: pathToFileURL(pluginPath).href,
|
|
13
|
+
options
|
|
14
|
+
}};
|
|
17
15
|
};
|
|
18
16
|
}
|
|
19
17
|
|
|
@@ -27,12 +25,15 @@ function defineConfig(config) {
|
|
|
27
25
|
//#region src/index.ts
|
|
28
26
|
var src_index_ns = {};
|
|
29
27
|
__export(src_index_ns, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
BuiltinGlobImportPlugin: () => BuiltinGlobImportPlugin,
|
|
29
|
+
BuiltinWasmPlugin: () => BuiltinWasmPlugin,
|
|
30
|
+
defineConfig: () => defineConfig,
|
|
31
|
+
defineParallelPlugin: () => defineParallelPlugin,
|
|
32
|
+
experimental_scan: () => experimental_scan,
|
|
33
|
+
rolldown: () => rolldown,
|
|
34
|
+
transform: () => import_binding.transform
|
|
35
35
|
});
|
|
36
|
+
var import_binding = __toESM(require_binding());
|
|
36
37
|
|
|
37
38
|
//#endregion
|
|
38
39
|
module.exports = __toCommonJS(src_index_ns)
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { __toCommonJS, __toESM } = require("../shared/chunk-
|
|
4
|
-
const { bindingifyPlugin, require_binding } = require("../shared/
|
|
3
|
+
const { __toCommonJS, __toESM } = require("../shared/chunk-IY9XHjk1.cjs");
|
|
4
|
+
const { bindingifyPlugin, require_binding } = require("../shared/utils_index-PYoHCZRc.cjs");
|
|
5
5
|
const { parentPort, workerData } = __toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
8
|
var parallel_plugin_worker_ns = {};
|
|
9
9
|
var import_binding = __toESM(require_binding());
|
|
10
|
-
const {registryId, pluginInfos, threadNumber} = workerData;
|
|
11
|
-
(async() => {
|
|
12
|
-
try{
|
|
13
|
-
const plugins = await Promise.all(pluginInfos.map(async pluginInfo => {
|
|
10
|
+
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
11
|
+
(async () => {
|
|
12
|
+
try {
|
|
13
|
+
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
14
14
|
const pluginModule = await import(pluginInfo.fileUrl);
|
|
15
15
|
const definePluginImpl = pluginModule.default;
|
|
16
|
-
const plugin = await definePluginImpl(pluginInfo.options, {
|
|
17
|
-
threadNumber
|
|
18
|
-
});
|
|
16
|
+
const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
|
|
19
17
|
return {
|
|
20
|
-
index:pluginInfo.index,
|
|
21
|
-
plugin:bindingifyPlugin(plugin, {}, {})
|
|
18
|
+
index: pluginInfo.index,
|
|
19
|
+
plugin: bindingifyPlugin(plugin, {}, {})
|
|
22
20
|
};
|
|
23
21
|
}));
|
|
24
|
-
(0,import_binding.registerPlugins)(registryId, plugins);
|
|
22
|
+
(0, import_binding.registerPlugins)(registryId, plugins);
|
|
23
|
+
parentPort.postMessage({type: 'success'});
|
|
24
|
+
} catch (error) {
|
|
25
25
|
parentPort.postMessage({
|
|
26
|
-
type:'
|
|
27
|
-
});
|
|
28
|
-
}catch(error){
|
|
29
|
-
parentPort.postMessage({
|
|
30
|
-
type:'error',
|
|
26
|
+
type: 'error',
|
|
31
27
|
error
|
|
32
28
|
});
|
|
33
|
-
}
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
34
31
|
parentPort.unref();
|
|
35
|
-
}
|
|
32
|
+
}
|
|
33
|
+
})();
|
|
36
34
|
|
|
37
35
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { __export, __toCommonJS } = require("../shared/chunk-
|
|
3
|
+
const { __export, __toCommonJS } = require("../shared/chunk-IY9XHjk1.cjs");
|
|
4
4
|
|
|
5
5
|
//#region src/plugin/parallel-plugin-implementation.ts
|
|
6
6
|
function defineParallelPluginImplementation(plugin) {
|
|
@@ -10,9 +10,7 @@ function defineParallelPluginImplementation(plugin) {
|
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/parallel-plugin.ts
|
|
12
12
|
var parallel_plugin_ns = {};
|
|
13
|
-
__export(parallel_plugin_ns, {
|
|
14
|
-
defineParallelPluginImplementation:() => defineParallelPluginImplementation
|
|
15
|
-
});
|
|
13
|
+
__export(parallel_plugin_ns, {defineParallelPluginImplementation: () => defineParallelPluginImplementation});
|
|
16
14
|
|
|
17
15
|
//#endregion
|
|
18
16
|
module.exports = __toCommonJS(parallel_plugin_ns)
|