@rolldown/browser 1.0.3 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cli.mjs +7 -7
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -2
  4. package/dist/{error-DAfzPCGW.js → error-Azs8e8cN.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +5 -5
  6. package/dist/experimental-index.d.mts +5 -5
  7. package/dist/experimental-index.mjs +5 -5
  8. package/dist/filter-index.d.mts +1 -104
  9. package/dist/filter-index.mjs +1 -120
  10. package/dist/index.browser.mjs +2 -2
  11. package/dist/index.d.mts +3 -3
  12. package/dist/index.mjs +3 -3
  13. package/dist/parallel-plugin-worker.mjs +1 -1
  14. package/dist/parallel-plugin.d.mts +2 -2
  15. package/dist/parse-ast-index.d.mts +1 -1
  16. package/dist/parse-ast-index.mjs +1 -1
  17. package/dist/plugins-index.d.mts +3 -3
  18. package/dist/{resolve-tsconfig-B0FaCdVd.js → resolve-tsconfig-Cmw0SAxd.js} +1 -1
  19. package/dist/rolldown-binding.wasi-browser.js +1 -1
  20. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  21. package/dist/{rolldown-build-XdM92thc.js → rolldown-build-C9wAyTYG.js} +59 -9
  22. package/dist/shared/{binding-BhK3B-Zu.d.mts → binding-BPMI4t0-.d.mts} +97 -1
  23. package/dist/shared/{bindingify-input-options-BKrzu-Ci.mjs → bindingify-input-options-EBZ5IFF2.mjs} +14 -6
  24. package/dist/shared/{constructors-CtnJN4Sg.d.mts → constructors-DAokZVCk.d.mts} +2 -2
  25. package/dist/shared/{define-config-D4nAGxn1.d.mts → define-config-Nwe1joYW.d.mts} +134 -15
  26. package/dist/shared/{composable-filters-BcLvc0mh.mjs → filter-B_mD-HGz-Cbrk-2bt.mjs} +117 -4
  27. package/dist/shared/{load-config-BXndT4NL.mjs → load-config-2QjEcEu4.mjs} +1 -1
  28. package/dist/shared/{parse-DSgaJ6oU.mjs → parse-DNkPrz4w.mjs} +1 -1
  29. package/dist/shared/{rolldown-CMk-JrOo.mjs → rolldown-Bqp7kINm.mjs} +1 -1
  30. package/dist/shared/{rolldown-build-Dh-EVzMc.mjs → rolldown-build-BgBj9qUV.mjs} +46 -4
  31. package/dist/shared/{transform-HS_zMlQ1.d.mts → transform-DulXg6tQ.d.mts} +1 -1
  32. package/dist/shared/{utils-m0ogxd-4.d.mts → utils-Bp1VejKQ.d.mts} +1 -1
  33. package/dist/shared/{watch-_n5IfB8D.mjs → watch-C6WxUyjE.mjs} +3 -3
  34. package/dist/utils-index.browser.mjs +5 -5
  35. package/dist/utils-index.d.mts +3 -3
  36. package/dist/utils-index.mjs +4 -4
  37. package/package.json +10 -5
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { n as onExit, t as watch } from "./shared/watch-_n5IfB8D.mjs";
2
- import { C as version, S as description } from "./shared/bindingify-input-options-BKrzu-Ci.mjs";
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-Dh-EVzMc.mjs";
5
- import { t as rolldown } from "./shared/rolldown-CMk-JrOo.mjs";
6
- import { t as loadConfig } from "./shared/load-config-BXndT4NL.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-C6WxUyjE.mjs";
2
+ import { C as version, S as description } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
3
+ import { y as arraify } from "./shared/filter-B_mD-HGz-Cbrk-2bt.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-BgBj9qUV.mjs";
5
+ import { t as rolldown } from "./shared/rolldown-Bqp7kINm.mjs";
6
+ import { t as loadConfig } from "./shared/load-config-2QjEcEu4.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.133.0/helpers/esm/usingCtx.js
850
+ //#region \0@oxc-project+runtime@0.135.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-D4nAGxn1.mjs";
1
+ import { r as defineConfig, rt as VERSION, t as ConfigExport } from "./shared/define-config-Nwe1joYW.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-BKrzu-Ci.mjs";
1
+ import { x as VERSION } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
2
2
  import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
3
- import { t as loadConfig } from "./shared/load-config-BXndT4NL.mjs";
3
+ import { t as loadConfig } from "./shared/load-config-2QjEcEu4.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.133.0/node_modules/oxc-parser/src-js/wrap.js
17
+ //#region ../../node_modules/.pnpm/oxc-parser@0.135.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-XdM92thc.js";
3
- import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-DAfzPCGW.js";
2
+ import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-C9wAyTYG.js";
3
+ import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-Azs8e8cN.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-B0FaCdVd.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-Cmw0SAxd.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,13 +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
73
  }
74
74
  triggerFullBuild() {
75
75
  this.#inner.triggerFullBuild();
76
76
  }
77
77
  async invalidate(file, firstInvalidatedBy) {
78
- return this.#inner.invalidate(file, firstInvalidatedBy);
78
+ return unwrapBindingResult(await this.#inner.invalidate(file, firstInvalidatedBy));
79
79
  }
80
80
  async registerModules(clientId, modules) {
81
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-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-D4nAGxn1.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";
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-BPMI4t0-.mjs";
2
+ import { fn as RolldownOutput, kt as NormalizedOutputOptions, l as InputOptions, mn as freeExternalMemory, on as OutputOptions, vt as defineParallelPlugin } from "./shared/define-config-Nwe1joYW.mjs";
3
+ import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-Bp1VejKQ.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-DulXg6tQ.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-DAokZVCk.mjs";
6
6
 
7
7
  //#region src/api/dev/dev-options.d.ts
8
8
  type DevOnHmrUpdates = (result: Error | {
@@ -1,8 +1,8 @@
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-BKrzu-Ci.mjs";
3
- import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-Dh-EVzMc.mjs";
2
+ import { o as transformToRollupOutput } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
3
+ import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-BgBj9qUV.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-DSgaJ6oU.mjs";
5
+ import { n as parseSync$2, t as parse$2 } from "./shared/parse-DNkPrz4w.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
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";
@@ -71,13 +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
75
  }
76
76
  triggerFullBuild() {
77
77
  this.#inner.triggerFullBuild();
78
78
  }
79
79
  async invalidate(file, firstInvalidatedBy) {
80
- return this.#inner.invalidate(file, firstInvalidatedBy);
80
+ return unwrapBindingResult(await this.#inner.invalidate(file, firstInvalidatedBy));
81
81
  }
82
82
  async registerModules(clientId, modules) {
83
83
  await this.#inner.registerModules(clientId, modules);
@@ -1,105 +1,2 @@
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-D4nAGxn1.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts
4
- /**
5
- * Filters out Vite plugins that have `apply: 'serve'` set.
6
- *
7
- * Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
8
- * are intended only for Vite's dev server and should be excluded from the build process.
9
- *
10
- * @param plugins - Array of plugins (can include nested arrays)
11
- * @returns Filtered array with serve-only plugins removed
12
- *
13
- * @example
14
- * ```ts
15
- * import { defineConfig } from 'rolldown';
16
- * import { filterVitePlugins } from '@rolldown/pluginutils';
17
- * import viteReact from '@vitejs/plugin-react';
18
- *
19
- * export default defineConfig({
20
- * plugins: filterVitePlugins([
21
- * viteReact(),
22
- * {
23
- * name: 'dev-only',
24
- * apply: 'serve', // This will be filtered out
25
- * // ...
26
- * }
27
- * ])
28
- * });
29
- * ```
30
- */
31
- declare function filterVitePlugins<T = any>(plugins: T | T[] | null | undefined | false): T[];
32
- //#endregion
33
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts
34
- /**
35
- * Constructs a RegExp that matches the exact string specified.
36
- *
37
- * This is useful for plugin hook filters.
38
- *
39
- * @param str the string to match.
40
- * @param flags flags for the RegExp.
41
- *
42
- * @example
43
- * ```ts
44
- * import { exactRegex } from '@rolldown/pluginutils';
45
- * const plugin = {
46
- * name: 'plugin',
47
- * resolveId: {
48
- * filter: { id: exactRegex('foo') },
49
- * handler(id) {} // will only be called for `foo`
50
- * }
51
- * }
52
- * ```
53
- */
54
- declare function exactRegex(str: string, flags?: string): RegExp;
55
- /**
56
- * Constructs a RegExp that matches a value that has the specified prefix.
57
- *
58
- * This is useful for plugin hook filters.
59
- *
60
- * @param str the string to match.
61
- * @param flags flags for the RegExp.
62
- *
63
- * @example
64
- * ```ts
65
- * import { prefixRegex } from '@rolldown/pluginutils';
66
- * const plugin = {
67
- * name: 'plugin',
68
- * resolveId: {
69
- * filter: { id: prefixRegex('foo') },
70
- * handler(id) {} // will only be called for IDs starting with `foo`
71
- * }
72
- * }
73
- * ```
74
- */
75
- declare function prefixRegex(str: string, flags?: string): RegExp;
76
- type WidenString<T> = T extends string ? string : T;
77
- /**
78
- * Converts a id filter to match with an id with a query.
79
- *
80
- * @param input the id filters to convert.
81
- *
82
- * @example
83
- * ```ts
84
- * import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils';
85
- * const plugin = {
86
- * name: 'plugin',
87
- * transform: {
88
- * filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) },
89
- * // The handler will be called for IDs like:
90
- * // - foo.js
91
- * // - foo.js?foo
92
- * // - foo.txt?foo.js
93
- * // - foo.ts
94
- * // - foo.ts?foo
95
- * // - foo.txt?foo.ts
96
- * handler(code, id) {}
97
- * }
98
- * }
99
- * ```
100
- */
101
- declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: T): WidenString<T>;
102
- declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: readonly T[]): WidenString<T>[];
103
- declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[];
104
- //#endregion
1
+ import { $ as prefixRegex, B as exactRegex, F as FilterExpressionKind, G as importerId, H as exprInterpreter, I as QueryFilterObject, J as interpreterImpl, K as include, L as TopLevelFilterExpression, N as withFilter, P as FilterExpression, Q as or, R as and, U as filterVitePlugins, V as exclude, W as id, X as moduleType, Y as makeIdFiltersToMatchWithQuery, Z as not, et as queries, q as interpreter, tt as query, z as code } from "./shared/define-config-Nwe1joYW.mjs";
105
2
  export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query, withFilter };
@@ -1,123 +1,4 @@
1
- import { a as id, c as interpreter, d as not, f as or, g as isPromiseLike, h as arraify, i as exprInterpreter, l as interpreterImpl, m as query, n as code, o as importerId, p as queries, r as exclude, s as include, t as and, u as moduleType } from "./shared/composable-filters-BcLvc0mh.mjs";
2
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js
3
- /**
4
- * Filters out Vite plugins that have `apply: 'serve'` set.
5
- *
6
- * Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
7
- * are intended only for Vite's dev server and should be excluded from the build process.
8
- *
9
- * @param plugins - Array of plugins (can include nested arrays)
10
- * @returns Filtered array with serve-only plugins removed
11
- *
12
- * @example
13
- * ```ts
14
- * import { defineConfig } from 'rolldown';
15
- * import { filterVitePlugins } from '@rolldown/pluginutils';
16
- * import viteReact from '@vitejs/plugin-react';
17
- *
18
- * export default defineConfig({
19
- * plugins: filterVitePlugins([
20
- * viteReact(),
21
- * {
22
- * name: 'dev-only',
23
- * apply: 'serve', // This will be filtered out
24
- * // ...
25
- * }
26
- * ])
27
- * });
28
- * ```
29
- */
30
- function filterVitePlugins(plugins) {
31
- if (!plugins) return [];
32
- const pluginArray = Array.isArray(plugins) ? plugins : [plugins];
33
- const result = [];
34
- for (const plugin of pluginArray) {
35
- if (!plugin) continue;
36
- if (Array.isArray(plugin)) {
37
- result.push(...filterVitePlugins(plugin));
38
- continue;
39
- }
40
- const pluginWithApply = plugin;
41
- if ("apply" in pluginWithApply) {
42
- const applyValue = pluginWithApply.apply;
43
- if (typeof applyValue === "function") try {
44
- if (applyValue({}, {
45
- command: "build",
46
- mode: "production"
47
- })) result.push(plugin);
48
- } catch {
49
- result.push(plugin);
50
- }
51
- else if (applyValue === "serve") continue;
52
- else result.push(plugin);
53
- } else result.push(plugin);
54
- }
55
- return result;
56
- }
57
- //#endregion
58
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js
59
- /**
60
- * Constructs a RegExp that matches the exact string specified.
61
- *
62
- * This is useful for plugin hook filters.
63
- *
64
- * @param str the string to match.
65
- * @param flags flags for the RegExp.
66
- *
67
- * @example
68
- * ```ts
69
- * import { exactRegex } from '@rolldown/pluginutils';
70
- * const plugin = {
71
- * name: 'plugin',
72
- * resolveId: {
73
- * filter: { id: exactRegex('foo') },
74
- * handler(id) {} // will only be called for `foo`
75
- * }
76
- * }
77
- * ```
78
- */
79
- function exactRegex(str, flags) {
80
- return new RegExp(`^${escapeRegex(str)}$`, flags);
81
- }
82
- /**
83
- * Constructs a RegExp that matches a value that has the specified prefix.
84
- *
85
- * This is useful for plugin hook filters.
86
- *
87
- * @param str the string to match.
88
- * @param flags flags for the RegExp.
89
- *
90
- * @example
91
- * ```ts
92
- * import { prefixRegex } from '@rolldown/pluginutils';
93
- * const plugin = {
94
- * name: 'plugin',
95
- * resolveId: {
96
- * filter: { id: prefixRegex('foo') },
97
- * handler(id) {} // will only be called for IDs starting with `foo`
98
- * }
99
- * }
100
- * ```
101
- */
102
- function prefixRegex(str, flags) {
103
- return new RegExp(`^${escapeRegex(str)}`, flags);
104
- }
105
- const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
106
- function escapeRegex(str) {
107
- return str.replace(escapeRegexRE, "\\$&");
108
- }
109
- function makeIdFiltersToMatchWithQuery(input) {
110
- if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
111
- return input.map((i) => makeIdFilterToMatchWithQuery(i));
112
- }
113
- function makeIdFilterToMatchWithQuery(input) {
114
- if (typeof input === "string") return `${input}{?*,}`;
115
- return makeRegexIdFilterToMatchWithQuery(input);
116
- }
117
- function makeRegexIdFilterToMatchWithQuery(input) {
118
- return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
119
- }
120
- //#endregion
1
+ import { _ as queries, a as exprInterpreter, b as isPromiseLike, c as importerId, d as interpreterImpl, f as makeIdFiltersToMatchWithQuery, g as prefixRegex, h as or, i as exclude, l as include, m as not, n as code, o as filterVitePlugins, p as moduleType, r as exactRegex, s as id, t as and, u as interpreter, v as query, y as arraify } from "./shared/filter-B_mD-HGz-Cbrk-2bt.mjs";
121
2
  //#region src/plugin/with-filter.ts
122
3
  function withFilterImpl(pluginOption, filterObjectList) {
123
4
  if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
@@ -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-XdM92thc.js";
3
- import { t as aggregateBindingErrorsIntoJsError } from "./error-DAfzPCGW.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-C9wAyTYG.js";
3
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-Azs8e8cN.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-BhK3B-Zu.mjs";
1
+ import { z as PreRenderedChunk } from "./shared/binding-BPMI4t0-.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-D4nAGxn1.mjs";
4
- import { o as PartialNull } from "./shared/utils-m0ogxd-4.mjs";
3
+ import { $t as CodeSplittingOptions, A as RolldownPluginOption, At as NormalizedInputOptions, Bt as WatchOptions, C as ParallelPluginHooks, Ct as ModuleTypeFilter, D as ResolveIdResult, Dt as RolldownFsModule, E as ResolveIdExtraOptions, Et as RolldownFileStats, Ft as RolldownMagicString, Gt as AddonFunction, Ht as RolldownBuild, It as watch, Jt as BuiltinModuleTag, Kt as AdvancedChunksGroup, Lt as RolldownWatcher, M as TransformResult, Mt as ChecksOptions, Nt as LoggingFunction, O as ResolvedId, Ot as InternalModuleFormat, Pt as WarningHandlerWithDefault, Qt as CodeSplittingNameFunction, Rt as RolldownWatcherEvent, S as ObjectHook, St as HookFilter, T as Plugin, Tt as RolldownDirectoryEntry, Ut as BuildOptions, Vt as rolldown, Wt as build, Xt as ChunkingContext, Yt as ChunkFileNamesFunction, Zt as CodeSplittingGroup, _ as HookFilterExtension, _t as DefineParallelPluginResult, a as ChunkOptimizationOptions, an as ModuleFormat, at as ExistingRawSourceMap, b as ModuleOptions, bt as PluginContextMeta, c as InputOption, cn as OutputAsset, ct as TreeshakingOptions, d as OptimizationOptions, dn as RenderedModule, dt as EmittedChunk, en as CommentsOptions, f as WatcherFileWatcherOptions, fn as RolldownOutput, ft as EmittedFile, g as FunctionPluginHooks, gn as SourcemapIgnoreListOption, gt as PluginContextResolveOptions, h as CustomPluginOptions, hn as ModuleInfo, ht as PluginContext, i as RolldownOptions, in as MinifyOptions, it as BundleError, j as SourceDescription, jt as TransformOptions, k as RolldownPlugin, kt as NormalizedOutputOptions, l as InputOptions, ln as OutputChunk, lt as TransformPluginContext, m as AsyncPluginHooks, mt as GetModuleInfo, n as RolldownOptionsFunction, nn as GeneratedCodePreset, nt as RUNTIME_MODULE_ID, o as ExternalOption, on as OutputOptions, ot as SourceMapInput, p as WatcherOptions, pn as SourceMap, pt as EmittedPrebuiltChunk, qt as AdvancedChunksOptions, r as defineConfig, rn as GlobalsFunction, rt as VERSION, s as ExternalOptionFunction, sn as PreRenderedAsset, st as OutputBundle, t as ConfigExport, tn as GeneratedCodeOptions, u as ModuleTypes, un as RenderedChunk, ut as EmittedAsset, v as ImportKind, w as PartialResolvedId, wt as BufferEncoding, x as ModuleType, xt as GeneralHookFilter, y as LoadResult, yt as MinimalPluginContext, zt as RolldownWatcherWatcherEventMap } from "./shared/define-config-Nwe1joYW.mjs";
4
+ import { o as PartialNull } from "./shared/utils-Bp1VejKQ.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-_n5IfB8D.mjs";
2
- import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-BKrzu-Ci.mjs";
3
- import { t as rolldown } from "./shared/rolldown-CMk-JrOo.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-C6WxUyjE.mjs";
2
+ import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
3
+ import { t as rolldown } from "./shared/rolldown-Bqp7kINm.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-BKrzu-Ci.mjs";
1
+ import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-EBZ5IFF2.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-D4nAGxn1.mjs";
2
- import { i as MaybePromise } from "./shared/utils-m0ogxd-4.mjs";
1
+ import { T as Plugin } from "./shared/define-config-Nwe1joYW.mjs";
2
+ import { i as MaybePromise } from "./shared/utils-Bp1VejKQ.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-BhK3B-Zu.mjs";
1
+ import { L as ParseResult$1, R as ParserOptions$1, bn as Program } from "./shared/binding-BPMI4t0-.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-DSgaJ6oU.mjs";
2
+ import { n as parseSync, t as parse } from "./shared/parse-DNkPrz4w.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-BhK3B-Zu.mjs";
2
- import { t as BuiltinPlugin } from "./shared/utils-m0ogxd-4.mjs";
3
- import { t as esmExternalRequirePlugin } from "./shared/constructors-CtnJN4Sg.mjs";
1
+ import { m as BindingReplacePluginConfig } from "./shared/binding-BPMI4t0-.mjs";
2
+ import { t as BuiltinPlugin } from "./shared/utils-Bp1VejKQ.mjs";
3
+ import { t as esmExternalRequirePlugin } from "./shared/constructors-DAokZVCk.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-DAfzPCGW.js";
1
+ import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-Azs8e8cN.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,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
  }
@@ -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-DAfzPCGW.js";
2
+ import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-Azs8e8cN.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.3";
457
+ const VERSION = "1.1.1";
458
458
  //#endregion
459
459
  //#region src/constants/index.ts
460
460
  /**
@@ -1914,7 +1914,43 @@ const TransformOptionsSchema = /* @__PURE__ */ object({
1914
1914
  plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
1915
1915
  styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
1916
1916
  taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1917
- })), /* @__PURE__ */ description("Third-party plugins to use"))
1917
+ })), /* @__PURE__ */ description("Third-party plugins to use")),
1918
+ reactCompiler: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
1919
+ compilationMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1920
+ /* @__PURE__ */ literal("infer"),
1921
+ /* @__PURE__ */ literal("syntax"),
1922
+ /* @__PURE__ */ literal("annotation"),
1923
+ /* @__PURE__ */ literal("all")
1924
+ ])),
1925
+ panicThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1926
+ /* @__PURE__ */ literal("none"),
1927
+ /* @__PURE__ */ literal("critical_errors"),
1928
+ /* @__PURE__ */ literal("all_errors")
1929
+ ])),
1930
+ target: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1931
+ /* @__PURE__ */ literal("17"),
1932
+ /* @__PURE__ */ literal("18"),
1933
+ /* @__PURE__ */ literal("19")
1934
+ ])),
1935
+ noEmit: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1936
+ outputMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1937
+ /* @__PURE__ */ literal("client"),
1938
+ /* @__PURE__ */ literal("ssr"),
1939
+ /* @__PURE__ */ literal("lint")
1940
+ ])),
1941
+ ignoreUseNoForget: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1942
+ flowSuppressions: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1943
+ enableReanimated: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1944
+ isDev: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1945
+ filename: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1946
+ eslintSuppressionRules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
1947
+ customOptOutDirectives: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
1948
+ gating: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1949
+ source: /* @__PURE__ */ string(),
1950
+ importSpecifierName: /* @__PURE__ */ string()
1951
+ })),
1952
+ dynamicGating: /* @__PURE__ */ optional(/* @__PURE__ */ object({ source: /* @__PURE__ */ string() }))
1953
+ })]))
1918
1954
  });
1919
1955
  const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
1920
1956
  usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
@@ -1957,7 +1993,8 @@ const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
1957
1993
  duplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when both the code and postBanner contain shebang")),
1958
1994
  unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
1959
1995
  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")),
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)"))
1996
+ 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)")),
1997
+ sourcemapBroken: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a plugin transforms code without generating a sourcemap"))
1961
1998
  });
1962
1999
  const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
1963
2000
  compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
@@ -2165,6 +2202,7 @@ const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
2165
2202
  maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2166
2203
  entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2167
2204
  entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2205
+ includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2168
2206
  tags: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
2169
2207
  })))
2170
2208
  });
@@ -2439,7 +2477,7 @@ function bindingAssetSource(source) {
2439
2477
  return { inner: source };
2440
2478
  }
2441
2479
  //#endregion
2442
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
2480
+ //#region \0@oxc-project+runtime@0.135.0/helpers/esm/decorate.js
2443
2481
  function __decorate(decorators, target, key, desc) {
2444
2482
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2445
2483
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -2960,7 +2998,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
2960
2998
  return map;
2961
2999
  }
2962
3000
  //#endregion
2963
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js
3001
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.1/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs
2964
3002
  var And = class {
2965
3003
  kind;
2966
3004
  args;
@@ -3566,16 +3604,18 @@ function bindingifyTransform(args) {
3566
3604
  });
3567
3605
  let normalizedCode = void 0;
3568
3606
  let map = ret.map;
3607
+ let mapHandledByNativeChannel = false;
3569
3608
  if (typeof ret.code === "string") normalizedCode = ret.code;
3570
3609
  else if (ret.code instanceof RolldownMagicString) {
3571
3610
  let magicString = ret.code;
3572
3611
  normalizedCode = magicString.toString();
3573
3612
  let fallbackSourcemap = ctx.sendMagicString(magicString);
3574
3613
  if (fallbackSourcemap != void 0) map = fallbackSourcemap;
3614
+ else mapHandledByNativeChannel = true;
3575
3615
  }
3576
3616
  return {
3577
3617
  code: normalizedCode,
3578
- map: bindingifySourcemap$1(normalizeTransformHookSourcemap(id, code, map)) ?? (ret.map === null ? null : void 0),
3618
+ map: bindingifySourcemap$1(normalizeTransformHookSourcemap(id, code, map)) ?? (mapHandledByNativeChannel || ret.map === null ? null : void 0),
3579
3619
  moduleSideEffects: moduleOption.moduleSideEffects ?? void 0,
3580
3620
  moduleType: ret.moduleType
3581
3621
  };
@@ -3681,7 +3721,10 @@ function bindingifyRenderChunk(args) {
3681
3721
  if (ret.code instanceof RolldownMagicString) {
3682
3722
  const magicString = ret.code;
3683
3723
  const normalizedCode = magicString.toString();
3684
- if (ret.map === null) return { code: normalizedCode };
3724
+ if (ret.map === null) return {
3725
+ code: normalizedCode,
3726
+ map: null
3727
+ };
3685
3728
  if (ret.map === void 0) {
3686
3729
  const generatedMap = magicString.generateMap();
3687
3730
  return {
@@ -3700,7 +3743,10 @@ function bindingifyRenderChunk(args) {
3700
3743
  map: bindingifySourcemap$1(ret.map)
3701
3744
  };
3702
3745
  }
3703
- if (!ret.map) return { code: ret.code };
3746
+ if (ret.map === null) return {
3747
+ code: ret.code,
3748
+ map: null
3749
+ };
3704
3750
  return {
3705
3751
  code: ret.code,
3706
3752
  map: bindingifySourcemap$1(ret.map)
@@ -5293,6 +5339,10 @@ var RolldownBuild = class RolldownBuild {
5293
5339
  /**
5294
5340
  * Close the bundle and free resources.
5295
5341
  *
5342
+ * This method should be called even if the {@linkcode generate} method
5343
+ * or the {@linkcode write} method threw an error. It should be called
5344
+ * even if neither of the methods are called.
5345
+ *
5296
5346
  * This method is called automatically when using `using` syntax.
5297
5347
  *
5298
5348
  * @example