@rolldown/browser 1.0.0-rc.11 → 1.0.0-rc.13

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 (37) 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-nyELQq9T.js → error-D_M_TRRS.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +3 -3
  6. package/dist/experimental-index.d.mts +16 -18
  7. package/dist/experimental-index.mjs +3 -3
  8. package/dist/filter-index.d.mts +1 -1
  9. package/dist/index.browser.mjs +2 -2
  10. package/dist/index.d.mts +3 -2
  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 -2
  15. package/dist/parse-ast-index.mjs +1 -1
  16. package/dist/plugins-index.d.mts +3 -3
  17. package/dist/{resolve-tsconfig-CkWJwi9L.js → resolve-tsconfig-YM52CJsk.js} +1 -1
  18. package/dist/rolldown-binding.wasi-browser.js +6 -0
  19. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  20. package/dist/{rolldown-build-BPQtF2AA.js → rolldown-build-Bz6L_TNm.js} +47 -4
  21. package/dist/shared/binding-ChYotyxN.d.mts +3171 -0
  22. package/dist/shared/{bindingify-input-options-CSSx7s5e.mjs → bindingify-input-options-Y2rQIZiC.mjs} +45 -2
  23. package/dist/shared/{constructors-BVnf_fH1.d.mts → constructors-DFNu-pUS.d.mts} +2 -2
  24. package/dist/shared/{define-config-Cr6054d_.d.mts → define-config-r09Rqv1_.d.mts} +12 -15
  25. package/dist/shared/{load-config-CXtSVabV.mjs → load-config-B52gTI_Z.mjs} +1 -1
  26. package/dist/shared/{parse-B_jvq8dU.mjs → parse-C27hqfZ9.mjs} +1 -1
  27. package/dist/shared/{rolldown-D-bh1N9N.mjs → rolldown-BjzKYYwB.mjs} +1 -1
  28. package/dist/shared/{rolldown-build-Bysdmf-9.mjs → rolldown-build-YfCjCcGn.mjs} +2 -2
  29. package/dist/shared/{transform-DEgNAQOQ.d.mts → transform-CcdA4xZ5.d.mts} +15 -15
  30. package/dist/shared/{utils-6wxe_LMG.d.mts → utils-C4hvMCOQ.d.mts} +1 -1
  31. package/dist/shared/{watch-V9eI6ua1.mjs → watch-BeG0KBxY.mjs} +2 -2
  32. package/dist/utils-index.browser.mjs +5 -5
  33. package/dist/utils-index.d.mts +4 -4
  34. package/dist/utils-index.mjs +4 -4
  35. package/dist/wasi-worker-browser.mjs +8 -0
  36. package/package.json +4 -2
  37. package/dist/shared/types-K2r0mx6Y.d.mts +0 -1302
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { n as onExit, t as watch } from "./shared/watch-V9eI6ua1.mjs";
2
- import { C as version, S as description } from "./shared/bindingify-input-options-CSSx7s5e.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-BeG0KBxY.mjs";
2
+ import { C as version, S as description } from "./shared/bindingify-input-options-Y2rQIZiC.mjs";
3
3
  import { h as arraify } from "./shared/composable-filters-B2ByPP8y.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-Bysdmf-9.mjs";
5
- import { t as rolldown } from "./shared/rolldown-D-bh1N9N.mjs";
6
- import { t as loadConfig } from "./shared/load-config-CXtSVabV.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-YfCjCcGn.mjs";
5
+ import { t as rolldown } from "./shared/rolldown-BjzKYYwB.mjs";
6
+ import { t as loadConfig } from "./shared/load-config-B52gTI_Z.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.121.0/helpers/usingCtx.js
850
+ //#region \0@oxc-project+runtime@0.123.0/helpers/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-Cr6054d_.mjs";
1
+ import { Q as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-r09Rqv1_.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-CSSx7s5e.mjs";
1
+ import { x as VERSION } from "./shared/bindingify-input-options-Y2rQIZiC.mjs";
2
2
  import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
3
- import { t as loadConfig } from "./shared/load-config-CXtSVabV.mjs";
3
+ import { t as loadConfig } from "./shared/load-config-B52gTI_Z.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.121.0/node_modules/oxc-parser/src-js/wrap.js
17
+ //#region ../../node_modules/.pnpm/oxc-parser@0.121.0_@emnapi+core@1.9.1_@emnapi+runtime@1.9.1/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-Db8ibFkp.js";
2
- import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-BPQtF2AA.js";
3
- import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-nyELQq9T.js";
2
+ import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-Bz6L_TNm.js";
3
+ import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-D_M_TRRS.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-LtcP0f-6.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-CkWJwi9L.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-YM52CJsk.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
@@ -1,14 +1,12 @@
1
- import { Tt as NormalizedOutputOptions, c as InputOptions, ln as freeExternalMemory, mt as defineParallelPlugin, sn as RolldownOutput, tn as OutputOptions } from "./shared/define-config-Cr6054d_.mjs";
2
- import { t as BuiltinPlugin } from "./shared/utils-6wxe_LMG.mjs";
3
- import { a as transform$1, c as MinifyResult$2, d as ParseResult$3, f as ParserOptions$3, g as resolveTsconfig, h as TsconfigCache$2, i as TsconfigRawOptions$1, l as minify$1, m as parseSync$1, n as TransformResult$1, o as transformSync$1, p as parse$1, r as TsconfigCompilerOptions$1, s as MinifyOptions$2, t as TransformOptions$2, u as minifySync$1 } from "./shared/transform-DEgNAQOQ.mjs";
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 "./shared/constructors-BVnf_fH1.mjs";
5
- import { BindingBundleAnalyzerPluginConfig, BindingViteManifestPluginConfig, BindingViteTransformPluginConfig } from "../binding.cjs";
6
- import { BindingBundleState, BindingClientHmrUpdate as BindingClientHmrUpdate$1 } from "../../binding.cjs";
7
- import { BindingClientHmrUpdate, BindingRebuildStrategy, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform } from "./binding.cjs";
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-ChYotyxN.mjs";
2
+ import { c as InputOptions, cn as freeExternalMemory, en as OutputOptions, on as RolldownOutput, pt as defineParallelPlugin, wt as NormalizedOutputOptions } from "./shared/define-config-r09Rqv1_.mjs";
3
+ import { t as BuiltinPlugin } from "./shared/utils-C4hvMCOQ.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-CcdA4xZ5.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-DFNu-pUS.mjs";
8
6
 
9
7
  //#region src/api/dev/dev-options.d.ts
10
8
  type DevOnHmrUpdates = (result: Error | {
11
- updates: BindingClientHmrUpdate$1[];
9
+ updates: BindingClientHmrUpdate[];
12
10
  changedFiles: string[];
13
11
  }) => void | Promise<void>;
14
12
  type DevOnOutput = (result: Error | RolldownOutput) => void | Promise<void>;
@@ -75,7 +73,7 @@ declare class DevEngine {
75
73
  ensureCurrentBuildFinish(): Promise<void>;
76
74
  getBundleState(): Promise<BindingBundleState>;
77
75
  ensureLatestBuildOutput(): Promise<void>;
78
- invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate$1[]>;
76
+ invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate[]>;
79
77
  registerModules(clientId: string, modules: string[]): Promise<void>;
80
78
  removeClient(clientId: string): Promise<void>;
81
79
  close(): Promise<void>;
@@ -227,30 +225,30 @@ declare const parse: typeof parse$1;
227
225
  /** @deprecated Use from `rolldown/utils` instead. */
228
226
  declare const parseSync: typeof parseSync$1;
229
227
  /** @deprecated Use from `rolldown/utils` instead. */
230
- type ParseResult = ParseResult$3;
228
+ type ParseResult = ParseResult$1;
231
229
  /** @deprecated Use from `rolldown/utils` instead. */
232
- type ParserOptions = ParserOptions$3;
230
+ type ParserOptions = ParserOptions$1;
233
231
  /** @deprecated Use from `rolldown/utils` instead. */
234
232
  declare const minify: typeof minify$1;
235
233
  /** @deprecated Use from `rolldown/utils` instead. */
236
234
  declare const minifySync: typeof minifySync$1;
237
235
  /** @deprecated Use from `rolldown/utils` instead. */
238
- type MinifyOptions = MinifyOptions$2;
236
+ type MinifyOptions = MinifyOptions$1;
239
237
  /** @deprecated Use from `rolldown/utils` instead. */
240
- type MinifyResult = MinifyResult$2;
238
+ type MinifyResult = MinifyResult$1;
241
239
  /** @deprecated Use from `rolldown/utils` instead. */
242
240
  declare const transform: typeof transform$1;
243
241
  /** @deprecated Use from `rolldown/utils` instead. */
244
242
  declare const transformSync: typeof transformSync$1;
245
243
  /** @deprecated Use from `rolldown/utils` instead. */
246
- type TransformOptions = TransformOptions$2;
244
+ type TransformOptions = TransformOptions$1;
247
245
  /** @deprecated Use from `rolldown/utils` instead. */
248
246
  type TransformResult = TransformResult$1;
249
247
  /** @deprecated Use from `rolldown/utils` instead. */
250
- declare const TsconfigCache: typeof TsconfigCache$2;
248
+ declare const TsconfigCache: typeof TsconfigCache$1;
251
249
  /** @deprecated Use from `rolldown/utils` instead. */
252
- type TsconfigRawOptions = TsconfigRawOptions$1;
250
+ type TsconfigRawOptions = BindingTsconfigRawOptions;
253
251
  /** @deprecated Use from `rolldown/utils` instead. */
254
- type TsconfigCompilerOptions = TsconfigCompilerOptions$1;
252
+ type TsconfigCompilerOptions = BindingTsconfigCompilerOptions;
255
253
  //#endregion
256
- export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
254
+ export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
@@ -1,8 +1,8 @@
1
1
  import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-D0o84ejN.mjs";
2
- import { o as transformToRollupOutput } from "./shared/bindingify-input-options-CSSx7s5e.mjs";
3
- import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-Bysdmf-9.mjs";
2
+ import { o as transformToRollupOutput } from "./shared/bindingify-input-options-Y2rQIZiC.mjs";
3
+ import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-YfCjCcGn.mjs";
4
4
  import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-CQ6njWsV.mjs";
5
- import { n as parseSync$2, t as parse$2 } from "./shared/parse-B_jvq8dU.mjs";
5
+ import { n as parseSync$2, t as parse$2 } from "./shared/parse-C27hqfZ9.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-BGLoUvKR.mjs";
7
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-Cwoo4h_o.mjs";
8
8
  import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
@@ -1,4 +1,4 @@
1
- import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H as importerId, I as TopLevelFilterExpression, J as or, K as moduleType, L as and, M as withFilter, N as FilterExpression, P as FilterExpressionKind, R as code, U as include, V as id, W as interpreter, X as query, Y as queries, q as not, z as exclude } from "./shared/define-config-Cr6054d_.mjs";
1
+ import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H as importerId, I as TopLevelFilterExpression, J as or, K as moduleType, L as and, M as withFilter, N as FilterExpression, P as FilterExpressionKind, R as code, U as include, V as id, W as interpreter, X as query, Y as queries, q as not, z as exclude } from "./shared/define-config-r09Rqv1_.mjs";
2
2
 
3
3
  //#region ../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-Db8ibFkp.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-BPQtF2AA.js";
3
- import { t as aggregateBindingErrorsIntoJsError } from "./error-nyELQq9T.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-Bz6L_TNm.js";
3
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-D_M_TRRS.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,4 +1,5 @@
1
+ import { z as PreRenderedChunk } from "./shared/binding-ChYotyxN.mjs";
1
2
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-C6h4g8dA.mjs";
2
- import { $ as VERSION, $t as MinifyOptions, A as SourceDescription, At as WarningHandlerWithDefault, Bt as build, C as PartialResolvedId, Ct as RolldownFsModule, D as ResolvedId, Dt as TransformOptions, E as ResolveIdResult, Et as NormalizedInputOptions, Ft as RolldownWatcherWatcherEventMap, Gt as ChunkingContext, Ht as AdvancedChunksGroup, It as WatchOptions, Jt as CodeSplittingOptions, Kt as CodeSplittingGroup, Lt as rolldown, Mt as watch, Nt as RolldownWatcher, O as RolldownPlugin, Ot as ChecksOptions, Pt as RolldownWatcherEvent, Q as RUNTIME_MODULE_ID, Qt as GlobalsFunction, Rt as RolldownBuild, S as ParallelPluginHooks, St as RolldownFileStats, T as ResolveIdExtraOptions, Tt as NormalizedOutputOptions, Ut as AdvancedChunksOptions, Vt as AddonFunction, Wt as ChunkFileNamesFunction, Xt as GeneratedCodeOptions, Yt as CommentsOptions, Z as PreRenderedChunk, Zt as GeneratedCodePreset, _ as ImportKind, _t as GeneralHookFilter, a as ExternalOption, an as RenderedChunk, at as TransformPluginContext, b as ModuleType, bt as BufferEncoding, c as InputOptions, cn as SourceMap, ct as EmittedFile, d as WatcherFileWatcherOptions, dn as SourcemapIgnoreListOption, dt as PluginContext, en as ModuleFormat, et as BundleError, f as WatcherOptions, ft as PluginContextResolveOptions, g as HookFilterExtension, gt as PluginContextMeta, h as FunctionPluginHooks, ht as MinimalPluginContext, i as RolldownOptions, in as OutputChunk, it as TreeshakingOptions, j as TransformResult, jt as RolldownMagicString, k as RolldownPluginOption, kt as LoggingFunction, l as ModuleTypes, lt as EmittedPrebuiltChunk, m as CustomPluginOptions, n as RolldownOptionsFunction, nn as PreRenderedAsset, nt as SourceMapInput, o as ExternalOptionFunction, on as RenderedModule, ot as EmittedAsset, p as AsyncPluginHooks, pt as DefineParallelPluginResult, qt as CodeSplittingNameFunction, r as defineConfig, rn as OutputAsset, rt as OutputBundle, s as InputOption, sn as RolldownOutput, st as EmittedChunk, t as ConfigExport, tn as OutputOptions, tt as ExistingRawSourceMap, u as OptimizationOptions, un as ModuleInfo, ut as GetModuleInfo, v as LoadResult, vt as HookFilter, w as Plugin, wt as InternalModuleFormat, x as ObjectHook, xt as RolldownDirectoryEntry, y as ModuleOptions, yt as ModuleTypeFilter, zt as BuildOptions } from "./shared/define-config-Cr6054d_.mjs";
3
- import { o as PartialNull } from "./shared/utils-6wxe_LMG.mjs";
3
+ import { $ as BundleError, $t as ModuleFormat, A as SourceDescription, At as RolldownMagicString, Bt as AddonFunction, C as PartialResolvedId, Ct as InternalModuleFormat, D as ResolvedId, Dt as ChecksOptions, E as ResolveIdResult, Et as TransformOptions, Ft as WatchOptions, Gt as CodeSplittingGroup, Ht as AdvancedChunksOptions, It as rolldown, Jt as CommentsOptions, Kt as CodeSplittingNameFunction, Lt as RolldownBuild, Mt as RolldownWatcher, Nt as RolldownWatcherEvent, O as RolldownPlugin, Ot as LoggingFunction, Pt as RolldownWatcherWatcherEventMap, Q as VERSION, Qt as MinifyOptions, Rt as BuildOptions, S as ParallelPluginHooks, St as RolldownFsModule, T as ResolveIdExtraOptions, Tt as NormalizedInputOptions, Ut as ChunkFileNamesFunction, Vt as AdvancedChunksGroup, Wt as ChunkingContext, Xt as GeneratedCodePreset, Yt as GeneratedCodeOptions, Z as RUNTIME_MODULE_ID, Zt as GlobalsFunction, _ as ImportKind, _t as HookFilter, a as ExternalOption, an as RenderedModule, at as EmittedAsset, b as ModuleType, bt as RolldownDirectoryEntry, c as InputOptions, ct as EmittedPrebuiltChunk, d as WatcherFileWatcherOptions, dt as PluginContextResolveOptions, en as OutputOptions, et as ExistingRawSourceMap, f as WatcherOptions, ft as DefineParallelPluginResult, g as HookFilterExtension, gt as GeneralHookFilter, h as FunctionPluginHooks, ht as PluginContextMeta, i as RolldownOptions, in as RenderedChunk, it as TransformPluginContext, j as TransformResult, jt as watch, k as RolldownPluginOption, kt as WarningHandlerWithDefault, l as ModuleTypes, ln as ModuleInfo, lt as GetModuleInfo, m as CustomPluginOptions, mt as MinimalPluginContext, n as RolldownOptionsFunction, nn as OutputAsset, nt as OutputBundle, o as ExternalOptionFunction, on as RolldownOutput, ot as EmittedChunk, p as AsyncPluginHooks, qt as CodeSplittingOptions, r as defineConfig, rn as OutputChunk, rt as TreeshakingOptions, s as InputOption, sn as SourceMap, st as EmittedFile, t as ConfigExport, tn as PreRenderedAsset, tt as SourceMapInput, u as OptimizationOptions, un as SourcemapIgnoreListOption, ut as PluginContext, v as LoadResult, vt as ModuleTypeFilter, w as Plugin, wt as NormalizedOutputOptions, x as ObjectHook, xt as RolldownFileStats, y as ModuleOptions, yt as BufferEncoding, zt as build } from "./shared/define-config-r09Rqv1_.mjs";
4
+ import { o as PartialNull } from "./shared/utils-C4hvMCOQ.mjs";
4
5
  export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BufferEncoding, BuildOptions, BundleError, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, CodeSplittingGroup, CodeSplittingNameFunction, CodeSplittingOptions, CommentsOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedChunk, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, ExternalOptionFunction, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PluginContextResolveOptions, PreRenderedAsset, PreRenderedChunk, RUNTIME_MODULE_ID, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownError, RolldownError as RollupError, RolldownFileStats, RolldownFsModule, RolldownLog, RolldownLog as RollupLog, RolldownLogWithString, RolldownLogWithString as RollupLogWithString, RolldownMagicString, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RolldownWatcherWatcherEventMap, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherFileWatcherOptions, 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-V9eI6ua1.mjs";
2
- import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-CSSx7s5e.mjs";
3
- import { t as rolldown } from "./shared/rolldown-D-bh1N9N.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-BeG0KBxY.mjs";
2
+ import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-Y2rQIZiC.mjs";
3
+ import { t as rolldown } from "./shared/rolldown-BjzKYYwB.mjs";
4
4
  import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.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-CSSx7s5e.mjs";
1
+ import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-Y2rQIZiC.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 { w as Plugin } from "./shared/define-config-Cr6054d_.mjs";
2
- import { i as MaybePromise } from "./shared/utils-6wxe_LMG.mjs";
1
+ import { w as Plugin } from "./shared/define-config-r09Rqv1_.mjs";
2
+ import { i as MaybePromise } from "./shared/utils-C4hvMCOQ.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,5 +1,4 @@
1
- import { t as Program } from "./shared/types-K2r0mx6Y.mjs";
2
- import { ParseResult as ParseResult$1, ParserOptions as ParserOptions$1 } from "./binding.cjs";
1
+ import { J as Program, L as ParseResult$1, R as ParserOptions$1 } from "./shared/binding-ChYotyxN.mjs";
3
2
 
4
3
  //#region src/parse-ast-index.d.ts
5
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-D80CXhvg.mjs";
2
- import { n as parseSync, t as parse } from "./shared/parse-B_jvq8dU.mjs";
2
+ import { n as parseSync, t as parse } from "./shared/parse-C27hqfZ9.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 { t as BuiltinPlugin } from "./shared/utils-6wxe_LMG.mjs";
2
- import { t as esmExternalRequirePlugin } from "./shared/constructors-BVnf_fH1.mjs";
3
- import { BindingReplacePluginConfig } from "../binding.cjs";
1
+ import { m as BindingReplacePluginConfig } from "./shared/binding-ChYotyxN.mjs";
2
+ import { t as BuiltinPlugin } from "./shared/utils-C4hvMCOQ.mjs";
3
+ import { t as esmExternalRequirePlugin } from "./shared/constructors-DFNu-pUS.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-nyELQq9T.js";
1
+ import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-D_M_TRRS.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
  /**
@@ -43,6 +43,12 @@ const {
43
43
  })
44
44
  worker.addEventListener('message', __wasmCreateOnMessageForFsProxy(__fs))
45
45
 
46
+ worker.addEventListener('error', (event) => {
47
+ if (event.data && typeof event.data === 'object' && event.data.type === 'error') {
48
+ window.dispatchEvent(new CustomEvent('napi-rs-worker-error', { detail: event.data }))
49
+ }
50
+ })
51
+
46
52
  return worker
47
53
  },
48
54
  overwriteImports(importObject) {
@@ -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-Db8ibFkp.js";
2
- import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-nyELQq9T.js";
2
+ import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-D_M_TRRS.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.0-rc.11";
457
+ const VERSION = "1.0.0-rc.13";
458
458
  //#endregion
459
459
  //#region src/constants/index.ts
460
460
  /**
@@ -747,7 +747,7 @@ function getSortedPlugins(hookName, plugins) {
747
747
  ];
748
748
  }
749
749
  //#endregion
750
- //#region ../../node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.mjs
750
+ //#region ../../node_modules/.pnpm/valibot@1.3.1_typescript@6.0.2/node_modules/valibot/dist/index.mjs
751
751
  let store$4;
752
752
  /**
753
753
  * Returns the global configuration.
@@ -2506,7 +2506,7 @@ function bindingAssetSource(source) {
2506
2506
  return { inner: source };
2507
2507
  }
2508
2508
  //#endregion
2509
- //#region \0@oxc-project+runtime@0.121.0/helpers/decorate.js
2509
+ //#region \0@oxc-project+runtime@0.123.0/helpers/decorate.js
2510
2510
  function __decorate(decorators, target, key, desc) {
2511
2511
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2512
2512
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -2878,6 +2878,49 @@ Object.defineProperty(BindingMagicString.prototype, "isRolldownMagicString", {
2878
2878
  writable: false,
2879
2879
  configurable: false
2880
2880
  });
2881
+ function assertString(content, msg) {
2882
+ if (typeof content !== "string") throw new TypeError(msg);
2883
+ }
2884
+ const nativeAppend = BindingMagicString.prototype.append;
2885
+ const nativePrepend = BindingMagicString.prototype.prepend;
2886
+ const nativeAppendLeft = BindingMagicString.prototype.appendLeft;
2887
+ const nativeAppendRight = BindingMagicString.prototype.appendRight;
2888
+ const nativePrependLeft = BindingMagicString.prototype.prependLeft;
2889
+ const nativePrependRight = BindingMagicString.prototype.prependRight;
2890
+ const nativeOverwrite = BindingMagicString.prototype.overwrite;
2891
+ const nativeUpdate = BindingMagicString.prototype.update;
2892
+ BindingMagicString.prototype.append = function(content) {
2893
+ assertString(content, "outro content must be a string");
2894
+ return nativeAppend.call(this, content);
2895
+ };
2896
+ BindingMagicString.prototype.prepend = function(content) {
2897
+ assertString(content, "outro content must be a string");
2898
+ return nativePrepend.call(this, content);
2899
+ };
2900
+ BindingMagicString.prototype.appendLeft = function(index, content) {
2901
+ assertString(content, "inserted content must be a string");
2902
+ return nativeAppendLeft.call(this, index, content);
2903
+ };
2904
+ BindingMagicString.prototype.appendRight = function(index, content) {
2905
+ assertString(content, "inserted content must be a string");
2906
+ return nativeAppendRight.call(this, index, content);
2907
+ };
2908
+ BindingMagicString.prototype.prependLeft = function(index, content) {
2909
+ assertString(content, "inserted content must be a string");
2910
+ return nativePrependLeft.call(this, index, content);
2911
+ };
2912
+ BindingMagicString.prototype.prependRight = function(index, content) {
2913
+ assertString(content, "inserted content must be a string");
2914
+ return nativePrependRight.call(this, index, content);
2915
+ };
2916
+ BindingMagicString.prototype.overwrite = function(start, end, content, options) {
2917
+ assertString(content, "replacement content must be a string");
2918
+ return nativeOverwrite.call(this, start, end, content, options);
2919
+ };
2920
+ BindingMagicString.prototype.update = function(start, end, content, options) {
2921
+ assertString(content, "replacement content must be a string");
2922
+ return nativeUpdate.call(this, start, end, content, options);
2923
+ };
2881
2924
  const nativeReplace = BindingMagicString.prototype.replace;
2882
2925
  const nativeReplaceAll = BindingMagicString.prototype.replaceAll;
2883
2926
  BindingMagicString.prototype.replace = function(searchValue, replacement) {