rolldown 1.0.0-beta.4-commit.308f68b → 1.0.0-beta.40
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/bin/cli.mjs +2 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +579 -0
- package/dist/config.d.mts +10 -0
- package/dist/config.mjs +10 -0
- package/dist/experimental-index.d.mts +147 -0
- package/dist/experimental-index.mjs +216 -0
- package/dist/experimental-runtime-types.d.ts +71 -0
- package/dist/filter-index.d.mts +4 -0
- package/dist/filter-index.mjs +44 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +5 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/{esm/parallel-plugin-worker.mjs → parallel-plugin-worker.mjs} +8 -16
- package/dist/parallel-plugin.d.mts +14 -0
- package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -1
- package/dist/parse-ast-index.d.mts +8 -0
- package/dist/parse-ast-index.mjs +3 -0
- package/dist/shared/binding-BVXbXhPv.d.mts +1413 -0
- package/dist/shared/define-config-0kfJrpvQ.d.mts +1454 -0
- package/dist/shared/load-config-BJ274Wsp.mjs +117 -0
- package/dist/{esm/cli.mjs → shared/logger-CiCY7ucm.mjs} +107 -868
- package/dist/shared/misc-CQeo-AFx.mjs +22 -0
- package/dist/shared/parse-ast-index-C7EYXjEA.mjs +10974 -0
- package/dist/shared/{prompt-CxK9euq3.mjs → prompt-D2FxOcB5.mjs} +243 -245
- package/dist/shared/src-BH2eQDD9.mjs +4282 -0
- package/package.json +62 -76
- package/bin/cli.js +0 -2
- package/dist/cjs/cli.cjs +0 -1753
- package/dist/cjs/experimental-index.cjs +0 -85
- package/dist/cjs/index.cjs +0 -8
- package/dist/cjs/parallel-plugin-worker.cjs +0 -41
- package/dist/cjs/parallel-plugin.cjs +0 -9
- package/dist/cjs/parse-ast-index.cjs +0 -4
- package/dist/esm/experimental-index.mjs +0 -57
- package/dist/esm/index.mjs +0 -4
- package/dist/esm/parse-ast-index.mjs +0 -3
- package/dist/shared/chunk-qZFfknuJ.cjs +0 -40
- package/dist/shared/parse-ast-index-CyX8MVZE.mjs +0 -674
- package/dist/shared/parse-ast-index-D7XtMFo4.cjs +0 -719
- package/dist/shared/prompt-ZZScCEWI.cjs +0 -854
- package/dist/shared/src-DB6mZNTU.mjs +0 -2875
- package/dist/shared/src-y8hk77fd.cjs +0 -3056
- package/dist/types/api/build.d.ts +0 -18
- package/dist/types/api/experimental.d.ts +0 -7
- package/dist/types/api/rolldown/index.d.ts +0 -3
- package/dist/types/api/rolldown/rolldown-build.d.ts +0 -13
- package/dist/types/api/watch/index.d.ts +0 -3
- package/dist/types/api/watch/watch-emitter.d.ts +0 -31
- package/dist/types/api/watch/watcher.d.ts +0 -13
- package/dist/types/binding.d.ts +0 -1456
- package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
- package/dist/types/builtin-plugin/constructors.d.ts +0 -21
- package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -28
- package/dist/types/builtin-plugin/transform-plugin.d.ts +0 -9
- package/dist/types/builtin-plugin/utils.d.ts +0 -8
- package/dist/types/cli/arguments/alias.d.ts +0 -16
- package/dist/types/cli/arguments/index.d.ts +0 -15
- package/dist/types/cli/arguments/normalize.d.ts +0 -12
- package/dist/types/cli/arguments/utils.d.ts +0 -8
- package/dist/types/cli/colors.d.ts +0 -11
- package/dist/types/cli/commands/bundle.d.ts +0 -3
- package/dist/types/cli/commands/help.d.ts +0 -1
- package/dist/types/cli/index.d.ts +0 -1
- package/dist/types/cli/load-config.d.ts +0 -5
- package/dist/types/cli/logger.d.ts +0 -5
- package/dist/types/constants/plugin-context.d.ts +0 -7
- package/dist/types/constants/plugin.d.ts +0 -45
- package/dist/types/experimental-index.d.ts +0 -9
- package/dist/types/index.d.ts +0 -30
- package/dist/types/log/log-handler.d.ts +0 -4
- package/dist/types/log/logger.d.ts +0 -6
- package/dist/types/log/logging.d.ts +0 -12
- package/dist/types/log/logs.d.ts +0 -18
- package/dist/types/options/generated/checks-options.d.ts +0 -57
- package/dist/types/options/input-options.d.ts +0 -177
- package/dist/types/options/normalized-input-options.d.ts +0 -18
- package/dist/types/options/normalized-output-options.d.ts +0 -70
- package/dist/types/options/output-options.d.ts +0 -182
- package/dist/types/options/watch-options.d.ts +0 -5
- package/dist/types/parallel-plugin-worker.d.ts +0 -1
- package/dist/types/parallel-plugin.d.ts +0 -1
- package/dist/types/parse-ast-index.d.ts +0 -5
- package/dist/types/plugin/bindingify-build-hooks.d.ts +0 -10
- package/dist/types/plugin/bindingify-hook-filter.d.ts +0 -7
- package/dist/types/plugin/bindingify-output-hooks.d.ts +0 -14
- package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +0 -8
- package/dist/types/plugin/bindingify-plugin.d.ts +0 -16
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
- package/dist/types/plugin/hook-filter.d.ts +0 -48
- package/dist/types/plugin/index.d.ts +0 -134
- package/dist/types/plugin/minimal-plugin-context.d.ts +0 -23
- package/dist/types/plugin/parallel-plugin-implementation.d.ts +0 -10
- package/dist/types/plugin/parallel-plugin.d.ts +0 -9
- package/dist/types/plugin/plugin-context-data.d.ts +0 -17
- package/dist/types/plugin/plugin-context.d.ts +0 -67
- package/dist/types/plugin/plugin-driver.d.ts +0 -8
- package/dist/types/plugin/transform-plugin-context.d.ts +0 -28
- package/dist/types/types/assert.d.ts +0 -14
- package/dist/types/types/config-export.d.ts +0 -5
- package/dist/types/types/misc.d.ts +0 -40
- package/dist/types/types/module-info.d.ts +0 -15
- package/dist/types/types/module-side-effects.d.ts +0 -12
- package/dist/types/types/output-bundle.d.ts +0 -4
- package/dist/types/types/rolldown-options.d.ts +0 -5
- package/dist/types/types/rolldown-output.d.ts +0 -66
- package/dist/types/types/schema.d.ts +0 -33
- package/dist/types/types/sourcemap.d.ts +0 -14
- package/dist/types/types/utils.d.ts +0 -13
- package/dist/types/utils/asset-source.d.ts +0 -4
- package/dist/types/utils/async-flatten.d.ts +0 -1
- package/dist/types/utils/bindingify-input-options.d.ts +0 -7
- package/dist/types/utils/bindingify-output-options.d.ts +0 -5
- package/dist/types/utils/code-frame.d.ts +0 -1
- package/dist/types/utils/compose-js-plugins.d.ts +0 -2
- package/dist/types/utils/create-bundler-option.d.ts +0 -11
- package/dist/types/utils/create-bundler.d.ts +0 -8
- package/dist/types/utils/define-config.d.ts +0 -5
- package/dist/types/utils/error.d.ts +0 -2
- package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -19
- package/dist/types/utils/misc.d.ts +0 -6
- package/dist/types/utils/normalize-hook.d.ts +0 -7
- package/dist/types/utils/normalize-plugin-option.d.ts +0 -13
- package/dist/types/utils/normalize-string-or-regex.d.ts +0 -2
- package/dist/types/utils/plugin/index.d.ts +0 -2
- package/dist/types/utils/resolved-external.d.ts +0 -4
- package/dist/types/utils/transform-module-info.d.ts +0 -4
- package/dist/types/utils/transform-rendered-chunk.d.ts +0 -4
- package/dist/types/utils/transform-rendered-module.d.ts +0 -3
- package/dist/types/utils/transform-side-effects.d.ts +0 -3
- package/dist/types/utils/transform-sourcemap.d.ts +0 -3
- package/dist/types/utils/transform-to-rollup-output.d.ts +0 -11
- package/dist/types/utils/validator.d.ts +0 -6
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('../shared/src-y8hk77fd.cjs');
|
|
4
|
-
const require_parse_ast_index = require('../shared/parse-ast-index-D7XtMFo4.cjs');
|
|
5
|
-
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
|
-
|
|
7
|
-
//#region src/plugin/parallel-plugin.ts
|
|
8
|
-
function defineParallelPlugin(pluginPath) {
|
|
9
|
-
return (options) => {
|
|
10
|
-
return { _parallel: {
|
|
11
|
-
fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
|
|
12
|
-
options
|
|
13
|
-
} };
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/api/experimental.ts
|
|
19
|
-
const experimental_scan = async (input) => {
|
|
20
|
-
const { bundler, stopWorkers } = await require_src.createBundler(input, {});
|
|
21
|
-
const output = await bundler.scan();
|
|
22
|
-
require_src.handleOutputErrors(output);
|
|
23
|
-
await stopWorkers?.();
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/builtin-plugin/transform-plugin.ts
|
|
28
|
-
function normalizeEcmaTransformPluginConfig(config) {
|
|
29
|
-
if (!config) return void 0;
|
|
30
|
-
let normalizedConfig = {
|
|
31
|
-
...config,
|
|
32
|
-
exclude: require_src.normalizedStringOrRegex(config.exclude),
|
|
33
|
-
include: require_src.normalizedStringOrRegex(config.include)
|
|
34
|
-
};
|
|
35
|
-
return normalizedConfig;
|
|
36
|
-
}
|
|
37
|
-
function transformPlugin(config) {
|
|
38
|
-
return new require_src.BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/builtin-plugin/replace-plugin.ts
|
|
43
|
-
function replacePlugin(values = {}, options = {}) {
|
|
44
|
-
return new require_src.BuiltinPlugin("builtin:replace", {
|
|
45
|
-
...options,
|
|
46
|
-
values
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/builtin-plugin/alias-plugin.ts
|
|
52
|
-
function aliasPlugin(config) {
|
|
53
|
-
return new require_src.BuiltinPlugin("builtin:alias", config);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
//#endregion
|
|
57
|
-
exports.aliasPlugin = aliasPlugin
|
|
58
|
-
exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin
|
|
59
|
-
exports.composePlugins = require_src.composeJsPlugins
|
|
60
|
-
exports.defineParallelPlugin = defineParallelPlugin
|
|
61
|
-
exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin
|
|
62
|
-
exports.importGlobPlugin = require_src.importGlobPlugin
|
|
63
|
-
exports.jsonPlugin = require_src.jsonPlugin
|
|
64
|
-
exports.loadFallbackPlugin = require_src.loadFallbackPlugin
|
|
65
|
-
exports.manifestPlugin = require_src.manifestPlugin
|
|
66
|
-
exports.moduleFederationPlugin = require_src.moduleFederationPlugin
|
|
67
|
-
exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin
|
|
68
|
-
Object.defineProperty(exports, 'moduleRunnerTransform', {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function () {
|
|
71
|
-
return import_binding.moduleRunnerTransform;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
exports.replacePlugin = replacePlugin
|
|
75
|
-
exports.scan = experimental_scan
|
|
76
|
-
Object.defineProperty(exports, 'transform', {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return import_binding.transform;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
exports.transformPlugin = transformPlugin
|
|
83
|
-
exports.viteResolvePlugin = require_src.viteResolvePlugin
|
|
84
|
-
exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin
|
|
85
|
-
exports.wasmHelperPlugin = require_src.wasmHelperPlugin
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const require_src = require('../shared/src-y8hk77fd.cjs');
|
|
2
|
-
require('../shared/parse-ast-index-D7XtMFo4.cjs');
|
|
3
|
-
|
|
4
|
-
exports.VERSION = require_src.VERSION
|
|
5
|
-
exports.build = require_src.build
|
|
6
|
-
exports.defineConfig = require_src.defineConfig
|
|
7
|
-
exports.rolldown = require_src.rolldown
|
|
8
|
-
exports.watch = require_src.watch
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('../shared/src-y8hk77fd.cjs');
|
|
4
|
-
const require_parse_ast_index = require('../shared/parse-ast-index-D7XtMFo4.cjs');
|
|
5
|
-
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
|
-
|
|
7
|
-
//#region src/parallel-plugin-worker.ts
|
|
8
|
-
const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
|
|
9
|
-
(async () => {
|
|
10
|
-
try {
|
|
11
|
-
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
12
|
-
const pluginModule = await import(pluginInfo.fileUrl);
|
|
13
|
-
const definePluginImpl = pluginModule.default;
|
|
14
|
-
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
15
|
-
return {
|
|
16
|
-
index: pluginInfo.index,
|
|
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
|
-
() => {},
|
|
25
|
-
"info"
|
|
26
|
-
)
|
|
27
|
-
};
|
|
28
|
-
}));
|
|
29
|
-
(0, require_parse_ast_index.import_binding.registerPlugins)(registryId, plugins);
|
|
30
|
-
node_worker_threads.parentPort.postMessage({ type: "success" });
|
|
31
|
-
} catch (error) {
|
|
32
|
-
node_worker_threads.parentPort.postMessage({
|
|
33
|
-
type: "error",
|
|
34
|
-
error
|
|
35
|
-
});
|
|
36
|
-
} finally {
|
|
37
|
-
node_worker_threads.parentPort.unref();
|
|
38
|
-
}
|
|
39
|
-
})();
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { import_binding } from "../shared/parse-ast-index-CyX8MVZE.mjs";
|
|
2
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-DB6mZNTU.mjs";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
|
|
5
|
-
//#region src/plugin/parallel-plugin.ts
|
|
6
|
-
function defineParallelPlugin(pluginPath) {
|
|
7
|
-
return (options) => {
|
|
8
|
-
return { _parallel: {
|
|
9
|
-
fileUrl: pathToFileURL(pluginPath).href,
|
|
10
|
-
options
|
|
11
|
-
} };
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/api/experimental.ts
|
|
17
|
-
const experimental_scan = async (input) => {
|
|
18
|
-
const { bundler, stopWorkers } = await createBundler(input, {});
|
|
19
|
-
const output = await bundler.scan();
|
|
20
|
-
handleOutputErrors(output);
|
|
21
|
-
await stopWorkers?.();
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/builtin-plugin/transform-plugin.ts
|
|
26
|
-
function normalizeEcmaTransformPluginConfig(config) {
|
|
27
|
-
if (!config) return void 0;
|
|
28
|
-
let normalizedConfig = {
|
|
29
|
-
...config,
|
|
30
|
-
exclude: normalizedStringOrRegex(config.exclude),
|
|
31
|
-
include: normalizedStringOrRegex(config.include)
|
|
32
|
-
};
|
|
33
|
-
return normalizedConfig;
|
|
34
|
-
}
|
|
35
|
-
function transformPlugin(config) {
|
|
36
|
-
return new BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/builtin-plugin/replace-plugin.ts
|
|
41
|
-
function replacePlugin(values = {}, options = {}) {
|
|
42
|
-
return new BuiltinPlugin("builtin:replace", {
|
|
43
|
-
...options,
|
|
44
|
-
values
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/builtin-plugin/alias-plugin.ts
|
|
50
|
-
function aliasPlugin(config) {
|
|
51
|
-
return new BuiltinPlugin("builtin:alias", config);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
//#endregion
|
|
55
|
-
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
|
|
56
|
-
var transform = import_binding.transform;
|
|
57
|
-
export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
package/dist/esm/index.mjs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//#region rolldown:runtime
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJS = (cb, mod) => function() {
|
|
10
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
-
key = keys[i];
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: ((k) => from[k]).bind(null, key),
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
Object.defineProperty(exports, '__commonJS', {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: function () {
|
|
32
|
-
return __commonJS;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
Object.defineProperty(exports, '__toESM', {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
get: function () {
|
|
38
|
-
return __toESM;
|
|
39
|
-
}
|
|
40
|
-
});
|