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,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { __toESM } = require("../shared/chunk-gQ4GMlVi.cjs");
|
|
4
|
+
const { require_binding } = require("../shared/plugin-context-data-S1bXhfAf.cjs");
|
|
5
|
+
const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/rolldown-z62CIhEW.cjs");
|
|
6
|
+
const { pathToFileURL } = __toESM(require("node:url"));
|
|
7
|
+
|
|
8
|
+
//#region src/plugin/parallel-plugin.ts
|
|
9
|
+
function defineParallelPlugin(pluginPath) {
|
|
10
|
+
return (options) => {
|
|
11
|
+
return {_parallel: {
|
|
12
|
+
fileUrl: (pathToFileURL(pluginPath)).href,
|
|
13
|
+
options
|
|
14
|
+
}};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/experimental-index.ts
|
|
20
|
+
var import_binding = __toESM(require_binding());
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
24
|
+
var transform = import_binding.transform;
|
|
25
|
+
exports.aliasPlugin = aliasPlugin;
|
|
26
|
+
exports.buildImportAnalysisPlugin = buildImportAnalysisPlugin;
|
|
27
|
+
exports.composePlugins = composeJsPlugins;
|
|
28
|
+
exports.defineParallelPlugin = defineParallelPlugin;
|
|
29
|
+
exports.dynamicImportVarsPlugin = dynamicImportVarsPlugin;
|
|
30
|
+
exports.importGlobPlugin = importGlobPlugin;
|
|
31
|
+
exports.jsonPlugin = jsonPlugin;
|
|
32
|
+
exports.loadFallbackPlugin = loadFallbackPlugin;
|
|
33
|
+
exports.manifestPlugin = manifestPlugin;
|
|
34
|
+
exports.modulePreloadPolyfillPlugin = modulePreloadPolyfillPlugin;
|
|
35
|
+
exports.replacePlugin = replacePlugin;
|
|
36
|
+
exports.scan = experimental_scan;
|
|
37
|
+
exports.transform = transform;
|
|
38
|
+
exports.transformPlugin = transformPlugin;
|
|
39
|
+
exports.wasmFallbackPlugin = wasmFallbackPlugin;
|
|
40
|
+
exports.wasmHelperPlugin = wasmHelperPlugin;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const {
|
|
5
|
-
const {
|
|
6
|
-
const { pathToFileURL } = __toESM(require("node:url"));
|
|
3
|
+
require("../shared/plugin-context-data-S1bXhfAf.cjs");
|
|
4
|
+
const { rolldown } = require("../shared/rolldown-z62CIhEW.cjs");
|
|
5
|
+
const { version } = require("../shared/package-OJCNSbf0.cjs");
|
|
7
6
|
|
|
8
|
-
//#region src/plugin/parallel-plugin.ts
|
|
9
|
-
function defineParallelPlugin(pluginPath) {
|
|
10
|
-
return (options) => {
|
|
11
|
-
return {_parallel: {
|
|
12
|
-
fileUrl: pathToFileURL(pluginPath).href,
|
|
13
|
-
options
|
|
14
|
-
}};
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
7
|
//#region src/utils/define-config.ts
|
|
20
8
|
function defineConfig(config) {
|
|
21
9
|
return config;
|
|
@@ -23,15 +11,10 @@ function defineConfig(config) {
|
|
|
23
11
|
|
|
24
12
|
//#endregion
|
|
25
13
|
//#region src/index.ts
|
|
26
|
-
|
|
14
|
+
const VERSION = version;
|
|
27
15
|
|
|
28
16
|
//#endregion
|
|
29
17
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
30
|
-
|
|
31
|
-
exports.BuiltinGlobImportPlugin = BuiltinGlobImportPlugin;
|
|
32
|
-
exports.BuiltinWasmPlugin = BuiltinWasmPlugin;
|
|
18
|
+
exports.VERSION = VERSION;
|
|
33
19
|
exports.defineConfig = defineConfig;
|
|
34
|
-
exports.defineParallelPlugin = defineParallelPlugin;
|
|
35
|
-
exports.experimental_scan = experimental_scan;
|
|
36
20
|
exports.rolldown = rolldown;
|
|
37
|
-
exports.transform = transform;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { __toESM } = require("../shared/chunk-
|
|
4
|
-
const { bindingifyPlugin, require_binding } = require("../shared/
|
|
3
|
+
const { __toESM } = require("../shared/chunk-gQ4GMlVi.cjs");
|
|
4
|
+
const { PluginContextData, bindingifyPlugin, require_binding } = require("../shared/plugin-context-data-S1bXhfAf.cjs");
|
|
5
5
|
const { parentPort, workerData } = __toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
8
|
var import_binding = __toESM(require_binding());
|
|
9
|
-
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
9
|
+
const { registryId: registryId, pluginInfos: pluginInfos, threadNumber: threadNumber } = workerData;
|
|
10
10
|
(async () => {
|
|
11
11
|
try {
|
|
12
12
|
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
@@ -15,14 +15,14 @@ const { registryId, pluginInfos, threadNumber } = workerData;
|
|
|
15
15
|
const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
|
|
16
16
|
return {
|
|
17
17
|
index: pluginInfo.index,
|
|
18
|
-
plugin: bindingifyPlugin(plugin, {}, {})
|
|
18
|
+
plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData())
|
|
19
19
|
};
|
|
20
20
|
}));
|
|
21
21
|
(0, import_binding.registerPlugins)(registryId, plugins);
|
|
22
|
-
parentPort.postMessage({type:
|
|
22
|
+
parentPort.postMessage({type: "success"});
|
|
23
23
|
} catch (error) {
|
|
24
24
|
parentPort.postMessage({
|
|
25
|
-
type:
|
|
25
|
+
type: "error",
|
|
26
26
|
error
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -31,4 +31,4 @@ const { registryId, pluginInfos, threadNumber } = workerData;
|
|
|
31
31
|
}
|
|
32
32
|
})();
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
34
|
+
//#endregion
|
|
@@ -8,4 +8,4 @@ function defineParallelPluginImplementation(plugin) {
|
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
|
|
11
|
+
exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
|