@rollipop/rolldown 1.0.23 → 1.0.25

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 (39) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/config.d.mts +16 -17
  3. package/dist/config.mjs +2 -2
  4. package/dist/experimental-index.d.mts +214 -205
  5. package/dist/experimental-index.mjs +23 -14
  6. package/dist/experimental-runtime-types.d.ts +111 -41
  7. package/dist/filter-index.d.mts +6 -5
  8. package/dist/get-log-filter.d.mts +2 -2
  9. package/dist/index.d.mts +3 -3
  10. package/dist/index.mjs +4 -4
  11. package/dist/parallel-plugin-worker.mjs +2 -2
  12. package/dist/parallel-plugin.d.mts +3 -4
  13. package/dist/parse-ast-index.d.mts +19 -20
  14. package/dist/parse-ast-index.mjs +1 -1
  15. package/dist/plugins-index.d.mts +27 -28
  16. package/dist/plugins-index.mjs +2 -2
  17. package/dist/shared/{binding-FraDreAW.d.mts → binding-CyCKfYSu.d.mts} +37 -25
  18. package/dist/shared/{binding-BeFnGbcC.mjs → binding-DnitnDvS.mjs} +26 -26
  19. package/dist/shared/{bindingify-input-options-Bn4KwwnQ.mjs → bindingify-input-options-CkSiXecU.mjs} +5 -5
  20. package/dist/shared/{constructors-CXtPAgZN.d.mts → constructors-B1v9buY3.d.mts} +9 -10
  21. package/dist/shared/{constructors-BtPvcMnV.mjs → constructors-CEYV9FDo.mjs} +1 -1
  22. package/dist/shared/define-config-JSiTCvYA.d.mts +4033 -0
  23. package/dist/shared/{error-ByvXiVA5.mjs → error-pMeQY3Ie.mjs} +1 -1
  24. package/dist/shared/get-log-filter-B6CU6b90.d.mts +34 -0
  25. package/dist/shared/{load-config-Bq5f70mp.mjs → load-config-BAsjK_il.mjs} +1 -1
  26. package/dist/shared/{logging-BSNejiLS.d.mts → logging-xuHO4mAy.d.mts} +6 -6
  27. package/dist/shared/{normalize-string-or-regex-BP4QDm1i.mjs → normalize-string-or-regex-CSHtENP1.mjs} +1 -1
  28. package/dist/shared/{parse-fKhlPUp2.mjs → parse-BEeauYyL.mjs} +2 -2
  29. package/dist/shared/{resolve-tsconfig-bMlSU2mx.mjs → resolve-tsconfig-upebNbwm.mjs} +2 -2
  30. package/dist/shared/{rolldown-B8ugj8Jp.mjs → rolldown-DHWEkE2v.mjs} +1 -1
  31. package/dist/shared/{rolldown-build-2x6VVmNU.mjs → rolldown-build-Cy0C2jvD.mjs} +4 -4
  32. package/dist/shared/transform-DJLP9UUk.d.mts +148 -0
  33. package/dist/shared/{watch-Dyck2DYi.mjs → watch-BLrLOBAp.mjs} +4 -4
  34. package/dist/utils-index.d.mts +29 -30
  35. package/dist/utils-index.mjs +5 -5
  36. package/package.json +14 -14
  37. package/dist/shared/define-config-oNOGrLUX.d.mts +0 -4008
  38. package/dist/shared/get-log-filter-B4LpBryx.d.mts +0 -35
  39. package/dist/shared/transform-DmrnpNrQ.d.mts +0 -149
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { n as onExit, t as watch } from "./shared/watch-Dyck2DYi.mjs";
2
- import { S as version, x as description } from "./shared/bindingify-input-options-Bn4KwwnQ.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-BLrLOBAp.mjs";
2
+ import { S as version, x as description } from "./shared/bindingify-input-options-CkSiXecU.mjs";
3
3
  import { t as arraify } from "./shared/misc-CoQm4NHO.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-2x6VVmNU.mjs";
5
- import { t as rolldown } from "./shared/rolldown-B8ugj8Jp.mjs";
6
- import { t as loadConfig } from "./shared/load-config-Bq5f70mp.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-Cy0C2jvD.mjs";
5
+ import { t as rolldown } from "./shared/rolldown-DHWEkE2v.mjs";
6
+ import { t as loadConfig } from "./shared/load-config-BAsjK_il.mjs";
7
7
  import path from "node:path";
8
8
  import g$1 from "node:process";
9
9
  import { performance } from "node:perf_hooks";
@@ -862,7 +862,7 @@ function getClearScreenFunction(options) {
862
862
  };
863
863
  }
864
864
  //#endregion
865
- //#region \0@oxc-project+runtime@0.139.0/helpers/esm/usingCtx.js
865
+ //#region \0@oxc-project+runtime@0.140.0/helpers/esm/usingCtx.js
866
866
  function _usingCtx() {
867
867
  var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
868
868
  var n = Error();
package/dist/config.d.mts CHANGED
@@ -1,27 +1,26 @@
1
- import { L as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-oNOGrLUX.mjs";
2
-
1
+ import { L as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-JSiTCvYA.mjs";
3
2
  //#region src/utils/load-config.d.ts
4
3
  type ConfigLoader = "bundle" | "native";
5
4
  interface LoadConfigOptions {
6
5
  /**
7
- * How to load the config file.
8
- * - `'bundle'` (default): bundle the config with Rolldown, then import it.
9
- * - `'native'`: import the config directly, delegating TypeScript/loader
10
- * handling to the runtime. Faster, but requires runtime support.
11
- *
12
- * @default 'bundle'
13
- */
6
+ * How to load the config file.
7
+ * - `'bundle'` (default): bundle the config with Rolldown, then import it.
8
+ * - `'native'`: import the config directly, delegating TypeScript/loader
9
+ * handling to the runtime. Faster, but requires runtime support.
10
+ *
11
+ * @default 'bundle'
12
+ */
14
13
  configLoader?: ConfigLoader;
15
14
  }
16
15
  /**
17
- * Load config from a file in a way that Rolldown does.
18
- *
19
- * @param configPath The path to the config file. If empty, it will look for `rolldown.config` with supported extensions in the current working directory.
20
- * @param options Loading options. `configLoader` selects `'bundle'` (default) or `'native'`.
21
- * @returns The loaded config export
22
- *
23
- * @category Config
24
- */
16
+ * Load config from a file in a way that Rolldown does.
17
+ *
18
+ * @param configPath The path to the config file. If empty, it will look for `rolldown.config` with supported extensions in the current working directory.
19
+ * @param options Loading options. `configLoader` selects `'bundle'` (default) or `'native'`.
20
+ * @returns The loaded config export
21
+ *
22
+ * @category Config
23
+ */
25
24
  declare function loadConfig(configPath: string, options?: LoadConfigOptions): Promise<ConfigExport>;
26
25
  //#endregion
27
26
  export { VERSION, defineConfig, loadConfig };
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { b as VERSION } from "./shared/bindingify-input-options-Bn4KwwnQ.mjs";
1
+ import { b as VERSION } from "./shared/bindingify-input-options-CkSiXecU.mjs";
2
2
  import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
3
- import { t as loadConfig } from "./shared/load-config-Bq5f70mp.mjs";
3
+ import { t as loadConfig } from "./shared/load-config-BAsjK_il.mjs";
4
4
  export { VERSION, defineConfig, loadConfig };
@@ -1,8 +1,7 @@
1
- import { $ as moduleRunnerTransform, A as BindingViteTransformPluginConfig, G as ResolverFactory, N as IsolatedDeclarationsOptions, P as IsolatedDeclarationsResult, Q as isolatedDeclarationSync, R as NapiResolveOptions, T as BindingViteManifestPluginConfig, W as ResolveResult, X as clearCacheById, Y as clearCache, Z as isolatedDeclaration, f as BindingRebuildStrategy, g as BindingRollipopReactRefreshWrapperPluginConfig, h as BindingRollipopReactNativeTransformResult, i as BindingClientHmrUpdate, n as BindingBundleAnalyzerPluginConfig, r as BindingBundleState, v as BindingTsconfigCompilerOptions, y as BindingTsconfigRawOptions } from "./shared/binding-FraDreAW.mjs";
2
- import { Bt as OutputOptions, F as BuiltinPlugin, Q as defineParallelPlugin, Wt as StringOrRegExp, Yt as RolldownOutput, Zt as freeExternalMemory, l as InputOptions, lt as NormalizedOutputOptions } from "./shared/define-config-oNOGrLUX.mjs";
3
- 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-DmrnpNrQ.mjs";
4
- import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-CXtPAgZN.mjs";
5
-
1
+ import { $ as isolatedDeclarationSync, E as BindingViteManifestPluginConfig, F as IsolatedDeclarationsResult, G as ResolveResult, K as ResolverFactory, P as IsolatedDeclarationsOptions, Q as isolatedDeclaration, X as clearCache, Z as clearCacheById, _ as BindingRollipopReactRefreshWrapperPluginConfig, b as BindingTsconfigRawOptions, et as moduleRunnerTransform, g as BindingRollipopReactNativeTransformResult, i as BindingClientHmrUpdate, j as BindingViteTransformPluginConfig, n as BindingBundleAnalyzerPluginConfig, p as BindingRebuildStrategy, r as BindingBundleState, u as BindingLazyChunkOutput, y as BindingTsconfigCompilerOptions, z as NapiResolveOptions } from "./shared/binding-CyCKfYSu.mjs";
2
+ import { Bt as OutputOptions, F as BuiltinPlugin, Q as defineParallelPlugin, Wt as StringOrRegExp, Yt as RolldownOutput, Zt as freeExternalMemory, l as InputOptions, lt as NormalizedOutputOptions } from "./shared/define-config-JSiTCvYA.mjs";
3
+ 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-DJLP9UUk.mjs";
4
+ import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-B1v9buY3.mjs";
6
5
  //#region src/api/dev/dev-options.d.ts
7
6
  type DevOnHmrUpdates = (result: Error | {
8
7
  updates: BindingClientHmrUpdate[];
@@ -12,80 +11,81 @@ type DevOnOutput = (result: Error | RolldownOutput) => void | Promise<void>;
12
11
  type DevOnAdditionalAssets = (output: RolldownOutput) => void | Promise<void>;
13
12
  interface DevWatchOptions {
14
13
  /**
15
- * If `true`, files are not written to disk.
16
- * @default false
17
- */
14
+ * If `true`, files are not written to disk.
15
+ * @default false
16
+ */
18
17
  skipWrite?: boolean;
19
18
  /**
20
- * If `true`, use polling instead of native file system events for watching.
21
- * @default false
22
- */
19
+ * If `true`, use polling instead of native file system events for watching.
20
+ * @default false
21
+ */
23
22
  usePolling?: boolean;
24
23
  /**
25
- * Poll interval in milliseconds (only used when usePolling is true).
26
- * @default 100
27
- */
24
+ * Poll interval in milliseconds (only used when usePolling is true).
25
+ * @default 100
26
+ */
28
27
  pollInterval?: number;
29
28
  /**
30
- * If `true`, use debounced watcher. If `false`, use non-debounced watcher for immediate responses.
31
- * @default true
32
- */
29
+ * If `true`, use debounced watcher. If `false`, use non-debounced watcher for immediate responses.
30
+ * @default true
31
+ */
33
32
  useDebounce?: boolean;
34
33
  /**
35
- * Debounce duration in milliseconds (only used when useDebounce is true).
36
- * @default 10
37
- */
34
+ * Debounce duration in milliseconds (only used when useDebounce is true).
35
+ * @default 10
36
+ */
38
37
  debounceDuration?: number;
39
38
  /**
40
- * Whether to compare file contents for poll-based watchers (only used when usePolling is true).
41
- * When enabled, poll watchers will check file contents to determine if they actually changed.
42
- * @default false
43
- */
39
+ * Whether to compare file contents for poll-based watchers (only used when usePolling is true).
40
+ * When enabled, poll watchers will check file contents to determine if they actually changed.
41
+ * @default false
42
+ */
44
43
  compareContentsForPolling?: boolean;
45
44
  /**
46
- * Tick rate in milliseconds for debounced watchers (only used when useDebounce is true).
47
- * Controls how frequently the debouncer checks for events to process.
48
- * When not specified, the debouncer will auto-select an appropriate tick rate (1/4 of the debounce duration).
49
- * @default undefined (auto-select)
50
- */
45
+ * Tick rate in milliseconds for debounced watchers (only used when useDebounce is true).
46
+ * Controls how frequently the debouncer checks for events to process.
47
+ * When not specified, the debouncer will auto-select an appropriate tick rate (1/4 of the debounce duration).
48
+ * @default undefined (auto-select)
49
+ */
51
50
  debounceTickRate?: number;
52
51
  /**
53
- * Filter to limit which discovered files are registered with the file watcher.
54
- *
55
- * Strings are treated as glob patterns.
56
- *
57
- * @default []
58
- */
52
+ * Filter to limit which discovered files are registered with the file watcher.
53
+ *
54
+ * Strings are treated as glob patterns.
55
+ *
56
+ * @default []
57
+ */
59
58
  include?: StringOrRegExp | StringOrRegExp[];
60
59
  /**
61
- * Filter to prevent discovered files from being registered with the file watcher.
62
- *
63
- * Strings are treated as glob patterns.
64
- *
65
- * @default []
66
- */
60
+ * Filter to prevent discovered files from being registered with the file watcher.
61
+ *
62
+ * Strings are treated as glob patterns.
63
+ *
64
+ * @default []
65
+ */
67
66
  exclude?: StringOrRegExp | StringOrRegExp[];
68
67
  }
69
68
  interface DevOptions {
70
69
  onHmrUpdates?: DevOnHmrUpdates;
71
70
  onOutput?: DevOnOutput;
72
71
  /**
73
- * Called with assets emitted while generating an HMR patch or compiling a
74
- * lazy entry (e.g. an image newly imported by the changed/lazy module).
75
- *
76
- * These never go through {@link onOutput}, so a consumer that serves built
77
- * files (e.g. Vite's bundled dev server) must register this to receive them
78
- * and write them to its in-memory file store before the client requests them.
79
- */
72
+ * Called with assets emitted while generating an HMR patch or compiling a
73
+ * lazy entry (e.g. an image newly imported by the changed/lazy module).
74
+ *
75
+ * These never go through {@link onOutput}, so a consumer that serves built
76
+ * files (e.g. Vite's bundled dev server) must register this to receive them
77
+ * and write them to its in-memory file store before the client requests them.
78
+ */
80
79
  onAdditionalAssets?: DevOnAdditionalAssets;
81
80
  /**
82
- * Strategy for triggering rebuilds after HMR updates.
83
- * - `'always'`: Always trigger a rebuild after HMR updates
84
- * - `'auto'`: Trigger rebuild only if HMR updates contain full reload updates
85
- * - `'never'`: Never trigger rebuild after HMR updates (default)
86
- * @default 'auto'
87
- */
88
- rebuildStrategy?: "always" | "auto" | "never";
81
+ * Strategy for triggering rebuilds after HMR updates.
82
+ * - `'always'`: Always trigger a rebuild after HMR updates
83
+ * - `'never'`: Never trigger rebuild after HMR updates. The server no longer
84
+ * decides full reloads, so there is no `'auto'` upgrade anymore; pull fresh
85
+ * bundle output explicitly (e.g. `ensureLatestBuildOutput`) when needed.
86
+ * @default 'never'
87
+ */
88
+ rebuildStrategy?: "always" | "never";
89
89
  watch?: DevWatchOptions;
90
90
  }
91
91
  //#endregion
@@ -99,22 +99,31 @@ declare class DevEngine {
99
99
  getBundleState(): Promise<BindingBundleState>;
100
100
  ensureLatestBuildOutput(): Promise<void>;
101
101
  triggerFullBuild(): void;
102
- invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate[]>;
103
- registerModules(clientId: string, modules: string[]): Promise<void>;
102
+ /**
103
+ * Client-connect signal (the clientId hello): creates the per-client session
104
+ * with an empty ship map. Reconnects arrive as fresh clientIds.
105
+ */
106
+ registerClient(clientId: string): Promise<void>;
107
+ /**
108
+ * Delivery notification from the serving middleware: the response for
109
+ * `filename` completed, so record its modules as shipped to that client.
110
+ */
111
+ notifyPayloadDelivered(filename: string): Promise<void>;
104
112
  removeClient(clientId: string): Promise<void>;
105
113
  close(): Promise<void>;
106
114
  /**
107
- * Compile a lazy entry module and return HMR-style patch code.
108
- *
109
- * This is called when a dynamically imported module is first requested at runtime.
110
- * The module was previously stubbed with a proxy, and now we need to compile the
111
- * actual module and its dependencies.
112
- *
113
- * @param moduleId - The absolute file path of the module to compile
114
- * @param clientId - The client ID requesting this compilation
115
- * @returns The compiled JavaScript code as a string (HMR patch format)
116
- */
117
- compileEntry(moduleId: string, clientId: string): Promise<string>;
115
+ * Compile a lazy entry module and return HMR-style patch code.
116
+ *
117
+ * This is called when a dynamically imported module is first requested at runtime.
118
+ * The module was previously stubbed with a proxy, and now we need to compile the
119
+ * actual module and its dependencies.
120
+ *
121
+ * @param moduleId - The absolute file path of the module to compile
122
+ * @param clientId - The client ID requesting this compilation
123
+ * @returns The compiled chunk: its code plus the filename whose delivery the
124
+ * serving middleware reports via {@link notifyPayloadDelivered}
125
+ */
126
+ compileEntry(moduleId: string, clientId: string): Promise<BindingLazyChunkOutput>;
118
127
  }
119
128
  //#endregion
120
129
  //#region src/api/dev/index.d.ts
@@ -122,20 +131,20 @@ declare const dev: typeof DevEngine.create;
122
131
  //#endregion
123
132
  //#region src/api/experimental.d.ts
124
133
  /**
125
- * This is an experimental API. Its behavior may change in the future.
126
- *
127
- * - Calling this API will only execute the `scan/build` stage of rolldown.
128
- * - `scan` will clean up all resources automatically, but if you want to ensure timely cleanup, you need to wait for the returned promise to resolve.
129
- *
130
- * @example To ensure cleanup of resources, use the returned promise to wait for the scan to complete.
131
- * ```ts
132
- * import { scan } from '@rollipop/rolldown/api/experimental';
133
- *
134
- * const cleanupPromise = await scan(...);
135
- * await cleanupPromise;
136
- * // Now all resources have been cleaned up.
137
- * ```
138
- */
134
+ * This is an experimental API. Its behavior may change in the future.
135
+ *
136
+ * - Calling this API will only execute the `scan/build` stage of rolldown.
137
+ * - `scan` will clean up all resources automatically, but if you want to ensure timely cleanup, you need to wait for the returned promise to resolve.
138
+ *
139
+ * @example To ensure cleanup of resources, use the returned promise to wait for the scan to complete.
140
+ * ```ts
141
+ * import { scan } from '@rollipop/rolldown/api/experimental';
142
+ *
143
+ * const cleanupPromise = await scan(...);
144
+ * await cleanupPromise;
145
+ * // Now all resources have been cleaned up.
146
+ * ```
147
+ */
139
148
  declare const scan: (rawInputOptions: InputOptions, rawOutputOptions?: {}) => Promise<Promise<void>>;
140
149
  //#endregion
141
150
  //#region src/builtin-plugin/alias-plugin.d.ts
@@ -149,53 +158,53 @@ declare function viteAliasPlugin(config: ViteAliasPluginConfig): BuiltinPlugin;
149
158
  //#endregion
150
159
  //#region src/builtin-plugin/bundle-analyzer-plugin.d.ts
151
160
  /**
152
- * A plugin that analyzes bundle composition and generates detailed reports.
153
- *
154
- * The plugin outputs a file containing detailed information about:
155
- * - All chunks and their relationships
156
- * - Modules bundled in each chunk
157
- * - Import dependencies between chunks
158
- * - Reachable modules from each entry point
159
- *
160
- * @example
161
- * ```js
162
- * import { bundleAnalyzerPlugin } from '@rollipop/rolldown/experimental';
163
- *
164
- * export default {
165
- * plugins: [
166
- * bundleAnalyzerPlugin()
167
- * ]
168
- * }
169
- * ```
170
- *
171
- * @example
172
- * **Custom filename**
173
- * ```js
174
- * import { bundleAnalyzerPlugin } from '@rollipop/rolldown/experimental';
175
- *
176
- * export default {
177
- * plugins: [
178
- * bundleAnalyzerPlugin({
179
- * fileName: 'bundle-analysis.json'
180
- * })
181
- * ]
182
- * }
183
- * ```
184
- *
185
- * @example
186
- * **LLM-friendly markdown output**
187
- * ```js
188
- * import { bundleAnalyzerPlugin } from '@rollipop/rolldown/experimental';
189
- *
190
- * export default {
191
- * plugins: [
192
- * bundleAnalyzerPlugin({
193
- * format: 'md'
194
- * })
195
- * ]
196
- * }
197
- * ```
198
- */
161
+ * A plugin that analyzes bundle composition and generates detailed reports.
162
+ *
163
+ * The plugin outputs a file containing detailed information about:
164
+ * - All chunks and their relationships
165
+ * - Modules bundled in each chunk
166
+ * - Import dependencies between chunks
167
+ * - Reachable modules from each entry point
168
+ *
169
+ * @example
170
+ * ```js
171
+ * import { bundleAnalyzerPlugin } from '@rollipop/rolldown/experimental';
172
+ *
173
+ * export default {
174
+ * plugins: [
175
+ * bundleAnalyzerPlugin()
176
+ * ]
177
+ * }
178
+ * ```
179
+ *
180
+ * @example
181
+ * **Custom filename**
182
+ * ```js
183
+ * import { bundleAnalyzerPlugin } from '@rollipop/rolldown/experimental';
184
+ *
185
+ * export default {
186
+ * plugins: [
187
+ * bundleAnalyzerPlugin({
188
+ * fileName: 'bundle-analysis.json'
189
+ * })
190
+ * ]
191
+ * }
192
+ * ```
193
+ *
194
+ * @example
195
+ * **LLM-friendly markdown output**
196
+ * ```js
197
+ * import { bundleAnalyzerPlugin } from '@rollipop/rolldown/experimental';
198
+ *
199
+ * export default {
200
+ * plugins: [
201
+ * bundleAnalyzerPlugin({
202
+ * format: 'md'
203
+ * })
204
+ * ]
205
+ * }
206
+ * ```
207
+ */
199
208
  declare function bundleAnalyzerPlugin(config?: BindingBundleAnalyzerPluginConfig): BuiltinPlugin;
200
209
  //#endregion
201
210
  //#region src/builtin-plugin/transform-plugin.d.ts
@@ -221,11 +230,11 @@ declare function rollipopReactRefreshWrapperPlugin(config: BindingRollipopReactR
221
230
  type RollipopReactNativeRuntimeTarget = "hermes" | "hermes-v1";
222
231
  type RollipopReactNativeModuleType = "unambiguous" | "commonjs";
223
232
  /**
224
- * `react-native-worklets` transform configuration. Field semantics mirror
225
- * the upstream Babel plugin's `WorkletsOptions`, minus the rolldown-managed
226
- * fields (`filename`, `cwd`). Pass `worklets: {}` to opt in with defaults;
227
- * omit the field entirely to skip the visitor.
228
- */
233
+ * `react-native-worklets` transform configuration. Field semantics mirror
234
+ * the upstream Babel plugin's `WorkletsOptions`, minus the rolldown-managed
235
+ * fields (`filename`, `cwd`). Pass `worklets: {}` to opt in with defaults;
236
+ * omit the field entirely to skip the visitor.
237
+ */
229
238
  interface RollipopReactNativeWorkletsConfig {
230
239
  /** Identifiers treated as globals — never captured into worklet closures. */
231
240
  globals?: string[];
@@ -249,29 +258,29 @@ interface RollipopReactNativeWorkletsConfig {
249
258
  pluginVersion?: string;
250
259
  }
251
260
  /**
252
- * Flow handling configuration. Mirrors Babel's
253
- * `@babel/plugin-transform-flow-strip-types` semantics.
254
- */
261
+ * Flow handling configuration. Mirrors Babel's
262
+ * `@babel/plugin-transform-flow-strip-types` semantics.
263
+ */
255
264
  interface RollipopReactNativeFlowConfig {
256
265
  /**
257
- * When `true`, only files containing `@flow` or `@noflow` directive comments are parsed as Flow (Babel `requireDirective: true`).
258
- * When `false` (default), every JS module is parsed as Flow regardless of directive — matches Metro / Babel default behavior.
259
- */
266
+ * When `true`, only files containing `@flow` or `@noflow` directive comments are parsed as Flow (Babel `requireDirective: true`).
267
+ * When `false` (default), every JS module is parsed as Flow regardless of directive — matches Metro / Babel default behavior.
268
+ */
260
269
  requireDirective?: boolean;
261
270
  }
262
271
  /**
263
- * React (JSX) transform configuration. Mirrors Babel's
264
- * `@babel/plugin-transform-react-jsx`, minus dev-server-only knobs
265
- * (fast refresh) — those belong to a bundler, not a precompile/test path.
266
- */
272
+ * React (JSX) transform configuration. Mirrors Babel's
273
+ * `@babel/plugin-transform-react-jsx`, minus dev-server-only knobs
274
+ * (fast refresh) — those belong to a bundler, not a precompile/test path.
275
+ */
267
276
  interface RollipopReactNativeReactConfig {
268
277
  /**
269
- * JSX runtime.
270
- * - `"Preserve"` (default): leave JSX untouched — downstream bundler owns it.
271
- * - `"Automatic"`: compile to `_jsx` / `_jsxs` / `Fragment` imports from
272
- * `react/jsx-runtime` (or `react/jsx-dev-runtime` when `development`).
273
- * - `"Classic"`: compile to `React.createElement` calls.
274
- */
278
+ * JSX runtime.
279
+ * - `"Preserve"` (default): leave JSX untouched — downstream bundler owns it.
280
+ * - `"Automatic"`: compile to `_jsx` / `_jsxs` / `Fragment` imports from
281
+ * `react/jsx-runtime` (or `react/jsx-dev-runtime` when `development`).
282
+ * - `"Classic"`: compile to `React.createElement` calls.
283
+ */
275
284
  runtime?: "Preserve" | "Automatic" | "Classic";
276
285
  /** Import source for the automatic runtime. Defaults to `"react"`. */
277
286
  importSource?: string;
@@ -282,31 +291,31 @@ interface RollipopReactNativeReactConfig {
282
291
  /** Throw on XML namespace prefixes (e.g. `<svg:path>`). */
283
292
  throwIfNamespace?: boolean;
284
293
  /**
285
- * When `true`, emits the development runtime (`__source` / `__self` debug
286
- * props for automatic, `react/jsx-dev-runtime` import).
287
- */
294
+ * When `true`, emits the development runtime (`__source` / `__self` debug
295
+ * props for automatic, `react/jsx-dev-runtime` import).
296
+ */
288
297
  development?: boolean;
289
298
  }
290
299
  interface RollipopReactNativeModuleConfig {
291
300
  /**
292
- * Module transform type.
293
- * - `"unambiguous"` (default): preserve the input module shape.
294
- * - `"commonjs"`: transform ESM syntax to CommonJS.
295
- */
301
+ * Module transform type.
302
+ * - `"unambiguous"` (default): preserve the input module shape.
303
+ * - `"commonjs"`: transform ESM syntax to CommonJS.
304
+ */
296
305
  type?: RollipopReactNativeModuleType;
297
306
  }
298
307
  /**
299
- * SWC pipeline configuration — wasm plugins, helper emission, React transform.
300
- */
308
+ * SWC pipeline configuration — wasm plugins, helper emission, React transform.
309
+ */
301
310
  interface RollipopReactNativeSwcConfig {
302
311
  /** SWC `.wasm` plugins to load. Each entry is `[pluginPath, pluginConfig]`. */
303
312
  plugins?: [string, Record<string, unknown>][];
304
313
  /**
305
- * When `true`, runtime helpers are emitted as imports of `@swc/helpers` so
306
- * a downstream bundler can deduplicate them. When `false` (default), helpers
307
- * are inlined into each transformed file — preferred when feeding the
308
- * output to a runtime (e.g. jest) without a bundle step in between.
309
- */
314
+ * When `true`, runtime helpers are emitted as imports of `@swc/helpers` so
315
+ * a downstream bundler can deduplicate them. When `false` (default), helpers
316
+ * are inlined into each transformed file — preferred when feeding the
317
+ * output to a runtime (e.g. jest) without a bundle step in between.
318
+ */
310
319
  externalHelpers?: boolean;
311
320
  /** React (JSX) transform configuration. Skipped when `runtime` is `"Preserve"`. */
312
321
  react?: RollipopReactNativeReactConfig;
@@ -318,9 +327,9 @@ interface RollipopReactNativeSwcConfig {
318
327
  interface RollipopReactNativePluginConfig {
319
328
  runtimeTarget?: RollipopReactNativeRuntimeTarget;
320
329
  /**
321
- * The name of the `env` to use when loading configs and plugins. Defaults
322
- * to the value of `SWC_ENV`, or else `NODE_ENV`, or else `"development"`.
323
- */
330
+ * The name of the `env` to use when loading configs and plugins. Defaults
331
+ * to the value of `SWC_ENV`, or else `NODE_ENV`, or else `"development"`.
332
+ */
324
333
  envName?: string;
325
334
  /** `react-native-worklets` transform. Visitor is skipped when omitted. */
326
335
  worklets?: RollipopReactNativeWorkletsConfig;
@@ -335,18 +344,18 @@ declare function rollipopReactNativePlugin(config?: RollipopReactNativePluginCon
335
344
  type RollipopReactNativeTransformerConfig = RollipopReactNativePluginConfig;
336
345
  type RollipopReactNativeTransformResult = BindingRollipopReactNativeTransformResult;
337
346
  /**
338
- * Standalone React Native SWC transform pipeline.
339
- *
340
- * Mirrors the behavior of {@link rollipopReactNativePlugin} but can be
341
- * invoked directly outside of a rolldown build (e.g. from Metro adapters,
342
- * test harnesses, or precompile steps). SWC `.wasm` plugins listed in the
343
- * config are read from disk and compiled exactly once at construction
344
- * time — call `transform` / `transformSync` repeatedly without reloading.
345
- *
346
- * All options pass through unchanged — `swc.externalHelpers` defaults to
347
- * `false` (helpers inlined) and `swc.react.runtime` to `"Preserve"`, both
348
- * matching the underlying Rust defaults. Set them explicitly when needed.
349
- */
347
+ * Standalone React Native SWC transform pipeline.
348
+ *
349
+ * Mirrors the behavior of {@link rollipopReactNativePlugin} but can be
350
+ * invoked directly outside of a rolldown build (e.g. from Metro adapters,
351
+ * test harnesses, or precompile steps). SWC `.wasm` plugins listed in the
352
+ * config are read from disk and compiled exactly once at construction
353
+ * time — call `transform` / `transformSync` repeatedly without reloading.
354
+ *
355
+ * All options pass through unchanged — `swc.externalHelpers` defaults to
356
+ * `false` (helpers inlined) and `swc.react.runtime` to `"Preserve"`, both
357
+ * matching the underlying Rust defaults. Set them explicitly when needed.
358
+ */
350
359
  declare class RollipopReactNativeTransformer {
351
360
  private inner;
352
361
  constructor(config?: RollipopReactNativeTransformerConfig);
@@ -356,32 +365,32 @@ declare class RollipopReactNativeTransformer {
356
365
  //#endregion
357
366
  //#region src/experimental-index.d.ts
358
367
  /**
359
- * In-memory file system for browser builds.
360
- *
361
- * This is a re-export of the {@link https://github.com/streamich/memfs | memfs} package used by the WASI runtime.
362
- * It allows you to read and write files to a virtual filesystem when using rolldown in browser environments.
363
- *
364
- * - `fs`: A Node.js-compatible filesystem API (`IFs` from memfs)
365
- * - `volume`: The underlying `Volume` instance that stores the filesystem state
366
- *
367
- * Returns `undefined` in Node.js builds (only available in browser builds via `@rolldown/browser`).
368
- *
369
- * @example
370
- * ```typescript
371
- * import { memfs } from '@rollipop/rolldown/experimental';
372
- *
373
- * // Write files to virtual filesystem before bundling
374
- * memfs?.volume.fromJSON({
375
- * '/src/index.js': 'export const foo = 42;',
376
- * '/package.json': '{"name": "my-app"}'
377
- * });
378
- *
379
- * // Read files from the virtual filesystem
380
- * const content = memfs?.fs.readFileSync('/src/index.js', 'utf8');
381
- * ```
382
- *
383
- * @see {@link https://github.com/streamich/memfs} for more information on the memfs API.
384
- */
368
+ * In-memory file system for browser builds.
369
+ *
370
+ * This is a re-export of the {@link https://github.com/streamich/memfs | memfs} package used by the WASI runtime.
371
+ * It allows you to read and write files to a virtual filesystem when using rolldown in browser environments.
372
+ *
373
+ * - `fs`: A Node.js-compatible filesystem API (`IFs` from memfs)
374
+ * - `volume`: The underlying `Volume` instance that stores the filesystem state
375
+ *
376
+ * Returns `undefined` in Node.js builds (only available in browser builds via `@rolldown/browser`).
377
+ *
378
+ * @example
379
+ * ```typescript
380
+ * import { memfs } from '@rollipop/rolldown/experimental';
381
+ *
382
+ * // Write files to virtual filesystem before bundling
383
+ * memfs?.volume.fromJSON({
384
+ * '/src/index.js': 'export const foo = 42;',
385
+ * '/package.json': '{"name": "my-app"}'
386
+ * });
387
+ *
388
+ * // Read files from the virtual filesystem
389
+ * const content = memfs?.fs.readFileSync('/src/index.js', 'utf8');
390
+ * ```
391
+ *
392
+ * @see {@link https://github.com/streamich/memfs} for more information on the memfs API.
393
+ */
385
394
  declare const memfs: {
386
395
  fs: any;
387
396
  volume: any;