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

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,3 +1,3 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./src-Cl6h35QH.js";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./src-C2GHZXDs.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-wK0CRIMb.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, 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-BcNhk996.mjs";
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, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
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";
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,4 +1,4 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-Dc4fRARy.mjs";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-kVjGhYdF.mjs";
2
2
  import "./shared/parse-ast-index-C3TkGcEQ.mjs";
3
3
  import "./shared/dist-CHTC3-kR.mjs";
4
4
 
@@ -1,4 +1,4 @@
1
- import { PluginContextData, bindingifyPlugin } from "./shared/src-Dc4fRARy.mjs";
1
+ import { PluginContextData, bindingifyPlugin } from "./shared/src-kVjGhYdF.mjs";
2
2
  import "./shared/parse-ast-index-C3TkGcEQ.mjs";
3
3
  import "./shared/dist-CHTC3-kR.mjs";
4
4
  import { parentPort, workerData } from "node:worker_threads";
@@ -1,5 +1,5 @@
1
- import "./shared/binding-wK0CRIMb.mjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-BcNhk996.mjs";
1
+ import "./shared/binding-Cjs27cfu.mjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-DzsPS4fI.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-wK0CRIMb.mjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding-Cjs27cfu.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -103,6 +103,7 @@ export const BindingWatcher = __napiModule.exports.BindingWatcher
103
103
  export const BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
104
104
  export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
105
105
  export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
106
+ export const ScheduledBuild = __napiModule.exports.ScheduledBuild
106
107
  export const TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
107
108
  export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
108
109
  export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
@@ -148,6 +148,7 @@ module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
148
148
  module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
149
149
  module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
150
150
  module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
151
+ module.exports.ScheduledBuild = __napiModule.exports.ScheduledBuild
151
152
  module.exports.TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
152
153
  module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
153
154
  module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
@@ -1,4 +1,4 @@
1
- import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-wK0CRIMb.mjs";
1
+ import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-Cjs27cfu.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
 
@@ -802,6 +802,9 @@ interface OutputBundle {
802
802
  [fileName: string]: OutputAsset | OutputChunk;
803
803
  }
804
804
  //#endregion
805
+ //#region src/types/rolldown-options-function.d.ts
806
+ type RolldownOptionsFunction = (commandLineArguments: Record<string, any>) => MaybePromise<RolldownOptions | RolldownOptions[]>;
807
+ //#endregion
805
808
  //#region src/types/sourcemap.d.ts
806
809
  interface ExistingRawSourceMap {
807
810
  file?: string | null;
@@ -819,15 +822,11 @@ type SourceMapInput = ExistingRawSourceMap | string | null;
819
822
  declare const VERSION: string;
820
823
  //#endregion
821
824
  //#region src/builtin-plugin/utils.d.ts
822
- declare const BuiltinClassSymbol: symbol;
823
825
  declare class BuiltinPlugin {
824
826
  name: BindingBuiltinPluginName;
825
827
  _options?: unknown;
826
828
  constructor(name: BindingBuiltinPluginName, _options?: unknown);
827
829
  }
828
- interface BuiltinPlugin {
829
- [BuiltinClassSymbol]: boolean;
830
- }
831
830
  //#endregion
832
831
  //#region src/constants/plugin.d.ts
833
832
  declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
@@ -1411,11 +1410,12 @@ interface RolldownOptions extends InputOptions {
1411
1410
  /**
1412
1411
  * Type for `default export` of `rolldown.config.js` file.
1413
1412
  */
1414
- type ConfigExport = RolldownOptions | RolldownOptions[];
1413
+ type ConfigExport = RolldownOptions | RolldownOptions[] | RolldownOptionsFunction;
1415
1414
  //#endregion
1416
1415
  //#region src/utils/define-config.d.ts
1417
1416
  declare function defineConfig(config: RolldownOptions): RolldownOptions;
1418
1417
  declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
1418
+ declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
1419
1419
  declare function defineConfig(config: ConfigExport): ConfigExport;
1420
1420
  //#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 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 };
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 };
@@ -1,4 +1,4 @@
1
- import { rolldown } from "./src-Dc4fRARy.mjs";
1
+ import { rolldown } from "./src-kVjGhYdF.mjs";
2
2
  import path from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { readdir } from "node:fs/promises";