@rolldown/browser 1.0.2 → 1.1.0

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.mjs +6 -6
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -2
  4. package/dist/{error-u6fgq_tm.js → error-5Tc1aq0X.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +8 -5
  6. package/dist/experimental-index.d.mts +6 -5
  7. package/dist/experimental-index.mjs +9 -6
  8. package/dist/filter-index.d.mts +1 -1
  9. package/dist/index.browser.mjs +2 -2
  10. package/dist/index.d.mts +3 -3
  11. package/dist/index.mjs +3 -3
  12. package/dist/parallel-plugin-worker.mjs +1 -1
  13. package/dist/parallel-plugin.d.mts +2 -2
  14. package/dist/parse-ast-index.d.mts +1 -1
  15. package/dist/parse-ast-index.mjs +1 -1
  16. package/dist/plugins-index.d.mts +3 -3
  17. package/dist/{resolve-tsconfig-DDQjQ68j.js → resolve-tsconfig-zB6S1f4Q.js} +14 -3
  18. package/dist/rolldown-binding.wasi-browser.js +2 -1
  19. package/dist/rolldown-binding.wasi.cjs +1 -0
  20. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  21. package/dist/{rolldown-build-D3Q68dCD.js → rolldown-build-CDo_414H.js} +34 -10
  22. package/dist/shared/{binding-Ba2kzvIy.d.mts → binding-BhK3B-Zu.d.mts} +31 -0
  23. package/dist/shared/{bindingify-input-options-Dh93Higz.mjs → bindingify-input-options-Yh0p_yKx.mjs} +14 -6
  24. package/dist/shared/{constructors-DbOoVFJG.d.mts → constructors-CtnJN4Sg.d.mts} +2 -2
  25. package/dist/shared/{define-config-CgQHLEzf.d.mts → define-config-D0lnfATD.d.mts} +32 -12
  26. package/dist/shared/{load-config-CYjpnIlH.mjs → load-config-D8sdE9HQ.mjs} +1 -1
  27. package/dist/shared/{parse-Vf7R2RjR.mjs → parse-DYBaZ0kb.mjs} +1 -1
  28. package/dist/shared/{prompt-DewH0PjV.mjs → prompt-DYnaB1Nb.mjs} +1 -1
  29. package/dist/shared/{resolve-tsconfig-D8Galy_A.mjs → resolve-tsconfig-DsK7KzKK.mjs} +13 -2
  30. package/dist/shared/{rolldown-BFjamCgT.mjs → rolldown-CTBzrYF-.mjs} +1 -1
  31. package/dist/shared/{rolldown-build-BodFrzFa.mjs → rolldown-build-w_8ZCR-S.mjs} +21 -5
  32. package/dist/shared/{transform-DEcsn5bq.d.mts → transform-HS_zMlQ1.d.mts} +1 -1
  33. package/dist/shared/{utils-CA_QYuaU.d.mts → utils-m0ogxd-4.d.mts} +1 -1
  34. package/dist/shared/{watch-Dt8HdCIN.mjs → watch-C5dPEOJJ.mjs} +2 -2
  35. package/dist/utils-index.browser.mjs +5 -5
  36. package/dist/utils-index.d.mts +3 -3
  37. package/dist/utils-index.mjs +5 -5
  38. package/package.json +7 -2
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { n as onExit, t as watch } from "./shared/watch-Dt8HdCIN.mjs";
2
- import { C as version, S as description } from "./shared/bindingify-input-options-Dh93Higz.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-C5dPEOJJ.mjs";
2
+ import { C as version, S as description } from "./shared/bindingify-input-options-Yh0p_yKx.mjs";
3
3
  import { h as arraify } from "./shared/composable-filters-BcLvc0mh.mjs";
4
- import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-BodFrzFa.mjs";
5
- import { t as rolldown } from "./shared/rolldown-BFjamCgT.mjs";
6
- import { t as loadConfig } from "./shared/load-config-CYjpnIlH.mjs";
4
+ import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-w_8ZCR-S.mjs";
5
+ import { t as rolldown } from "./shared/rolldown-CTBzrYF-.mjs";
6
+ import { t as loadConfig } from "./shared/load-config-D8sdE9HQ.mjs";
7
7
  import path from "node:path";
8
8
  import process$1 from "node:process";
9
9
  import { performance } from "node:perf_hooks";
@@ -847,7 +847,7 @@ function getClearScreenFunction(options) {
847
847
  };
848
848
  }
849
849
  //#endregion
850
- //#region \0@oxc-project+runtime@0.132.0/helpers/usingCtx.js
850
+ //#region \0@oxc-project+runtime@0.134.0/helpers/esm/usingCtx.js
851
851
  function _usingCtx() {
852
852
  var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
853
853
  var n = Error();
package/dist/config.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-CgQHLEzf.mjs";
1
+ import { $ as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-D0lnfATD.mjs";
2
2
 
3
3
  //#region src/utils/load-config.d.ts
4
4
  /**
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { x as VERSION } from "./shared/bindingify-input-options-Dh93Higz.mjs";
1
+ import { x as VERSION } from "./shared/bindingify-input-options-Yh0p_yKx.mjs";
2
2
  import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
3
- import { t as loadConfig } from "./shared/load-config-CYjpnIlH.mjs";
3
+ import { t as loadConfig } from "./shared/load-config-D8sdE9HQ.mjs";
4
4
  export { VERSION, defineConfig, loadConfig };
@@ -14,7 +14,7 @@ function bindingifySourcemap(map) {
14
14
  } };
15
15
  }
16
16
  //#endregion
17
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/wrap.js
17
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/wrap.js
18
18
  function wrap(result) {
19
19
  let program, module, comments, errors;
20
20
  return {
@@ -1,8 +1,8 @@
1
1
  import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-A9UIvc9j.js";
2
- import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-D3Q68dCD.js";
3
- import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-u6fgq_tm.js";
2
+ import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-CDo_414H.js";
3
+ import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-5Tc1aq0X.js";
4
4
  import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./constructors-B3MtwuwE.js";
5
- import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-DDQjQ68j.js";
5
+ import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-zB6S1f4Q.js";
6
6
  import * as binding from "./rolldown-binding.wasi-browser.js";
7
7
  import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
8
8
  //#region src/api/dev/dev-engine.ts
@@ -69,10 +69,13 @@ var DevEngine = class DevEngine {
69
69
  return this.#inner.getBundleState();
70
70
  }
71
71
  async ensureLatestBuildOutput() {
72
- await this.#inner.ensureLatestBuildOutput();
72
+ unwrapBindingResult(await this.#inner.ensureLatestBuildOutput());
73
+ }
74
+ triggerFullBuild() {
75
+ this.#inner.triggerFullBuild();
73
76
  }
74
77
  async invalidate(file, firstInvalidatedBy) {
75
- return this.#inner.invalidate(file, firstInvalidatedBy);
78
+ return unwrapBindingResult(await this.#inner.invalidate(file, firstInvalidatedBy));
76
79
  }
77
80
  async registerModules(clientId, modules) {
78
81
  await this.#inner.registerModules(clientId, modules);
@@ -1,8 +1,8 @@
1
- import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-Ba2kzvIy.mjs";
2
- import { Tt as NormalizedOutputOptions, cn as RolldownOutput, l as InputOptions, mt as defineParallelPlugin, nn as OutputOptions, un as freeExternalMemory } from "./shared/define-config-CgQHLEzf.mjs";
3
- import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-CA_QYuaU.mjs";
4
- import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-DEcsn5bq.mjs";
5
- import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-DbOoVFJG.mjs";
1
+ import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-BhK3B-Zu.mjs";
2
+ import { Tt as NormalizedOutputOptions, cn as RolldownOutput, l as InputOptions, mt as defineParallelPlugin, nn as OutputOptions, un as freeExternalMemory } from "./shared/define-config-D0lnfATD.mjs";
3
+ import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-m0ogxd-4.mjs";
4
+ import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-HS_zMlQ1.mjs";
5
+ import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-CtnJN4Sg.mjs";
6
6
 
7
7
  //#region src/api/dev/dev-options.d.ts
8
8
  type DevOnHmrUpdates = (result: Error | {
@@ -89,6 +89,7 @@ declare class DevEngine {
89
89
  ensureCurrentBuildFinish(): Promise<void>;
90
90
  getBundleState(): Promise<BindingBundleState>;
91
91
  ensureLatestBuildOutput(): Promise<void>;
92
+ triggerFullBuild(): void;
92
93
  invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate[]>;
93
94
  registerModules(clientId: string, modules: string[]): Promise<void>;
94
95
  removeClient(clientId: string): Promise<void>;
@@ -1,10 +1,10 @@
1
1
  import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-CHVaSqeF.mjs";
2
- import { o as transformToRollupOutput } from "./shared/bindingify-input-options-Dh93Higz.mjs";
3
- import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-BodFrzFa.mjs";
2
+ import { o as transformToRollupOutput } from "./shared/bindingify-input-options-Yh0p_yKx.mjs";
3
+ import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-w_8ZCR-S.mjs";
4
4
  import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-B5cMIevi.mjs";
5
- import { n as parseSync$2, t as parse$2 } from "./shared/parse-Vf7R2RjR.mjs";
5
+ import { n as parseSync$2, t as parse$2 } from "./shared/parse-DYBaZ0kb.mjs";
6
6
  import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-YQsI-lJq.mjs";
7
- import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./shared/resolve-tsconfig-D8Galy_A.mjs";
7
+ import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./shared/resolve-tsconfig-DsK7KzKK.mjs";
8
8
  import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
9
9
  import { pathToFileURL } from "node:url";
10
10
  //#region src/api/dev/dev-engine.ts
@@ -71,10 +71,13 @@ var DevEngine = class DevEngine {
71
71
  return this.#inner.getBundleState();
72
72
  }
73
73
  async ensureLatestBuildOutput() {
74
- await this.#inner.ensureLatestBuildOutput();
74
+ unwrapBindingResult(await this.#inner.ensureLatestBuildOutput());
75
+ }
76
+ triggerFullBuild() {
77
+ this.#inner.triggerFullBuild();
75
78
  }
76
79
  async invalidate(file, firstInvalidatedBy) {
77
- return this.#inner.invalidate(file, firstInvalidatedBy);
80
+ return unwrapBindingResult(await this.#inner.invalidate(file, firstInvalidatedBy));
78
81
  }
79
82
  async registerModules(clientId, modules) {
80
83
  await this.#inner.registerModules(clientId, modules);
@@ -1,4 +1,4 @@
1
- import { B as exclude, F as FilterExpressionKind, G as interpreter, H as id, I as QueryFilterObject, J as not, K as interpreterImpl, L as TopLevelFilterExpression, N as withFilter, P as FilterExpression, R as and, U as importerId, V as exprInterpreter, W as include, X as queries, Y as or, Z as query, q as moduleType, z as code } from "./shared/define-config-CgQHLEzf.mjs";
1
+ import { B as exclude, F as FilterExpressionKind, G as interpreter, H as id, I as QueryFilterObject, J as not, K as interpreterImpl, L as TopLevelFilterExpression, N as withFilter, P as FilterExpression, R as and, U as importerId, V as exprInterpreter, W as include, X as queries, Y as or, Z as query, q as moduleType, z as code } from "./shared/define-config-D0lnfATD.mjs";
2
2
 
3
3
  //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-A9UIvc9j.js";
2
- import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-D3Q68dCD.js";
3
- import { t as aggregateBindingErrorsIntoJsError } from "./error-u6fgq_tm.js";
2
+ import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-CDo_414H.js";
3
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-5Tc1aq0X.js";
4
4
  import { BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
5
5
  //#region src/api/rolldown/index.ts
6
6
  /**
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { z as PreRenderedChunk } from "./shared/binding-Ba2kzvIy.mjs";
1
+ import { z as PreRenderedChunk } from "./shared/binding-BhK3B-Zu.mjs";
2
2
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-BSNejiLS.mjs";
3
- import { $ as VERSION, $t as GlobalsFunction, A as RolldownPluginOption, At as WarningHandlerWithDefault, Bt as build, C as ParallelPluginHooks, Ct as RolldownFsModule, D as ResolveIdResult, Dt as TransformOptions, E as ResolveIdExtraOptions, Et as NormalizedInputOptions, Ft as RolldownWatcherWatcherEventMap, Gt as ChunkFileNamesFunction, Ht as AdvancedChunksGroup, It as WatchOptions, Jt as CodeSplittingNameFunction, Kt as ChunkingContext, Lt as rolldown, M as TransformResult, Mt as watch, Nt as RolldownWatcher, O as ResolvedId, Ot as ChecksOptions, Pt as RolldownWatcherEvent, Q as RUNTIME_MODULE_ID, Qt as GeneratedCodePreset, Rt as RolldownBuild, S as ObjectHook, St as RolldownFileStats, T as Plugin, Tt as NormalizedOutputOptions, Ut as AdvancedChunksOptions, Vt as AddonFunction, Wt as BuiltinModuleTag, Xt as CommentsOptions, Yt as CodeSplittingOptions, Zt as GeneratedCodeOptions, _ as HookFilterExtension, _t as GeneralHookFilter, a as ChunkOptimizationOptions, an as OutputChunk, at as TransformPluginContext, b as ModuleOptions, bt as BufferEncoding, c as InputOption, cn as RolldownOutput, ct as EmittedFile, d as OptimizationOptions, dn as ModuleInfo, dt as PluginContext, en as MinifyOptions, et as BundleError, f as WatcherFileWatcherOptions, fn as SourcemapIgnoreListOption, ft as PluginContextResolveOptions, g as FunctionPluginHooks, gt as PluginContextMeta, h as CustomPluginOptions, ht as MinimalPluginContext, i as RolldownOptions, in as OutputAsset, it as TreeshakingOptions, j as SourceDescription, jt as RolldownMagicString, k as RolldownPlugin, kt as LoggingFunction, l as InputOptions, ln as SourceMap, lt as EmittedPrebuiltChunk, m as AsyncPluginHooks, n as RolldownOptionsFunction, nn as OutputOptions, nt as SourceMapInput, o as ExternalOption, on as RenderedChunk, ot as EmittedAsset, p as WatcherOptions, pt as DefineParallelPluginResult, qt as CodeSplittingGroup, r as defineConfig, rn as PreRenderedAsset, rt as OutputBundle, s as ExternalOptionFunction, sn as RenderedModule, st as EmittedChunk, t as ConfigExport, tn as ModuleFormat, tt as ExistingRawSourceMap, u as ModuleTypes, ut as GetModuleInfo, v as ImportKind, vt as HookFilter, w as PartialResolvedId, wt as InternalModuleFormat, x as ModuleType, xt as RolldownDirectoryEntry, y as LoadResult, yt as ModuleTypeFilter, zt as BuildOptions } from "./shared/define-config-CgQHLEzf.mjs";
4
- import { o as PartialNull } from "./shared/utils-CA_QYuaU.mjs";
3
+ import { $ as VERSION, $t as GlobalsFunction, A as RolldownPluginOption, At as WarningHandlerWithDefault, Bt as build, C as ParallelPluginHooks, Ct as RolldownFsModule, D as ResolveIdResult, Dt as TransformOptions, E as ResolveIdExtraOptions, Et as NormalizedInputOptions, Ft as RolldownWatcherWatcherEventMap, Gt as ChunkFileNamesFunction, Ht as AdvancedChunksGroup, It as WatchOptions, Jt as CodeSplittingNameFunction, Kt as ChunkingContext, Lt as rolldown, M as TransformResult, Mt as watch, Nt as RolldownWatcher, O as ResolvedId, Ot as ChecksOptions, Pt as RolldownWatcherEvent, Q as RUNTIME_MODULE_ID, Qt as GeneratedCodePreset, Rt as RolldownBuild, S as ObjectHook, St as RolldownFileStats, T as Plugin, Tt as NormalizedOutputOptions, Ut as AdvancedChunksOptions, Vt as AddonFunction, Wt as BuiltinModuleTag, Xt as CommentsOptions, Yt as CodeSplittingOptions, Zt as GeneratedCodeOptions, _ as HookFilterExtension, _t as GeneralHookFilter, a as ChunkOptimizationOptions, an as OutputChunk, at as TransformPluginContext, b as ModuleOptions, bt as BufferEncoding, c as InputOption, cn as RolldownOutput, ct as EmittedFile, d as OptimizationOptions, dn as ModuleInfo, dt as PluginContext, en as MinifyOptions, et as BundleError, f as WatcherFileWatcherOptions, fn as SourcemapIgnoreListOption, ft as PluginContextResolveOptions, g as FunctionPluginHooks, gt as PluginContextMeta, h as CustomPluginOptions, ht as MinimalPluginContext, i as RolldownOptions, in as OutputAsset, it as TreeshakingOptions, j as SourceDescription, jt as RolldownMagicString, k as RolldownPlugin, kt as LoggingFunction, l as InputOptions, ln as SourceMap, lt as EmittedPrebuiltChunk, m as AsyncPluginHooks, n as RolldownOptionsFunction, nn as OutputOptions, nt as SourceMapInput, o as ExternalOption, on as RenderedChunk, ot as EmittedAsset, p as WatcherOptions, pt as DefineParallelPluginResult, qt as CodeSplittingGroup, r as defineConfig, rn as PreRenderedAsset, rt as OutputBundle, s as ExternalOptionFunction, sn as RenderedModule, st as EmittedChunk, t as ConfigExport, tn as ModuleFormat, tt as ExistingRawSourceMap, u as ModuleTypes, ut as GetModuleInfo, v as ImportKind, vt as HookFilter, w as PartialResolvedId, wt as InternalModuleFormat, x as ModuleType, xt as RolldownDirectoryEntry, y as LoadResult, yt as ModuleTypeFilter, zt as BuildOptions } from "./shared/define-config-D0lnfATD.mjs";
4
+ import { o as PartialNull } from "./shared/utils-m0ogxd-4.mjs";
5
5
  export { type AddonFunction, type AdvancedChunksGroup, type AdvancedChunksOptions, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, type BuiltinModuleTag, type BundleError, type ChecksOptions, type ChunkFileNamesFunction, type ChunkOptimizationOptions, type ChunkingContext, type CodeSplittingGroup, type CodeSplittingNameFunction, type CodeSplittingOptions, type CommentsOptions, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedChunk, type EmittedFile, type EmittedPrebuiltChunk, type ExistingRawSourceMap, type ExternalOption, type ExternalOptionFunction, type FunctionPluginHooks, type GeneralHookFilter, type GeneratedCodeOptions, type GeneratedCodePreset, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PluginContextResolveOptions, type PreRenderedAsset, type PreRenderedChunk, RUNTIME_MODULE_ID, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownError, type RolldownError as RollupError, type RolldownFileStats, type RolldownFsModule, type RolldownLog, type RolldownLog as RollupLog, type RolldownLogWithString, type RolldownLogWithString as RollupLogWithString, RolldownMagicString, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RolldownWatcherWatcherEventMap, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformOptions, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherFileWatcherOptions, type WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { n as onExit, t as watch } from "./shared/watch-Dt8HdCIN.mjs";
2
- import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-Dh93Higz.mjs";
3
- import { t as rolldown } from "./shared/rolldown-BFjamCgT.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-C5dPEOJJ.mjs";
2
+ import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-Yh0p_yKx.mjs";
3
+ import { t as rolldown } from "./shared/rolldown-CTBzrYF-.mjs";
4
4
  import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
5
5
  import { isMainThread } from "node:worker_threads";
6
6
  import { initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
@@ -1,4 +1,4 @@
1
- import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-Dh93Higz.mjs";
1
+ import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-Yh0p_yKx.mjs";
2
2
  import { parentPort, workerData } from "node:worker_threads";
3
3
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
4
4
  //#region src/parallel-plugin-worker.ts
@@ -1,5 +1,5 @@
1
- import { T as Plugin } from "./shared/define-config-CgQHLEzf.mjs";
2
- import { i as MaybePromise } from "./shared/utils-CA_QYuaU.mjs";
1
+ import { T as Plugin } from "./shared/define-config-D0lnfATD.mjs";
2
+ import { i as MaybePromise } from "./shared/utils-m0ogxd-4.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- import { L as ParseResult$1, R as ParserOptions$1, bn as Program } from "./shared/binding-Ba2kzvIy.mjs";
1
+ import { L as ParseResult$1, R as ParserOptions$1, bn as Program } from "./shared/binding-BhK3B-Zu.mjs";
2
2
 
3
3
  //#region src/parse-ast-index.d.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-aMKUxRpj.mjs";
2
- import { n as parseSync, t as parse } from "./shared/parse-Vf7R2RjR.mjs";
2
+ import { n as parseSync, t as parse } from "./shared/parse-DYBaZ0kb.mjs";
3
3
  //#region src/parse-ast-index.ts
4
4
  function wrap(result, filename, sourceText) {
5
5
  if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
@@ -1,6 +1,6 @@
1
- import { m as BindingReplacePluginConfig } from "./shared/binding-Ba2kzvIy.mjs";
2
- import { t as BuiltinPlugin } from "./shared/utils-CA_QYuaU.mjs";
3
- import { t as esmExternalRequirePlugin } from "./shared/constructors-DbOoVFJG.mjs";
1
+ import { m as BindingReplacePluginConfig } from "./shared/binding-BhK3B-Zu.mjs";
2
+ import { t as BuiltinPlugin } from "./shared/utils-m0ogxd-4.mjs";
3
+ import { t as esmExternalRequirePlugin } from "./shared/constructors-CtnJN4Sg.mjs";
4
4
 
5
5
  //#region src/builtin-plugin/replace-plugin.d.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-u6fgq_tm.js";
1
+ import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-5Tc1aq0X.js";
2
2
  import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync, resolveTsconfig } from "./rolldown-binding.wasi-browser.js";
3
3
  //#region src/utils/minify.ts
4
4
  /**
@@ -36,6 +36,17 @@ function minifySync$1(filename, sourceText, options) {
36
36
  //#endregion
37
37
  //#region src/utils/transform.ts
38
38
  const yarnPnp$1 = typeof process === "object" && !!process.versions?.pnp;
39
+ function normalizeBindingWarning(warning) {
40
+ if (warning.type === "JsError") return warning.field0;
41
+ return {
42
+ code: warning.field0.kind,
43
+ message: warning.field0.message,
44
+ id: warning.field0.id,
45
+ exporter: warning.field0.exporter,
46
+ loc: warning.field0.loc,
47
+ pos: warning.field0.pos
48
+ };
49
+ }
39
50
  /**
40
51
  * Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
41
52
  *
@@ -59,7 +70,7 @@ async function transform(filename, sourceText, options, cache) {
59
70
  return {
60
71
  ...result,
61
72
  errors: result.errors.map(normalizeBindingError),
62
- warnings: result.warnings.map((w) => w.field0)
73
+ warnings: result.warnings.map(normalizeBindingWarning)
63
74
  };
64
75
  }
65
76
  /**
@@ -83,7 +94,7 @@ function transformSync(filename, sourceText, options, cache) {
83
94
  return {
84
95
  ...result,
85
96
  errors: result.errors.map(normalizeBindingError),
86
- warnings: result.warnings.map((w) => w.field0)
97
+ warnings: result.warnings.map(normalizeBindingWarning)
87
98
  };
88
99
  }
89
100
  //#endregion
@@ -43,7 +43,7 @@ const {
43
43
  })
44
44
  worker.addEventListener('message', __wasmCreateOnMessageForFsProxy(__fs))
45
45
 
46
- worker.addEventListener('error', (event) => {
46
+ worker.addEventListener('message', (event) => {
47
47
  if (event.data && typeof event.data === 'object' && event.data.type === 'error') {
48
48
  window.dispatchEvent(new CustomEvent('napi-rs-worker-error', { detail: event.data }))
49
49
  }
@@ -69,6 +69,7 @@ const {
69
69
  },
70
70
  })
71
71
  export default __napiModule.exports
72
+ export const LegalCommentsMode = __napiModule.exports.LegalCommentsMode
72
73
  export const minify = __napiModule.exports.minify
73
74
  export const minifySync = __napiModule.exports.minifySync
74
75
  export const Severity = __napiModule.exports.Severity
@@ -108,6 +108,7 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule
108
108
  },
109
109
  })
110
110
  module.exports = __napiModule.exports
111
+ module.exports.LegalCommentsMode = __napiModule.exports.LegalCommentsMode
111
112
  module.exports.minify = __napiModule.exports.minify
112
113
  module.exports.minifySync = __napiModule.exports.minifySync
113
114
  module.exports.Severity = __napiModule.exports.Severity
@@ -1,5 +1,5 @@
1
1
  import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-A9UIvc9j.js";
2
- import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-u6fgq_tm.js";
2
+ import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-5Tc1aq0X.js";
3
3
  import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
4
4
  //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
5
5
  let _lazyMatch = () => {
@@ -454,7 +454,7 @@ const win32 = /* @__PURE__ */ mix(";");
454
454
  *
455
455
  * @category Plugin APIs
456
456
  */
457
- const VERSION = "1.0.2";
457
+ const VERSION = "1.1.0";
458
458
  //#endregion
459
459
  //#region src/constants/index.ts
460
460
  /**
@@ -1888,7 +1888,8 @@ const TransformOptionsSchema = /* @__PURE__ */ object({
1888
1888
  helpers: /* @__PURE__ */ optional(/* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")])) })),
1889
1889
  decorator: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1890
1890
  legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1891
- emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1891
+ emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1892
+ strictNullChecks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1892
1893
  })),
1893
1894
  jsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1894
1895
  /* @__PURE__ */ literal(false),
@@ -1956,7 +1957,8 @@ const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
1956
1957
  duplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when both the code and postBanner contain shebang")),
1957
1958
  unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
1958
1959
  ineffectiveDynamicImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting")),
1959
- largeBarrelModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit info logs when a barrel module has a very large number of re-exports (more than 5000)"))
1960
+ largeBarrelModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit info logs when a barrel module has a very large number of re-exports (more than 5000)")),
1961
+ sourcemapBroken: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a plugin transforms code without generating a sourcemap"))
1960
1962
  });
1961
1963
  const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
1962
1964
  compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
@@ -1989,7 +1991,16 @@ const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
1989
1991
  })])),
1990
1992
  debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1991
1993
  })])),
1992
- codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) })]))
1994
+ codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
1995
+ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1996
+ legalComments: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1997
+ /* @__PURE__ */ literal("none"),
1998
+ /* @__PURE__ */ literal("inline"),
1999
+ /* @__PURE__ */ literal("eof"),
2000
+ /* @__PURE__ */ literal("external"),
2001
+ /* @__PURE__ */ strictObject({ linked: /* @__PURE__ */ string() })
2002
+ ]))
2003
+ })]))
1993
2004
  });
1994
2005
  const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
1995
2006
  alias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
@@ -2155,6 +2166,7 @@ const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
2155
2166
  maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2156
2167
  entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2157
2168
  entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2169
+ includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2158
2170
  tags: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
2159
2171
  })))
2160
2172
  });
@@ -2429,7 +2441,7 @@ function bindingAssetSource(source) {
2429
2441
  return { inner: source };
2430
2442
  }
2431
2443
  //#endregion
2432
- //#region \0@oxc-project+runtime@0.132.0/helpers/decorate.js
2444
+ //#region \0@oxc-project+runtime@0.134.0/helpers/esm/decorate.js
2433
2445
  function __decorate(decorators, target, key, desc) {
2434
2446
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2435
2447
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -2726,7 +2738,7 @@ function transformToOutputBundle(context, output, changed) {
2726
2738
  const originalStackTraceLimit = Error.stackTraceLimit;
2727
2739
  Error.stackTraceLimit = 2;
2728
2740
  const message = "This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored. https://rollupjs.org/plugin-development/#generatebundle:~:text=DANGER,this.emitFile.";
2729
- const stack = new Error(message).stack ?? message;
2741
+ const stack = (/* @__PURE__ */ new Error(message)).stack ?? message;
2730
2742
  Error.stackTraceLimit = originalStackTraceLimit;
2731
2743
  context.warn({
2732
2744
  message: stack,
@@ -3556,16 +3568,18 @@ function bindingifyTransform(args) {
3556
3568
  });
3557
3569
  let normalizedCode = void 0;
3558
3570
  let map = ret.map;
3571
+ let mapHandledByNativeChannel = false;
3559
3572
  if (typeof ret.code === "string") normalizedCode = ret.code;
3560
3573
  else if (ret.code instanceof RolldownMagicString) {
3561
3574
  let magicString = ret.code;
3562
3575
  normalizedCode = magicString.toString();
3563
3576
  let fallbackSourcemap = ctx.sendMagicString(magicString);
3564
3577
  if (fallbackSourcemap != void 0) map = fallbackSourcemap;
3578
+ else mapHandledByNativeChannel = true;
3565
3579
  }
3566
3580
  return {
3567
3581
  code: normalizedCode,
3568
- map: bindingifySourcemap$1(normalizeTransformHookSourcemap(id, code, map)),
3582
+ map: bindingifySourcemap$1(normalizeTransformHookSourcemap(id, code, map)) ?? (mapHandledByNativeChannel || ret.map === null ? null : void 0),
3569
3583
  moduleSideEffects: moduleOption.moduleSideEffects ?? void 0,
3570
3584
  moduleType: ret.moduleType
3571
3585
  };
@@ -3671,7 +3685,10 @@ function bindingifyRenderChunk(args) {
3671
3685
  if (ret.code instanceof RolldownMagicString) {
3672
3686
  const magicString = ret.code;
3673
3687
  const normalizedCode = magicString.toString();
3674
- if (ret.map === null) return { code: normalizedCode };
3688
+ if (ret.map === null) return {
3689
+ code: normalizedCode,
3690
+ map: null
3691
+ };
3675
3692
  if (ret.map === void 0) {
3676
3693
  const generatedMap = magicString.generateMap();
3677
3694
  return {
@@ -3690,7 +3707,10 @@ function bindingifyRenderChunk(args) {
3690
3707
  map: bindingifySourcemap$1(ret.map)
3691
3708
  };
3692
3709
  }
3693
- if (!ret.map) return { code: ret.code };
3710
+ if (ret.map === null) return {
3711
+ code: ret.code,
3712
+ map: null
3713
+ };
3694
3714
  return {
3695
3715
  code: ret.code,
3696
3716
  map: bindingifySourcemap$1(ret.map)
@@ -5283,6 +5303,10 @@ var RolldownBuild = class RolldownBuild {
5283
5303
  /**
5284
5304
  * Close the bundle and free resources.
5285
5305
  *
5306
+ * This method should be called even if the {@linkcode generate} method
5307
+ * or the {@linkcode write} method threw an error. It should be called
5308
+ * even if neither of the methods are called.
5309
+ *
5286
5310
  * This method is called automatically when using `using` syntax.
5287
5311
  *
5288
5312
  * @example
@@ -1310,6 +1310,20 @@ interface CodegenOptions {
1310
1310
  * @default true
1311
1311
  */
1312
1312
  removeWhitespace?: boolean;
1313
+ /**
1314
+ * How to handle legal comments (comments containing `@license`, `@preserve`, or starting with `//!`/`/*!`).
1315
+ *
1316
+ * * `"none"` - Do not preserve any legal comments.
1317
+ * * `"inline"` - Preserve all legal comments inline.
1318
+ * * `"eof"` - Move all legal comments to the end of the file.
1319
+ * * `"external"` - Extract legal comments without linking.
1320
+ * * `{ linked: "path/to/legal.txt" }` - Extract legal comments and add a link comment to the given path.
1321
+ *
1322
+ * @default "none" (when minifying)
1323
+ */
1324
+ legalComments?: 'none' | 'inline' | 'eof' | 'external' | {
1325
+ linked: string;
1326
+ };
1313
1327
  }
1314
1328
  interface CompressOptions {
1315
1329
  /**
@@ -1435,6 +1449,11 @@ interface MinifyResult {
1435
1449
  code: string;
1436
1450
  map?: SourceMap;
1437
1451
  errors: Array<OxcError>;
1452
+ /**
1453
+ * Legal comments extracted from the source code.
1454
+ * Only populated when `codegen.legalComments` is `"linked"` or `"external"`.
1455
+ */
1456
+ legalComments: Array<string>;
1438
1457
  }
1439
1458
  interface TreeShakeOptions {
1440
1459
  /**
@@ -2074,6 +2093,18 @@ interface DecoratorOptions {
2074
2093
  * @default false
2075
2094
  */
2076
2095
  emitDecoratorMetadata?: boolean;
2096
+ /**
2097
+ * Aligns nullable-union `design:type` emission with `--strictNullChecks`.
2098
+ *
2099
+ * When `true` (default), `T | null` and `T | undefined` emit `Object`, matching tsc strict.
2100
+ * When `false`, `null` and `undefined` are elided from the union so the underlying
2101
+ * primitive constructor is emitted, matching tsc with `--strictNullChecks=false`
2102
+ * and `babel-plugin-transform-typescript-metadata`.
2103
+ *
2104
+ * @see https://www.typescriptlang.org/tsconfig/#strictNullChecks
2105
+ * @default true
2106
+ */
2107
+ strictNullChecks?: boolean;
2077
2108
  }
2078
2109
  type HelperMode =
2079
2110
  /**
@@ -7,7 +7,7 @@ import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, Bin
7
7
  import path from "node:path";
8
8
  import fsp from "node:fs/promises";
9
9
  //#region package.json
10
- var version = "1.0.2";
10
+ var version = "1.1.0";
11
11
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
12
12
  //#endregion
13
13
  //#region src/constants/version.ts
@@ -218,7 +218,7 @@ function bindingAssetSource(source) {
218
218
  return { inner: source };
219
219
  }
220
220
  //#endregion
221
- //#region \0@oxc-project+runtime@0.132.0/helpers/decorate.js
221
+ //#region \0@oxc-project+runtime@0.134.0/helpers/esm/decorate.js
222
222
  function __decorate(decorators, target, key, desc) {
223
223
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
224
224
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -515,7 +515,7 @@ function transformToOutputBundle(context, output, changed) {
515
515
  const originalStackTraceLimit = Error.stackTraceLimit;
516
516
  Error.stackTraceLimit = 2;
517
517
  const message = "This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored. https://rollupjs.org/plugin-development/#generatebundle:~:text=DANGER,this.emitFile.";
518
- const stack = new Error(message).stack ?? message;
518
+ const stack = (/* @__PURE__ */ new Error(message)).stack ?? message;
519
519
  Error.stackTraceLimit = originalStackTraceLimit;
520
520
  context.warn({
521
521
  message: stack,
@@ -1190,16 +1190,18 @@ function bindingifyTransform(args) {
1190
1190
  });
1191
1191
  let normalizedCode = void 0;
1192
1192
  let map = ret.map;
1193
+ let mapHandledByNativeChannel = false;
1193
1194
  if (typeof ret.code === "string") normalizedCode = ret.code;
1194
1195
  else if (ret.code instanceof RolldownMagicString) {
1195
1196
  let magicString = ret.code;
1196
1197
  normalizedCode = magicString.toString();
1197
1198
  let fallbackSourcemap = ctx.sendMagicString(magicString);
1198
1199
  if (fallbackSourcemap != void 0) map = fallbackSourcemap;
1200
+ else mapHandledByNativeChannel = true;
1199
1201
  }
1200
1202
  return {
1201
1203
  code: normalizedCode,
1202
- map: bindingifySourcemap(normalizeTransformHookSourcemap(id, code, map)),
1204
+ map: bindingifySourcemap(normalizeTransformHookSourcemap(id, code, map)) ?? (mapHandledByNativeChannel || ret.map === null ? null : void 0),
1203
1205
  moduleSideEffects: moduleOption.moduleSideEffects ?? void 0,
1204
1206
  moduleType: ret.moduleType
1205
1207
  };
@@ -1305,7 +1307,10 @@ function bindingifyRenderChunk(args) {
1305
1307
  if (ret.code instanceof RolldownMagicString) {
1306
1308
  const magicString = ret.code;
1307
1309
  const normalizedCode = magicString.toString();
1308
- if (ret.map === null) return { code: normalizedCode };
1310
+ if (ret.map === null) return {
1311
+ code: normalizedCode,
1312
+ map: null
1313
+ };
1309
1314
  if (ret.map === void 0) {
1310
1315
  const generatedMap = magicString.generateMap();
1311
1316
  return {
@@ -1324,7 +1329,10 @@ function bindingifyRenderChunk(args) {
1324
1329
  map: bindingifySourcemap(ret.map)
1325
1330
  };
1326
1331
  }
1327
- if (!ret.map) return { code: ret.code };
1332
+ if (ret.map === null) return {
1333
+ code: ret.code,
1334
+ map: null
1335
+ };
1328
1336
  return {
1329
1337
  code: ret.code,
1330
1338
  map: bindingifySourcemap(ret.map)
@@ -1,5 +1,5 @@
1
- import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-Ba2kzvIy.mjs";
2
- import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-CA_QYuaU.mjs";
1
+ import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-BhK3B-Zu.mjs";
2
+ import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-m0ogxd-4.mjs";
3
3
 
4
4
  //#region src/builtin-plugin/constructors.d.ts
5
5
  declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
@@ -1,6 +1,6 @@
1
- import { A as ExternalMemoryStatus, N as JsxOptions, P as MinifyOptions$1, R as ParserOptions, U as TransformOptions$1, bn as Program, c as BindingHookResolveIdExtraArgs, d as BindingPluginContextResolveOptions, h as BindingTransformHookExtraArgs, k as BindingWatcherBundler, p as BindingRenderedChunk, u as BindingMagicString, z as PreRenderedChunk } from "./binding-Ba2kzvIy.mjs";
1
+ import { A as ExternalMemoryStatus, N as JsxOptions, P as MinifyOptions$1, R as ParserOptions, U as TransformOptions$1, bn as Program, c as BindingHookResolveIdExtraArgs, d as BindingPluginContextResolveOptions, h as BindingTransformHookExtraArgs, k as BindingWatcherBundler, p as BindingRenderedChunk, u as BindingMagicString, z as PreRenderedChunk } from "./binding-BhK3B-Zu.mjs";
2
2
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-BSNejiLS.mjs";
3
- import { a as NullValue, i as MaybePromise, n as MakeAsync, o as PartialNull, r as MaybeArray, s as StringOrRegExp$1, t as BuiltinPlugin } from "./utils-CA_QYuaU.mjs";
3
+ import { a as NullValue, i as MaybePromise, n as MakeAsync, o as PartialNull, r as MaybeArray, s as StringOrRegExp$1, t as BuiltinPlugin } from "./utils-m0ogxd-4.mjs";
4
4
 
5
5
  //#region src/types/misc.d.ts
6
6
  /** @inline */
@@ -1133,6 +1133,20 @@ type CodeSplittingGroup = {
1133
1133
  */
1134
1134
  entriesAwareMergeThreshold?: number;
1135
1135
  /**
1136
+ * Whether to include captured modules' dependencies.
1137
+ *
1138
+ * Enabling this option reduces the chance of generating circular chunks.
1139
+ *
1140
+ * If you want to disable this behavior, it's recommended to both set
1141
+ * - {@linkcode InputOptions.preserveEntrySignatures | preserveEntrySignatures}: `false | 'allow-extension'`
1142
+ * - {@linkcode OutputOptions.strictExecutionOrder | strictExecutionOrder}: `true`
1143
+ *
1144
+ * to avoid generating invalid chunks.
1145
+ *
1146
+ * @default true
1147
+ */
1148
+ includeDependenciesRecursively?: boolean;
1149
+ /**
1136
1150
  * Filter modules by tags. Only modules that have **all** specified tags
1137
1151
  * are captured by this group. Combines with `test` and other filters —
1138
1152
  * a module must match all criteria.
@@ -1159,15 +1173,7 @@ type AdvancedChunksGroup = CodeSplittingGroup;
1159
1173
  */
1160
1174
  type CodeSplittingOptions = {
1161
1175
  /**
1162
- * By default, each group will also include captured modules' dependencies. This reduces the chance of generating circular chunks.
1163
- *
1164
- * If you want to disable this behavior, it's recommended to both set
1165
- * - {@linkcode InputOptions.preserveEntrySignatures | preserveEntrySignatures}: `false | 'allow-extension'`
1166
- * - {@linkcode OutputOptions.strictExecutionOrder | strictExecutionOrder}: `true`
1167
- *
1168
- * to avoid generating invalid chunks.
1169
- *
1170
- * @default true
1176
+ * Global fallback of {@linkcode CodeSplittingGroup.includeDependenciesRecursively | group.includeDependenciesRecursively}, if it's not specified in the group.
1171
1177
  */
1172
1178
  includeDependenciesRecursively?: boolean;
1173
1179
  /**
@@ -1274,6 +1280,10 @@ declare class RolldownBuild {
1274
1280
  /**
1275
1281
  * Close the bundle and free resources.
1276
1282
  *
1283
+ * This method should be called even if the {@linkcode generate} method
1284
+ * or the {@linkcode write} method threw an error. It should be called
1285
+ * even if neither of the methods are called.
1286
+ *
1277
1287
  * This method is called automatically when using `using` syntax.
1278
1288
  *
1279
1289
  * @example
@@ -1620,9 +1630,16 @@ interface ChecksOptions {
1620
1630
  * Such modules can significantly slow down module resolution. Consider using
1621
1631
  * [`@rolldown/plugin-transform-imports`](https://github.com/rolldown/plugins/tree/main/packages/transform-imports)
1622
1632
  * to rewrite barrel imports at the source level so the barrel file is never loaded.
1633
+ *
1634
+ * See [Large barrel modules](https://rolldown.rs/in-depth/lazy-barrel-optimization#large-barrel-modules) for more details.
1623
1635
  * @default true
1624
1636
  * */
1625
1637
  largeBarrelModules?: boolean;
1638
+ /**
1639
+ * Whether to emit warnings when a plugin transforms code without generating a sourcemap.
1640
+ * @default true
1641
+ * */
1642
+ sourcemapBroken?: boolean;
1626
1643
  }
1627
1644
  //#endregion
1628
1645
  //#region src/options/transform-options.d.ts
@@ -3819,8 +3836,11 @@ interface InputOptions {
3819
3836
  * Lazy barrel optimization avoids compiling unused re-export modules in side-effect-free barrel modules,
3820
3837
  * significantly improving build performance for large codebases with many barrel modules.
3821
3838
  *
3839
+ * This option is planned to be removed in the future. If you need to opt out, please open an issue
3840
+ * describing your use case so we can address it before the option is gone.
3841
+ *
3822
3842
  * @see {@link https://rolldown.rs/in-depth/lazy-barrel-optimization | Lazy Barrel Documentation}
3823
- * @default false
3843
+ * @default true
3824
3844
  */
3825
3845
  lazyBarrel?: boolean;
3826
3846
  };
@@ -1,4 +1,4 @@
1
- import { t as rolldown } from "./rolldown-BFjamCgT.mjs";
1
+ import { t as rolldown } from "./rolldown-CTBzrYF-.mjs";
2
2
  import path from "node:path";
3
3
  import { readdir } from "node:fs/promises";
4
4
  import { cwd } from "node:process";
@@ -1,5 +1,5 @@
1
1
  import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
2
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/wrap.js
2
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/wrap.js
3
3
  function wrap(result) {
4
4
  let program, module, comments, errors;
5
5
  return {
@@ -134,7 +134,7 @@ function requirePicocolors() {
134
134
  picocolors.exports.createColors = createColors;
135
135
  return picocolors.exports;
136
136
  }
137
- const e = /* @__PURE__ */ getDefaultExportFromCjs(/* @__PURE__ */ requirePicocolors());
137
+ const e = /*@__PURE__*/ getDefaultExportFromCjs(/* @__PURE__ */ requirePicocolors());
138
138
  function J({ onlyFirst: t = false } = {}) {
139
139
  const F = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
140
140
  return new RegExp(F, t ? void 0 : "g");
@@ -36,6 +36,17 @@ function minifySync$1(filename, sourceText, options) {
36
36
  //#endregion
37
37
  //#region src/utils/transform.ts
38
38
  const yarnPnp$1 = typeof process === "object" && !!process.versions?.pnp;
39
+ function normalizeBindingWarning(warning) {
40
+ if (warning.type === "JsError") return warning.field0;
41
+ return {
42
+ code: warning.field0.kind,
43
+ message: warning.field0.message,
44
+ id: warning.field0.id,
45
+ exporter: warning.field0.exporter,
46
+ loc: warning.field0.loc,
47
+ pos: warning.field0.pos
48
+ };
49
+ }
39
50
  /**
40
51
  * Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
41
52
  *
@@ -59,7 +70,7 @@ async function transform(filename, sourceText, options, cache) {
59
70
  return {
60
71
  ...result,
61
72
  errors: result.errors.map(normalizeBindingError),
62
- warnings: result.warnings.map((w) => w.field0)
73
+ warnings: result.warnings.map(normalizeBindingWarning)
63
74
  };
64
75
  }
65
76
  /**
@@ -83,7 +94,7 @@ function transformSync(filename, sourceText, options, cache) {
83
94
  return {
84
95
  ...result,
85
96
  errors: result.errors.map(normalizeBindingError),
86
- warnings: result.warnings.map((w) => w.field0)
97
+ warnings: result.warnings.map(normalizeBindingWarning)
87
98
  };
88
99
  }
89
100
  //#endregion
@@ -1,4 +1,4 @@
1
- import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-BodFrzFa.mjs";
1
+ import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-w_8ZCR-S.mjs";
2
2
  //#region src/api/rolldown/index.ts
3
3
  /**
4
4
  * The API compatible with Rollup's `rollup` function.
@@ -1,6 +1,6 @@
1
1
  import { i as logInputHookInOutputPlugin, n as error } from "./logs-aMKUxRpj.mjs";
2
2
  import { n as BuiltinPlugin } from "./normalize-string-or-regex-CHVaSqeF.mjs";
3
- import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, 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, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-Dh93Higz.mjs";
3
+ import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, 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, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-Yh0p_yKx.mjs";
4
4
  import { v as unimplemented } from "./composable-filters-BcLvc0mh.mjs";
5
5
  import { i as unwrapBindingResult } from "./error-B5cMIevi.mjs";
6
6
  import { Worker } from "node:worker_threads";
@@ -1443,7 +1443,8 @@ const TransformOptionsSchema = /* @__PURE__ */ object({
1443
1443
  helpers: /* @__PURE__ */ optional(/* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")])) })),
1444
1444
  decorator: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1445
1445
  legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1446
- emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1446
+ emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1447
+ strictNullChecks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1447
1448
  })),
1448
1449
  jsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1449
1450
  /* @__PURE__ */ literal(false),
@@ -1511,7 +1512,8 @@ const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
1511
1512
  duplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when both the code and postBanner contain shebang")),
1512
1513
  unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
1513
1514
  ineffectiveDynamicImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting")),
1514
- largeBarrelModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit info logs when a barrel module has a very large number of re-exports (more than 5000)"))
1515
+ largeBarrelModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit info logs when a barrel module has a very large number of re-exports (more than 5000)")),
1516
+ sourcemapBroken: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a plugin transforms code without generating a sourcemap"))
1515
1517
  });
1516
1518
  const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
1517
1519
  compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
@@ -1544,7 +1546,16 @@ const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
1544
1546
  })])),
1545
1547
  debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1546
1548
  })])),
1547
- codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) })]))
1549
+ codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
1550
+ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1551
+ legalComments: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1552
+ /* @__PURE__ */ literal("none"),
1553
+ /* @__PURE__ */ literal("inline"),
1554
+ /* @__PURE__ */ literal("eof"),
1555
+ /* @__PURE__ */ literal("external"),
1556
+ /* @__PURE__ */ strictObject({ linked: /* @__PURE__ */ string() })
1557
+ ]))
1558
+ })]))
1548
1559
  });
1549
1560
  const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
1550
1561
  alias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
@@ -1710,6 +1721,7 @@ const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
1710
1721
  maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1711
1722
  entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1712
1723
  entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1724
+ includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1713
1725
  tags: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
1714
1726
  })))
1715
1727
  });
@@ -2856,7 +2868,7 @@ function createConsola(options = {}) {
2856
2868
  defaults: { level },
2857
2869
  stdout: process.stdout,
2858
2870
  stderr: process.stderr,
2859
- prompt: (...args) => import("./prompt-DewH0PjV.mjs").then((m) => m.prompt(...args)),
2871
+ prompt: (...args) => import("./prompt-DYnaB1Nb.mjs").then((m) => m.prompt(...args)),
2860
2872
  reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
2861
2873
  ...options
2862
2874
  });
@@ -3190,6 +3202,10 @@ var RolldownBuild = class RolldownBuild {
3190
3202
  /**
3191
3203
  * Close the bundle and free resources.
3192
3204
  *
3205
+ * This method should be called even if the {@linkcode generate} method
3206
+ * or the {@linkcode write} method threw an error. It should be called
3207
+ * even if neither of the methods are called.
3208
+ *
3193
3209
  * This method is called automatically when using `using` syntax.
3194
3210
  *
3195
3211
  * @example
@@ -1,4 +1,4 @@
1
- import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-Ba2kzvIy.mjs";
1
+ import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-BhK3B-Zu.mjs";
2
2
  import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
3
3
 
4
4
  //#region src/utils/resolve-tsconfig.d.ts
@@ -1,4 +1,4 @@
1
- import { t as BindingBuiltinPluginName } from "./binding-Ba2kzvIy.mjs";
1
+ import { t as BindingBuiltinPluginName } from "./binding-BhK3B-Zu.mjs";
2
2
 
3
3
  //#region src/types/utils.d.ts
4
4
  type MaybePromise<T> = T | Promise<T>;
@@ -1,7 +1,7 @@
1
1
  import { o as logMultipleWatcherOption } from "./logs-aMKUxRpj.mjs";
2
- import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-Dh93Higz.mjs";
2
+ import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-Yh0p_yKx.mjs";
3
3
  import { h as arraify } from "./composable-filters-BcLvc0mh.mjs";
4
- import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-BodFrzFa.mjs";
4
+ import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-w_8ZCR-S.mjs";
5
5
  import { t as aggregateBindingErrorsIntoJsError } from "./error-B5cMIevi.mjs";
6
6
  import { BindingWatcher, shutdownAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
@@ -1,6 +1,6 @@
1
- import { a as parse, o as parseSync } from "./error-u6fgq_tm.js";
2
- import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./resolve-tsconfig-DDQjQ68j.js";
3
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { a as parse, o as parseSync } from "./error-5Tc1aq0X.js";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./resolve-tsconfig-zB6S1f4Q.js";
3
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
4
4
  function walkNode(node, visitors) {
5
5
  if (node == null) return;
6
6
  if (Array.isArray(node)) {
@@ -2010,7 +2010,7 @@ function walkTSUnionType(node, visitors) {
2010
2010
  exit !== null && exit(node);
2011
2011
  }
2012
2012
  //#endregion
2013
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2013
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2014
2014
  /** Mapping from node type name to node type ID */
2015
2015
  const NODE_TYPE_IDS_MAP = new Map([
2016
2016
  ["DebuggerStatement", 0],
@@ -2180,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
2180
2180
  ["TSUnionType", 164]
2181
2181
  ]);
2182
2182
  //#endregion
2183
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/visit/visitor.js
2183
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/visit/visitor.js
2184
2184
  let compiledVisitor;
2185
2185
  function createCompiledVisitor() {
2186
2186
  compiledVisitor = [];
@@ -1,7 +1,7 @@
1
- import { $ as AssignmentPattern, $n as TSInferType, $r as UpdateExpression, $t as JSXMemberExpression, An as SwitchStatement, Ar as TSTupleType, At as ForStatement, Bn as TSConstructorType, Br as TSTypeQuery, Bt as ImportNamespaceSpecifier, Cn as ReturnStatement, Cr as TSRestType, Ct as ExportAllDeclaration, Dn as StringLiteral, Dr as TSTemplateLiteralType, Dt as ExpressionStatement, En as StaticBlock, Er as TSSymbolKeyword, Et as ExportSpecifier, Fn as TSBooleanKeyword, Fr as TSTypeOperator, Ft as IfStatement, Gn as TSExternalModuleReference, Gr as TSVoidKeyword, Gt as JSXAttribute, Hn as TSEnumDeclaration, Hr as TSUndefinedKeyword, Ht as JSDocNonNullableType, In as TSCallSignatureDeclaration, Ir as TSTypeParameter, It as ImportAttribute, J as AccessorProperty, Jn as TSImportEqualsDeclaration, Jr as TemplateLiteral, Jt as JSXElement, Kn as TSFunctionType, Kr as TaggedTemplateExpression, Kt as JSXClosingElement, Ln as TSClassImplements, Lr as TSTypeParameterDeclaration, Lt as ImportDeclaration, Mn as TSArrayType, Mr as TSTypeAnnotation, Mt as Function, Nn as TSAsExpression, Nr as TSTypeAssertion, Nt as IdentifierName, On as Super, Or as TSThisParameter, Ot as ForInStatement, Pn as TSBigIntKeyword, Pr as TSTypeLiteral, Pt as IdentifierReference, Q as AssignmentExpression, Qn as TSIndexedAccessType, Qr as UnaryExpression, Qt as JSXIdentifier, Rn as TSConditionalType, Rr as TSTypeParameterInstantiation, Rt as ImportDefaultSpecifier, Sn as RegExpLiteral, Sr as TSQualifiedName, St as EmptyStatement, Tn as SpreadElement, Tr as TSStringKeyword, Tt as ExportNamedDeclaration, Un as TSEnumMember, Ur as TSUnionType, Ut as JSDocNullableType, Vn as TSEnumBody, Vr as TSTypeReference, Vt as ImportSpecifier, Wn as TSExportAssignment, Wr as TSUnknownKeyword, Wt as JSDocUnknownType, X as ArrayPattern, Xn as TSIndexSignature, Xr as ThrowStatement, Xt as JSXExpressionContainer, Y as ArrayExpression, Yn as TSImportType, Yr as ThisExpression, Yt as JSXEmptyExpression, Z as ArrowFunctionExpression, Zn as TSIndexSignatureName, Zr as TryStatement, Zt as JSXFragment, _ as BindingTsconfigRawOptions, _n as ObjectProperty, _r as TSObjectKeyword, _t as ConditionalExpression, ai as YieldExpression, an as JSXText, ar as TSIntrinsicKeyword, at as BinaryExpression, bn as Program, br as TSParenthesizedType, bt as Decorator, cn as LogicalExpression, cr as TSMethodSignature, ct as BindingRestElement, dn as MethodDefinition, dr as TSNamedTupleMember, dt as BreakStatement, ei as V8IntrinsicExpression, en as JSXNamespacedName, er as TSInstantiationExpression, et as AssignmentTargetProperty, fn as NewExpression, fr as TSNamespaceExportDeclaration, ft as CallExpression, g as BindingTsconfigCompilerOptions, gn as ObjectPattern, gr as TSNumberKeyword, gt as ClassBody, hn as ObjectExpression, hr as TSNullKeyword, ht as Class, ii as WithStatement, in as JSXSpreadChild, ir as TSIntersectionType, it as BigIntLiteral, jn as TSAnyKeyword, jr as TSTypeAliasDeclaration, jt as FormalParameterRest, kn as SwitchCase, kr as TSThisType, kt as ForOfStatement, ln as MemberExpression, lr as TSModuleBlock, lt as BlockStatement, mn as NumericLiteral, mr as TSNonNullExpression, mt as ChainExpression, ni as VariableDeclarator, nn as JSXOpeningFragment, nr as TSInterfaceDeclaration, nt as AssignmentTargetRest, oi as types_d_exports, on as LabelIdentifier, or as TSLiteralType, ot as BindingIdentifier, pn as NullLiteral, pr as TSNeverKeyword, pt as CatchClause, qn as TSGlobalDeclaration, qr as TemplateElement, qt as JSXClosingFragment, ri as WhileStatement, rn as JSXSpreadAttribute, rr as TSInterfaceHeritage, rt as AwaitExpression, sn as LabeledStatement, sr as TSMappedType, st as BindingProperty, ti as VariableDeclaration, tn as JSXOpeningElement, tr as TSInterfaceBody, tt as AssignmentTargetPropertyProperty, un as MetaProperty, ur as TSModuleDeclaration, ut as BooleanLiteral, vn as ParenthesizedExpression, vr as TSOptionalType, vt as ContinueStatement, wn as SequenceExpression, wr as TSSatisfiesExpression, wt as ExportDefaultDeclaration, xn as PropertyDefinition, xr as TSPropertySignature, xt as DoWhileStatement, yn as PrivateIdentifier, yr as TSParameterProperty, yt as DebuggerStatement, zn as TSConstructSignatureDeclaration, zr as TSTypePredicate, zt as ImportExpression } from "./shared/binding-Ba2kzvIy.mjs";
2
- import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-DEcsn5bq.mjs";
1
+ import { $ as AssignmentPattern, $n as TSInferType, $r as UpdateExpression, $t as JSXMemberExpression, An as SwitchStatement, Ar as TSTupleType, At as ForStatement, Bn as TSConstructorType, Br as TSTypeQuery, Bt as ImportNamespaceSpecifier, Cn as ReturnStatement, Cr as TSRestType, Ct as ExportAllDeclaration, Dn as StringLiteral, Dr as TSTemplateLiteralType, Dt as ExpressionStatement, En as StaticBlock, Er as TSSymbolKeyword, Et as ExportSpecifier, Fn as TSBooleanKeyword, Fr as TSTypeOperator, Ft as IfStatement, Gn as TSExternalModuleReference, Gr as TSVoidKeyword, Gt as JSXAttribute, Hn as TSEnumDeclaration, Hr as TSUndefinedKeyword, Ht as JSDocNonNullableType, In as TSCallSignatureDeclaration, Ir as TSTypeParameter, It as ImportAttribute, J as AccessorProperty, Jn as TSImportEqualsDeclaration, Jr as TemplateLiteral, Jt as JSXElement, Kn as TSFunctionType, Kr as TaggedTemplateExpression, Kt as JSXClosingElement, Ln as TSClassImplements, Lr as TSTypeParameterDeclaration, Lt as ImportDeclaration, Mn as TSArrayType, Mr as TSTypeAnnotation, Mt as Function, Nn as TSAsExpression, Nr as TSTypeAssertion, Nt as IdentifierName, On as Super, Or as TSThisParameter, Ot as ForInStatement, Pn as TSBigIntKeyword, Pr as TSTypeLiteral, Pt as IdentifierReference, Q as AssignmentExpression, Qn as TSIndexedAccessType, Qr as UnaryExpression, Qt as JSXIdentifier, Rn as TSConditionalType, Rr as TSTypeParameterInstantiation, Rt as ImportDefaultSpecifier, Sn as RegExpLiteral, Sr as TSQualifiedName, St as EmptyStatement, Tn as SpreadElement, Tr as TSStringKeyword, Tt as ExportNamedDeclaration, Un as TSEnumMember, Ur as TSUnionType, Ut as JSDocNullableType, Vn as TSEnumBody, Vr as TSTypeReference, Vt as ImportSpecifier, Wn as TSExportAssignment, Wr as TSUnknownKeyword, Wt as JSDocUnknownType, X as ArrayPattern, Xn as TSIndexSignature, Xr as ThrowStatement, Xt as JSXExpressionContainer, Y as ArrayExpression, Yn as TSImportType, Yr as ThisExpression, Yt as JSXEmptyExpression, Z as ArrowFunctionExpression, Zn as TSIndexSignatureName, Zr as TryStatement, Zt as JSXFragment, _ as BindingTsconfigRawOptions, _n as ObjectProperty, _r as TSObjectKeyword, _t as ConditionalExpression, ai as YieldExpression, an as JSXText, ar as TSIntrinsicKeyword, at as BinaryExpression, bn as Program, br as TSParenthesizedType, bt as Decorator, cn as LogicalExpression, cr as TSMethodSignature, ct as BindingRestElement, dn as MethodDefinition, dr as TSNamedTupleMember, dt as BreakStatement, ei as V8IntrinsicExpression, en as JSXNamespacedName, er as TSInstantiationExpression, et as AssignmentTargetProperty, fn as NewExpression, fr as TSNamespaceExportDeclaration, ft as CallExpression, g as BindingTsconfigCompilerOptions, gn as ObjectPattern, gr as TSNumberKeyword, gt as ClassBody, hn as ObjectExpression, hr as TSNullKeyword, ht as Class, ii as WithStatement, in as JSXSpreadChild, ir as TSIntersectionType, it as BigIntLiteral, jn as TSAnyKeyword, jr as TSTypeAliasDeclaration, jt as FormalParameterRest, kn as SwitchCase, kr as TSThisType, kt as ForOfStatement, ln as MemberExpression, lr as TSModuleBlock, lt as BlockStatement, mn as NumericLiteral, mr as TSNonNullExpression, mt as ChainExpression, ni as VariableDeclarator, nn as JSXOpeningFragment, nr as TSInterfaceDeclaration, nt as AssignmentTargetRest, oi as types_d_exports, on as LabelIdentifier, or as TSLiteralType, ot as BindingIdentifier, pn as NullLiteral, pr as TSNeverKeyword, pt as CatchClause, qn as TSGlobalDeclaration, qr as TemplateElement, qt as JSXClosingFragment, ri as WhileStatement, rn as JSXSpreadAttribute, rr as TSInterfaceHeritage, rt as AwaitExpression, sn as LabeledStatement, sr as TSMappedType, st as BindingProperty, ti as VariableDeclaration, tn as JSXOpeningElement, tr as TSInterfaceBody, tt as AssignmentTargetPropertyProperty, un as MetaProperty, ur as TSModuleDeclaration, ut as BooleanLiteral, vn as ParenthesizedExpression, vr as TSOptionalType, vt as ContinueStatement, wn as SequenceExpression, wr as TSSatisfiesExpression, wt as ExportDefaultDeclaration, xn as PropertyDefinition, xr as TSPropertySignature, xt as DoWhileStatement, yn as PrivateIdentifier, yr as TSParameterProperty, yt as DebuggerStatement, zn as TSConstructSignatureDeclaration, zr as TSTypePredicate, zt as ImportExpression } from "./shared/binding-BhK3B-Zu.mjs";
2
+ import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-HS_zMlQ1.mjs";
3
3
 
4
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
4
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
5
5
  interface VisitorObject$1 {
6
6
  DebuggerStatement?: (node: DebuggerStatement) => void;
7
7
  "DebuggerStatement:exit"?: (node: DebuggerStatement) => void;
@@ -1,6 +1,6 @@
1
- import { n as parseSync, t as parse } from "./shared/parse-Vf7R2RjR.mjs";
2
- import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-D8Galy_A.mjs";
3
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { n as parseSync, t as parse } from "./shared/parse-DYBaZ0kb.mjs";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-DsK7KzKK.mjs";
3
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
4
4
  function walkNode(node, visitors) {
5
5
  if (node == null) return;
6
6
  if (Array.isArray(node)) {
@@ -2010,7 +2010,7 @@ function walkTSUnionType(node, visitors) {
2010
2010
  exit !== null && exit(node);
2011
2011
  }
2012
2012
  //#endregion
2013
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2013
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2014
2014
  /** Mapping from node type name to node type ID */
2015
2015
  const NODE_TYPE_IDS_MAP = new Map([
2016
2016
  ["DebuggerStatement", 0],
@@ -2180,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
2180
2180
  ["TSUnionType", 164]
2181
2181
  ]);
2182
2182
  //#endregion
2183
- //#region ../../node_modules/.pnpm/oxc-parser@0.132.0/node_modules/oxc-parser/src-js/visit/visitor.js
2183
+ //#region ../../node_modules/.pnpm/oxc-parser@0.134.0/node_modules/oxc-parser/src-js/visit/visitor.js
2184
2184
  let compiledVisitor;
2185
2185
  function createCompiledVisitor() {
2186
2186
  compiledVisitor = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "keywords": [
6
6
  "bundler",
@@ -39,14 +39,19 @@
39
39
  "browser": "./dist/experimental-index.browser.mjs",
40
40
  "default": "./dist/experimental-index.mjs"
41
41
  },
42
+ "./experimental/runtime-types": {
43
+ "types": "./dist/experimental-runtime-types.d.ts"
44
+ },
42
45
  "./plugins": {
43
46
  "browser": "./dist/plugins-index.browser.mjs",
44
47
  "default": "./dist/plugins-index.mjs"
45
48
  },
46
49
  "./filter": "./dist/filter-index.mjs",
50
+ "./getLogFilter": "./dist/get-log-filter.mjs",
47
51
  "./parallelPlugin": "./dist/parallel-plugin.mjs",
48
52
  "./parseAst": "./dist/parse-ast-index.mjs",
49
- "./package.json": "./package.json"
53
+ "./package.json": "./package.json",
54
+ "./utils": "./dist/utils-index.mjs"
50
55
  },
51
56
  "publishConfig": {
52
57
  "access": "public",