rolldown 0.14.0-snapshot-f1bd92f-20241126015006 → 0.14.0-snapshot-3009016-20241127042951
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 +768 -860
- package/dist/cjs/experimental-index.cjs +35 -35
- package/dist/cjs/index.cjs +5 -8
- package/dist/cjs/parallel-plugin-worker.cjs +20 -14
- package/dist/cjs/parallel-plugin.cjs +1 -3
- package/dist/esm/cli.mjs +707 -801
- package/dist/esm/experimental-index.mjs +6 -10
- package/dist/esm/index.mjs +2 -4
- package/dist/esm/parallel-plugin-worker.mjs +15 -10
- package/dist/esm/parallel-plugin.mjs +1 -3
- package/dist/shared/{chunk-JoMxl5V2.cjs → chunk-BK2Ye-xa.cjs} +19 -6
- package/dist/shared/{consola.36c0034f-HcmWcfPe.cjs → consola_36c0034f--b2gQiI0.cjs} +247 -295
- package/dist/shared/{consola.36c0034f-Xyw7SC_7.mjs → consola_36c0034f-DWsVjwtA.mjs} +218 -283
- package/dist/shared/{prompt-hoPhcrA-.mjs → prompt-DGW8ZJmn.mjs} +125 -174
- package/dist/shared/{prompt-9Ij3R3TG.cjs → prompt-RFvZMmjc.cjs} +157 -204
- package/dist/shared/rolldown-binding.linux-x64-gnu.node +0 -0
- package/dist/shared/rolldown-binding.wasi.cjs +24 -24
- package/dist/shared/{src_index-jsZ3BLsy.mjs → src-BvC6D2iq.mjs} +860 -1052
- package/dist/shared/{src_index-EDDIS90J.cjs → src-lKR2W-tO.cjs} +1019 -1093
- package/dist/types/binding.d.ts +32 -2
- package/dist/types/cli/arguments/schema.d.ts +5 -5
- package/dist/types/constants/plugin.d.ts +2 -1
- package/dist/types/log/locate-character/index.d.ts +13 -0
- package/dist/types/log/logs.d.ts +2 -0
- package/dist/types/options/input-options-schema.d.ts +11 -11
- package/dist/types/options/input-options.d.ts +2 -2
- package/dist/types/options/normalized-input-options.d.ts +7 -2
- package/dist/types/options/normalized-output-options.d.ts +30 -3
- package/dist/types/options/output-options-schema.d.ts +2 -2
- package/dist/types/plugin/index.d.ts +2 -3
- package/dist/types/plugin/plugin-context.d.ts +1 -1
- package/dist/types/plugin/plugin-driver.d.ts +2 -2
- package/dist/types/utils/bindingify-input-options.d.ts +3 -1
- package/dist/types/utils/normalize-plugin-option.d.ts +5 -0
- package/dist/types/utils/transform-sourcemap.d.ts +2 -0
- package/package.json +27 -17
|
@@ -1,41 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const { pathToFileURL } = __toESM(require("node:url"));
|
|
2
|
+
const require_chunk = require('../shared/chunk-BK2Ye-xa.cjs');
|
|
3
|
+
const require_src = require('../shared/src-lKR2W-tO.cjs');
|
|
4
|
+
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
5
|
|
|
7
6
|
//#region src/plugin/parallel-plugin.ts
|
|
8
7
|
function defineParallelPlugin(pluginPath) {
|
|
9
8
|
return (options) => {
|
|
10
|
-
return {_parallel: {
|
|
11
|
-
fileUrl: (pathToFileURL(pluginPath)
|
|
9
|
+
return { _parallel: {
|
|
10
|
+
fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
|
|
12
11
|
options
|
|
13
|
-
}};
|
|
12
|
+
} };
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
//#endregion
|
|
18
17
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
19
18
|
function normalizeEcmaTransformPluginConfig(config) {
|
|
20
|
-
if (!config)
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
19
|
+
if (!config) return undefined;
|
|
23
20
|
let normalizedConfig = {
|
|
24
21
|
jsxInject: config?.jsxInject,
|
|
25
|
-
exclude: normalizedStringOrRegex(config.exclude),
|
|
26
|
-
include: normalizedStringOrRegex(config.include),
|
|
22
|
+
exclude: require_src.normalizedStringOrRegex(config.exclude),
|
|
23
|
+
include: require_src.normalizedStringOrRegex(config.include),
|
|
27
24
|
targets: config.targets
|
|
28
25
|
};
|
|
29
26
|
return normalizedConfig;
|
|
30
27
|
}
|
|
31
28
|
function transformPlugin(config) {
|
|
32
|
-
return new BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
|
|
29
|
+
return new require_src.BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
//#endregion
|
|
36
33
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
37
34
|
function replacePlugin(values = {}, options = {}) {
|
|
38
|
-
return new BuiltinPlugin("builtin:replace", {
|
|
35
|
+
return new require_src.BuiltinPlugin("builtin:replace", {
|
|
39
36
|
...options,
|
|
40
37
|
values
|
|
41
38
|
});
|
|
@@ -44,30 +41,33 @@ function replacePlugin(values = {}, options = {}) {
|
|
|
44
41
|
//#endregion
|
|
45
42
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
46
43
|
function aliasPlugin(config) {
|
|
47
|
-
return new BuiltinPlugin("builtin:alias", config);
|
|
44
|
+
return new require_src.BuiltinPlugin("builtin:alias", config);
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
//#endregion
|
|
51
48
|
//#region src/experimental-index.ts
|
|
52
|
-
var import_binding = __toESM(require_binding());
|
|
49
|
+
var import_binding = require_chunk.__toESM(require_binding());
|
|
53
50
|
|
|
54
51
|
//#endregion
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
60
|
-
exports.
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
exports.
|
|
52
|
+
exports.aliasPlugin = aliasPlugin
|
|
53
|
+
exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin
|
|
54
|
+
exports.composePlugins = require_src.composeJsPlugins
|
|
55
|
+
exports.defineParallelPlugin = defineParallelPlugin
|
|
56
|
+
exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin
|
|
57
|
+
exports.importGlobPlugin = require_src.importGlobPlugin
|
|
58
|
+
exports.jsonPlugin = require_src.jsonPlugin
|
|
59
|
+
exports.loadFallbackPlugin = require_src.loadFallbackPlugin
|
|
60
|
+
exports.manifestPlugin = require_src.manifestPlugin
|
|
61
|
+
exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin
|
|
62
|
+
exports.replacePlugin = replacePlugin
|
|
63
|
+
exports.scan = require_src.experimental_scan
|
|
64
|
+
Object.defineProperty(exports, 'transform', {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return import_binding.transform;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
exports.transformPlugin = transformPlugin
|
|
71
|
+
exports.viteResolvePlugin = require_src.viteResolvePlugin
|
|
72
|
+
exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin
|
|
73
|
+
exports.wasmHelperPlugin = require_src.wasmHelperPlugin
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const require_src = require('../shared/src-lKR2W-tO.cjs');
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.
|
|
7
|
-
exports.defineConfig = defineConfig;
|
|
8
|
-
exports.rolldown = rolldown;
|
|
9
|
-
exports.watch = watch;
|
|
3
|
+
exports.VERSION = require_src.VERSION
|
|
4
|
+
exports.defineConfig = require_src.defineConfig
|
|
5
|
+
exports.rolldown = require_src.rolldown
|
|
6
|
+
exports.watch = require_src.watch
|
|
@@ -1,34 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const { parentPort, workerData } = __toESM(require("node:worker_threads"));
|
|
2
|
+
const require_chunk = require('../shared/chunk-BK2Ye-xa.cjs');
|
|
3
|
+
const require_src = require('../shared/src-lKR2W-tO.cjs');
|
|
4
|
+
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
5
|
|
|
7
6
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
-
var import_binding = __toESM(require_binding());
|
|
9
|
-
const { registryId
|
|
7
|
+
var import_binding = require_chunk.__toESM(require_binding());
|
|
8
|
+
const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
|
|
10
9
|
(async () => {
|
|
11
10
|
try {
|
|
12
11
|
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
13
12
|
const pluginModule = await import(pluginInfo.fileUrl);
|
|
14
13
|
const definePluginImpl = pluginModule.default;
|
|
15
|
-
const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
|
|
14
|
+
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
16
15
|
return {
|
|
17
16
|
index: pluginInfo.index,
|
|
18
|
-
plugin: bindingifyPlugin(
|
|
17
|
+
plugin: require_src.bindingifyPlugin(
|
|
18
|
+
plugin,
|
|
19
|
+
{},
|
|
20
|
+
{},
|
|
21
|
+
// TODO need to find a way to share pluginContextData
|
|
22
|
+
new require_src.PluginContextData(),
|
|
23
|
+
() => {},
|
|
24
|
+
"info"
|
|
25
|
+
)
|
|
19
26
|
};
|
|
20
27
|
}));
|
|
21
28
|
(0, import_binding.registerPlugins)(registryId, plugins);
|
|
22
|
-
parentPort.postMessage({type: "success"});
|
|
29
|
+
node_worker_threads.parentPort.postMessage({ type: "success" });
|
|
23
30
|
} catch (error) {
|
|
24
|
-
parentPort.postMessage({
|
|
31
|
+
node_worker_threads.parentPort.postMessage({
|
|
25
32
|
type: "error",
|
|
26
33
|
error
|
|
27
34
|
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
parentPort.unref();
|
|
35
|
+
} finally {
|
|
36
|
+
node_worker_threads.parentPort.unref();
|
|
31
37
|
}
|
|
32
38
|
})();
|
|
33
39
|
|
|
34
|
-
//#endregion
|
|
40
|
+
//#endregion
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
//#region src/plugin/parallel-plugin-implementation.ts
|
|
5
4
|
function defineParallelPluginImplementation(plugin) {
|
|
6
5
|
return plugin;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
//#endregion
|
|
10
|
-
|
|
11
|
-
exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
|
|
9
|
+
exports.defineParallelPluginImplementation = defineParallelPluginImplementation
|