rolldown 1.0.0-beta.7-commit.a7cf9ac → 1.0.0-beta.7-commit.b80d472
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/cli.cjs +78 -13
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +79 -14
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.d.cts +65 -0
- package/dist/experimental-index.d.mts +65 -0
- package/dist/experimental-index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.d.cts +1 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/parallel-plugin.d.cts +15 -0
- package/dist/parallel-plugin.d.mts +15 -0
- package/dist/parallel-plugin.mjs +0 -1
- package/dist/parse-ast-index.d.cts +9 -0
- package/dist/parse-ast-index.d.mts +9 -0
- package/dist/shared/binding.d-CJ9AePJ7.d.cts +789 -0
- package/dist/shared/binding.d-jRGZ_qiz.d.mts +789 -0
- package/dist/shared/input-options.d-0CaiVwOO.d.cts +1046 -0
- package/dist/shared/input-options.d-6gWWIKa5.d.mts +1046 -0
- package/dist/shared/{src-CY9fSPIv.mjs → src-Cgiazi-7.mjs} +71 -4
- package/dist/shared/{src-B6DuetJS.cjs → src-DiHrbNiz.cjs} +67 -4
- package/package.json +16 -20
- package/dist/tsconfig.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 -15
- 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 -1507
- package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
- package/dist/types/builtin-plugin/constructors.d.ts +0 -23
- package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -27
- 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 -16
- package/dist/types/cli/arguments/utils.d.ts +0 -8
- 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 -31
- 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 -185
- 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 -17
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
- package/dist/types/plugin/hook-filter.d.ts +0 -49
- package/dist/types/plugin/index.d.ts +0 -141
- package/dist/types/plugin/minimal-plugin-context.d.ts +0 -24
- 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 -22
- package/dist/types/plugin/plugin-context.d.ts +0 -67
- package/dist/types/plugin/plugin-driver.d.ts +0 -10
- package/dist/types/plugin/transform-plugin-context.d.ts +0 -28
- package/dist/types/plugin/with-filter.d.ts +0 -10
- 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/types.d.ts +0 -7
- 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 -9
- 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 -17
- package/dist/types/utils/misc.d.ts +0 -7
- 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
|
@@ -8,7 +8,7 @@ import { availableParallelism } from "node:os";
|
|
|
8
8
|
import { Worker } from "node:worker_threads";
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.7-commit.
|
|
11
|
+
var version = "1.0.0-beta.7-commit.b80d472";
|
|
12
12
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -706,9 +706,10 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
|
706
706
|
dropLabels: v.pipe(v.optional(v.array(v.string())), v.description("Remove labeled statements with these label names")),
|
|
707
707
|
checks: v.optional(ChecksOptionsSchema),
|
|
708
708
|
keepNames: v.pipe(v.optional(v.boolean()), v.description("Keep function/class name")),
|
|
709
|
-
debug: v.pipe(v.optional(v.object({
|
|
709
|
+
debug: v.pipe(v.optional(v.object({ sessionId: v.pipe(v.optional(v.string()), v.description("Used to name the build.")) })), v.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
|
|
710
710
|
});
|
|
711
711
|
InputCliOverrideSchema = v.strictObject({
|
|
712
|
+
input: v.pipe(v.optional(v.array(v.string())), v.description("Entry file")),
|
|
712
713
|
external: v.pipe(v.optional(v.array(v.string())), v.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
713
714
|
inject: v.pipe(v.optional(v.record(v.string(), v.string())), v.description("Inject import statements on demand")),
|
|
714
715
|
treeshake: v.pipe(v.optional(v.boolean()), v.description("enable treeshaking")),
|
|
@@ -718,7 +719,6 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
|
718
719
|
...InputOptionsSchema.entries,
|
|
719
720
|
...InputCliOverrideSchema.entries
|
|
720
721
|
}), [
|
|
721
|
-
"input",
|
|
722
722
|
"plugins",
|
|
723
723
|
"onwarn",
|
|
724
724
|
"onLog",
|
|
@@ -2016,6 +2016,70 @@ var init_bindingify_watch_hooks = __esm({ "src/plugin/bindingify-watch-hooks.ts"
|
|
|
2016
2016
|
init_plugin_context();
|
|
2017
2017
|
} });
|
|
2018
2018
|
|
|
2019
|
+
//#endregion
|
|
2020
|
+
//#region src/plugin/generated/hook-usage.ts
|
|
2021
|
+
function extractHookUsage(plugin) {
|
|
2022
|
+
let hookUsage = new HookUsage();
|
|
2023
|
+
if (plugin.buildStart) hookUsage.union(HookUsageKind.buildStart);
|
|
2024
|
+
if (plugin.resolveId) hookUsage.union(HookUsageKind.resolveId);
|
|
2025
|
+
if (plugin.resolveDynamicImport) hookUsage.union(HookUsageKind.resolveDynamicImport);
|
|
2026
|
+
if (plugin.load) hookUsage.union(HookUsageKind.load);
|
|
2027
|
+
if (plugin.transform) hookUsage.union(HookUsageKind.transform);
|
|
2028
|
+
if (plugin.moduleParsed) hookUsage.union(HookUsageKind.moduleParsed);
|
|
2029
|
+
if (plugin.buildEnd) hookUsage.union(HookUsageKind.buildEnd);
|
|
2030
|
+
if (plugin.renderStart) hookUsage.union(HookUsageKind.renderStart);
|
|
2031
|
+
if (plugin.renderError) hookUsage.union(HookUsageKind.renderError);
|
|
2032
|
+
if (plugin.renderChunk) hookUsage.union(HookUsageKind.renderChunk);
|
|
2033
|
+
if (plugin.augmentChunkHash) hookUsage.union(HookUsageKind.augmentChunkHash);
|
|
2034
|
+
if (plugin.generateBundle) hookUsage.union(HookUsageKind.generateBundle);
|
|
2035
|
+
if (plugin.writeBundle) hookUsage.union(HookUsageKind.writeBundle);
|
|
2036
|
+
if (plugin.closeBundle) hookUsage.union(HookUsageKind.closeBundle);
|
|
2037
|
+
if (plugin.watchChange) hookUsage.union(HookUsageKind.watchChange);
|
|
2038
|
+
if (plugin.closeWatcher) hookUsage.union(HookUsageKind.closeWatcher);
|
|
2039
|
+
if (plugin.banner) hookUsage.union(HookUsageKind.banner);
|
|
2040
|
+
if (plugin.footer) hookUsage.union(HookUsageKind.footer);
|
|
2041
|
+
if (plugin.intro) hookUsage.union(HookUsageKind.intro);
|
|
2042
|
+
if (plugin.outro) hookUsage.union(HookUsageKind.outro);
|
|
2043
|
+
return hookUsage;
|
|
2044
|
+
}
|
|
2045
|
+
var HookUsageKind, HookUsage;
|
|
2046
|
+
var init_hook_usage = __esm({ "src/plugin/generated/hook-usage.ts"() {
|
|
2047
|
+
HookUsageKind = /* @__PURE__ */ function(HookUsageKind$1) {
|
|
2048
|
+
HookUsageKind$1[HookUsageKind$1["buildStart"] = 1] = "buildStart";
|
|
2049
|
+
HookUsageKind$1[HookUsageKind$1["resolveId"] = 2] = "resolveId";
|
|
2050
|
+
HookUsageKind$1[HookUsageKind$1["resolveDynamicImport"] = 4] = "resolveDynamicImport";
|
|
2051
|
+
HookUsageKind$1[HookUsageKind$1["load"] = 8] = "load";
|
|
2052
|
+
HookUsageKind$1[HookUsageKind$1["transform"] = 16] = "transform";
|
|
2053
|
+
HookUsageKind$1[HookUsageKind$1["moduleParsed"] = 32] = "moduleParsed";
|
|
2054
|
+
HookUsageKind$1[HookUsageKind$1["buildEnd"] = 64] = "buildEnd";
|
|
2055
|
+
HookUsageKind$1[HookUsageKind$1["renderStart"] = 128] = "renderStart";
|
|
2056
|
+
HookUsageKind$1[HookUsageKind$1["renderError"] = 256] = "renderError";
|
|
2057
|
+
HookUsageKind$1[HookUsageKind$1["renderChunk"] = 512] = "renderChunk";
|
|
2058
|
+
HookUsageKind$1[HookUsageKind$1["augmentChunkHash"] = 1024] = "augmentChunkHash";
|
|
2059
|
+
HookUsageKind$1[HookUsageKind$1["generateBundle"] = 2048] = "generateBundle";
|
|
2060
|
+
HookUsageKind$1[HookUsageKind$1["writeBundle"] = 4096] = "writeBundle";
|
|
2061
|
+
HookUsageKind$1[HookUsageKind$1["closeBundle"] = 8192] = "closeBundle";
|
|
2062
|
+
HookUsageKind$1[HookUsageKind$1["watchChange"] = 16384] = "watchChange";
|
|
2063
|
+
HookUsageKind$1[HookUsageKind$1["closeWatcher"] = 32768] = "closeWatcher";
|
|
2064
|
+
HookUsageKind$1[HookUsageKind$1["transformAst"] = 65536] = "transformAst";
|
|
2065
|
+
HookUsageKind$1[HookUsageKind$1["banner"] = 131072] = "banner";
|
|
2066
|
+
HookUsageKind$1[HookUsageKind$1["footer"] = 262144] = "footer";
|
|
2067
|
+
HookUsageKind$1[HookUsageKind$1["intro"] = 524288] = "intro";
|
|
2068
|
+
HookUsageKind$1[HookUsageKind$1["outro"] = 1048576] = "outro";
|
|
2069
|
+
return HookUsageKind$1;
|
|
2070
|
+
}({});
|
|
2071
|
+
HookUsage = class {
|
|
2072
|
+
bitflag = BigInt(0);
|
|
2073
|
+
constructor() {}
|
|
2074
|
+
union(kind) {
|
|
2075
|
+
this.bitflag |= BigInt(kind);
|
|
2076
|
+
}
|
|
2077
|
+
inner() {
|
|
2078
|
+
return Number(this.bitflag);
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
} });
|
|
2082
|
+
|
|
2019
2083
|
//#endregion
|
|
2020
2084
|
//#region src/plugin/bindingify-plugin.ts
|
|
2021
2085
|
function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode) {
|
|
@@ -2049,6 +2113,7 @@ function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, nor
|
|
|
2049
2113
|
const { plugin: outro, meta: outroMeta } = bindingifyOutro(args);
|
|
2050
2114
|
const { plugin: watchChange, meta: watchChangeMeta } = bindingifyWatchChange(args);
|
|
2051
2115
|
const { plugin: closeWatcher, meta: closeWatcherMeta } = bindingifyCloseWatcher(args);
|
|
2116
|
+
let hookUsage = extractHookUsage(plugin).inner();
|
|
2052
2117
|
const result = {
|
|
2053
2118
|
name: plugin.name,
|
|
2054
2119
|
buildStart,
|
|
@@ -2093,7 +2158,8 @@ function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, nor
|
|
|
2093
2158
|
watchChange,
|
|
2094
2159
|
watchChangeMeta,
|
|
2095
2160
|
closeWatcher,
|
|
2096
|
-
closeWatcherMeta
|
|
2161
|
+
closeWatcherMeta,
|
|
2162
|
+
hookUsage
|
|
2097
2163
|
};
|
|
2098
2164
|
return wrapHandlers(result);
|
|
2099
2165
|
}
|
|
@@ -2139,6 +2205,7 @@ var init_bindingify_plugin = __esm({ "src/plugin/bindingify-plugin.ts"() {
|
|
|
2139
2205
|
init_bindingify_output_hooks();
|
|
2140
2206
|
init_logs();
|
|
2141
2207
|
init_bindingify_watch_hooks();
|
|
2208
|
+
init_hook_usage();
|
|
2142
2209
|
} });
|
|
2143
2210
|
|
|
2144
2211
|
//#endregion
|
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.7-commit.
|
|
12
|
+
var version = "1.0.0-beta.7-commit.b80d472";
|
|
13
13
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -613,9 +613,10 @@ const InputOptionsSchema = valibot.strictObject({
|
|
|
613
613
|
dropLabels: valibot.pipe(valibot.optional(valibot.array(valibot.string())), valibot.description("Remove labeled statements with these label names")),
|
|
614
614
|
checks: valibot.optional(ChecksOptionsSchema),
|
|
615
615
|
keepNames: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Keep function/class name")),
|
|
616
|
-
debug: valibot.pipe(valibot.optional(valibot.object({
|
|
616
|
+
debug: valibot.pipe(valibot.optional(valibot.object({ sessionId: valibot.pipe(valibot.optional(valibot.string()), valibot.description("Used to name the build.")) })), valibot.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
|
|
617
617
|
});
|
|
618
618
|
const InputCliOverrideSchema = valibot.strictObject({
|
|
619
|
+
input: valibot.pipe(valibot.optional(valibot.array(valibot.string())), valibot.description("Entry file")),
|
|
619
620
|
external: valibot.pipe(valibot.optional(valibot.array(valibot.string())), valibot.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
620
621
|
inject: valibot.pipe(valibot.optional(valibot.record(valibot.string(), valibot.string())), valibot.description("Inject import statements on demand")),
|
|
621
622
|
treeshake: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("enable treeshaking")),
|
|
@@ -625,7 +626,6 @@ const InputCliOptionsSchema = valibot.omit(valibot.strictObject({
|
|
|
625
626
|
...InputOptionsSchema.entries,
|
|
626
627
|
...InputCliOverrideSchema.entries
|
|
627
628
|
}), [
|
|
628
|
-
"input",
|
|
629
629
|
"plugins",
|
|
630
630
|
"onwarn",
|
|
631
631
|
"onLog",
|
|
@@ -1872,6 +1872,67 @@ function bindingifyCloseWatcher(args) {
|
|
|
1872
1872
|
};
|
|
1873
1873
|
}
|
|
1874
1874
|
|
|
1875
|
+
//#endregion
|
|
1876
|
+
//#region src/plugin/generated/hook-usage.ts
|
|
1877
|
+
let HookUsageKind = /* @__PURE__ */ function(HookUsageKind$1) {
|
|
1878
|
+
HookUsageKind$1[HookUsageKind$1["buildStart"] = 1] = "buildStart";
|
|
1879
|
+
HookUsageKind$1[HookUsageKind$1["resolveId"] = 2] = "resolveId";
|
|
1880
|
+
HookUsageKind$1[HookUsageKind$1["resolveDynamicImport"] = 4] = "resolveDynamicImport";
|
|
1881
|
+
HookUsageKind$1[HookUsageKind$1["load"] = 8] = "load";
|
|
1882
|
+
HookUsageKind$1[HookUsageKind$1["transform"] = 16] = "transform";
|
|
1883
|
+
HookUsageKind$1[HookUsageKind$1["moduleParsed"] = 32] = "moduleParsed";
|
|
1884
|
+
HookUsageKind$1[HookUsageKind$1["buildEnd"] = 64] = "buildEnd";
|
|
1885
|
+
HookUsageKind$1[HookUsageKind$1["renderStart"] = 128] = "renderStart";
|
|
1886
|
+
HookUsageKind$1[HookUsageKind$1["renderError"] = 256] = "renderError";
|
|
1887
|
+
HookUsageKind$1[HookUsageKind$1["renderChunk"] = 512] = "renderChunk";
|
|
1888
|
+
HookUsageKind$1[HookUsageKind$1["augmentChunkHash"] = 1024] = "augmentChunkHash";
|
|
1889
|
+
HookUsageKind$1[HookUsageKind$1["generateBundle"] = 2048] = "generateBundle";
|
|
1890
|
+
HookUsageKind$1[HookUsageKind$1["writeBundle"] = 4096] = "writeBundle";
|
|
1891
|
+
HookUsageKind$1[HookUsageKind$1["closeBundle"] = 8192] = "closeBundle";
|
|
1892
|
+
HookUsageKind$1[HookUsageKind$1["watchChange"] = 16384] = "watchChange";
|
|
1893
|
+
HookUsageKind$1[HookUsageKind$1["closeWatcher"] = 32768] = "closeWatcher";
|
|
1894
|
+
HookUsageKind$1[HookUsageKind$1["transformAst"] = 65536] = "transformAst";
|
|
1895
|
+
HookUsageKind$1[HookUsageKind$1["banner"] = 131072] = "banner";
|
|
1896
|
+
HookUsageKind$1[HookUsageKind$1["footer"] = 262144] = "footer";
|
|
1897
|
+
HookUsageKind$1[HookUsageKind$1["intro"] = 524288] = "intro";
|
|
1898
|
+
HookUsageKind$1[HookUsageKind$1["outro"] = 1048576] = "outro";
|
|
1899
|
+
return HookUsageKind$1;
|
|
1900
|
+
}({});
|
|
1901
|
+
var HookUsage = class {
|
|
1902
|
+
bitflag = BigInt(0);
|
|
1903
|
+
constructor() {}
|
|
1904
|
+
union(kind) {
|
|
1905
|
+
this.bitflag |= BigInt(kind);
|
|
1906
|
+
}
|
|
1907
|
+
inner() {
|
|
1908
|
+
return Number(this.bitflag);
|
|
1909
|
+
}
|
|
1910
|
+
};
|
|
1911
|
+
function extractHookUsage(plugin) {
|
|
1912
|
+
let hookUsage = new HookUsage();
|
|
1913
|
+
if (plugin.buildStart) hookUsage.union(HookUsageKind.buildStart);
|
|
1914
|
+
if (plugin.resolveId) hookUsage.union(HookUsageKind.resolveId);
|
|
1915
|
+
if (plugin.resolveDynamicImport) hookUsage.union(HookUsageKind.resolveDynamicImport);
|
|
1916
|
+
if (plugin.load) hookUsage.union(HookUsageKind.load);
|
|
1917
|
+
if (plugin.transform) hookUsage.union(HookUsageKind.transform);
|
|
1918
|
+
if (plugin.moduleParsed) hookUsage.union(HookUsageKind.moduleParsed);
|
|
1919
|
+
if (plugin.buildEnd) hookUsage.union(HookUsageKind.buildEnd);
|
|
1920
|
+
if (plugin.renderStart) hookUsage.union(HookUsageKind.renderStart);
|
|
1921
|
+
if (plugin.renderError) hookUsage.union(HookUsageKind.renderError);
|
|
1922
|
+
if (plugin.renderChunk) hookUsage.union(HookUsageKind.renderChunk);
|
|
1923
|
+
if (plugin.augmentChunkHash) hookUsage.union(HookUsageKind.augmentChunkHash);
|
|
1924
|
+
if (plugin.generateBundle) hookUsage.union(HookUsageKind.generateBundle);
|
|
1925
|
+
if (plugin.writeBundle) hookUsage.union(HookUsageKind.writeBundle);
|
|
1926
|
+
if (plugin.closeBundle) hookUsage.union(HookUsageKind.closeBundle);
|
|
1927
|
+
if (plugin.watchChange) hookUsage.union(HookUsageKind.watchChange);
|
|
1928
|
+
if (plugin.closeWatcher) hookUsage.union(HookUsageKind.closeWatcher);
|
|
1929
|
+
if (plugin.banner) hookUsage.union(HookUsageKind.banner);
|
|
1930
|
+
if (plugin.footer) hookUsage.union(HookUsageKind.footer);
|
|
1931
|
+
if (plugin.intro) hookUsage.union(HookUsageKind.intro);
|
|
1932
|
+
if (plugin.outro) hookUsage.union(HookUsageKind.outro);
|
|
1933
|
+
return hookUsage;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1875
1936
|
//#endregion
|
|
1876
1937
|
//#region src/plugin/bindingify-plugin.ts
|
|
1877
1938
|
function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode) {
|
|
@@ -1905,6 +1966,7 @@ function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, nor
|
|
|
1905
1966
|
const { plugin: outro, meta: outroMeta } = bindingifyOutro(args);
|
|
1906
1967
|
const { plugin: watchChange, meta: watchChangeMeta } = bindingifyWatchChange(args);
|
|
1907
1968
|
const { plugin: closeWatcher, meta: closeWatcherMeta } = bindingifyCloseWatcher(args);
|
|
1969
|
+
let hookUsage = extractHookUsage(plugin).inner();
|
|
1908
1970
|
const result = {
|
|
1909
1971
|
name: plugin.name,
|
|
1910
1972
|
buildStart,
|
|
@@ -1949,7 +2011,8 @@ function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, nor
|
|
|
1949
2011
|
watchChange,
|
|
1950
2012
|
watchChangeMeta,
|
|
1951
2013
|
closeWatcher,
|
|
1952
|
-
closeWatcherMeta
|
|
2014
|
+
closeWatcherMeta,
|
|
2015
|
+
hookUsage
|
|
1953
2016
|
};
|
|
1954
2017
|
return wrapHandlers(result);
|
|
1955
2018
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "1.0.0-beta.7-commit.
|
|
3
|
+
"version": "1.0.0-beta.7-commit.b80d472",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"homepage": "https://rolldown.rs/",
|
|
@@ -28,25 +28,21 @@
|
|
|
28
28
|
"rolldown": "./bin/cli.mjs"
|
|
29
29
|
},
|
|
30
30
|
"main": "./dist/index.cjs",
|
|
31
|
-
"types": "./dist/
|
|
31
|
+
"types": "./dist/index.d.cts",
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
|
-
"types": "./dist/types/index.d.ts",
|
|
35
34
|
"require": "./dist/index.cjs",
|
|
36
35
|
"import": "./dist/index.mjs"
|
|
37
36
|
},
|
|
38
37
|
"./experimental": {
|
|
39
|
-
"types": "./dist/types/experimental-index.d.ts",
|
|
40
38
|
"require": "./dist/experimental-index.cjs",
|
|
41
39
|
"import": "./dist/experimental-index.mjs"
|
|
42
40
|
},
|
|
43
41
|
"./parallel-plugin": {
|
|
44
|
-
"types": "./dist/types/parallel-plugin.d.ts",
|
|
45
42
|
"require": "./dist/parallel-plugin.cjs",
|
|
46
43
|
"import": "./dist/parallel-plugin.mjs"
|
|
47
44
|
},
|
|
48
45
|
"./parseAst": {
|
|
49
|
-
"types": "./dist/types/parse-ast-index.d.ts",
|
|
50
46
|
"require": "./dist/parse-ast-index.cjs",
|
|
51
47
|
"import": "./dist/parse-ast-index.mjs"
|
|
52
48
|
},
|
|
@@ -114,6 +110,7 @@
|
|
|
114
110
|
"oxc-parser": "^0.64.0",
|
|
115
111
|
"pathe": "^2.0.3",
|
|
116
112
|
"remeda": "^2.10.0",
|
|
113
|
+
"rolldown-plugin-dts": "^0.7.12",
|
|
117
114
|
"rollup": "^4.18.0",
|
|
118
115
|
"signal-exit": "4.1.0",
|
|
119
116
|
"source-map": "^0.7.4",
|
|
@@ -123,21 +120,21 @@
|
|
|
123
120
|
"typescript": "^5.7.3",
|
|
124
121
|
"unbuild": "^3.0.0",
|
|
125
122
|
"@rolldown/testing": "0.0.1",
|
|
126
|
-
"rolldown": "1.0.0-beta.7-commit.
|
|
123
|
+
"rolldown": "1.0.0-beta.7-commit.b80d472"
|
|
127
124
|
},
|
|
128
125
|
"optionalDependencies": {
|
|
129
|
-
"@rolldown/binding-darwin-arm64": "1.0.0-beta.7-commit.
|
|
130
|
-
"@rolldown/binding-darwin-x64": "1.0.0-beta.7-commit.
|
|
131
|
-
"@rolldown/binding-
|
|
132
|
-
"@rolldown/binding-linux-
|
|
133
|
-
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7-commit.
|
|
134
|
-
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7-commit.
|
|
135
|
-
"@rolldown/binding-
|
|
136
|
-
"@rolldown/binding-
|
|
137
|
-
"@rolldown/binding-
|
|
138
|
-
"@rolldown/binding-win32-
|
|
139
|
-
"@rolldown/binding-
|
|
140
|
-
"@rolldown/binding-
|
|
126
|
+
"@rolldown/binding-darwin-arm64": "1.0.0-beta.7-commit.b80d472",
|
|
127
|
+
"@rolldown/binding-darwin-x64": "1.0.0-beta.7-commit.b80d472",
|
|
128
|
+
"@rolldown/binding-freebsd-x64": "1.0.0-beta.7-commit.b80d472",
|
|
129
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.7-commit.b80d472",
|
|
130
|
+
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7-commit.b80d472",
|
|
131
|
+
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7-commit.b80d472",
|
|
132
|
+
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.7-commit.b80d472",
|
|
133
|
+
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.7-commit.b80d472",
|
|
134
|
+
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.7-commit.b80d472",
|
|
135
|
+
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.7-commit.b80d472",
|
|
136
|
+
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.7-commit.b80d472",
|
|
137
|
+
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.7-commit.b80d472"
|
|
141
138
|
},
|
|
142
139
|
"scripts": {
|
|
143
140
|
"# Scrips for binding #": "_",
|
|
@@ -147,7 +144,6 @@
|
|
|
147
144
|
"build-binding:wasi": "pnpm build-binding --target wasm32-wasip1-threads",
|
|
148
145
|
"build-binding:wasi:release": "pnpm build-binding --profile release-wasi --target wasm32-wasip1-threads",
|
|
149
146
|
"# Scrips for node #": "_",
|
|
150
|
-
"build-types": "tsc -p ./tsconfig.json",
|
|
151
147
|
"build-node": "tsx ./build.ts",
|
|
152
148
|
"build-types-check": "tsc -p ./tsconfig.check.json",
|
|
153
149
|
"build-js-glue": "pnpm run --sequential \"/^build-(types|node|types-check)$/\"",
|