rolldown 0.12.2 → 0.13.0-snapshot-514fd69-20240905003110
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 +1552 -584
- package/dist/cjs/experimental-index.cjs +40 -0
- package/dist/cjs/index.cjs +5 -22
- package/dist/cjs/parallel-plugin-worker.cjs +7 -7
- package/dist/cjs/parallel-plugin.cjs +1 -1
- package/dist/esm/cli.mjs +1549 -583
- package/dist/esm/experimental-index.mjs +23 -0
- package/dist/esm/index.mjs +5 -17
- package/dist/esm/parallel-plugin-worker.mjs +6 -6
- package/dist/esm/parallel-plugin.mjs +1 -1
- package/dist/shared/{chunk-1xb6WR3y.cjs → chunk-gQ4GMlVi.cjs} +3 -2
- package/dist/shared/{consola.36c0034f-N8xiTrv3.cjs → consola.36c0034f-eps_ogJv.cjs} +188 -188
- package/dist/shared/{consola.36c0034f-jtHhMkSX.mjs → consola.36c0034f-m5cABVv4.mjs} +187 -187
- package/dist/shared/package-3VR4tEG7.mjs +9 -0
- package/dist/shared/package-OJCNSbf0.cjs +11 -0
- package/dist/shared/plugin-context-data-AMG1kfMv.mjs +1443 -0
- package/dist/shared/plugin-context-data-S1bXhfAf.cjs +1436 -0
- package/dist/shared/{prompt-pjyLzLci.mjs → prompt-9VjtYvi_.mjs} +182 -182
- package/dist/shared/{prompt-1K6oCkIU.cjs → prompt-Ah5G71p-.cjs} +183 -183
- package/dist/shared/rolldown-NGdGAW73.mjs +1069 -0
- package/dist/shared/rolldown-binding.wasi.cjs +70 -51
- package/dist/shared/rolldown-z62CIhEW.cjs +1085 -0
- package/dist/types/binding.d.ts +329 -14
- package/dist/types/cli/arguments/alias.d.ts +8 -0
- package/dist/types/cli/arguments/index.d.ts +13 -0
- package/dist/types/cli/arguments/normalize.d.ts +15 -0
- package/dist/types/cli/arguments/schema.d.ts +161 -0
- package/dist/types/cli/arguments/utils.d.ts +6 -0
- package/dist/types/cli/commands/bundle.d.ts +3 -1
- package/dist/types/cli/commands/help.d.ts +1 -0
- package/dist/types/cli/utils.d.ts +1 -1
- package/dist/types/constants/plugin-context.d.ts +7 -0
- package/dist/types/constants/plugin.d.ts +36 -0
- package/dist/types/experimental-index.d.ts +5 -0
- package/dist/types/index.d.ts +8 -8
- package/dist/types/options/input-options.d.ts +139 -27
- package/dist/types/options/normalized-alias-plugin-config.d.ts +10 -0
- package/dist/types/options/normalized-ecma-transform-plugin-config.d.ts +8 -0
- package/dist/types/options/normalized-output-options.d.ts +8 -3
- package/dist/types/options/output-options.d.ts +102 -11
- package/dist/types/options/utils.d.ts +2 -0
- package/dist/types/plugin/bindingify-build-hooks.d.ts +9 -8
- package/dist/types/plugin/bindingify-hook-filter.d.ts +5 -0
- package/dist/types/plugin/bindingify-output-hooks.d.ts +11 -7
- package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +8 -0
- package/dist/types/plugin/bindingify-plugin.d.ts +2 -1
- package/dist/types/plugin/builtin-plugin.d.ts +75 -7
- package/dist/types/plugin/index.d.ts +68 -28
- package/dist/types/plugin/plugin-context-data.d.ts +6 -0
- package/dist/types/plugin/plugin-context.d.ts +18 -8
- package/dist/types/plugin/plugin-driver.d.ts +2 -2
- package/dist/types/rollup.d.ts +1 -0
- package/dist/types/types/rolldown-output.d.ts +1 -0
- package/dist/types/utils/compose-js-plugins.d.ts +2 -0
- package/dist/types/utils/misc.d.ts +1 -0
- package/dist/types/utils/normalize-hook.d.ts +7 -5
- package/dist/types/utils/plugin/index.d.ts +2 -0
- package/dist/types/utils/type-assert.d.ts +1 -0
- package/package.json +30 -22
- package/dist/shared/rolldown-SCF5NBN_.cjs +0 -49
- package/dist/shared/rolldown-kYz4BvAA.mjs +0 -48
- package/dist/shared/utils_index-_DFpKlu1.mjs +0 -1582
- package/dist/shared/utils_index-xb2NoRNm.cjs +0 -1557
- package/dist/types/cli/constants.d.ts +0 -1
- package/dist/types/utils/ensure-array.d.ts +0 -1
- package/dist/types/utils/index.d.ts +0 -9
- /package/dist/types/plugin/{transfrom-plugin-context.d.ts → transform-plugin-context.d.ts} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import __node_module__ from 'node:module';
|
|
2
|
+
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
+
import { __toESM, require_binding } from "../shared/plugin-context-data-AMG1kfMv.mjs";
|
|
4
|
+
import { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/rolldown-NGdGAW73.mjs";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
|
|
7
|
+
//#region src/plugin/parallel-plugin.ts
|
|
8
|
+
function defineParallelPlugin(pluginPath) {
|
|
9
|
+
return (options) => {
|
|
10
|
+
return {_parallel: {
|
|
11
|
+
fileUrl: (pathToFileURL(pluginPath)).href,
|
|
12
|
+
options
|
|
13
|
+
}};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/experimental-index.ts
|
|
19
|
+
var import_binding = __toESM(require_binding());
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
var transform = import_binding.transform;
|
|
23
|
+
export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, experimental_scan as scan, transform, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import "../shared/plugin-context-data-AMG1kfMv.mjs";
|
|
4
|
+
import { rolldown } from "../shared/rolldown-NGdGAW73.mjs";
|
|
5
|
+
import { version } from "../shared/package-3VR4tEG7.mjs";
|
|
6
6
|
|
|
7
|
-
//#region src/plugin/parallel-plugin.ts
|
|
8
|
-
function defineParallelPlugin(pluginPath) {
|
|
9
|
-
return (options) => {
|
|
10
|
-
return {_parallel: {
|
|
11
|
-
fileUrl: pathToFileURL(pluginPath).href,
|
|
12
|
-
options
|
|
13
|
-
}};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
7
|
//#region src/utils/define-config.ts
|
|
19
8
|
function defineConfig(config) {
|
|
20
9
|
return config;
|
|
@@ -22,8 +11,7 @@ function defineConfig(config) {
|
|
|
22
11
|
|
|
23
12
|
//#endregion
|
|
24
13
|
//#region src/index.ts
|
|
25
|
-
|
|
14
|
+
const VERSION = version;
|
|
26
15
|
|
|
27
16
|
//#endregion
|
|
28
|
-
|
|
29
|
-
export { BuiltinGlobImportPlugin, BuiltinWasmPlugin, defineConfig, defineParallelPlugin, experimental_scan, rolldown, transform };
|
|
17
|
+
export { VERSION, defineConfig, rolldown };
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/plugin-context-data-AMG1kfMv.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;
|
|
8
|
+
const { registryId: registryId, pluginInfos: pluginInfos, threadNumber: threadNumber } = workerData;
|
|
9
9
|
(async () => {
|
|
10
10
|
try {
|
|
11
11
|
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
@@ -14,14 +14,14 @@ const { registryId, pluginInfos, threadNumber } = workerData;
|
|
|
14
14
|
const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
|
|
15
15
|
return {
|
|
16
16
|
index: pluginInfo.index,
|
|
17
|
-
plugin: bindingifyPlugin(plugin, {}, {})
|
|
17
|
+
plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData())
|
|
18
18
|
};
|
|
19
19
|
}));
|
|
20
20
|
(0, import_binding.registerPlugins)(registryId, plugins);
|
|
21
|
-
parentPort.postMessage({type:
|
|
21
|
+
parentPort.postMessage({type: "success"});
|
|
22
22
|
} catch (error) {
|
|
23
23
|
parentPort.postMessage({
|
|
24
|
-
type:
|
|
24
|
+
type: "error",
|
|
25
25
|
error
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -30,4 +30,4 @@ const { registryId, pluginInfos, threadNumber } = workerData;
|
|
|
30
30
|
}
|
|
31
31
|
})();
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
33
|
+
//#endregion
|
|
@@ -15,7 +15,7 @@ var __export = (target, all) => {
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
var __copyProps = (to, from, except, desc) => {
|
|
18
|
-
if (from && typeof from ===
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
19
|
key = keys[i];
|
|
20
20
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
21
|
get: ((k) => from[k]).bind(null, key),
|
|
@@ -24,7 +24,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
}
|
|
25
25
|
return to;
|
|
26
26
|
};
|
|
27
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target,
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
28
|
value: mod,
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
@@ -34,3 +34,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
exports.__commonJSMin = __commonJSMin;
|
|
35
35
|
exports.__export = __export;
|
|
36
36
|
exports.__toESM = __toESM;
|
|
37
|
+
|