rolldown 1.2.0 → 1.2.1

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.
Files changed (42) hide show
  1. package/THIRD-PARTY-LICENSE +33 -0
  2. package/dist/cli.mjs +9 -10
  3. package/dist/config.d.mts +1 -1
  4. package/dist/config.mjs +2 -2
  5. package/dist/experimental-default-runtime.mjs +116 -0
  6. package/dist/experimental-index.d.mts +10 -4
  7. package/dist/experimental-index.mjs +32 -16
  8. package/dist/experimental-runtime-base.mjs +95 -0
  9. package/dist/experimental-runtime.d.ts +177 -0
  10. package/dist/experimental-runtime.mjs +257 -0
  11. package/dist/filter-index.d.mts +1 -1
  12. package/dist/filter-index.mjs +1 -3
  13. package/dist/index.d.mts +3 -3
  14. package/dist/index.mjs +4 -4
  15. package/dist/parallel-plugin-worker.mjs +2 -2
  16. package/dist/parallel-plugin.d.mts +1 -1
  17. package/dist/parse-ast-index.d.mts +1 -1
  18. package/dist/parse-ast-index.mjs +2 -2
  19. package/dist/plugins-index.d.mts +3 -3
  20. package/dist/plugins-index.mjs +2 -2
  21. package/dist/shared/{binding-Dbbi0RbO.d.mts → binding-CVtkJvyl.d.mts} +11 -0
  22. package/dist/shared/{binding-Dby9rwGk.mjs → binding-Cv62mM1i.mjs} +124 -50
  23. package/dist/shared/{bindingify-input-options-_ppP73I9.mjs → bindingify-input-options-EnUlEF0T.mjs} +209 -252
  24. package/dist/shared/{constructors-CSWbNgBZ.d.mts → constructors-ALilxAii.d.mts} +2 -2
  25. package/dist/shared/{constructors-CuGa75s-.mjs → constructors-CuqzPFxJ.mjs} +10 -6
  26. package/dist/shared/{rolldown-build-CdF8HAHX.mjs → create-bundler-option-4QtiLLuz.mjs} +39 -156
  27. package/dist/shared/{define-config-B-IDOhDz.d.mts → define-config-DSMNXceb.d.mts} +85 -22
  28. package/dist/shared/{error-DFGNOCle.mjs → error-BgfXq0Tb.mjs} +1 -1
  29. package/dist/shared/{load-config-C6UyiS41.mjs → load-config-DsMzOVzu.mjs} +2 -2
  30. package/dist/shared/{logs-ZGEh6uhb.mjs → logs-DmYCAKcW.mjs} +8 -1
  31. package/dist/shared/{misc-CoQm4NHO.mjs → misc-DOSKtd97.mjs} +9 -1
  32. package/dist/shared/{normalize-string-or-regex-SiXbePVH.mjs → normalize-string-or-regex-BVNGzRe4.mjs} +2 -2
  33. package/dist/shared/{parse-BFj5G_7i.mjs → parse-DQIYJwT4.mjs} +2 -2
  34. package/dist/shared/{prompt--dNycKSZ.mjs → prompt-CH6TK0bC.mjs} +2 -6
  35. package/dist/shared/{resolve-tsconfig-2TXRF_zr.mjs → resolve-tsconfig-CQndqeLj.mjs} +2 -2
  36. package/dist/shared/rolldown-DP_p9pd3.mjs +178 -0
  37. package/dist/shared/{transform-Cs2bUDRH.d.mts → transform-WmU_cI8e.d.mts} +1 -1
  38. package/dist/shared/{watch-WnrlHRS0.mjs → watch-Cwq-cFUy.mjs} +16 -13
  39. package/dist/utils-index.d.mts +3 -3
  40. package/dist/utils-index.mjs +6 -8
  41. package/package.json +31 -24
  42. package/dist/shared/rolldown-951h_1lf.mjs +0 -40
@@ -1,5 +1,5 @@
1
- import { C as BindingViteJsonPluginConfig, D as BindingViteReporterPluginConfig, E as BindingViteReactRefreshWrapperPluginConfig, O as BindingViteResolvePluginConfig, S as BindingViteImportGlobPluginConfig, T as BindingViteModulePreloadPolyfillPluginConfig, b as BindingViteBuildImportAnalysisPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, x as BindingViteDynamicImportVarsPluginConfig } from "./binding-Dbbi0RbO.mjs";
2
- import { F as BuiltinPlugin, Wt as StringOrRegExp } from "./define-config-B-IDOhDz.mjs";
1
+ import { C as BindingViteJsonPluginConfig, D as BindingViteReporterPluginConfig, E as BindingViteReactRefreshWrapperPluginConfig, O as BindingViteResolvePluginConfig, S as BindingViteImportGlobPluginConfig, T as BindingViteModulePreloadPolyfillPluginConfig, b as BindingViteBuildImportAnalysisPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, x as BindingViteDynamicImportVarsPluginConfig } from "./binding-CVtkJvyl.mjs";
2
+ import { Gt as StringOrRegExp, I as BuiltinPlugin } from "./define-config-DSMNXceb.mjs";
3
3
  //#region src/builtin-plugin/constructors.d.ts
4
4
  declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
5
5
  type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConfig, "include" | "exclude"> & {
@@ -1,4 +1,4 @@
1
- import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-SiXbePVH.mjs";
1
+ import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-BVNGzRe4.mjs";
2
2
  //#region src/builtin-plugin/constructors.ts
3
3
  function viteModulePreloadPolyfillPlugin(config) {
4
4
  return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
@@ -20,16 +20,18 @@ function viteLoadFallbackPlugin() {
20
20
  return new BuiltinPlugin("builtin:vite-load-fallback");
21
21
  }
22
22
  function viteJsonPlugin(config) {
23
- return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-json", config));
23
+ const builtinPlugin = new BuiltinPlugin("builtin:vite-json", config);
24
+ return makeBuiltinPluginCallable(builtinPlugin);
24
25
  }
25
26
  function viteBuildImportAnalysisPlugin(config) {
26
27
  return new BuiltinPlugin("builtin:vite-build-import-analysis", config);
27
28
  }
28
29
  function viteResolvePlugin(config) {
29
- return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-resolve", {
30
+ const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", {
30
31
  ...config,
31
32
  yarnPnp: typeof process === "object" && !!process.versions?.pnp
32
- }));
33
+ });
34
+ return makeBuiltinPluginCallable(builtinPlugin);
33
35
  }
34
36
  function isolatedDeclarationPlugin(config) {
35
37
  return new BuiltinPlugin("builtin:isolated-declaration", config);
@@ -52,14 +54,16 @@ function esmExternalRequirePlugin(config) {
52
54
  * This plugin should not be used for Rolldown.
53
55
  */
54
56
  function oxcRuntimePlugin() {
55
- return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:oxc-runtime"));
57
+ const builtinPlugin = new BuiltinPlugin("builtin:oxc-runtime");
58
+ return makeBuiltinPluginCallable(builtinPlugin);
56
59
  }
57
60
  function viteReactRefreshWrapperPlugin(config) {
58
61
  if (config) {
59
62
  config.include = normalizedStringOrRegex(config.include);
60
63
  config.exclude = normalizedStringOrRegex(config.exclude);
61
64
  }
62
- return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
65
+ const builtinPlugin = new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config);
66
+ return makeBuiltinPluginCallable(builtinPlugin);
63
67
  }
64
68
  //#endregion
65
69
  export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWebWorkerPostPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
@@ -1,9 +1,8 @@
1
- import { n as __toESM, t as require_binding } from "./binding-Dby9rwGk.mjs";
2
- import { i as logInputHookInOutputPlugin, n as error } from "./logs-ZGEh6uhb.mjs";
3
- import { n as BuiltinPlugin } from "./normalize-string-or-regex-SiXbePVH.mjs";
4
- import { a as transformModuleInfo, b as VERSION, c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as PluginContextData, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, y as logLevelPriority } from "./bindingify-input-options-_ppP73I9.mjs";
5
- import { i as unimplemented } from "./misc-CoQm4NHO.mjs";
6
- import { i as unwrapBindingResult } from "./error-DFGNOCle.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-Cv62mM1i.mjs";
2
+ import { a as logInputHookInOutputPlugin, n as error } from "./logs-DmYCAKcW.mjs";
3
+ import { n as BuiltinPlugin } from "./normalize-string-or-regex-BVNGzRe4.mjs";
4
+ import { a as transformModuleInfo, b as logLevelPriority, f as MinimalPluginContextImpl, g as LOG_LEVEL_DEBUG, h as normalizeLog, i as PluginContextData, l as transformAssetSource, m as normalizeHook, p as getParallelPluginInfo, s as transformRenderedChunk, t as bindingifyInputOptions, x as VERSION, y as LOG_LEVEL_WARN } from "./bindingify-input-options-EnUlEF0T.mjs";
5
+ import { a as unimplemented } from "./misc-DOSKtd97.mjs";
7
6
  import { Worker } from "node:worker_threads";
8
7
  import path, { sep } from "node:path";
9
8
  import { formatWithOptions, styleText } from "node:util";
@@ -11,7 +10,6 @@ import g$1 from "node:process";
11
10
  import * as tty from "node:tty";
12
11
  import os from "node:os";
13
12
  //#region src/log/logger.ts
14
- var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
15
13
  function getLogger(plugins, onLog, logLevel, watchMode) {
16
14
  const minimalPriority = logLevelPriority[logLevel];
17
15
  const logger = (level, log, skipped = /* @__PURE__ */ new Set()) => {
@@ -106,7 +104,8 @@ const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES = [
106
104
  "renderStart",
107
105
  "renderError",
108
106
  "writeBundle",
109
- "generateBundle"
107
+ "generateBundle",
108
+ "resolveFileUrl"
110
109
  ];
111
110
  const ENUMERATED_PLUGIN_HOOK_NAMES = [
112
111
  ...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES,
@@ -116,7 +115,15 @@ const ENUMERATED_PLUGIN_HOOK_NAMES = [
116
115
  "intro",
117
116
  "outro"
118
117
  ];
119
- ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[22];
118
+ ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[23], ENUMERATED_PLUGIN_HOOK_NAMES[23];
119
+ //#endregion
120
+ //#region src/plugin/internal-hooks.ts
121
+ /**
122
+ * Names of the hidden hooks, alongside {@linkcode InternalFunctionPluginHooks}.
123
+ * Kept separate from `ENUMERATED_INPUT_PLUGIN_HOOK_NAMES` so the names stay out
124
+ * of the published `.d.ts` (that list's type is reachable from public types).
125
+ */
126
+ const INTERNAL_PLUGIN_HOOK_NAMES = ["hotUpdate"];
120
127
  //#endregion
121
128
  //#region src/utils/async-flatten.ts
122
129
  async function asyncFlatten(array) {
@@ -129,7 +136,7 @@ async function asyncFlatten(array) {
129
136
  //#region src/utils/normalize-plugin-option.ts
130
137
  const normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
131
138
  function checkOutputPluginOption(plugins, onLog) {
132
- for (const plugin of plugins) for (const hook of ENUMERATED_INPUT_PLUGIN_HOOK_NAMES) if (hook in plugin) {
139
+ for (const plugin of plugins) for (const hook of [...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ...INTERNAL_PLUGIN_HOOK_NAMES]) if (hook in plugin) {
133
140
  delete plugin[hook];
134
141
  onLog(LOG_LEVEL_WARN, logInputHookInOutputPlugin(plugin.name, hook));
135
142
  }
@@ -137,9 +144,10 @@ function checkOutputPluginOption(plugins, onLog) {
137
144
  }
138
145
  function normalizePlugins(plugins, anonymousPrefix) {
139
146
  for (const [index, plugin] of plugins.entries()) {
140
- if ("_parallel" in plugin) continue;
147
+ if (getParallelPluginInfo(plugin)) continue;
141
148
  if (plugin instanceof BuiltinPlugin) continue;
142
- if (!plugin.name) plugin.name = `${anonymousPrefix}${index + 1}`;
149
+ const objectPlugin = plugin;
150
+ if (!objectPlugin.name) objectPlugin.name = `${anonymousPrefix}${index + 1}`;
143
151
  }
144
152
  return plugins;
145
153
  }
@@ -180,7 +188,7 @@ var PluginDriver = class {
180
188
  function getObjectPlugins(plugins) {
181
189
  return plugins.filter((plugin) => {
182
190
  if (!plugin) return;
183
- if ("_parallel" in plugin) return;
191
+ if (getParallelPluginInfo(plugin)) return;
184
192
  if (plugin instanceof BuiltinPlugin) return;
185
193
  return plugin;
186
194
  });
@@ -1604,6 +1612,7 @@ const DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PU
1604
1612
  port: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1605
1613
  host: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1606
1614
  implement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1615
+ skipCommonRuntimeInjection: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1607
1616
  lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1608
1617
  })]);
1609
1618
  const InputOptionsSchema = /* @__PURE__ */ strictObject({
@@ -1805,7 +1814,7 @@ const OutputOptionsSchema = /* @__PURE__ */ strictObject({
1805
1814
  topLevelVar: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Rewrite top-level declarations to use `var`.")),
1806
1815
  cleanDir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Clean output directory before emitting output")),
1807
1816
  keepNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Keep function and class names after bundling")),
1808
- strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Lets modules be executed in the order they are declared.")),
1817
+ strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Preserve source module execution order across generated chunks.")),
1809
1818
  strict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("auto")])), /* @__PURE__ */ description("Whether to always output `\"use strict\"` directive in non-ES module outputs."))
1810
1819
  });
1811
1820
  const getAddonDescription = (placement, wrapper) => {
@@ -1897,30 +1906,6 @@ function getCliSchemaInfo() {
1897
1906
  return flattenValibotSchema(CliOptionsSchema);
1898
1907
  }
1899
1908
  //#endregion
1900
- //#region src/types/rolldown-output-impl.ts
1901
- var RolldownOutputImpl = class extends PlainObjectLike {
1902
- bindingOutputs;
1903
- constructor(bindingOutputs) {
1904
- super();
1905
- this.bindingOutputs = bindingOutputs;
1906
- }
1907
- get output() {
1908
- return transformToRollupOutput(this.bindingOutputs).output;
1909
- }
1910
- __rolldown_external_memory_handle__(keepDataAlive) {
1911
- const results = this.output.map((item) => item.__rolldown_external_memory_handle__(keepDataAlive));
1912
- if (!results.every((r) => r.freed)) {
1913
- const reasons = results.filter((r) => !r.freed).map((r) => r.reason).filter(Boolean);
1914
- return {
1915
- freed: false,
1916
- reason: `Failed to free ${reasons.length} item(s): ${reasons.join("; ")}`
1917
- };
1918
- }
1919
- return { freed: true };
1920
- }
1921
- };
1922
- __decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
1923
- //#endregion
1924
1909
  //#region src/types/chunking-context.ts
1925
1910
  var ChunkingContextImpl = class {
1926
1911
  context;
@@ -2348,10 +2333,11 @@ ${indent}`);
2348
2333
  return causedPrefix + message + "\n" + stack + causedError;
2349
2334
  }
2350
2335
  formatArgs(args, opts) {
2351
- return formatWithOptions(opts, ...args.map((arg) => {
2336
+ const _args = args.map((arg) => {
2352
2337
  if (arg && typeof arg.stack === "string") return this.formatError(arg, opts);
2353
2338
  return arg;
2354
- }));
2339
+ });
2340
+ return formatWithOptions(opts, ..._args);
2355
2341
  }
2356
2342
  formatDate(date, opts) {
2357
2343
  return opts.date ? date.toLocaleTimeString() : "";
@@ -2887,7 +2873,7 @@ function createConsola(options = {}) {
2887
2873
  defaults: { level },
2888
2874
  stdout: process.stdout,
2889
2875
  stderr: process.stderr,
2890
- prompt: (...args) => import("./prompt--dNycKSZ.mjs").then((m) => m.prompt(...args)),
2876
+ prompt: (...args) => import("./prompt-CH6TK0bC.mjs").then((m) => m.prompt(...args)),
2891
2877
  reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
2892
2878
  ...options
2893
2879
  });
@@ -3083,15 +3069,19 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
3083
3069
  }
3084
3070
  //#endregion
3085
3071
  //#region src/utils/initialize-parallel-plugins.ts
3072
+ var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
3086
3073
  async function initializeParallelPlugins(plugins) {
3087
3074
  const pluginInfos = [];
3088
- for (const [index, plugin] of plugins.entries()) if ("_parallel" in plugin) {
3089
- const { fileUrl, options } = plugin._parallel;
3090
- pluginInfos.push({
3091
- index,
3092
- fileUrl,
3093
- options
3094
- });
3075
+ for (const [index, plugin] of plugins.entries()) {
3076
+ const parallel = getParallelPluginInfo(plugin);
3077
+ if (parallel) {
3078
+ const { fileUrl, options } = parallel;
3079
+ pluginInfos.push({
3080
+ index,
3081
+ fileUrl,
3082
+ options
3083
+ });
3084
+ }
3095
3085
  }
3096
3086
  if (pluginInfos.length <= 0) return;
3097
3087
  const count = availableParallelism();
@@ -3174,111 +3164,4 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
3174
3164
  }
3175
3165
  }
3176
3166
  //#endregion
3177
- //#region src/api/rolldown/rolldown-build.ts
3178
- Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
3179
- /**
3180
- * The bundle object returned by {@linkcode rolldown} function.
3181
- *
3182
- * @category Programmatic APIs
3183
- */
3184
- var RolldownBuild = class RolldownBuild {
3185
- #inputOptions;
3186
- #bundler;
3187
- #stopWorkers;
3188
- /** @internal */
3189
- static asyncRuntimeShutdown = false;
3190
- /** @hidden should not be used directly */
3191
- constructor(inputOptions) {
3192
- this.#inputOptions = inputOptions;
3193
- this.#bundler = new import_binding.BindingBundler();
3194
- }
3195
- /**
3196
- * Whether the bundle has been closed.
3197
- *
3198
- * If the bundle is closed, calling other methods will throw an error.
3199
- */
3200
- get closed() {
3201
- return this.#bundler.closed;
3202
- }
3203
- /**
3204
- * Generate bundles in-memory.
3205
- *
3206
- * If you directly want to write bundles to disk, use the {@linkcode write} method instead.
3207
- *
3208
- * @param outputOptions The output options.
3209
- * @returns The generated bundle.
3210
- * @throws {@linkcode BundleError} When an error occurs during the build.
3211
- */
3212
- async generate(outputOptions = {}) {
3213
- return this.#build(false, outputOptions);
3214
- }
3215
- /**
3216
- * Generate and write bundles to disk.
3217
- *
3218
- * If you want to generate bundles in-memory, use the {@linkcode generate} method instead.
3219
- *
3220
- * @param outputOptions The output options.
3221
- * @returns The generated bundle.
3222
- * @throws {@linkcode BundleError} When an error occurs during the build.
3223
- */
3224
- async write(outputOptions = {}) {
3225
- return this.#build(true, outputOptions);
3226
- }
3227
- /**
3228
- * Close the bundle and free resources.
3229
- *
3230
- * This method should be called even if the {@linkcode generate} method
3231
- * or the {@linkcode write} method threw an error. It should be called
3232
- * even if neither of the methods are called.
3233
- *
3234
- * This method is called automatically when using `using` syntax.
3235
- *
3236
- * @example
3237
- * ```js
3238
- * import { rolldown } from 'rolldown';
3239
- *
3240
- * {
3241
- * using bundle = await rolldown({ input: 'src/main.js' });
3242
- * const output = await bundle.generate({ format: 'esm' });
3243
- * console.log(output);
3244
- * // bundle.close() is called automatically here
3245
- * }
3246
- * ```
3247
- */
3248
- async close() {
3249
- await this.#stopWorkers?.();
3250
- await this.#bundler.close();
3251
- (0, import_binding.shutdownAsyncRuntime)();
3252
- RolldownBuild.asyncRuntimeShutdown = true;
3253
- this.#stopWorkers = void 0;
3254
- }
3255
- /** @hidden documented in close method */
3256
- async [Symbol.asyncDispose]() {
3257
- await this.close();
3258
- }
3259
- /**
3260
- * @experimental
3261
- * @hidden not ready for public usage yet
3262
- */
3263
- get watchFiles() {
3264
- return Promise.resolve(this.#bundler.getWatchFiles());
3265
- }
3266
- async #build(isWrite, outputOptions) {
3267
- validateOption("output", outputOptions);
3268
- await this.#stopWorkers?.();
3269
- const option = await createBundlerOptions(this.#inputOptions, outputOptions, false);
3270
- if (RolldownBuild.asyncRuntimeShutdown) (0, import_binding.startAsyncRuntime)();
3271
- try {
3272
- this.#stopWorkers = option.stopWorkers;
3273
- let output;
3274
- if (isWrite) output = await this.#bundler.write(option.bundlerOptions);
3275
- else output = await this.#bundler.generate(option.bundlerOptions);
3276
- return new RolldownOutputImpl(unwrapBindingResult(output));
3277
- } catch (e) {
3278
- await option.stopWorkers?.();
3279
- throw e;
3280
- }
3281
- }
3282
- };
3283
- //#endregion
3284
- export { getInputCliKeys as a, validateOption as c, getCliSchemaInfo as i, styleText$1 as l, createBundlerOptions as n, getOutputCliKeys as o, logger as r, validateCliOptions as s, RolldownBuild as t, PluginDriver as u };
3167
+ export { getOutputCliKeys as a, styleText$1 as c, getInputCliKeys as i, PluginDriver as l, logger as n, validateCliOptions as o, getCliSchemaInfo as r, validateOption as s, createBundlerOptions as t };
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-xuHO4mAy.mjs";
2
- import { A as BindingWatcherBundler, B as PreRenderedChunk, F as MinifyOptions$1, P as JsxOptions, W as TransformOptions$1, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, f as BindingPluginContextResolveOptions, g as BindingTransformHookExtraArgs, j as ExternalMemoryStatus, m as BindingRenderedChunk, t as BindingBuiltinPluginName, z as ParserOptions } from "./binding-Dbbi0RbO.mjs";
2
+ import { A as BindingWatcherBundler, B as PreRenderedChunk, F as MinifyOptions$1, P as JsxOptions, W as TransformOptions$1, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, f as BindingPluginContextResolveOptions, g as BindingTransformHookExtraArgs, j as ExternalMemoryStatus, m as BindingRenderedChunk, t as BindingBuiltinPluginName, z as ParserOptions } from "./binding-CVtkJvyl.mjs";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
  import { Program } from "@oxc-project/types";
5
5
  //#region src/types/misc.d.ts
@@ -330,9 +330,9 @@ type ManualChunksFunction = (moduleId: string, meta: {
330
330
  }) => string | NullValue;
331
331
  /** @inline */
332
332
  type GlobalsFunction = (name: string) => string;
333
- /** @category Plugin APIs */
333
+ /** @category Code Splitting */
334
334
  type CodeSplittingNameFunction = (moduleId: string, ctx: ChunkingContext) => string | NullValue;
335
- /** @inline */
335
+ /** @inline @category Code Splitting */
336
336
  type CodeSplittingTestFunction = (id: string) => boolean | undefined | void;
337
337
  type MinifyOptions = Omit<MinifyOptions$1, "module" | "sourcemap">;
338
338
  interface CommentsOptions {
@@ -349,7 +349,7 @@ interface CommentsOptions {
349
349
  */
350
350
  jsdoc?: boolean;
351
351
  }
352
- /** @inline */
352
+ /** @inline @category Code Splitting */
353
353
  interface ChunkingContext {
354
354
  getModuleInfo(moduleId: string): ModuleInfo | null;
355
355
  }
@@ -967,12 +967,12 @@ interface OutputOptions {
967
967
  */
968
968
  keepNames?: boolean;
969
969
  /**
970
- * Lets modules be executed in the order they are declared.
970
+ * Preserve source module execution order across generated chunks.
971
971
  *
972
- * This is done by injecting runtime helpers to ensure that modules are executed in the order they are imported. External modules won't be affected.
972
+ * When enabled, Rolldown wraps ESM modules so their bodies run in source order regardless of chunk placement. Interop wrappers for CommonJS and require-of-ESM modules are unchanged, and external modules are not affected. `experimental.onDemandWrapping` replaces wrap-all with a conservative plan derived from predicted chunk execution hazards.
973
973
  *
974
974
  * > [!WARNING]
975
- * > Enabling this option may negatively increase bundle size. It is recommended to use this option only when absolutely necessary.
975
+ * > Enabling this option increases bundle size because wrapped modules need runtime init helpers.
976
976
  * @default false
977
977
  */
978
978
  strictExecutionOrder?: boolean;
@@ -993,8 +993,11 @@ interface OutputOptions {
993
993
  * Built-in module tag names computed by rolldown.
994
994
  *
995
995
  * - `'$initial'` — the module is statically imported by at least one user-defined entry point, or is part of its static dependency chain.
996
+ *
997
+ * @category Code Splitting
996
998
  */
997
999
  type BuiltinModuleTag = "$initial";
1000
+ /** @category Code Splitting */
998
1001
  type CodeSplittingGroup = {
999
1002
  /**
1000
1003
  * Name of the group. It will be also used as the name of the chunk and replace the `[name]` placeholder in the {@linkcode OutputOptions.chunkFileNames | output.chunkFileNames} option.
@@ -1192,10 +1195,14 @@ type CodeSplittingGroup = {
1192
1195
  * Alias for {@linkcode CodeSplittingGroup}. Use this type for the `codeSplitting.groups` option.
1193
1196
  *
1194
1197
  * @deprecated Please use {@linkcode CodeSplittingGroup} instead.
1198
+ *
1199
+ * @category Code Splitting
1195
1200
  */
1196
1201
  type AdvancedChunksGroup = CodeSplittingGroup;
1197
1202
  /**
1198
1203
  * Configuration options for advanced code splitting.
1204
+ *
1205
+ * @category Code Splitting
1199
1206
  */
1200
1207
  type CodeSplittingOptions = {
1201
1208
  /**
@@ -1231,6 +1238,8 @@ type CodeSplittingOptions = {
1231
1238
  * Alias for {@linkcode CodeSplittingOptions}. Use this type for the `codeSplitting` option.
1232
1239
  *
1233
1240
  * @deprecated Please use {@linkcode CodeSplittingOptions} instead.
1241
+ *
1242
+ * @category Code Splitting
1234
1243
  */
1235
1244
  type AdvancedChunksOptions = CodeSplittingOptions;
1236
1245
  //#endregion
@@ -1273,8 +1282,6 @@ declare function build(options: BuildOptions[]): Promise<RolldownOutput[]>;
1273
1282
  */
1274
1283
  declare class RolldownBuild {
1275
1284
  #private;
1276
- /** @internal */
1277
- static asyncRuntimeShutdown: boolean;
1278
1285
  /** @hidden should not be used directly */
1279
1286
  constructor(inputOptions: InputOptions);
1280
1287
  /**
@@ -1988,6 +1995,9 @@ interface HookFilter {
1988
1995
  * If the value is a string, it is treated as a glob pattern.
1989
1996
  * The string type is not available for {@linkcode Plugin.resolveId | resolveId} hook.
1990
1997
  *
1998
+ * If the value is a regular expression, it is tested after the `id`'s path separators are normalized to forward slashes (`/`).
1999
+ * This keeps the filter portable across operating systems without requiring the regular expression to match both `/` and `\`.
2000
+ *
1991
2001
  * @example
1992
2002
  * Include all `id`s that contain `node_modules` in the path.
1993
2003
  * ```js
@@ -2555,14 +2565,14 @@ interface OutputBundle {
2555
2565
  //#region src/types/sourcemap.d.ts
2556
2566
  /** @category Plugin APIs */
2557
2567
  interface ExistingRawSourceMap {
2558
- file?: string | null;
2568
+ file?: string | null | undefined;
2559
2569
  mappings: string;
2560
- names?: string[];
2561
- sources?: (string | null)[];
2562
- sourcesContent?: (string | null | undefined)[];
2563
- sourceRoot?: string;
2564
- version?: number;
2565
- x_google_ignoreList?: number[];
2570
+ names?: string[] | undefined;
2571
+ sources?: (string | null)[] | undefined;
2572
+ sourcesContent?: (string | null | undefined)[] | undefined;
2573
+ sourceRoot?: string | undefined;
2574
+ version?: number | undefined;
2575
+ x_google_ignoreList?: number[] | undefined;
2566
2576
  }
2567
2577
  /** @inline @category Plugin APIs */
2568
2578
  type SourceMapInput = ExistingRawSourceMap | string | null;
@@ -2606,7 +2616,7 @@ declare class BuiltinPlugin {
2606
2616
  //#endregion
2607
2617
  //#region src/constants/plugin.d.ts
2608
2618
  declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
2609
- declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle"];
2619
+ declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle", "resolveFileUrl"];
2610
2620
  declare const ENUMERATED_PLUGIN_HOOK_NAMES: [...typeof ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ...typeof ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES, "footer", "banner", "intro", "outro"];
2611
2621
  /**
2612
2622
  * Names of all defined hooks. It's like
@@ -2782,6 +2792,45 @@ interface SourceDescription extends SpecifiedModuleOptions, Partial<PartialNull<
2782
2792
  map?: SourceMapInput;
2783
2793
  moduleType?: ModuleType;
2784
2794
  }
2795
+ /**
2796
+ * Argument passed to the {@linkcode FunctionPluginHooks.resolveFileUrl | resolveFileUrl} hook.
2797
+ *
2798
+ * @category Plugin APIs
2799
+ */
2800
+ interface ResolveFileUrlArgs {
2801
+ /**
2802
+ * The preliminary filename of the chunk containing the reference with hash placeholders.
2803
+ * Similar to {@linkcode RenderedChunk.fileName | chunk.fileName}.
2804
+ */
2805
+ chunkId: string;
2806
+ /** The filename of the emitted file, relative to the output directory. */
2807
+ fileName: string;
2808
+ /** The rendered output format. */
2809
+ format: InternalModuleFormat;
2810
+ /**
2811
+ * The id of the original module this file was referenced by
2812
+ * using the `import.meta.ROLLDOWN_FILE_URL_*` reference.
2813
+ */
2814
+ moduleId: string;
2815
+ /** The reference id of this file. */
2816
+ referenceId: string;
2817
+ /**
2818
+ * The path of the emitted file, relative to the chunk the file is referenced from.
2819
+ *
2820
+ * This path will contain no leading `./`, but may contain a leading `../`.
2821
+ */
2822
+ relativePath: string;
2823
+ /**
2824
+ * The `urlId` of an `import.meta.ROLLDOWN_FILE_URL_<referenceId>_<urlId>` reference,
2825
+ * or `undefined` when the reference has no `urlId`.
2826
+ *
2827
+ * This is a rolldown-specific extension: the Rollup-compatible
2828
+ * `import.meta.ROLLUP_FILE_URL_<referenceId>` form never carries a `urlId`.
2829
+ *
2830
+ * @experimental This API may change in minor versions.
2831
+ */
2832
+ urlId?: string | undefined;
2833
+ }
2785
2834
  /** @inline */
2786
2835
  interface ResolveIdExtraOptions {
2787
2836
  /**
@@ -3016,6 +3065,12 @@ interface FunctionPluginHooks {
3016
3065
  * @group Output Generation Hooks
3017
3066
  */
3018
3067
  [DEFINED_HOOK_NAMES.augmentChunkHash]: (this: PluginContext, chunk: RenderedChunk) => string | void;
3068
+ /**
3069
+ *
3070
+ *
3071
+ * @group Output Generation Hooks
3072
+ */
3073
+ [DEFINED_HOOK_NAMES.resolveFileUrl]: (this: PluginContext, args: ResolveFileUrlArgs) => string | NullValue;
3019
3074
  /**
3020
3075
  * Called when Rolldown encounters an error during
3021
3076
  * {@linkcode RolldownBuild.generate | bundle.generate()} or
@@ -3111,10 +3166,10 @@ type ObjectHookMeta = {
3111
3166
  type ObjectHook<T, O = {}> = T | ({
3112
3167
  handler: T;
3113
3168
  } & ObjectHookMeta & O);
3114
- type SyncPluginHooks = DefinedHookNames["augmentChunkHash" | "onLog" | "outputOptions"];
3169
+ type SyncPluginHooks = DefinedHookNames["augmentChunkHash" | "onLog" | "outputOptions" | "resolveFileUrl"];
3115
3170
  /** @category Plugin APIs */
3116
3171
  type AsyncPluginHooks = Exclude<keyof FunctionPluginHooks, SyncPluginHooks>;
3117
- type FirstPluginHooks = DefinedHookNames["load" | "resolveDynamicImport" | "resolveId"];
3172
+ type FirstPluginHooks = DefinedHookNames["load" | "resolveDynamicImport" | "resolveFileUrl" | "resolveId"];
3118
3173
  type SequentialPluginHooks = DefinedHookNames["augmentChunkHash" | "generateBundle" | "onLog" | "options" | "outputOptions" | "renderChunk" | "transform"];
3119
3174
  interface AddonHooks {
3120
3175
  /**
@@ -3146,7 +3201,7 @@ interface AddonHooks {
3146
3201
  */
3147
3202
  [DEFINED_HOOK_NAMES.outro]: AddonHook;
3148
3203
  }
3149
- type OutputPluginHooks = DefinedHookNames["augmentChunkHash" | "generateBundle" | "outputOptions" | "renderChunk" | "renderError" | "renderStart" | "writeBundle"];
3204
+ type OutputPluginHooks = DefinedHookNames["augmentChunkHash" | "generateBundle" | "outputOptions" | "renderChunk" | "renderError" | "renderStart" | "resolveFileUrl" | "writeBundle"];
3150
3205
  /** @internal */
3151
3206
  type ParallelPluginHooks = Exclude<keyof FunctionPluginHooks | keyof AddonHooks, FirstPluginHooks | SequentialPluginHooks>;
3152
3207
  /** @category Plugin APIs */
@@ -3385,6 +3440,13 @@ type DevModeOptions = boolean | {
3385
3440
  host?: string;
3386
3441
  port?: number;
3387
3442
  implement?: string;
3443
+ /**
3444
+ * Prevent Rolldown from prepending its common dev runtime to {@link implement}.
3445
+ * @deprecated Common runtime injection will be disabled by default in the future.
3446
+ * Include the common runtime in {@link implement} instead.
3447
+ * @default false
3448
+ */
3449
+ skipCommonRuntimeInjection?: boolean;
3388
3450
  lazy?: boolean;
3389
3451
  };
3390
3452
  type OptimizationOptions = {
@@ -3802,7 +3864,8 @@ interface InputOptions {
3802
3864
  fileName?: string;
3803
3865
  };
3804
3866
  /**
3805
- * Enable on-demand wrapping of modules.
3867
+ * Under `output.strictExecutionOrder`, derive a conservative wrapping plan from predicted
3868
+ * chunk execution hazards instead of wrapping every eligible module.
3806
3869
  * @default false
3807
3870
  * @hidden not ready for public usage yet
3808
3871
  */
@@ -4000,4 +4063,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
4000
4063
  declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
4001
4064
  declare function defineConfig(config: ConfigExport): ConfigExport;
4002
4065
  //#endregion
4003
- export { MinimalPluginContext as $, SourcemapIgnoreListOption as $t, RolldownPlugin as A, ChunkingContext as At, SourceMapInput as B, OutputOptions as Bt, ParallelPluginHooks as C, BuildOptions as Ct, ResolveIdExtraOptions as D, AdvancedChunksOptions as Dt, PluginMeta as E, AdvancedChunksGroup as Et, BuiltinPlugin as F, GeneratedCodeOptions as Ft, EmittedChunk as G, OutputAsset as Gt, TreeshakingOptions as H, MaybePromise as Ht, RUNTIME_MODULE_ID as I, GeneratedCodePreset as It, GetModuleInfo as J, RenderedModule as Jt, EmittedFile as K, OutputChunk as Kt, VERSION as L, GlobalsFunction as Lt, SourceDescription as M, CodeSplittingNameFunction as Mt, TransformResult as N, CodeSplittingOptions as Nt, ResolveIdResult as O, BuiltinModuleTag as Ot, withFilter as P, CommentsOptions as Pt, defineParallelPlugin as Q, ModuleInfo as Qt, BundleError as R, MinifyOptions as Rt, ObjectHook as S, RolldownBuild as St, Plugin as T, AddonFunction as Tt, TransformPluginContext as U, PartialNull as Ut, OutputBundle as V, PreRenderedAsset as Vt, EmittedAsset as W, StringOrRegExp as Wt, PluginContextResolveOptions as X, SourceMap as Xt, PluginContext as Y, RolldownOutput as Yt, DefineParallelPluginResult as Z, freeExternalMemory as Zt, HookFilterExtension as _, RolldownWatcher as _t, ChunkOptimizationOptions as a, RolldownDirectoryEntry as at, ModuleOptions as b, WatchOptions as bt, InputOption as c, InternalModuleFormat as ct, OptimizationOptions as d, TransformOptions as dt, PluginContextMeta as et, WatcherFileWatcherOptions as f, ChecksOptions as ft, FunctionPluginHooks as g, watch as gt, CustomPluginOptions as h, RolldownMagicString as ht, RolldownOptions as i, BufferEncoding as it, RolldownPluginOption as j, CodeSplittingGroup as jt, ResolvedId as k, ChunkFileNamesFunction as kt, InputOptions as l, NormalizedOutputOptions as lt, AsyncPluginHooks as m, WarningHandlerWithDefault as mt, RolldownOptionsFunction as n, HookFilter as nt, ExternalOption as o, RolldownFileStats as ot, WatcherOptions as p, LoggingFunction as pt, EmittedPrebuiltChunk as q, RenderedChunk as qt, defineConfig as r, ModuleTypeFilter as rt, ExternalOptionFunction as s, RolldownFsModule as st, ConfigExport as t, GeneralHookFilter as tt, ModuleTypes as u, NormalizedInputOptions as ut, ImportKind as v, RolldownWatcherEvent as vt, PartialResolvedId as w, build as wt, ModuleType as x, rolldown as xt, LoadResult as y, RolldownWatcherWatcherEventMap as yt, ExistingRawSourceMap as z, ModuleFormat as zt };
4066
+ export { defineParallelPlugin as $, ModuleInfo as $t, ResolvedId as A, ChunkFileNamesFunction as At, ExistingRawSourceMap as B, ModuleFormat as Bt, ParallelPluginHooks as C, RolldownBuild as Ct, ResolveFileUrlArgs as D, AdvancedChunksGroup as Dt, PluginMeta as E, AddonFunction as Et, withFilter as F, CommentsOptions as Ft, EmittedAsset as G, StringOrRegExp as Gt, OutputBundle as H, PreRenderedAsset as Ht, BuiltinPlugin as I, GeneratedCodeOptions as It, EmittedPrebuiltChunk as J, RenderedChunk as Jt, EmittedChunk as K, OutputAsset as Kt, RUNTIME_MODULE_ID as L, GeneratedCodePreset as Lt, RolldownPluginOption as M, CodeSplittingGroup as Mt, SourceDescription as N, CodeSplittingNameFunction as Nt, ResolveIdExtraOptions as O, AdvancedChunksOptions as Ot, TransformResult as P, CodeSplittingOptions as Pt, DefineParallelPluginResult as Q, freeExternalMemory as Qt, VERSION as R, GlobalsFunction as Rt, ObjectHook as S, rolldown as St, Plugin as T, build as Tt, TreeshakingOptions as U, MaybePromise as Ut, SourceMapInput as V, OutputOptions as Vt, TransformPluginContext as W, PartialNull as Wt, PluginContext as X, RolldownOutput as Xt, GetModuleInfo as Y, RenderedModule as Yt, PluginContextResolveOptions as Z, SourceMap as Zt, HookFilterExtension as _, watch as _t, ChunkOptimizationOptions as a, BufferEncoding as at, ModuleOptions as b, RolldownWatcherWatcherEventMap as bt, InputOption as c, RolldownFsModule as ct, OptimizationOptions as d, NormalizedInputOptions as dt, SourcemapIgnoreListOption as en, MinimalPluginContext as et, WatcherFileWatcherOptions as f, TransformOptions as ft, FunctionPluginHooks as g, RolldownMagicString as gt, CustomPluginOptions as h, WarningHandlerWithDefault as ht, RolldownOptions as i, ModuleTypeFilter as it, RolldownPlugin as j, ChunkingContext as jt, ResolveIdResult as k, BuiltinModuleTag as kt, InputOptions as l, InternalModuleFormat as lt, AsyncPluginHooks as m, LoggingFunction as mt, RolldownOptionsFunction as n, GeneralHookFilter as nt, ExternalOption as o, RolldownDirectoryEntry as ot, WatcherOptions as p, ChecksOptions as pt, EmittedFile as q, OutputChunk as qt, defineConfig as r, HookFilter as rt, ExternalOptionFunction as s, RolldownFileStats as st, ConfigExport as t, PluginContextMeta as tt, ModuleTypes as u, NormalizedOutputOptions as ut, ImportKind as v, RolldownWatcher as vt, PartialResolvedId as w, BuildOptions as wt, ModuleType as x, WatchOptions as xt, LoadResult as y, RolldownWatcherEvent as yt, BundleError as z, MinifyOptions as zt };
@@ -1,4 +1,4 @@
1
- import { t as require_binding } from "./binding-Dby9rwGk.mjs";
1
+ import { t as require_binding } from "./binding-Cv62mM1i.mjs";
2
2
  //#region src/types/sourcemap.ts
3
3
  function bindingifySourcemap(map) {
4
4
  if (map == null) return;
@@ -1,9 +1,9 @@
1
- import { t as rolldown } from "./rolldown-951h_1lf.mjs";
1
+ import { t as rolldown } from "./rolldown-DP_p9pd3.mjs";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { readdir } from "node:fs/promises";
5
- import { cwd } from "node:process";
6
5
  import { pathToFileURL } from "node:url";
6
+ import { cwd } from "node:process";
7
7
  //#region src/utils/load-config.ts
8
8
  async function bundleTsConfig(configFile, isEsm) {
9
9
  const dirnameVarName = "injected_original_dirname";
@@ -103,6 +103,7 @@ const INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN";
103
103
  const CYCLE_LOADING = "CYCLE_LOADING";
104
104
  const MULTIPLE_WATCHER_OPTION = "MULTIPLE_WATCHER_OPTION";
105
105
  const PARSE_ERROR = "PARSE_ERROR";
106
+ const VALIDATION_ERROR = "VALIDATION_ERROR";
106
107
  function logParseError(message, id, pos) {
107
108
  return {
108
109
  code: PARSE_ERROR,
@@ -111,6 +112,12 @@ function logParseError(message, id, pos) {
111
112
  pos
112
113
  };
113
114
  }
115
+ function logFailedValidation(message) {
116
+ return {
117
+ code: VALIDATION_ERROR,
118
+ message
119
+ };
120
+ }
114
121
  function logInvalidLogPosition(pluginName) {
115
122
  return {
116
123
  code: INVALID_LOG_POSITION,
@@ -182,4 +189,4 @@ function augmentCodeLocation(properties, pos, source, id) {
182
189
  }
183
190
  }
184
191
  //#endregion
185
- export { logInvalidLogPosition as a, logPluginError as c, logInputHookInOutputPlugin as i, locate as l, error as n, logMultipleWatcherOption as o, logCycleLoading as r, logParseError as s, augmentCodeLocation as t, getCodeFrame as u };
192
+ export { logInputHookInOutputPlugin as a, logParseError as c, getCodeFrame as d, logFailedValidation as i, logPluginError as l, error as n, logInvalidLogPosition as o, logCycleLoading as r, logMultipleWatcherOption as s, augmentCodeLocation as t, locate as u };