@rolldown/browser 1.0.0-beta.37 → 1.0.0-beta.39

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.
@@ -1,8 +1,13 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-Cjs27cfu.mjs";
2
- import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-DzsPS4fI.mjs";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-aYdpw2Yk.mjs";
2
+ import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-BtZ0vxTw.mjs";
3
3
 
4
4
  //#region src/api/dev/dev-options.d.ts
5
5
  interface DevWatchOptions {
6
+ /**
7
+ * If `true`, files are not written to disk.
8
+ * @default false
9
+ */
10
+ skipWrite?: boolean;
6
11
  /**
7
12
  * If `true`, use polling instead of native file system events for watching.
8
13
  * @default false
@@ -49,7 +54,7 @@ declare class DevEngine {
49
54
  private constructor();
50
55
  run(): Promise<void>;
51
56
  ensureCurrentBuildFinish(): Promise<void>;
52
- ensureLatestBuild(): Promise<void>;
57
+ ensureLatestBuildOutput(): Promise<void>;
53
58
  /**
54
59
  * Returns true if a new build is scheduled.
55
60
  */
@@ -66,7 +71,7 @@ declare var dev: typeof DevEngine.create;
66
71
  *
67
72
  * Calling this API will only execute the scan stage of rolldown.
68
73
  */
69
- declare const experimental_scan: (input: InputOptions) => Promise<void>;
74
+ declare const scan: (input: InputOptions) => Promise<void>;
70
75
  //#endregion
71
76
  //#region src/builtin-plugin/constructors.d.ts
72
77
  declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
@@ -88,6 +93,11 @@ declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPl
88
93
  declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
89
94
  declare function webWorkerPostPlugin(): BuiltinPlugin;
90
95
  declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
96
+ type ReactRefreshWrapperPluginConfig = Omit<BindingReactRefreshWrapperPluginConfig, "include" | "exclude"> & {
97
+ include?: StringOrRegExp | StringOrRegExp[];
98
+ exclude?: StringOrRegExp | StringOrRegExp[];
99
+ };
100
+ declare function reactRefreshWrapperPlugin(config: ReactRefreshWrapperPluginConfig): BuiltinPlugin;
91
101
  //#endregion
92
102
  //#region src/builtin-plugin/alias-plugin.d.ts
93
103
  type AliasPluginAlias = {
@@ -134,4 +144,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
134
144
  };
135
145
  declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
136
146
  //#endregion
137
- export { DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
147
+ export { DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
@@ -1,8 +1,8 @@
1
- import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-kVjGhYdF.mjs";
2
- import "./shared/parse-ast-index-C3TkGcEQ.mjs";
1
+ import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./shared/src-ChJBGGvK.mjs";
2
+ import "./shared/parse-ast-index-CIyujJMQ.mjs";
3
3
  import "./shared/dist-CHTC3-kR.mjs";
4
4
  import { logger } from "./shared/logger-CiCY7ucm.mjs";
5
- import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
5
+ import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
6
6
  import { pathToFileURL } from "node:url";
7
7
 
8
8
  //#region src/api/dev/dev-engine.ts
@@ -15,6 +15,7 @@ var DevEngine = class DevEngine {
15
15
  const bindingDevOptions = {
16
16
  onHmrUpdates: devOptions.onHmrUpdates,
17
17
  watch: devOptions.watch && {
18
+ skipWrite: devOptions.watch.skipWrite,
18
19
  usePolling: devOptions.watch.usePolling,
19
20
  pollInterval: devOptions.watch.pollInterval,
20
21
  useDebounce: devOptions.watch.useDebounce,
@@ -40,8 +41,8 @@ var DevEngine = class DevEngine {
40
41
  this.#cachedBuildFinishPromise = promise;
41
42
  return promise;
42
43
  }
43
- async ensureLatestBuild() {
44
- await this.#inner.ensureLatestBuild();
44
+ async ensureLatestBuildOutput() {
45
+ await this.#inner.ensureLatestBuildOutput();
45
46
  }
46
47
  /**
47
48
  * Returns true if a new build is scheduled.
@@ -69,12 +70,14 @@ var dev = DevEngine.create;
69
70
  *
70
71
  * Calling this API will only execute the scan stage of rolldown.
71
72
  */
72
- const experimental_scan = async (input) => {
73
+ const scan = async (input) => {
73
74
  const inputOptions = await PluginDriver.callOptionsHook(input);
74
- const { impl: bundler, stopWorkers } = await createBundlerImpl(new BindingBundler(), inputOptions, {});
75
- const output = await bundler.scan();
76
- handleOutputErrors(output);
77
- await stopWorkers?.();
75
+ const build = new RolldownBuild(inputOptions);
76
+ try {
77
+ await build.scan();
78
+ } finally {
79
+ await build.close();
80
+ }
78
81
  };
79
82
 
80
83
  //#endregion
@@ -88,6 +91,69 @@ function defineParallelPlugin(pluginPath) {
88
91
  };
89
92
  }
90
93
 
94
+ //#endregion
95
+ //#region src/builtin-plugin/constructors.ts
96
+ function modulePreloadPolyfillPlugin(config) {
97
+ return new BuiltinPlugin("builtin:module-preload-polyfill", config);
98
+ }
99
+ function dynamicImportVarsPlugin(config) {
100
+ if (config) {
101
+ config.include = normalizedStringOrRegex(config.include);
102
+ config.exclude = normalizedStringOrRegex(config.exclude);
103
+ }
104
+ return new BuiltinPlugin("builtin:dynamic-import-vars", config);
105
+ }
106
+ function importGlobPlugin(config) {
107
+ return new BuiltinPlugin("builtin:import-glob", config);
108
+ }
109
+ function reporterPlugin(config) {
110
+ return new BuiltinPlugin("builtin:reporter", config);
111
+ }
112
+ function manifestPlugin(config) {
113
+ return new BuiltinPlugin("builtin:manifest", config);
114
+ }
115
+ function wasmHelperPlugin(config) {
116
+ return new BuiltinPlugin("builtin:wasm-helper", config);
117
+ }
118
+ function wasmFallbackPlugin() {
119
+ const builtinPlugin = new BuiltinPlugin("builtin:wasm-fallback");
120
+ return makeBuiltinPluginCallable(builtinPlugin);
121
+ }
122
+ function loadFallbackPlugin() {
123
+ return new BuiltinPlugin("builtin:load-fallback");
124
+ }
125
+ function jsonPlugin(config) {
126
+ const builtinPlugin = new BuiltinPlugin("builtin:json", config);
127
+ return makeBuiltinPluginCallable(builtinPlugin);
128
+ }
129
+ function buildImportAnalysisPlugin(config) {
130
+ return new BuiltinPlugin("builtin:build-import-analysis", config);
131
+ }
132
+ function viteResolvePlugin(config) {
133
+ const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", config);
134
+ return makeBuiltinPluginCallable(builtinPlugin);
135
+ }
136
+ function isolatedDeclarationPlugin(config) {
137
+ return new BuiltinPlugin("builtin:isolated-declaration", config);
138
+ }
139
+ function assetPlugin(config) {
140
+ return new BuiltinPlugin("builtin:asset", config);
141
+ }
142
+ function webWorkerPostPlugin() {
143
+ return new BuiltinPlugin("builtin:web-worker-post");
144
+ }
145
+ function esmExternalRequirePlugin(config) {
146
+ return new BuiltinPlugin("builtin:esm-external-require", config);
147
+ }
148
+ function reactRefreshWrapperPlugin(config) {
149
+ if (config) {
150
+ config.include = normalizedStringOrRegex(config.include);
151
+ config.exclude = normalizedStringOrRegex(config.exclude);
152
+ }
153
+ const builtinPlugin = new BuiltinPlugin("builtin:react-refresh-wrapper", config);
154
+ return makeBuiltinPluginCallable(builtinPlugin);
155
+ }
156
+
91
157
  //#endregion
92
158
  //#region src/builtin-plugin/alias-plugin.ts
93
159
  function aliasPlugin(config) {
@@ -148,4 +214,4 @@ function transformPlugin(config) {
148
214
  }
149
215
 
150
216
  //#endregion
151
- export { DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
217
+ export { DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
@@ -1,4 +1,3 @@
1
- import "./shared/binding-Cjs27cfu.mjs";
2
- import { withFilter } from "./shared/define-config-DzsPS4fI.mjs";
3
- import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
1
+ import "./shared/binding-aYdpw2Yk.mjs";
2
+ import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config-BtZ0vxTw.mjs";
4
3
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,3 +1,3 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./src-C2GHZXDs.js";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./src-Da5FndSU.js";
2
2
 
3
3
  export { VERSION, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { PreRenderedChunk } from "./shared/binding-Cjs27cfu.mjs";
2
- import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-DzsPS4fI.mjs";
1
+ import { PreRenderedChunk } from "./shared/binding-aYdpw2Yk.mjs";
2
+ import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-BtZ0vxTw.mjs";
3
3
  export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-kVjGhYdF.mjs";
2
- import "./shared/parse-ast-index-C3TkGcEQ.mjs";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-ChJBGGvK.mjs";
2
+ import "./shared/parse-ast-index-CIyujJMQ.mjs";
3
3
  import "./shared/dist-CHTC3-kR.mjs";
4
4
 
5
5
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1 +1 @@
1
- export {};
1
+ export { };
@@ -1,5 +1,5 @@
1
- import { PluginContextData, bindingifyPlugin } from "./shared/src-kVjGhYdF.mjs";
2
- import "./shared/parse-ast-index-C3TkGcEQ.mjs";
1
+ import { PluginContextData, bindingifyPlugin } from "./shared/src-ChJBGGvK.mjs";
2
+ import "./shared/parse-ast-index-CIyujJMQ.mjs";
3
3
  import "./shared/dist-CHTC3-kR.mjs";
4
4
  import { parentPort, workerData } from "node:worker_threads";
5
5
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
@@ -1,5 +1,5 @@
1
- import "./shared/binding-Cjs27cfu.mjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-DzsPS4fI.mjs";
1
+ import "./shared/binding-aYdpw2Yk.mjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-BtZ0vxTw.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-Cjs27cfu.mjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding-aYdpw2Yk.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,3 +1,3 @@
1
- import { parseAst, parseAstAsync } from "./shared/parse-ast-index-C3TkGcEQ.mjs";
1
+ import { parseAst, parseAstAsync } from "./shared/parse-ast-index-CIyujJMQ.mjs";
2
2
 
3
3
  export { parseAst, parseAstAsync };
@@ -81,6 +81,7 @@ export const HelperMode = __napiModule.exports.HelperMode
81
81
  export const isolatedDeclaration = __napiModule.exports.isolatedDeclaration
82
82
  export const moduleRunnerTransform = __napiModule.exports.moduleRunnerTransform
83
83
  export const transform = __napiModule.exports.transform
84
+ export const transformAsync = __napiModule.exports.transformAsync
84
85
  export const BindingBundleEndEventData = __napiModule.exports.BindingBundleEndEventData
85
86
  export const BindingBundleErrorEventData = __napiModule.exports.BindingBundleErrorEventData
86
87
  export const BindingBundler = __napiModule.exports.BindingBundler
@@ -126,6 +126,7 @@ module.exports.HelperMode = __napiModule.exports.HelperMode
126
126
  module.exports.isolatedDeclaration = __napiModule.exports.isolatedDeclaration
127
127
  module.exports.moduleRunnerTransform = __napiModule.exports.moduleRunnerTransform
128
128
  module.exports.transform = __napiModule.exports.transform
129
+ module.exports.transformAsync = __napiModule.exports.transformAsync
129
130
  module.exports.BindingBundleEndEventData = __napiModule.exports.BindingBundleEndEventData
130
131
  module.exports.BindingBundleErrorEventData = __napiModule.exports.BindingBundleErrorEventData
131
132
  module.exports.BindingBundler = __napiModule.exports.BindingBundler
@@ -95,9 +95,6 @@ interface MangleOptionsKeepNames {
95
95
  */
96
96
  class: boolean;
97
97
  }
98
-
99
- /** Minify synchronously. */
100
-
101
98
  interface MinifyOptions {
102
99
  /** Use when minifying an ES6 module. */
103
100
  module?: boolean;
@@ -199,13 +196,6 @@ type ImportNameKind = /** `import { x } from "mod"` */
199
196
  'Name' | /** `import * as ns from "mod"` */
200
197
  'NamespaceObject' | /** `import defaultExport from "mod"` */
201
198
  'Default';
202
-
203
- /**
204
- * Parse asynchronously.
205
- *
206
- * Note: This function can be slower than `parseSync` due to the overhead of spawning a thread.
207
- */
208
-
209
199
  interface ParserOptions {
210
200
  /** Treat the source text as `js`, `jsx`, `ts`, `tsx` or `dts`. */
211
201
  lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
@@ -246,9 +236,6 @@ interface ParserOptions {
246
236
  */
247
237
  showSemanticErrors?: boolean;
248
238
  }
249
-
250
- /** Parse synchronously. */
251
-
252
239
  interface Span {
253
240
  start: number;
254
241
  end: number;
@@ -354,7 +341,6 @@ declare class ResolverFactory {
354
341
  /** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
355
342
  async(directory: string, request: string): Promise<ResolveResult>;
356
343
  }
357
-
358
344
  /** Node.js builtin module when `Options::builtin_modules` is enabled. */
359
345
  interface Builtin {
360
346
  /**
@@ -376,7 +362,6 @@ declare enum EnforceExtension {
376
362
  Disabled = 2,
377
363
  }
378
364
  type ModuleType = 'module' | 'commonjs' | 'json' | 'wasm' | 'addon';
379
-
380
365
  /**
381
366
  * Module Resolution Options
382
367
  *
@@ -571,7 +556,6 @@ interface ResolveResult {
571
556
  /** `package.json` path for the given module. */
572
557
  packageJsonPath?: string;
573
558
  }
574
-
575
559
  /**
576
560
  * Alias Value for [ResolveOptions::alias] and [ResolveOptions::fallback].
577
561
  * Use struct because napi don't support structured union now
@@ -706,7 +690,6 @@ type HelperMode =
706
690
  interface Helpers {
707
691
  mode?: HelperMode;
708
692
  }
709
-
710
693
  /** TypeScript Isolated Declarations for Standalone DTS Emit */
711
694
  declare function isolatedDeclaration(filename: string, sourceText: string, options?: IsolatedDeclarationsOptions | undefined | null): IsolatedDeclarationsResult;
712
695
  interface IsolatedDeclarationsOptions {
@@ -726,7 +709,6 @@ interface IsolatedDeclarationsResult {
726
709
  map?: SourceMap;
727
710
  errors: Array<OxcError>;
728
711
  }
729
-
730
712
  /**
731
713
  * Configure how TSX and JSX are transformed.
732
714
  *
@@ -821,7 +803,6 @@ interface JsxOptions {
821
803
  */
822
804
  refresh?: boolean | ReactRefreshOptions;
823
805
  }
824
-
825
806
  /**
826
807
  * Transform JavaScript code to a Vite Node runnable module.
827
808
  *
@@ -890,7 +871,6 @@ interface ReactRefreshOptions {
890
871
  refreshSig?: string;
891
872
  emitFullSignatures?: boolean;
892
873
  }
893
-
894
874
  /**
895
875
  * Configure how styled-components are transformed.
896
876
  *
@@ -969,7 +949,6 @@ interface StyledComponentsOptions {
969
949
  */
970
950
  topLevelImportPaths?: Array<string>;
971
951
  }
972
-
973
952
  /**
974
953
  * Transpile a JavaScript or TypeScript into a target ECMAScript version.
975
954
  *
@@ -983,7 +962,6 @@ interface StyledComponentsOptions {
983
962
  * errors that occurred during parsing or transformation.
984
963
  */
985
964
  declare function transform(filename: string, sourceText: string, options?: TransformOptions | undefined | null): TransformResult;
986
-
987
965
  /**
988
966
  * Options for transforming a JavaScript or TypeScript file.
989
967
  *
@@ -1264,7 +1242,7 @@ interface BindingBuildImportAnalysisPluginConfig {
1264
1242
  renderBuiltUrl: boolean;
1265
1243
  isRelativeBase: boolean;
1266
1244
  }
1267
- type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:oxc-runtime' | 'builtin:reporter' | 'builtin:replace' | 'builtin:esm-external-require' | 'builtin:transform' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
1245
+ type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:react-refresh-wrapper' | 'builtin:reporter' | 'builtin:replace' | 'builtin:esm-external-require' | 'builtin:transform' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
1268
1246
  interface BindingDynamicImportVarsPluginConfig {
1269
1247
  include?: Array<BindingStringOrRegex>;
1270
1248
  exclude?: Array<BindingStringOrRegex>;
@@ -1276,6 +1254,7 @@ interface BindingError {
1276
1254
  }
1277
1255
  interface BindingEsmExternalRequirePluginConfig {
1278
1256
  external: Array<BindingStringOrRegex>;
1257
+ skipDuplicateCheck?: boolean;
1279
1258
  }
1280
1259
  type BindingGenerateHmrPatchReturn = {
1281
1260
  type: 'Ok';
@@ -1341,6 +1320,12 @@ interface BindingModules {
1341
1320
  values: Array<BindingRenderedModule>;
1342
1321
  keys: Array<string>;
1343
1322
  }
1323
+ interface BindingReactRefreshWrapperPluginConfig {
1324
+ include?: Array<BindingStringOrRegex>;
1325
+ exclude?: Array<BindingStringOrRegex>;
1326
+ jsxImportSource: string;
1327
+ reactRefreshHost: string;
1328
+ }
1344
1329
  interface BindingRenderBuiltUrlConfig {
1345
1330
  ssr: boolean;
1346
1331
  type: 'asset' | 'public';
@@ -1376,7 +1361,6 @@ interface BindingTransformPluginConfig {
1376
1361
  jsxRefreshInclude?: Array<BindingStringOrRegex>;
1377
1362
  jsxRefreshExclude?: Array<BindingStringOrRegex>;
1378
1363
  isServerConsumer?: boolean;
1379
- runtimeResolveBase?: string;
1380
1364
  jsxInject?: string;
1381
1365
  transformOptions?: TransformOptions;
1382
1366
  }
@@ -1423,4 +1407,4 @@ interface PreRenderedChunk {
1423
1407
  exports: Array<string>;
1424
1408
  }
1425
1409
  //#endregion
1426
- export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, MinifyOptions, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
1410
+ export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, MinifyOptions, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
@@ -1,6 +1,5 @@
1
- import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-Cjs27cfu.mjs";
1
+ import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-aYdpw2Yk.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
- import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
3
 
5
4
  //#region src/log/logging.d.ts
6
5
  type LogLevel = "info" | "debug" | "warn";
@@ -481,8 +480,10 @@ declare function build(options: BuildOptions[]): Promise<RolldownOutput[]>;
481
480
  //#region src/api/rolldown/rolldown-build.d.ts
482
481
  declare class RolldownBuild {
483
482
  #private;
483
+ static asyncRuntimeShutdown: boolean;
484
484
  constructor(inputOptions: InputOptions);
485
485
  get closed(): boolean;
486
+ scan(): Promise<void>;
486
487
  generate(outputOptions?: OutputOptions): Promise<RolldownOutput>;
487
488
  write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
488
489
  close(): Promise<void>;
@@ -656,6 +657,84 @@ interface RolldownFileStats {
656
657
  birthtime: Date;
657
658
  }
658
659
  //#endregion
660
+ //#region ../pluginutils/dist/index.d.mts
661
+ //#region src/composable-filters.d.ts
662
+ type StringOrRegExp$1 = string | RegExp;
663
+ type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
664
+ type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Query;
665
+ type TopLevelFilterExpression = Include | Exclude$1;
666
+ declare class And {
667
+ kind: "and";
668
+ args: FilterExpression[];
669
+ constructor(...args: FilterExpression[]);
670
+ }
671
+ declare class Or {
672
+ kind: "or";
673
+ args: FilterExpression[];
674
+ constructor(...args: FilterExpression[]);
675
+ }
676
+ declare class Not {
677
+ kind: "not";
678
+ expr: FilterExpression;
679
+ constructor(expr: FilterExpression);
680
+ }
681
+ interface QueryFilterObject {
682
+ [key: string]: StringOrRegExp$1 | boolean;
683
+ }
684
+ interface IdParams {
685
+ cleanUrl?: boolean;
686
+ }
687
+ declare class Id {
688
+ kind: "id";
689
+ pattern: StringOrRegExp$1;
690
+ params: IdParams;
691
+ constructor(pattern: StringOrRegExp$1, params?: IdParams);
692
+ }
693
+ declare class ModuleType$1 {
694
+ kind: "moduleType";
695
+ pattern: PluginModuleType;
696
+ constructor(pattern: PluginModuleType);
697
+ }
698
+ declare class Code {
699
+ kind: "code";
700
+ pattern: StringOrRegExp$1;
701
+ constructor(expr: StringOrRegExp$1);
702
+ }
703
+ declare class Query {
704
+ kind: "query";
705
+ key: string;
706
+ pattern: StringOrRegExp$1 | boolean;
707
+ constructor(key: string, pattern: StringOrRegExp$1 | boolean);
708
+ }
709
+ declare class Include {
710
+ kind: "include";
711
+ expr: FilterExpression;
712
+ constructor(expr: FilterExpression);
713
+ }
714
+ declare class Exclude$1 {
715
+ kind: "exclude";
716
+ expr: FilterExpression;
717
+ constructor(expr: FilterExpression);
718
+ }
719
+ declare function and(...args: FilterExpression[]): And;
720
+ declare function or(...args: FilterExpression[]): Or;
721
+ declare function not(expr: FilterExpression): Not;
722
+ declare function id(pattern: StringOrRegExp$1, params?: IdParams): Id;
723
+ declare function moduleType(pattern: PluginModuleType): ModuleType$1;
724
+ declare function code(pattern: StringOrRegExp$1): Code;
725
+ declare function query(key: string, pattern: StringOrRegExp$1 | boolean): Query;
726
+ declare function include(expr: FilterExpression): Include;
727
+ declare function exclude(expr: FilterExpression): Exclude$1;
728
+ /**
729
+ * convert a queryObject to FilterExpression like
730
+ * ```js
731
+ * and(query(k1, v1), query(k2, v2))
732
+ * ```
733
+ * @param queryFilterObject The query filter object needs to be matched.
734
+ * @returns a `And` FilterExpression
735
+ */
736
+ declare function queries(queryFilter: QueryFilterObject): And;
737
+ //#endregion
659
738
  //#region src/plugin/hook-filter.d.ts
660
739
  type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
661
740
  include?: MaybeArray<Value>;
@@ -1142,7 +1221,7 @@ interface InputOptions {
1142
1221
  * > If you want to call `resolveId` hooks of other plugin, use `aliasPlugin` from `rolldown/experimental` instead.
1143
1222
  * > You could find more discussion in [this issue](https://github.com/rolldown/rolldown/issues/3615)
1144
1223
  */
1145
- alias?: Record<string, string[] | string>;
1224
+ alias?: Record<string, string[] | string | false>;
1146
1225
  aliasFields?: string[][];
1147
1226
  conditionNames?: string[];
1148
1227
  /**
@@ -1346,7 +1425,7 @@ interface InputOptions {
1346
1425
  inject?: Record<string, string | [string, string]>;
1347
1426
  profilerNames?: boolean;
1348
1427
  /**
1349
- * @deprecated Use {@link OxcTransformOption.jsx} instead.
1428
+ * @deprecated Use `transform.jsx` instead.
1350
1429
  *
1351
1430
  * This top-level `jsx` option will be removed in a future release.
1352
1431
  * It is only kept for backward compatibility and will be mapped internally to `transform.jsx`.
@@ -1418,4 +1497,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
1418
1497
  declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
1419
1498
  declare function defineConfig(config: ConfigExport): ConfigExport;
1420
1499
  //#endregion
1421
- export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, 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, MaybePromise, 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 PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, defineParallelPlugin, rolldown, watch, withFilter };
1500
+ export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, 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, MaybePromise, 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 PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, and, build, code, defineConfig, defineParallelPlugin, exclude, id, include, moduleType, not, or, queries, query, rolldown, watch, withFilter };
@@ -1,7 +1,7 @@
1
- import { rolldown } from "./src-kVjGhYdF.mjs";
1
+ import { rolldown } from "./src-ChJBGGvK.mjs";
2
2
  import path from "node:path";
3
- import { pathToFileURL } from "node:url";
4
3
  import { readdir } from "node:fs/promises";
4
+ import { pathToFileURL } from "node:url";
5
5
  import { cwd } from "node:process";
6
6
  import fs from "node:fs";
7
7
 
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
186
186
  }
187
187
 
188
188
  //#endregion
189
- //#region ../../node_modules/.pnpm/oxc-parser@0.87.0/node_modules/oxc-parser/wrap.mjs
189
+ //#region ../../node_modules/.pnpm/oxc-parser@0.90.0/node_modules/oxc-parser/wrap.mjs
190
190
  function wrap$1(result) {
191
191
  let program, module, comments, errors;
192
192
  return {