rolldown 1.0.0-beta.1-commit.7c52c94 → 1.0.0-beta.10
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.cjs +1748 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1745 -0
- package/dist/config.cjs +12 -0
- package/dist/config.d.cts +12 -0
- package/dist/config.d.mts +12 -0
- package/dist/config.mjs +10 -0
- package/dist/experimental-index.cjs +132 -0
- package/dist/experimental-index.d.cts +96 -0
- package/dist/experimental-index.d.mts +96 -0
- package/dist/experimental-index.mjs +91 -0
- package/dist/filter-index.cjs +105 -0
- package/dist/filter-index.d.cts +5 -0
- package/dist/filter-index.d.mts +5 -0
- package/dist/filter-index.mjs +44 -0
- package/dist/index.cjs +9 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +5 -0
- package/dist/{cjs/parallel-plugin-worker.cjs → parallel-plugin-worker.cjs} +7 -14
- package/dist/parallel-plugin-worker.d.cts +1 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/{esm/parallel-plugin-worker.mjs → parallel-plugin-worker.mjs} +5 -11
- package/dist/{cjs/parallel-plugin.cjs → parallel-plugin.cjs} +1 -2
- package/dist/parallel-plugin.d.cts +15 -0
- package/dist/parallel-plugin.d.mts +15 -0
- package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -1
- package/dist/parse-ast-index.cjs +4 -0
- package/dist/parse-ast-index.d.cts +9 -0
- package/dist/parse-ast-index.d.mts +9 -0
- package/dist/parse-ast-index.mjs +3 -0
- package/dist/shared/binding.d-Bl5Vi4GH.d.mts +1702 -0
- package/dist/shared/binding.d-DcFBMcjI.d.cts +1702 -0
- package/dist/shared/{chunk-qZFfknuJ.cjs → chunk-DDkG_k5U.cjs} +0 -1
- package/dist/shared/define-config.d-B2xOSmbM.d.cts +1082 -0
- package/dist/shared/define-config.d-USfUuKiR.d.mts +1082 -0
- package/dist/shared/load-config-D6gW8FDa.cjs +125 -0
- package/dist/shared/load-config-eyuttVHY.mjs +119 -0
- package/dist/shared/misc-BKp5iIef.cjs +67 -0
- package/dist/shared/misc-BN0nse6C.mjs +25 -0
- package/dist/shared/{binding-fhgdIkpS.cjs → parse-ast-index-BvK1MT-L.cjs} +347 -309
- package/dist/shared/{binding-Bl7VQy7c.mjs → parse-ast-index-PSQWLeSo.mjs} +334 -277
- package/dist/shared/prompt-8EeOGx1_.cjs +854 -0
- package/dist/shared/prompt-C3zHEaSG.mjs +852 -0
- package/dist/shared/src-C2v46mL8.cjs +4654 -0
- package/dist/shared/src-D-VRn8rI.mjs +4456 -0
- package/package.json +62 -61
- package/bin/cli.js +0 -2
- package/dist/cjs/cli.cjs +0 -769
- package/dist/cjs/experimental-index.cjs +0 -79
- package/dist/cjs/index.cjs +0 -8
- package/dist/cjs/parse-ast-index.cjs +0 -57
- package/dist/esm/cli.mjs +0 -766
- package/dist/esm/experimental-index.mjs +0 -56
- package/dist/esm/index.mjs +0 -4
- package/dist/esm/parse-ast-index.mjs +0 -55
- package/dist/shared/consola_36c0034f-Cx52UqEq.mjs +0 -832
- package/dist/shared/consola_36c0034f-CynBWXXO.cjs +0 -859
- package/dist/shared/prompt-B58MxVuU.cjs +0 -762
- package/dist/shared/prompt-DjjlOckE.mjs +0 -758
- package/dist/shared/src-CPCP99Z9.mjs +0 -2641
- package/dist/shared/src-lBcHSsjm.cjs +0 -2822
- package/dist/tsconfig.dts.tsbuildinfo +0 -1
- 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 -12
- 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 -1288
- package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
- package/dist/types/builtin-plugin/constructors.d.ts +0 -20
- 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 -3
- 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 -28
- package/dist/types/log/logHandler.d.ts +0 -4
- package/dist/types/log/logger.d.ts +0 -6
- package/dist/types/log/logging.d.ts +0 -11
- package/dist/types/log/logs.d.ts +0 -18
- package/dist/types/options/input-options.d.ts +0 -125
- package/dist/types/options/normalized-input-options.d.ts +0 -18
- package/dist/types/options/normalized-output-options.d.ts +0 -67
- package/dist/types/options/output-options.d.ts +0 -80
- 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 -4
- 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 -15
- 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 -126
- package/dist/types/plugin/minimal-plugin-context.d.ts +0 -15
- 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 -16
- package/dist/types/plugin/plugin-context.d.ts +0 -52
- package/dist/types/plugin/plugin-driver.d.ts +0 -8
- package/dist/types/plugin/transform-plugin-context.d.ts +0 -17
- package/dist/types/types/assert.d.ts +0 -13
- 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 -10
- 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 -63
- package/dist/types/types/schema.d.ts +0 -33
- package/dist/types/types/sourcemap.d.ts +0 -13
- 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 -3
- 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/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 -7
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
+
const require_src = require('./shared/src-C2v46mL8.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-BvK1MT-L.cjs');
|
|
4
|
+
require('./shared/misc-BKp5iIef.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
+
var import_binding = require_chunk.__toESM(require_parse_ast_index.require_binding());
|
|
8
9
|
const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
|
|
9
10
|
(async () => {
|
|
10
11
|
try {
|
|
@@ -14,18 +15,10 @@ const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData
|
|
|
14
15
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
15
16
|
return {
|
|
16
17
|
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
|
-
"info"
|
|
25
|
-
)
|
|
18
|
+
plugin: require_src.bindingifyPlugin(plugin, {}, {}, new require_src.PluginContextData(), [], () => {}, "info", false)
|
|
26
19
|
};
|
|
27
20
|
}));
|
|
28
|
-
(0,
|
|
21
|
+
(0, import_binding.registerPlugins)(registryId, plugins);
|
|
29
22
|
node_worker_threads.parentPort.postMessage({ type: "success" });
|
|
30
23
|
} catch (error) {
|
|
31
24
|
node_worker_threads.parentPort.postMessage({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PluginContextData, bindingifyPlugin } from "
|
|
1
|
+
import { __toESM, require_binding } from "./shared/parse-ast-index-PSQWLeSo.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-D-VRn8rI.mjs";
|
|
3
|
+
import "./shared/misc-BN0nse6C.mjs";
|
|
3
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
4
5
|
|
|
5
6
|
//#region src/parallel-plugin-worker.ts
|
|
7
|
+
var import_binding = __toESM(require_binding());
|
|
6
8
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
7
9
|
(async () => {
|
|
8
10
|
try {
|
|
@@ -12,15 +14,7 @@ const { registryId, pluginInfos, threadNumber } = workerData;
|
|
|
12
14
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
13
15
|
return {
|
|
14
16
|
index: pluginInfo.index,
|
|
15
|
-
plugin: bindingifyPlugin(
|
|
16
|
-
plugin,
|
|
17
|
-
{},
|
|
18
|
-
{},
|
|
19
|
-
// TODO need to find a way to share pluginContextData
|
|
20
|
-
new PluginContextData(),
|
|
21
|
-
() => {},
|
|
22
|
-
"info"
|
|
23
|
-
)
|
|
17
|
+
plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData(), [], () => {}, "info", false)
|
|
24
18
|
};
|
|
25
19
|
}));
|
|
26
20
|
(0, import_binding.registerPlugins)(registryId, plugins);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
|
|
3
2
|
//#region src/plugin/parallel-plugin-implementation.ts
|
|
4
3
|
function defineParallelPluginImplementation(plugin) {
|
|
@@ -6,4 +5,4 @@ function defineParallelPluginImplementation(plugin) {
|
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
//#endregion
|
|
9
|
-
exports.defineParallelPluginImplementation = defineParallelPluginImplementation
|
|
8
|
+
exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./shared/binding.d-DcFBMcjI.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config.d-B2xOSmbM.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
|
+
type ParallelPluginImplementation = Plugin;
|
|
6
|
+
type Context = {
|
|
7
|
+
/**
|
|
8
|
+
* Thread number
|
|
9
|
+
*/
|
|
10
|
+
threadNumber: number
|
|
11
|
+
};
|
|
12
|
+
declare function defineParallelPluginImplementation<Options>(plugin: (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>): (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>;
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Context, ParallelPluginImplementation, defineParallelPluginImplementation };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./shared/binding.d-Bl5Vi4GH.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config.d-USfUuKiR.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
|
+
type ParallelPluginImplementation = Plugin;
|
|
6
|
+
type Context = {
|
|
7
|
+
/**
|
|
8
|
+
* Thread number
|
|
9
|
+
*/
|
|
10
|
+
threadNumber: number
|
|
11
|
+
};
|
|
12
|
+
declare function defineParallelPluginImplementation<Options>(plugin: (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>): (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>;
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Context, ParallelPluginImplementation, defineParallelPluginImplementation };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParseResult, ParserOptions } from "./shared/binding.d-DcFBMcjI.cjs";
|
|
2
|
+
import { Program } from "@oxc-project/types";
|
|
3
|
+
|
|
4
|
+
//#region src/parse-ast-index.d.ts
|
|
5
|
+
declare function parseAst(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Program;
|
|
6
|
+
declare function parseAstAsync(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Promise<Program>;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ParseResult, ParserOptions, parseAst, parseAstAsync };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParseResult, ParserOptions } from "./shared/binding.d-Bl5Vi4GH.mjs";
|
|
2
|
+
import { Program } from "@oxc-project/types";
|
|
3
|
+
|
|
4
|
+
//#region src/parse-ast-index.d.ts
|
|
5
|
+
declare function parseAst(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Program;
|
|
6
|
+
declare function parseAstAsync(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Promise<Program>;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ParseResult, ParserOptions, parseAst, parseAstAsync };
|