rolldown 1.0.0-beta.15 → 1.0.0-beta.16

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 (38) hide show
  1. package/dist/cli.cjs +7 -7
  2. package/dist/cli.mjs +7 -7
  3. package/dist/config.cjs +3 -3
  4. package/dist/config.d.cts +2 -2
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +4 -3
  7. package/dist/experimental-index.cjs +2 -2
  8. package/dist/experimental-index.d.cts +2 -2
  9. package/dist/experimental-index.d.mts +2 -2
  10. package/dist/experimental-index.mjs +2 -2
  11. package/dist/experimental-runtime-types.d.ts +52 -0
  12. package/dist/filter-index.d.cts +2 -2
  13. package/dist/filter-index.d.mts +2 -2
  14. package/dist/index.cjs +2 -2
  15. package/dist/index.d.cts +2 -2
  16. package/dist/index.d.mts +2 -2
  17. package/dist/index.mjs +2 -2
  18. package/dist/parallel-plugin-worker.cjs +2 -2
  19. package/dist/parallel-plugin-worker.mjs +2 -2
  20. package/dist/parallel-plugin.d.cts +2 -2
  21. package/dist/parallel-plugin.d.mts +2 -2
  22. package/dist/parse-ast-index.cjs +1 -1
  23. package/dist/parse-ast-index.d.cts +1 -1
  24. package/dist/parse-ast-index.d.mts +1 -1
  25. package/dist/parse-ast-index.mjs +1 -1
  26. package/dist/shared/{binding-CZdobbZA.d.cts → binding--Y47JZSL.d.cts} +10 -2
  27. package/dist/shared/{binding-Dze8QVpf.d.mts → binding-C_9au5Eg.d.mts} +10 -2
  28. package/dist/shared/{define-config-BE-fkZNW.d.cts → define-config-CAyC9-af.d.cts} +5 -4
  29. package/dist/shared/{define-config-De_1kjGz.d.mts → define-config-DMWHsgSt.d.mts} +5 -4
  30. package/dist/shared/{load-config-BOcke1T-.mjs → load-config-BT5Ts430.mjs} +1 -1
  31. package/dist/shared/{load-config-Bq6nGoUg.cjs → load-config-BniS-jT_.cjs} +1 -1
  32. package/dist/shared/{parse-ast-index-BAuPesgO.mjs → parse-ast-index-BHkdbivO.mjs} +9 -8
  33. package/dist/shared/{parse-ast-index-C53MhHqY.cjs → parse-ast-index-hgMnddyI.cjs} +8 -7
  34. package/dist/shared/{prompt-Dc0i9ubg.mjs → prompt-CodO769G.mjs} +2 -2
  35. package/dist/shared/{prompt-8EeOGx1_.cjs → prompt-QNI93ne7.cjs} +2 -2
  36. package/dist/shared/{src-aJubL6dq.cjs → src-1lPDqeuR.cjs} +26 -13
  37. package/dist/shared/{src-DBOqhEP1.mjs → src-Cv4_zurW.mjs} +34 -20
  38. package/package.json +19 -19
package/dist/cli.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-aJubL6dq.cjs');
3
- require('./shared/parse-ast-index-C53MhHqY.cjs');
2
+ const require_src = require('./shared/src-1lPDqeuR.cjs');
3
+ require('./shared/parse-ast-index-hgMnddyI.cjs');
4
4
  const require_misc = require('./shared/misc-BKp5iIef.cjs');
5
- const require_load_config = require('./shared/load-config-Bq6nGoUg.cjs');
5
+ const require_load_config = require('./shared/load-config-BniS-jT_.cjs');
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
7
  const ansis = require_chunk.__toESM(require("ansis"));
8
8
  const node_process = require_chunk.__toESM(require("node:process"));
@@ -933,7 +933,7 @@ ${indent}`);
933
933
  line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors$2.gray(`[${right}]`)} ` : "") + left;
934
934
  line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
935
935
  if (logObj.type === "trace") {
936
- const _err = new Error("Trace: " + logObj.message);
936
+ const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
937
937
  line += this.formatStack(_err.stack || "", _err.message);
938
938
  }
939
939
  return isBadge ? "\n" + line + "\n" : line;
@@ -956,7 +956,7 @@ function createConsola(options$1 = {}) {
956
956
  defaults: { level },
957
957
  stdout: process.stdout,
958
958
  stderr: process.stderr,
959
- prompt: (...args) => Promise.resolve().then(() => require("./shared/prompt-8EeOGx1_.cjs")).then((m) => m.prompt(...args)),
959
+ prompt: (...args) => Promise.resolve().then(() => require("./shared/prompt-QNI93ne7.cjs")).then((m) => m.prompt(...args)),
960
960
  reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
961
961
  ...options$1
962
962
  });
@@ -1424,8 +1424,8 @@ const process$2 = globalThis.process;
1424
1424
  const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
1425
1425
 
1426
1426
  //#endregion
1427
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.3/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1428
- var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.3/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1427
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.73.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1428
+ var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.73.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1429
1429
  function _usingCtx() {
1430
1430
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1431
1431
  var n$2 = Error();
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { __commonJS, __esm, __toESM } from "./shared/chunk--iN_1bjD.mjs";
2
- import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-DBOqhEP1.mjs";
3
- import "./shared/parse-ast-index-BAuPesgO.mjs";
2
+ import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-Cv4_zurW.mjs";
3
+ import "./shared/parse-ast-index-BHkdbivO.mjs";
4
4
  import { arraify, init_misc } from "./shared/misc-DGAe2XOW.mjs";
5
- import { init_load_config, loadConfig } from "./shared/load-config-BOcke1T-.mjs";
5
+ import { init_load_config, loadConfig } from "./shared/load-config-BT5Ts430.mjs";
6
6
  import path, { sep } from "node:path";
7
7
  import colors from "ansis";
8
8
  import process$1 from "node:process";
@@ -759,7 +759,7 @@ function createConsola(options$1 = {}) {
759
759
  defaults: { level },
760
760
  stdout: process.stdout,
761
761
  stderr: process.stderr,
762
- prompt: (...args) => import("./shared/prompt-Dc0i9ubg.mjs").then((m) => m.prompt(...args)),
762
+ prompt: (...args) => import("./shared/prompt-CodO769G.mjs").then((m) => m.prompt(...args)),
763
763
  reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
764
764
  ...options$1
765
765
  });
@@ -975,7 +975,7 @@ ${indent}`);
975
975
  line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors$1.gray(`[${right}]`)} ` : "") + left;
976
976
  line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
977
977
  if (logObj.type === "trace") {
978
- const _err = new Error("Trace: " + logObj.message);
978
+ const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
979
979
  line += this.formatStack(_err.stack || "", _err.message);
980
980
  }
981
981
  return isBadge ? "\n" + line + "\n" : line;
@@ -1440,8 +1440,8 @@ var init_mjs = __esm({ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/
1440
1440
  } });
1441
1441
 
1442
1442
  //#endregion
1443
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.72.3/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1444
- var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.3/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1443
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.73.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1444
+ var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.73.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1445
1445
  function _usingCtx() {
1446
1446
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1447
1447
  var n$2 = Error();
package/dist/config.cjs CHANGED
@@ -1,7 +1,7 @@
1
- const require_src = require('./shared/src-aJubL6dq.cjs');
2
- require('./shared/parse-ast-index-C53MhHqY.cjs');
1
+ const require_src = require('./shared/src-1lPDqeuR.cjs');
2
+ require('./shared/parse-ast-index-hgMnddyI.cjs');
3
3
  require('./shared/misc-BKp5iIef.cjs');
4
- const require_load_config = require('./shared/load-config-Bq6nGoUg.cjs');
4
+ const require_load_config = require('./shared/load-config-BniS-jT_.cjs');
5
5
 
6
6
  //#region src/config.ts
7
7
  const VERSION = require_src.version;
package/dist/config.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import "./shared/binding-CZdobbZA.cjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config-BE-fkZNW.cjs";
1
+ import "./shared/binding--Y47JZSL.cjs";
2
+ import { ConfigExport, defineConfig } from "./shared/define-config-CAyC9-af.cjs";
3
3
 
4
4
  //#region src/utils/load-config.d.ts
5
5
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import "./shared/binding-Dze8QVpf.mjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config-De_1kjGz.mjs";
1
+ import "./shared/binding-C_9au5Eg.mjs";
2
+ import { ConfigExport, defineConfig } from "./shared/define-config-DMWHsgSt.mjs";
3
3
 
4
4
  //#region src/utils/load-config.d.ts
5
5
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.mjs CHANGED
@@ -1,9 +1,10 @@
1
- import { defineConfig, version } from "./shared/src-DBOqhEP1.mjs";
2
- import "./shared/parse-ast-index-BAuPesgO.mjs";
1
+ import { defineConfig, init_define_config, version } from "./shared/src-Cv4_zurW.mjs";
2
+ import "./shared/parse-ast-index-BHkdbivO.mjs";
3
3
  import "./shared/misc-DGAe2XOW.mjs";
4
- import { init_load_config, loadConfig } from "./shared/load-config-BOcke1T-.mjs";
4
+ import { init_load_config, loadConfig } from "./shared/load-config-BT5Ts430.mjs";
5
5
 
6
6
  //#region src/config.ts
7
+ init_define_config();
7
8
  init_load_config();
8
9
  const VERSION = version;
9
10
 
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-aJubL6dq.cjs');
3
- const require_parse_ast_index = require('./shared/parse-ast-index-C53MhHqY.cjs');
2
+ const require_src = require('./shared/src-1lPDqeuR.cjs');
3
+ const require_parse_ast_index = require('./shared/parse-ast-index-hgMnddyI.cjs');
4
4
  require('./shared/misc-BKp5iIef.cjs');
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-CZdobbZA.cjs";
2
- import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-BE-fkZNW.cjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding--Y47JZSL.cjs";
2
+ import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-CAyC9-af.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
 
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-Dze8QVpf.mjs";
2
- import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-De_1kjGz.mjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-C_9au5Eg.mjs";
2
+ import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-DMWHsgSt.mjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { __toESM } from "./shared/chunk--iN_1bjD.mjs";
2
- import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_plugin_driver, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-DBOqhEP1.mjs";
3
- import { require_binding } from "./shared/parse-ast-index-BAuPesgO.mjs";
2
+ import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_plugin_driver, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-Cv4_zurW.mjs";
3
+ import { require_binding } from "./shared/parse-ast-index-BHkdbivO.mjs";
4
4
  import "./shared/misc-DGAe2XOW.mjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
@@ -0,0 +1,52 @@
1
+ declare class DevRuntime {
2
+ /**
3
+ * @type {Record<string, { exports: any }>}
4
+ */
5
+ modules: Record<string, {
6
+ exports: any;
7
+ }>;
8
+ /**
9
+ * @param {string} _moduleId
10
+ */
11
+ createModuleHotContext(_moduleId: string): void;
12
+ /**
13
+ *
14
+ * @param {string[]} _boundaries
15
+ */
16
+ applyUpdates(_boundaries: string[]): void;
17
+ /**
18
+ * @param {string} id
19
+ * @param {{ exports: any }} module
20
+ */
21
+ registerModule(id: string, module: {
22
+ exports: any;
23
+ }): void;
24
+ /**
25
+ * @param {string} id
26
+ */
27
+ loadExports(id: string): any;
28
+ /**
29
+ * __esmMin
30
+ *
31
+ * @type {<T>(fn: any, res: T) => () => T}
32
+ * @internal
33
+ */
34
+ createEsmInitializer: <T>(fn: any, res: T) => () => T;
35
+ /**
36
+ * __commonJSMin
37
+ *
38
+ * @type {<T extends { exports: any }>(cb: any, mod: { exports: any }) => () => T}
39
+ * @internal
40
+ */
41
+ createCjsInitializer: <T extends {
42
+ exports: any;
43
+ }>(cb: any, mod: {
44
+ exports: any;
45
+ }) => () => T;
46
+ /** @internal */
47
+ __toESM: any;
48
+ /** @internal */
49
+ __toCommonJS: any;
50
+ /** @internal */
51
+ __export: any;
52
+ }
@@ -1,4 +1,4 @@
1
- import "./shared/binding-CZdobbZA.cjs";
2
- import { withFilter } from "./shared/define-config-BE-fkZNW.cjs";
1
+ import "./shared/binding--Y47JZSL.cjs";
2
+ import { withFilter } from "./shared/define-config-CAyC9-af.cjs";
3
3
  import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
4
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,4 +1,4 @@
1
- import "./shared/binding-Dze8QVpf.mjs";
2
- import { withFilter } from "./shared/define-config-De_1kjGz.mjs";
1
+ import "./shared/binding-C_9au5Eg.mjs";
2
+ import { withFilter } from "./shared/define-config-DMWHsgSt.mjs";
3
3
  import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
4
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- const require_src = require('./shared/src-aJubL6dq.cjs');
2
- require('./shared/parse-ast-index-C53MhHqY.cjs');
1
+ const require_src = require('./shared/src-1lPDqeuR.cjs');
2
+ require('./shared/parse-ast-index-hgMnddyI.cjs');
3
3
  require('./shared/misc-BKp5iIef.cjs');
4
4
 
5
5
  exports.VERSION = require_src.VERSION;
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { PreRenderedChunk } from "./shared/binding-CZdobbZA.cjs";
2
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-BE-fkZNW.cjs";
1
+ import { PreRenderedChunk } from "./shared/binding--Y47JZSL.cjs";
2
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-CAyC9-af.cjs";
3
3
  export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { PreRenderedChunk } from "./shared/binding-Dze8QVpf.mjs";
2
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-De_1kjGz.mjs";
1
+ import { PreRenderedChunk } from "./shared/binding-C_9au5Eg.mjs";
2
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-DMWHsgSt.mjs";
3
3
  export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-DBOqhEP1.mjs";
2
- import "./shared/parse-ast-index-BAuPesgO.mjs";
1
+ import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-Cv4_zurW.mjs";
2
+ import "./shared/parse-ast-index-BHkdbivO.mjs";
3
3
  import "./shared/misc-DGAe2XOW.mjs";
4
4
 
5
5
  init_src();
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-aJubL6dq.cjs');
3
- const require_parse_ast_index = require('./shared/parse-ast-index-C53MhHqY.cjs');
2
+ const require_src = require('./shared/src-1lPDqeuR.cjs');
3
+ const require_parse_ast_index = require('./shared/parse-ast-index-hgMnddyI.cjs');
4
4
  require('./shared/misc-BKp5iIef.cjs');
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { __commonJS, __toESM } from "./shared/chunk--iN_1bjD.mjs";
2
- import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-DBOqhEP1.mjs";
3
- import { require_binding } from "./shared/parse-ast-index-BAuPesgO.mjs";
2
+ import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-Cv4_zurW.mjs";
3
+ import { require_binding } from "./shared/parse-ast-index-BHkdbivO.mjs";
4
4
  import "./shared/misc-DGAe2XOW.mjs";
5
5
  import { parentPort, workerData } from "node:worker_threads";
6
6
 
@@ -1,5 +1,5 @@
1
- import "./shared/binding-CZdobbZA.cjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-BE-fkZNW.cjs";
1
+ import "./shared/binding--Y47JZSL.cjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-CAyC9-af.cjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,5 +1,5 @@
1
- import "./shared/binding-Dze8QVpf.mjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-De_1kjGz.mjs";
1
+ import "./shared/binding-C_9au5Eg.mjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-DMWHsgSt.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-C53MhHqY.cjs');
1
+ const require_parse_ast_index = require('./shared/parse-ast-index-hgMnddyI.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst;
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-CZdobbZA.cjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding--Y47JZSL.cjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-Dze8QVpf.mjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding-C_9au5Eg.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,4 +1,4 @@
1
- import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-BAuPesgO.mjs";
1
+ import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-BHkdbivO.mjs";
2
2
 
3
3
  init_parse_ast_index();
4
4
  export { parseAst, parseAstAsync };
@@ -1006,6 +1006,9 @@ declare class BindingNormalizedOptions {
1006
1006
  get minify(): false | BindingMinifyOptions;
1007
1007
  get polyfillRequire(): boolean;
1008
1008
  get legalComments(): 'none' | 'inline';
1009
+ get preserveModules(): boolean;
1010
+ get preserveModulesRoot(): string | undefined;
1011
+ get virtualDirname(): string;
1009
1012
  }
1010
1013
  declare class BindingOutputAsset {
1011
1014
  get fileName(): string;
@@ -1117,6 +1120,11 @@ interface BindingAssetPluginConfig {
1117
1120
  interface BindingAssetSource {
1118
1121
  inner: string | Uint8Array;
1119
1122
  }
1123
+ declare enum BindingAttachDebugInfo {
1124
+ None = 0,
1125
+ Simple = 1,
1126
+ Full = 2,
1127
+ }
1120
1128
  interface BindingBuildImportAnalysisPluginConfig {
1121
1129
  preloadCode: string;
1122
1130
  insertPreload: boolean;
@@ -1184,7 +1192,7 @@ interface BindingExperimentalOptions {
1184
1192
  viteMode?: boolean;
1185
1193
  resolveNewUrlToAsset?: boolean;
1186
1194
  hmr?: BindingExperimentalHmrOptions;
1187
- attachDebugInfo?: boolean;
1195
+ attachDebugInfo?: BindingAttachDebugInfo;
1188
1196
  }
1189
1197
  interface BindingFilterToken {
1190
1198
  kind: FilterTokenKind;
@@ -1645,4 +1653,4 @@ interface PreRenderedChunk {
1645
1653
  exports: Array<string>;
1646
1654
  }
1647
1655
  //#endregion
1648
- export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
1656
+ export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
@@ -1006,6 +1006,9 @@ declare class BindingNormalizedOptions {
1006
1006
  get minify(): false | BindingMinifyOptions;
1007
1007
  get polyfillRequire(): boolean;
1008
1008
  get legalComments(): 'none' | 'inline';
1009
+ get preserveModules(): boolean;
1010
+ get preserveModulesRoot(): string | undefined;
1011
+ get virtualDirname(): string;
1009
1012
  }
1010
1013
  declare class BindingOutputAsset {
1011
1014
  get fileName(): string;
@@ -1117,6 +1120,11 @@ interface BindingAssetPluginConfig {
1117
1120
  interface BindingAssetSource {
1118
1121
  inner: string | Uint8Array;
1119
1122
  }
1123
+ declare enum BindingAttachDebugInfo {
1124
+ None = 0,
1125
+ Simple = 1,
1126
+ Full = 2,
1127
+ }
1120
1128
  interface BindingBuildImportAnalysisPluginConfig {
1121
1129
  preloadCode: string;
1122
1130
  insertPreload: boolean;
@@ -1184,7 +1192,7 @@ interface BindingExperimentalOptions {
1184
1192
  viteMode?: boolean;
1185
1193
  resolveNewUrlToAsset?: boolean;
1186
1194
  hmr?: BindingExperimentalHmrOptions;
1187
- attachDebugInfo?: boolean;
1195
+ attachDebugInfo?: BindingAttachDebugInfo;
1188
1196
  }
1189
1197
  interface BindingFilterToken {
1190
1198
  kind: FilterTokenKind;
@@ -1645,4 +1653,4 @@ interface PreRenderedChunk {
1645
1653
  exports: Array<string>;
1646
1654
  }
1647
1655
  //#endregion
1648
- export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
1656
+ export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
@@ -1,4 +1,4 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CZdobbZA.cjs";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding--Y47JZSL.cjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
 
@@ -309,8 +309,8 @@ declare class RolldownBuild {
309
309
  write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
310
310
  close(): Promise<void>;
311
311
  [Symbol.asyncDispose](): Promise<void>;
312
- generateHmrPatch(changedFiles: string[]): Promise<BindingHmrOutputPatch | undefined>;
313
- hmrInvalidate(file: string, firstInvalidatedBy?: string): Promise<BindingHmrOutput | undefined>;
312
+ generateHmrPatch(changedFiles: string[]): Promise<BindingHmrOutputPatch>;
313
+ hmrInvalidate(file: string, firstInvalidatedBy?: string): Promise<BindingHmrOutputPatch>;
314
314
  // TODO(underfin)
315
315
  // The `watchFiles` method returns a promise, but Rollup does not.
316
316
  // Converting it to a synchronous API might cause a deadlock if the user calls `write` and `watchFiles` simultaneously.
@@ -878,6 +878,7 @@ type HmrOptions = boolean | {
878
878
  port?: number;
879
879
  implement?: string;
880
880
  };
881
+ type AttachDebugOptions = "none" | "simple" | "full";
881
882
  interface RollupJsxOptions {
882
883
  mode?: "classic" | "automatic" | "preserve";
883
884
  factory?: string;
@@ -936,7 +937,7 @@ interface InputOptions {
936
937
  viteMode?: boolean;
937
938
  resolveNewUrlToAsset?: boolean;
938
939
  hmr?: HmrOptions;
939
- attachDebugInfo?: boolean;
940
+ attachDebugInfo?: AttachDebugOptions;
940
941
  };
941
942
  /**
942
943
  * Replace global variables or [property accessors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_accessors) with the provided values.
@@ -1,4 +1,4 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-Dze8QVpf.mjs";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-C_9au5Eg.mjs";
2
2
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
3
3
  import { Program } from "@oxc-project/types";
4
4
 
@@ -309,8 +309,8 @@ declare class RolldownBuild {
309
309
  write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
310
310
  close(): Promise<void>;
311
311
  [Symbol.asyncDispose](): Promise<void>;
312
- generateHmrPatch(changedFiles: string[]): Promise<BindingHmrOutputPatch | undefined>;
313
- hmrInvalidate(file: string, firstInvalidatedBy?: string): Promise<BindingHmrOutput | undefined>;
312
+ generateHmrPatch(changedFiles: string[]): Promise<BindingHmrOutputPatch>;
313
+ hmrInvalidate(file: string, firstInvalidatedBy?: string): Promise<BindingHmrOutputPatch>;
314
314
  // TODO(underfin)
315
315
  // The `watchFiles` method returns a promise, but Rollup does not.
316
316
  // Converting it to a synchronous API might cause a deadlock if the user calls `write` and `watchFiles` simultaneously.
@@ -878,6 +878,7 @@ type HmrOptions = boolean | {
878
878
  port?: number;
879
879
  implement?: string;
880
880
  };
881
+ type AttachDebugOptions = "none" | "simple" | "full";
881
882
  interface RollupJsxOptions {
882
883
  mode?: "classic" | "automatic" | "preserve";
883
884
  factory?: string;
@@ -936,7 +937,7 @@ interface InputOptions {
936
937
  viteMode?: boolean;
937
938
  resolveNewUrlToAsset?: boolean;
938
939
  hmr?: HmrOptions;
939
- attachDebugInfo?: boolean;
940
+ attachDebugInfo?: AttachDebugOptions;
940
941
  };
941
942
  /**
942
943
  * Replace global variables or [property accessors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_accessors) with the provided values.
@@ -1,5 +1,5 @@
1
1
  import { __esm } from "./chunk--iN_1bjD.mjs";
2
- import { init_rolldown, rolldown } from "./src-DBOqhEP1.mjs";
2
+ import { init_rolldown, rolldown } from "./src-Cv4_zurW.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import { pathToFileURL } from "node:url";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_src = require('./src-aJubL6dq.cjs');
2
+ const require_src = require('./src-1lPDqeuR.cjs');
3
3
  const node_fs = require_chunk.__toESM(require("node:fs"));
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
@@ -96,7 +96,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
96
96
  } catch (e) {
97
97
  loadErrors.push(e);
98
98
  }
99
- } else loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
99
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Android ${process.arch}`));
100
100
  else if (process.platform === "win32") if (process.arch === "x64") {
101
101
  try {
102
102
  return __require("../rolldown-binding.win32-x64-msvc.node");
@@ -130,7 +130,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
130
130
  } catch (e) {
131
131
  loadErrors.push(e);
132
132
  }
133
- } else loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
133
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Windows: ${process.arch}`));
134
134
  else if (process.platform === "darwin") {
135
135
  try {
136
136
  return __require("../rolldown-binding.darwin-universal.node");
@@ -164,7 +164,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
164
164
  } catch (e) {
165
165
  loadErrors.push(e);
166
166
  }
167
- } else loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
167
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on macOS: ${process.arch}`));
168
168
  } else if (process.platform === "freebsd") if (process.arch === "x64") {
169
169
  try {
170
170
  return __require("../rolldown-binding.freebsd-x64.node");
@@ -187,7 +187,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
187
187
  } catch (e) {
188
188
  loadErrors.push(e);
189
189
  }
190
- } else loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
190
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
191
191
  else if (process.platform === "linux") if (process.arch === "x64") if (isMusl()) {
192
192
  try {
193
193
  return __require("../rolldown-binding.linux-x64-musl.node");
@@ -302,8 +302,8 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
302
302
  } catch (e) {
303
303
  loadErrors.push(e);
304
304
  }
305
- } else loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
306
- else loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
305
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Linux: ${process.arch}`));
306
+ else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
307
307
  }
308
308
  nativeBinding = requireNative();
309
309
  if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
@@ -368,6 +368,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
368
368
  module.exports.BindingWatcherEvent = nativeBinding.BindingWatcherEvent;
369
369
  module.exports.Bundler = nativeBinding.Bundler;
370
370
  module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
371
+ module.exports.BindingAttachDebugInfo = nativeBinding.BindingAttachDebugInfo;
371
372
  module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
372
373
  module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
373
374
  module.exports.BindingJsx = nativeBinding.BindingJsx;
@@ -569,7 +570,7 @@ var init_logs = __esm({ "src/log/logs.ts"() {
569
570
  } });
570
571
 
571
572
  //#endregion
572
- //#region ../../node_modules/.pnpm/oxc-parser@0.72.3/node_modules/oxc-parser/wrap.mjs
573
+ //#region ../../node_modules/.pnpm/oxc-parser@0.73.0/node_modules/oxc-parser/wrap.mjs
573
574
  function wrap$1(result) {
574
575
  let program, module$1, comments, errors;
575
576
  return {
@@ -604,7 +605,7 @@ function applyFix(program, fixPath) {
604
605
  node.value = RegExp(node.regex.pattern, node.regex.flags);
605
606
  } catch (_err) {}
606
607
  }
607
- var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.72.3/node_modules/oxc-parser/wrap.mjs"() {} });
608
+ var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.73.0/node_modules/oxc-parser/wrap.mjs"() {} });
608
609
 
609
610
  //#endregion
610
611
  //#region src/parse-ast-index.ts
@@ -96,7 +96,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
96
96
  } catch (e) {
97
97
  loadErrors.push(e);
98
98
  }
99
- } else loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
99
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Android ${process.arch}`));
100
100
  else if (process.platform === "win32") if (process.arch === "x64") {
101
101
  try {
102
102
  return require("../rolldown-binding.win32-x64-msvc.node");
@@ -130,7 +130,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
130
130
  } catch (e) {
131
131
  loadErrors.push(e);
132
132
  }
133
- } else loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
133
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Windows: ${process.arch}`));
134
134
  else if (process.platform === "darwin") {
135
135
  try {
136
136
  return require("../rolldown-binding.darwin-universal.node");
@@ -164,7 +164,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
164
164
  } catch (e) {
165
165
  loadErrors.push(e);
166
166
  }
167
- } else loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
167
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on macOS: ${process.arch}`));
168
168
  } else if (process.platform === "freebsd") if (process.arch === "x64") {
169
169
  try {
170
170
  return require("../rolldown-binding.freebsd-x64.node");
@@ -187,7 +187,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
187
187
  } catch (e) {
188
188
  loadErrors.push(e);
189
189
  }
190
- } else loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
190
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
191
191
  else if (process.platform === "linux") if (process.arch === "x64") if (isMusl()) {
192
192
  try {
193
193
  return require("../rolldown-binding.linux-x64-musl.node");
@@ -302,8 +302,8 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
302
302
  } catch (e) {
303
303
  loadErrors.push(e);
304
304
  }
305
- } else loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
306
- else loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
305
+ } else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Linux: ${process.arch}`));
306
+ else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
307
307
  }
308
308
  nativeBinding = requireNative();
309
309
  if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
@@ -368,6 +368,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
368
368
  module.exports.BindingWatcherEvent = nativeBinding.BindingWatcherEvent;
369
369
  module.exports.Bundler = nativeBinding.Bundler;
370
370
  module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
371
+ module.exports.BindingAttachDebugInfo = nativeBinding.BindingAttachDebugInfo;
371
372
  module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
372
373
  module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
373
374
  module.exports.BindingJsx = nativeBinding.BindingJsx;
@@ -560,7 +561,7 @@ function augmentCodeLocation(properties, pos, source, id) {
560
561
  }
561
562
 
562
563
  //#endregion
563
- //#region ../../node_modules/.pnpm/oxc-parser@0.72.3/node_modules/oxc-parser/wrap.mjs
564
+ //#region ../../node_modules/.pnpm/oxc-parser@0.73.0/node_modules/oxc-parser/wrap.mjs
564
565
  function wrap$1(result) {
565
566
  let program, module$1, comments, errors;
566
567
  return {
@@ -270,7 +270,7 @@ async function prompt(message, opts = {}) {
270
270
  if (typeof value !== "symbol" || value.toString() !== "Symbol(clack:cancel)") return value;
271
271
  switch (opts.cancel) {
272
272
  case "reject": {
273
- const error = new Error("Prompt cancelled.");
273
+ const error = /* @__PURE__ */ new Error("Prompt cancelled.");
274
274
  error.name = "ConsolaPromptCancelledError";
275
275
  if (Error.captureStackTrace) Error.captureStackTrace(error, prompt);
276
276
  throw error;
@@ -455,7 +455,7 @@ var init_prompt = __esm({ "../../node_modules/.pnpm/consola@3.4.2/node_modules/c
455
455
  `)];
456
456
  for (const [E, a] of o$1.entries()) {
457
457
  if (e$1 += a, v.has(a)) {
458
- const { groups: B$1 } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o$1.slice(E).join("")) || { groups: {} };
458
+ const { groups: B$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`)).exec(o$1.slice(E).join("")) || { groups: {} };
459
459
  if (B$1.code !== void 0) {
460
460
  const p = Number.parseFloat(B$1.code);
461
461
  s = p === CD ? void 0 : p;
@@ -385,7 +385,7 @@ const iD = sD(), v = new Set(["\x1B", "›"]), CD = 39, w$1 = "\x07", W$1 = "[",
385
385
  `)];
386
386
  for (const [E, a] of o$1.entries()) {
387
387
  if (e$1 += a, v.has(a)) {
388
- const { groups: B$1 } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o$1.slice(E).join("")) || { groups: {} };
388
+ const { groups: B$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`)).exec(o$1.slice(E).join("")) || { groups: {} };
389
389
  if (B$1.code !== void 0) {
390
390
  const p = Number.parseFloat(B$1.code);
391
391
  s = p === CD ? void 0 : p;
@@ -808,7 +808,7 @@ async function prompt(message, opts = {}) {
808
808
  if (typeof value !== "symbol" || value.toString() !== "Symbol(clack:cancel)") return value;
809
809
  switch (opts.cancel) {
810
810
  case "reject": {
811
- const error = new Error("Prompt cancelled.");
811
+ const error = /* @__PURE__ */ new Error("Prompt cancelled.");
812
812
  error.name = "ConsolaPromptCancelledError";
813
813
  if (Error.captureStackTrace) Error.captureStackTrace(error, prompt);
814
814
  throw error;
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_parse_ast_index = require('./parse-ast-index-C53MhHqY.cjs');
2
+ const require_parse_ast_index = require('./parse-ast-index-hgMnddyI.cjs');
3
3
  const require_misc = require('./misc-BKp5iIef.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
@@ -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.15";
12
+ var version = "1.0.0-beta.16";
13
13
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion
@@ -2027,7 +2027,11 @@ const InputOptionsSchema = strictObject({
2027
2027
  resolveNewUrlToAsset: optional(boolean()),
2028
2028
  strictExecutionOrder: optional(boolean()),
2029
2029
  hmr: optional(HmrSchema),
2030
- attachDebugInfo: optional(boolean())
2030
+ attachDebugInfo: optional(union([
2031
+ literal("none"),
2032
+ literal("simple"),
2033
+ literal("full")
2034
+ ]))
2031
2035
  })),
2032
2036
  define: pipe(optional(record(string(), string())), description("Define global variables")),
2033
2037
  inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
@@ -2301,7 +2305,7 @@ function bindingifySourcemap(map) {
2301
2305
  //#endregion
2302
2306
  //#region src/utils/error.ts
2303
2307
  function normalizeErrors(rawErrors) {
2304
- const errors = rawErrors.map((e) => e instanceof Error ? e : Object.assign(new Error(), {
2308
+ const errors = rawErrors.map((e) => e instanceof Error ? e : Object.assign(/* @__PURE__ */ new Error(), {
2305
2309
  kind: e.kind,
2306
2310
  message: e.message,
2307
2311
  stack: void 0
@@ -2399,7 +2403,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
2399
2403
  }
2400
2404
 
2401
2405
  //#endregion
2402
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-D6FCK2GA.js
2406
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-D6FCK2GA.js
2403
2407
  function u$1(o, n, a) {
2404
2408
  let t$1 = (r) => o(r, ...n);
2405
2409
  return a === void 0 ? t$1 : Object.assign(t$1, {
@@ -2409,7 +2413,7 @@ function u$1(o, n, a) {
2409
2413
  }
2410
2414
 
2411
2415
  //#endregion
2412
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-WIMGWYZL.js
2416
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-WIMGWYZL.js
2413
2417
  function u(r, n, o) {
2414
2418
  let a = r.length - n.length;
2415
2419
  if (a === 0) return r(...n);
@@ -2418,7 +2422,7 @@ function u(r, n, o) {
2418
2422
  }
2419
2423
 
2420
2424
  //#endregion
2421
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-3IFJP4R5.js
2425
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-3IFJP4R5.js
2422
2426
  function d(...r) {
2423
2427
  return u(i, r);
2424
2428
  }
@@ -2429,7 +2433,7 @@ var i = (r, t$1) => {
2429
2433
  };
2430
2434
 
2431
2435
  //#endregion
2432
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-5NQBDF4H.js
2436
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-5NQBDF4H.js
2433
2437
  function t(...n) {
2434
2438
  return u(Object.keys, n);
2435
2439
  }
@@ -3135,13 +3139,13 @@ var NormalizedOutputOptionsImpl = class {
3135
3139
  return this.normalizedOutputPlugins;
3136
3140
  }
3137
3141
  get preserveModules() {
3138
- return this.outputOptions.preserveModules || false;
3142
+ return this.inner.preserveModules;
3139
3143
  }
3140
3144
  get preserveModulesRoot() {
3141
- return this.outputOptions.preserveModulesRoot;
3145
+ return this.inner.preserveModulesRoot;
3142
3146
  }
3143
3147
  get virtualDirname() {
3144
- return this.outputOptions.virtualDirname || "_virtual";
3148
+ return this.inner.virtualDirname;
3145
3149
  }
3146
3150
  };
3147
3151
  function normalizeAddon(value) {
@@ -3797,7 +3801,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3797
3801
  viteMode: inputOptions.experimental?.viteMode,
3798
3802
  resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset,
3799
3803
  hmr: bindingifyHmr(inputOptions.experimental?.hmr),
3800
- attachDebugInfo: inputOptions.experimental?.attachDebugInfo
3804
+ attachDebugInfo: bindingifyAttachDebugInfo(inputOptions.experimental?.attachDebugInfo)
3801
3805
  },
3802
3806
  profilerNames: inputOptions?.profilerNames,
3803
3807
  jsx,
@@ -3829,6 +3833,14 @@ function bindingifyHmr(hmr) {
3829
3833
  return hmr;
3830
3834
  }
3831
3835
  }
3836
+ function bindingifyAttachDebugInfo(attachDebugInfo) {
3837
+ switch (attachDebugInfo) {
3838
+ case void 0: return void 0;
3839
+ case "full": return import_binding$3.BindingAttachDebugInfo.Full;
3840
+ case "simple": return import_binding$3.BindingAttachDebugInfo.Simple;
3841
+ case "none": return import_binding$3.BindingAttachDebugInfo.None;
3842
+ }
3843
+ }
3832
3844
  function bindingifyExternal(external) {
3833
3845
  if (external) {
3834
3846
  if (typeof external === "function") return (id, importer, isResolved) => {
@@ -4459,7 +4471,8 @@ var RolldownBuild = class {
4459
4471
  return transformHmrPatchOutput(output);
4460
4472
  }
4461
4473
  async hmrInvalidate(file, firstInvalidatedBy) {
4462
- return this.#bundler?.bundler.hmrInvalidate(file, firstInvalidatedBy);
4474
+ const output = await this.#bundler.bundler.hmrInvalidate(file, firstInvalidatedBy);
4475
+ return transformHmrPatchOutput(output);
4463
4476
  }
4464
4477
  get watchFiles() {
4465
4478
  return this.#bundler?.bundler.getWatchFiles() ?? Promise.resolve([]);
@@ -1,5 +1,5 @@
1
1
  import { __esm, __toESM } from "./chunk--iN_1bjD.mjs";
2
- import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, require_binding } from "./parse-ast-index-BAuPesgO.mjs";
2
+ import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, require_binding } from "./parse-ast-index-BHkdbivO.mjs";
3
3
  import { arraify, init_misc, isNullish, noop, unimplemented, unreachable, unsupported } from "./misc-DGAe2XOW.mjs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -9,7 +9,7 @@ import os from "node:os";
9
9
  import { Worker } from "node:worker_threads";
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.0-beta.15";
12
+ var version = "1.0.0-beta.16";
13
13
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion
@@ -2116,7 +2116,11 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
2116
2116
  resolveNewUrlToAsset: optional(boolean()),
2117
2117
  strictExecutionOrder: optional(boolean()),
2118
2118
  hmr: optional(HmrSchema),
2119
- attachDebugInfo: optional(boolean())
2119
+ attachDebugInfo: optional(union([
2120
+ literal("none"),
2121
+ literal("simple"),
2122
+ literal("full")
2123
+ ]))
2120
2124
  })),
2121
2125
  define: pipe(optional(record(string(), string())), description("Define global variables")),
2122
2126
  inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
@@ -2354,7 +2358,7 @@ var init_sourcemap = __esm({ "src/types/sourcemap.ts"() {} });
2354
2358
  //#endregion
2355
2359
  //#region src/utils/error.ts
2356
2360
  function normalizeErrors(rawErrors) {
2357
- const errors = rawErrors.map((e) => e instanceof Error ? e : Object.assign(new Error(), {
2361
+ const errors = rawErrors.map((e) => e instanceof Error ? e : Object.assign(/* @__PURE__ */ new Error(), {
2358
2362
  kind: e.kind,
2359
2363
  message: e.message,
2360
2364
  stack: void 0
@@ -2460,7 +2464,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
2460
2464
  var init_transform_sourcemap = __esm({ "src/utils/transform-sourcemap.ts"() {} });
2461
2465
 
2462
2466
  //#endregion
2463
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-D6FCK2GA.js
2467
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-D6FCK2GA.js
2464
2468
  function u$1(o, n, a) {
2465
2469
  let t$1 = (r) => o(r, ...n);
2466
2470
  return a === void 0 ? t$1 : Object.assign(t$1, {
@@ -2468,27 +2472,27 @@ function u$1(o, n, a) {
2468
2472
  lazyArgs: n
2469
2473
  });
2470
2474
  }
2471
- var init_chunk_D6FCK2GA = __esm({ "../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-D6FCK2GA.js"() {} });
2475
+ var init_chunk_D6FCK2GA = __esm({ "../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-D6FCK2GA.js"() {} });
2472
2476
 
2473
2477
  //#endregion
2474
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-WIMGWYZL.js
2478
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-WIMGWYZL.js
2475
2479
  function u(r, n, o) {
2476
2480
  let a = r.length - n.length;
2477
2481
  if (a === 0) return r(...n);
2478
2482
  if (a === 1) return u$1(r, n, o);
2479
2483
  throw new Error("Wrong number of arguments");
2480
2484
  }
2481
- var init_chunk_WIMGWYZL = __esm({ "../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-WIMGWYZL.js"() {
2485
+ var init_chunk_WIMGWYZL = __esm({ "../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-WIMGWYZL.js"() {
2482
2486
  init_chunk_D6FCK2GA();
2483
2487
  } });
2484
2488
 
2485
2489
  //#endregion
2486
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-3IFJP4R5.js
2490
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-3IFJP4R5.js
2487
2491
  function d(...r) {
2488
2492
  return u(i, r);
2489
2493
  }
2490
2494
  var i;
2491
- var init_chunk_3IFJP4R5 = __esm({ "../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-3IFJP4R5.js"() {
2495
+ var init_chunk_3IFJP4R5 = __esm({ "../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-3IFJP4R5.js"() {
2492
2496
  init_chunk_WIMGWYZL();
2493
2497
  i = (r, t$1) => {
2494
2498
  let a = [[], []];
@@ -2498,17 +2502,17 @@ var init_chunk_3IFJP4R5 = __esm({ "../../node_modules/.pnpm/remeda@2.22.5/node_m
2498
2502
  } });
2499
2503
 
2500
2504
  //#endregion
2501
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-5NQBDF4H.js
2505
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-5NQBDF4H.js
2502
2506
  function t(...n) {
2503
2507
  return u(Object.keys, n);
2504
2508
  }
2505
- var init_chunk_5NQBDF4H = __esm({ "../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/chunk-5NQBDF4H.js"() {
2509
+ var init_chunk_5NQBDF4H = __esm({ "../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/chunk-5NQBDF4H.js"() {
2506
2510
  init_chunk_WIMGWYZL();
2507
2511
  } });
2508
2512
 
2509
2513
  //#endregion
2510
- //#region ../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/index.js
2511
- var init_dist = __esm({ "../../node_modules/.pnpm/remeda@2.22.5/node_modules/remeda/dist/index.js"() {
2514
+ //#region ../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/index.js
2515
+ var init_dist = __esm({ "../../node_modules/.pnpm/remeda@2.23.0/node_modules/remeda/dist/index.js"() {
2512
2516
  init_chunk_3IFJP4R5();
2513
2517
  init_chunk_5NQBDF4H();
2514
2518
  } });
@@ -3269,13 +3273,13 @@ var init_normalized_output_options = __esm({ "src/options/normalized-output-opti
3269
3273
  return this.normalizedOutputPlugins;
3270
3274
  }
3271
3275
  get preserveModules() {
3272
- return this.outputOptions.preserveModules || false;
3276
+ return this.inner.preserveModules;
3273
3277
  }
3274
3278
  get preserveModulesRoot() {
3275
- return this.outputOptions.preserveModulesRoot;
3279
+ return this.inner.preserveModulesRoot;
3276
3280
  }
3277
3281
  get virtualDirname() {
3278
- return this.outputOptions.virtualDirname || "_virtual";
3282
+ return this.inner.virtualDirname;
3279
3283
  }
3280
3284
  };
3281
3285
  } });
@@ -3965,7 +3969,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3965
3969
  viteMode: inputOptions.experimental?.viteMode,
3966
3970
  resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset,
3967
3971
  hmr: bindingifyHmr(inputOptions.experimental?.hmr),
3968
- attachDebugInfo: inputOptions.experimental?.attachDebugInfo
3972
+ attachDebugInfo: bindingifyAttachDebugInfo(inputOptions.experimental?.attachDebugInfo)
3969
3973
  },
3970
3974
  profilerNames: inputOptions?.profilerNames,
3971
3975
  jsx,
@@ -3997,6 +4001,14 @@ function bindingifyHmr(hmr) {
3997
4001
  return hmr;
3998
4002
  }
3999
4003
  }
4004
+ function bindingifyAttachDebugInfo(attachDebugInfo) {
4005
+ switch (attachDebugInfo) {
4006
+ case void 0: return void 0;
4007
+ case "full": return import_binding$3.BindingAttachDebugInfo.Full;
4008
+ case "simple": return import_binding$3.BindingAttachDebugInfo.Simple;
4009
+ case "none": return import_binding$3.BindingAttachDebugInfo.None;
4010
+ }
4011
+ }
4000
4012
  function bindingifyExternal(external) {
4001
4013
  if (external) {
4002
4014
  if (typeof external === "function") return (id, importer, isResolved) => {
@@ -4677,7 +4689,8 @@ var init_rolldown_build = __esm({ "src/api/rolldown/rolldown-build.ts"() {
4677
4689
  return transformHmrPatchOutput(output);
4678
4690
  }
4679
4691
  async hmrInvalidate(file, firstInvalidatedBy) {
4680
- return this.#bundler?.bundler.hmrInvalidate(file, firstInvalidatedBy);
4692
+ const output = await this.#bundler.bundler.hmrInvalidate(file, firstInvalidatedBy);
4693
+ return transformHmrPatchOutput(output);
4681
4694
  }
4682
4695
  get watchFiles() {
4683
4696
  return this.#bundler?.bundler.getWatchFiles() ?? Promise.resolve([]);
@@ -4879,8 +4892,9 @@ var init_src = __esm({ "src/index.ts"() {
4879
4892
  init_build();
4880
4893
  init_rolldown();
4881
4894
  init_watch();
4895
+ init_define_config();
4882
4896
  VERSION = version;
4883
4897
  } });
4884
4898
 
4885
4899
  //#endregion
4886
- export { BuiltinPlugin, PluginContextData, PluginDriver, VERSION, assetPlugin, bindingifyPlugin, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, description$1 as description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, init_bindingify_plugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_plugin_context_data, init_plugin_driver, init_rolldown, init_src, init_transform_to_rollup_output, init_validator, init_watch, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin };
4900
+ export { BuiltinPlugin, PluginContextData, PluginDriver, VERSION, assetPlugin, bindingifyPlugin, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, description$1 as description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, init_bindingify_plugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_define_config, init_normalize_string_or_regex, init_plugin_context_data, init_plugin_driver, init_rolldown, init_src, init_transform_to_rollup_output, init_validator, init_watch, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.16",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "type": "commonjs",
6
6
  "homepage": "https://rolldown.rs/",
@@ -90,15 +90,15 @@
90
90
  "dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\n"
91
91
  },
92
92
  "dependencies": {
93
- "@oxc-project/runtime": "=0.72.3",
94
- "@oxc-project/types": "=0.72.3",
93
+ "@oxc-project/runtime": "=0.73.0",
94
+ "@oxc-project/types": "=0.73.0",
95
95
  "ansis": "^4.0.0",
96
- "@rolldown/pluginutils": "1.0.0-beta.15"
96
+ "@rolldown/pluginutils": "1.0.0-beta.16"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@napi-rs/cli": "3.0.0-alpha.88",
100
100
  "@napi-rs/wasm-runtime": "^0.2.10",
101
- "@oxc-node/cli": "^0.0.27",
101
+ "@oxc-node/cli": "^0.0.28",
102
102
  "@rollup/plugin-json": "^6.1.0",
103
103
  "@valibot/to-json-schema": "1.3.0",
104
104
  "buble": "^0.20.0",
@@ -106,7 +106,7 @@
106
106
  "emnapi": "^1.2.0",
107
107
  "execa": "^9.2.0",
108
108
  "glob": "^11.0.0",
109
- "oxc-parser": "=0.72.3",
109
+ "oxc-parser": "=0.73.0",
110
110
  "pathe": "^2.0.3",
111
111
  "remeda": "^2.10.0",
112
112
  "rolldown-plugin-dts": "^0.13.6",
@@ -119,21 +119,21 @@
119
119
  "typescript": "^5.7.3",
120
120
  "valibot": "1.1.0",
121
121
  "@rolldown/testing": "0.0.1",
122
- "rolldown": "1.0.0-beta.15"
122
+ "rolldown": "1.0.0-beta.16"
123
123
  },
124
124
  "optionalDependencies": {
125
- "@rolldown/binding-darwin-x64": "1.0.0-beta.15",
126
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.15",
127
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.15",
128
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.15",
129
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.15",
130
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.15",
131
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.15",
132
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.15",
133
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.15",
134
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.15",
135
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.15",
136
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.15"
125
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.16",
126
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.16",
127
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.16",
128
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.16",
129
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.16",
130
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.16",
131
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.16",
132
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.16",
133
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.16",
134
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.16",
135
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.16",
136
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.16"
137
137
  },
138
138
  "scripts": {
139
139
  "# Scrips for binding #": "_",