Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rolldown

Package Overview
Dependencies
Maintainers
0
Versions
307
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rolldown - npm Package Compare versions

Comparing version 0.13.2-snapshot-88bcdcf-20241005003245 to 0.13.2-snapshot-918a4e0-20241103003536

dist/shared/src_index-bo904XLx.mjs

167

dist/types/binding.d.ts
type MaybePromise<T> = T | Promise<T>
type Nullable<T> = T | null | undefined
type VoidNullable<T = void> = T | null | undefined | void
export type BindingStringOrRegex = string | RegExp
export declare class BindingLog {

@@ -23,3 +25,2 @@ code: string

get source(): BindingAssetSource
set source(source: BindingAssetSource)
get name(): string | null

@@ -37,8 +38,5 @@ }

get imports(): Array<string>
set imports(imports: Array<string>)
get dynamicImports(): Array<string>
get code(): string
set code(code: string)
get map(): string | null
set map(map: string)
get sourcemapFileName(): string | null

@@ -49,7 +47,5 @@ get preliminaryFileName(): string

/** The `BindingOutputs` owner `Vec<Output>` the mutable reference, it avoid `Clone` at call `writeBundle/generateBundle` hook, and make it mutable. */
export declare class BindingOutputs {
get chunks(): Array<BindingOutputChunk>
get assets(): Array<BindingOutputAsset>
delete(fileName: string): void
}

@@ -63,2 +59,3 @@

getModuleIds(): Array<string> | null
addWatchFile(file: string): void
}

@@ -70,19 +67,16 @@

export declare class BindingWatcher {
close(): Promise<void>
on(event: BindingWatcherEvent, listener: (data?: Record<string, string>) => void): void
}
export declare class Bundler {
constructor(inputOptions: BindingInputOptions, outputOptions: BindingOutputOptions, parallelPluginsRegistry?: ParallelJsPluginRegistry | undefined | null)
write(): Promise<FinalBindingOutputs>
generate(): Promise<FinalBindingOutputs>
write(): Promise<BindingOutputs>
generate(): Promise<BindingOutputs>
scan(): Promise<void>
close(): Promise<void>
watch(): Promise<BindingWatcher>
}
/**
* The `FinalBindingOutputs` is used at `write()` or `generate()`, it is similar to `BindingOutputs`, if using `BindingOutputs` has unexpected behavior.
* TODO find a way to export it gracefully.
*/
export declare class FinalBindingOutputs {
get chunks(): Array<BindingOutputChunk>
get assets(): Array<BindingOutputAsset>
}
export declare class ParallelJsPluginRegistry {

@@ -99,3 +93,3 @@ id: number

export interface ArrowFunctionsBindingOptions {
export interface ArrowFunctionsOptions {
/**

@@ -252,2 +246,4 @@ * This option enables the following:

profilerNames?: boolean
jsx?: JsxOptions
watch?: BindingWatchOption
}

@@ -283,3 +279,3 @@

name: string
test?: string
test?: BindingStringOrRegex
priority?: number

@@ -294,2 +290,7 @@ minSize?: number

export interface BindingNotifyOption {
pollInterval?: number
compareContents?: boolean
}
export interface BindingOutputOptions {

@@ -307,3 +308,3 @@ name?: string

footer?: (chunk: RenderedChunk) => MaybePromise<VoidNullable<string>>
format?: 'es' | 'cjs' | 'iife'
format?: 'es' | 'cjs' | 'iife' | 'umd'
globals?: Record<string, string>

@@ -316,2 +317,3 @@ inlineDynamicImports?: boolean

sourcemapIgnoreList?: (source: string, sourcemapPath: string) => boolean
sourcemapDebugIds?: boolean
sourcemapPathTransform?: (source: string, sourcemapPath: string) => string

@@ -364,8 +366,12 @@ minify?: boolean

renderErrorMeta?: BindingPluginHookMeta
generateBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, isWrite: boolean) => MaybePromise<VoidNullable>
generateBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, isWrite: boolean) => MaybePromise<VoidNullable<JsChangedOutputs>>
generateBundleMeta?: BindingPluginHookMeta
writeBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs) => MaybePromise<VoidNullable>
writeBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs) => MaybePromise<VoidNullable<JsChangedOutputs>>
writeBundleMeta?: BindingPluginHookMeta
closeBundle?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable>
closeBundleMeta?: BindingPluginHookMeta
watchChange?: (ctx: BindingPluginContext, path: string, event: string) => MaybePromise<VoidNullable>
watchChangeMeta?: BindingPluginHookMeta
closeWatcher?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable>
closeWatcherMeta?: BindingPluginHookMeta
banner?: (ctx: BindingPluginContext, chunk: RenderedChunk) => void

@@ -420,16 +426,2 @@ bannerMeta?: BindingPluginHookMeta

/**
* For String, value is the string content, flag is the `None`
* For Regex, value is the regular expression, flag is the `Some()`.
* Make sure put a `Some("")` in flag even there is no flag in regexp.
*/
export interface BindingStringOrRegex {
value: string
/**
* There is a more compact way to represent this, `Option<u8>` with bitflags, but it will be hard
* to use(in js side), since construct a `JsRegex` is not used frequently. Optimize it when it is needed.
*/
flag?: string
}
export interface BindingTransformHookExtraArgs {

@@ -456,5 +448,19 @@ moduleType: string

export interface Es2015BindingOptions {
export declare enum BindingWatcherEvent {
Close = 0,
Event = 1,
ReStart = 2,
Change = 3
}
export interface BindingWatchOption {
skipWrite?: boolean
notify?: BindingNotifyOption
include?: Array<BindingStringOrRegex>
exclude?: Array<BindingStringOrRegex>
}
export interface Es2015Options {
/** Transform arrow functions into function expressions. */
arrowFunction?: ArrowFunctionsBindingOptions
arrowFunction?: ArrowFunctionsOptions
}

@@ -489,3 +495,16 @@

export interface PreRenderedChunk {
export interface JsChangedOutputs {
chunks: Array<JsOutputChunk>
assets: Array<JsOutputAsset>
deleted: Array<string>
}
export interface JsOutputAsset {
name?: string
originalFileName?: string
filename: string
source: BindingAssetSource
}
export interface JsOutputChunk {
name: string

@@ -497,2 +516,10 @@ isEntry: boolean

exports: Array<string>
filename: string
modules: Record<string, BindingRenderedModule>
imports: Array<string>
dynamicImports: Array<string>
code: string
map?: BindingSourcemap
sourcemapFilename?: string
preliminaryFilename: string
}

@@ -505,3 +532,3 @@

*/
export interface ReactBindingOptions {
export interface JsxOptions {
/**

@@ -586,7 +613,22 @@ * Decides which runtime to use.

useSpread?: boolean
/** Enable react fast refresh transform */
refresh?: ReactRefreshBindingOptions
/**
* Enable React Fast Refresh .
*
* Conforms to the implementation in {@link https://github.com/facebook/react/tree/main/packages/react-refresh}
*
* @default false
*/
refresh?: boolean | ReactRefreshOptions
}
export interface ReactRefreshBindingOptions {
export interface PreRenderedChunk {
name: string
isEntry: boolean
isDynamicEntry: boolean
facadeModuleId?: string
moduleIds: Array<string>
exports: Array<string>
}
export interface ReactRefreshOptions {
/**

@@ -624,7 +666,7 @@ * Specify the identifier of the refresh registration variable.

file?: string
mappings?: string
names?: Array<string>
mappings: string
names: Array<string>
sourceRoot?: string
sources?: Array<string | undefined | null>
sourcesContent?: Array<string | undefined | null>
sources: Array<string>
sourcesContent?: Array<string>
version: number

@@ -655,2 +697,4 @@ x_google_ignoreList?: Array<number>

sourceType?: 'script' | 'module' | 'unambiguous' | undefined
/** Treat the source text as `js`, `jsx`, `ts`, or `tsx`. */
lang?: 'js' | 'jsx' | 'ts' | 'tsx'
/**

@@ -662,14 +706,2 @@ * The current working directory. Used to resolve relative paths in other

/**
* Force jsx parsing,
*
* @default false
*/
jsx?: boolean
/** Configure how TypeScript is transformed. */
typescript?: TypeScriptBindingOptions
/** Configure how TSX and JSX are transformed. */
react?: ReactBindingOptions
/** Enable ES2015 transformations. */
es2015?: Es2015BindingOptions
/**
* Enable source map generation.

@@ -684,2 +716,12 @@ *

sourcemap?: boolean
/** Configure how TypeScript is transformed. */
typescript?: TypeScriptOptions
/** Configure how TSX and JSX are transformed. */
jsx?: JsxOptions
/** Enable ES2015 transformations. */
es2015?: Es2015Options
/** Define Plugin */
define?: Record<string, string>
/** Inject Plugin */
inject?: Record<string, string | [string, string]>
}

@@ -707,3 +749,3 @@

*
* @see {@link TypeScriptBindingOptions#declaration}
* @see {@link TypeScriptOptions#declaration}
* @see [declaration tsconfig option](https://www.typescriptlang.org/tsconfig/#declaration)

@@ -714,3 +756,3 @@ */

* Declaration source map. Only generated if both
* {@link TypeScriptBindingOptions#declaration declaration} and
* {@link TypeScriptOptions#declaration declaration} and
* {@link TransformOptions#sourcemap sourcemap} are set to `true`.

@@ -729,3 +771,3 @@ */

export interface TypeScriptBindingOptions {
export interface TypeScriptOptions {
jsxPragma?: string

@@ -758,2 +800,1 @@ jsxPragmaFrag?: string

}

@@ -7,3 +7,4 @@ import { CliOptions } from './schema';

hint?: string;
reverse?: boolean;
}
export declare const alias: Partial<Record<keyof CliOptions, OptionConfig>>;

@@ -9,3 +9,3 @@ export declare const flattenedSchema: Record<string, import("./types").Schema>;

hint?: string;
description?: string;
description: string;
};

@@ -12,0 +12,0 @@ };

@@ -14,3 +14,4 @@ /**

version: boolean;
watch: boolean;
}
export declare function normalizeCliOptions(cliOptions: CliOptions, positionals: string[]): NormalizedCliOptions;

@@ -7,2 +7,3 @@ import type { ObjectSchema } from './types';

version: z.ZodOptional<z.ZodBoolean>;
watch: z.ZodOptional<z.ZodBoolean>;
}, Omit<z.objectUtil.extendShape<{

@@ -56,3 +57,3 @@ input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;

onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>>>;
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>;
experimental: z.ZodOptional<z.ZodObject<{

@@ -74,2 +75,61 @@ enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;

profilerNames: z.ZodOptional<z.ZodBoolean>;
jsx: z.ZodOptional<z.ZodObject<{
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
factory: z.ZodOptional<z.ZodString>;
fragment: z.ZodOptional<z.ZodString>;
importSource: z.ZodOptional<z.ZodString>;
jsxImportSource: z.ZodOptional<z.ZodString>;
refresh: z.ZodOptional<z.ZodBoolean>;
development: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}>>;
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
skipWrite: z.ZodOptional<z.ZodBoolean>;
notify: z.ZodOptional<z.ZodObject<{
pollInterval: z.ZodOptional<z.ZodNumber>;
compareContents: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
}, {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
}>>;
include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
chokidar: z.ZodOptional<z.ZodAny>;
}, "strict", z.ZodTypeAny, {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
}, {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
}>, z.ZodLiteral<false>]>>;
}, {

@@ -79,6 +139,6 @@ external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;

treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames">>, Omit<z.objectUtil.extendShape<{
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">>, Omit<z.objectUtil.extendShape<{
dir: z.ZodOptional<z.ZodString>;
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>>;
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>;
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;

@@ -106,3 +166,3 @@ sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<import("../../options/output-options").SourcemapIgnoreListOption, z.ZodTypeDef, import("../../options/output-options").SourcemapIgnoreListOption>]>>;

name: z.ZodString;
test: z.ZodOptional<z.ZodString>;
test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
priority: z.ZodOptional<z.ZodNumber>;

@@ -115,3 +175,3 @@ minSize: z.ZodOptional<z.ZodNumber>;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -122,3 +182,3 @@ }, {

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -133,3 +193,3 @@ }>, "many">>;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -144,3 +204,3 @@ }[] | undefined;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -172,5 +232,15 @@ }[] | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
jsx?: {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
} | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;
inject?: Record<string, string> | undefined;
watch?: boolean | undefined;
footer?: string | undefined;

@@ -183,3 +253,3 @@ banner?: string | undefined;

dir?: string | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
sourcemap?: boolean | "inline" | "hidden" | undefined;

@@ -209,5 +279,15 @@ extend?: boolean | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
jsx?: {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
} | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;
inject?: Record<string, string> | undefined;
watch?: boolean | undefined;
footer?: string | undefined;

@@ -220,3 +300,3 @@ banner?: string | undefined;

dir?: string | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
sourcemap?: boolean | "inline" | "hidden" | undefined;

@@ -223,0 +303,0 @@ extend?: boolean | undefined;

import { Plugin } from '../plugin';
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "augmentChunkHash", "buildEnd", "onLog", "resolveDynamicImport", "generateBundle", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "footer", "banner", "intro", "outro", "closeBundle"];
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "augmentChunkHash", "buildEnd", "onLog", "resolveDynamicImport", "generateBundle", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "footer", "banner", "intro", "outro", "closeBundle", "watchChange", "closeWatcher"];
/**

@@ -4,0 +4,0 @@ * Names of all properties in a `Plugin` object. Includes `name` and `api`.

import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output';
import type { ExternalOption, InputOption, InputOptions } from './options/input-options';
import type { ExternalOption, InputOption, InputOptions, JsxOptions } from './options/input-options';
import type { ModuleFormat, OutputOptions } from './options/output-options';

@@ -8,3 +8,3 @@ import type { RolldownOptions } from './types/rolldown-options';

import { defineConfig } from './utils/define-config';
import { rolldown } from './rolldown';
import { rolldown, watch } from './rolldown';
import { ConfigExport } from './types/config-export';

@@ -22,6 +22,7 @@ import { RolldownBuild } from './rolldown-build';

import { OutputBundle } from './types/output-bundle';
export { defineConfig, rolldown };
import { WatchOptions } from './options/watch-option';
export { defineConfig, rolldown, watch };
export declare const VERSION: string;
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, RenderedChunk, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, };
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, RenderedChunk, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, JsxOptions, WatchOptions, };
export type { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, };
export type { RollupError, RollupLog, LoggingFunction } from './rollup';

@@ -6,2 +6,27 @@ import type { RolldownPluginRec } from '../plugin';

declare const externalSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodString>, z.ZodBoolean], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodVoid, z.ZodNull]>, z.ZodUndefined]>, z.ZodBoolean]>>]>;
declare const jsxOptionsSchema: z.ZodObject<{
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
factory: z.ZodOptional<z.ZodString>;
fragment: z.ZodOptional<z.ZodString>;
importSource: z.ZodOptional<z.ZodString>;
jsxImportSource: z.ZodOptional<z.ZodString>;
refresh: z.ZodOptional<z.ZodBoolean>;
development: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}>;
export declare const inputOptionsSchema: z.ZodObject<{

@@ -55,3 +80,3 @@ input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;

onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>>>;
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>;
experimental: z.ZodOptional<z.ZodObject<{

@@ -73,2 +98,61 @@ enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;

profilerNames: z.ZodOptional<z.ZodBoolean>;
jsx: z.ZodOptional<z.ZodObject<{
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
factory: z.ZodOptional<z.ZodString>;
fragment: z.ZodOptional<z.ZodString>;
importSource: z.ZodOptional<z.ZodString>;
jsxImportSource: z.ZodOptional<z.ZodString>;
refresh: z.ZodOptional<z.ZodBoolean>;
development: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}>>;
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
skipWrite: z.ZodOptional<z.ZodBoolean>;
notify: z.ZodOptional<z.ZodObject<{
pollInterval: z.ZodOptional<z.ZodNumber>;
compareContents: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
}, {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
}>>;
include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
chokidar: z.ZodOptional<z.ZodAny>;
}, "strict", z.ZodTypeAny, {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
}, {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
}>, z.ZodLiteral<false>]>>;
}, "strict", z.ZodTypeAny, {

@@ -98,3 +182,12 @@ input?: string | string[] | Record<string, string> | undefined;

onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
jsx?: {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
} | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
experimental?: {

@@ -108,2 +201,12 @@ enableComposingJsPlugins?: boolean | undefined;

profilerNames?: boolean | undefined;
watch?: false | {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
} | undefined;
}, {

@@ -133,3 +236,12 @@ input?: string | string[] | Record<string, string> | undefined;

onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
jsx?: {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
} | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
experimental?: {

@@ -143,2 +255,12 @@ enableComposingJsPlugins?: boolean | undefined;

profilerNames?: boolean | undefined;
watch?: false | {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
} | undefined;
}>;

@@ -193,3 +315,3 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{

onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>>>;
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>;
experimental: z.ZodOptional<z.ZodObject<{

@@ -211,2 +333,61 @@ enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;

profilerNames: z.ZodOptional<z.ZodBoolean>;
jsx: z.ZodOptional<z.ZodObject<{
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
factory: z.ZodOptional<z.ZodString>;
fragment: z.ZodOptional<z.ZodString>;
importSource: z.ZodOptional<z.ZodString>;
jsxImportSource: z.ZodOptional<z.ZodString>;
refresh: z.ZodOptional<z.ZodBoolean>;
development: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}, {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
}>>;
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
skipWrite: z.ZodOptional<z.ZodBoolean>;
notify: z.ZodOptional<z.ZodObject<{
pollInterval: z.ZodOptional<z.ZodNumber>;
compareContents: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
}, {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
}>>;
include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
chokidar: z.ZodOptional<z.ZodAny>;
}, "strict", z.ZodTypeAny, {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
}, {
skipWrite?: boolean | undefined;
notify?: {
pollInterval?: number | undefined;
compareContents?: boolean | undefined;
} | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
chokidar?: any;
}>, z.ZodLiteral<false>]>>;
}, {

@@ -216,3 +397,3 @@ external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;

treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames">, "strict", z.ZodTypeAny, {
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">, "strict", z.ZodTypeAny, {
external?: string[] | undefined;

@@ -224,3 +405,12 @@ cwd?: string | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
jsx?: {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
} | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;

@@ -235,3 +425,12 @@ inject?: Record<string, string> | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
jsx?: {
mode?: "classic" | "automatic" | undefined;
factory?: string | undefined;
fragment?: string | undefined;
importSource?: string | undefined;
jsxImportSource?: string | undefined;
refresh?: boolean | undefined;
development?: boolean | undefined;
} | undefined;
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;

@@ -270,2 +469,3 @@ inject?: Record<string, string> | undefined;

export type ExternalOption = z.infer<typeof externalSchema>;
export type JsxOptions = z.infer<typeof jsxOptionsSchema>;
export {};

@@ -1,2 +0,1 @@

import { BindingAliasPluginConfig } from '../binding';
type AliasPluginAlias = {

@@ -9,3 +8,2 @@ find: string | RegExp;

};
export declare function normalizeAliasPluginConfig(config?: AliasPluginConfig): BindingAliasPluginConfig | undefined;
export {};

@@ -5,3 +5,3 @@ import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';

import type { PreRenderedChunk, RenderedChunk } from '../binding';
export type InternalModuleFormat = 'es' | 'cjs' | 'iife';
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd';
type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;

@@ -8,0 +8,0 @@ type ChunkFileNamesOption = string | ((chunk: PreRenderedChunk) => string) | undefined;

import type { PreRenderedChunk, RenderedChunk } from '../binding';
import { z } from 'zod';
declare const ModuleFormatSchema: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>>;
declare const ModuleFormatSchema: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>;
declare const outputOptionsSchema: z.ZodObject<{
dir: z.ZodOptional<z.ZodString>;
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>>;
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>;
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;

@@ -30,3 +30,3 @@ sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<SourcemapIgnoreListOption, z.ZodTypeDef, SourcemapIgnoreListOption>]>>;

name: z.ZodString;
test: z.ZodOptional<z.ZodString>;
test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
priority: z.ZodOptional<z.ZodNumber>;

@@ -39,3 +39,3 @@ minSize: z.ZodOptional<z.ZodNumber>;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -46,3 +46,3 @@ }, {

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -57,3 +57,3 @@ }>, "many">>;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -68,3 +68,3 @@ }[] | undefined;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -81,3 +81,3 @@ }[] | undefined;

dir?: string | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
sourcemap?: boolean | "inline" | "hidden" | undefined;

@@ -102,3 +102,3 @@ sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -115,3 +115,3 @@ }[] | undefined;

dir?: string | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
sourcemap?: boolean | "inline" | "hidden" | undefined;

@@ -136,3 +136,3 @@ sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -145,3 +145,3 @@ }[] | undefined;

exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>>;
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>;
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;

@@ -169,3 +169,3 @@ sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<SourcemapIgnoreListOption, z.ZodTypeDef, SourcemapIgnoreListOption>]>>;

name: z.ZodString;
test: z.ZodOptional<z.ZodString>;
test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
priority: z.ZodOptional<z.ZodNumber>;

@@ -178,3 +178,3 @@ minSize: z.ZodOptional<z.ZodNumber>;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -185,3 +185,3 @@ }, {

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -196,3 +196,3 @@ }>, "many">>;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -207,3 +207,3 @@ }[] | undefined;

minShareCount?: number | undefined;
test?: string | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -236,3 +236,3 @@ }[] | undefined;

dir?: string | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
sourcemap?: boolean | "inline" | "hidden" | undefined;

@@ -260,3 +260,3 @@ extend?: boolean | undefined;

dir?: string | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
sourcemap?: boolean | "inline" | "hidden" | undefined;

@@ -263,0 +263,0 @@ extend?: boolean | undefined;

import { BindingGeneralHookFilter, BindingTransformHookFilter } from '../binding.d';
import { hookFilterExtension } from '.';
import type { StringFilter } from './hook-filter';
export declare function bindingifyStringFilter(matcher: StringFilter): BindingGeneralHookFilter;
export declare function bindingifyResolveIdFilter(filterOption?: hookFilterExtension<'resolveId'>['filter']): BindingGeneralHookFilter | undefined;
export declare function bindingifyLoadFilter(filterOption?: hookFilterExtension<'load'>['filter']): BindingGeneralHookFilter | undefined;
export declare function bindingifyTransformFilter(filterOption?: hookFilterExtension<'transform'>['filter']): BindingTransformHookFilter | undefined;

@@ -19,2 +19,3 @@ import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs, RenderedChunk } from '../binding';

import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
import { HookFilter } from './hook-filter';
export type ModuleSideEffects = boolean | 'no-treeshake' | null;

@@ -81,3 +82,8 @@ export type ModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});

[DEFINED_HOOK_NAMES.closeBundle]: (this: PluginContext) => void;
[DEFINED_HOOK_NAMES.watchChange]: (this: PluginContext, id: string, event: {
event: ChangeEvent;
}) => void;
[DEFINED_HOOK_NAMES.closeWatcher]: (this: PluginContext) => void;
}
export type ChangeEvent = 'create' | 'update' | 'delete';
export type PluginOrder = 'pre' | 'post' | null;

@@ -98,19 +104,6 @@ export type ObjectHookMeta<O = {}> = {

export type hookFilterExtension<K extends keyof FunctionPluginHooks> = K extends 'transform' ? {
filter?: BaseHookFilter;
filter?: HookFilter;
} : K extends 'load' | 'resolveId' ? {
filter?: Omit<BaseHookFilter, 'code' | 'moduleType'>;
filter?: Pick<HookFilter, 'id'>;
} : {};
export type BaseHookFilter = {
id?: {
include?: (string | RegExp)[];
exclude?: (string | RegExp)[];
};
moduleType?: ModuleType[] | {
include?: ModuleType[];
};
code?: {
include?: (string | RegExp)[];
exclude?: (string | RegExp)[];
};
};
export type PluginHooks = {

@@ -117,0 +110,0 @@ [K in keyof FunctionPluginHooks]: ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], hookFilterExtension<K>>;

import type { InputOptions } from './options/input-options';
import { RolldownBuild } from './rolldown-build';
import { Watcher } from './watcher';
import { WatchOptions } from './options/watch-option';
export declare const rolldown: (input: InputOptions) => Promise<RolldownBuild>;
export declare const watch: (input: WatchOptions) => Promise<Watcher>;
/**

@@ -5,0 +8,0 @@ * @description

@@ -12,1 +12,2 @@ export type MaybePromise<T> = T | Promise<T>;

export type MakeAsync<Function_> = Function_ extends (this: infer This, ...parameters: infer Arguments) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
export type MaybeArray<T> = T | T[];
import { Bundler } from '../binding';
import type { InputOptions } from '../options/input-options';
import type { OutputOptions } from '../options/output-options';
export declare function createBundler(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<{
export declare function createBundler(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerWithStopWorker>;
export interface BundlerWithStopWorker {
bundler: Bundler;
stopWorkers?: () => Promise<void>;
}>;
}
import type { RolldownOutput } from '../types/rolldown-output';
import type { OutputBundle } from '../types/output-bundle';
import type { BindingOutputs, FinalBindingOutputs } from '../binding';
export declare function transformToRollupOutput(output: BindingOutputs | FinalBindingOutputs): RolldownOutput;
export declare function transformToOutputBundle(output: BindingOutputs): OutputBundle;
import type { BindingOutputs, JsChangedOutputs } from '../binding';
export declare function transformToRollupOutput(output: BindingOutputs, changed?: ChangedOutputs): RolldownOutput;
export declare function transformToOutputBundle(output: BindingOutputs, changed: ChangedOutputs): OutputBundle;
export interface ChangedOutputs {
updated: Set<string>;
deleted: Set<string>;
}
export declare function collectChangedBundle(changed: ChangedOutputs, bundle: OutputBundle): JsChangedOutputs;
{
"name": "rolldown",
"version": "0.13.2-snapshot-88bcdcf-20241005003245",
"version": "0.13.2-snapshot-918a4e0-20241103003536",
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",

@@ -47,2 +47,3 @@ "homepage": "https://rolldown.rs/",

},
"./watcher-worker": "./dist/shared/watcher-worker.js",
"./package.json": "./package.json"

@@ -80,3 +81,3 @@ },

},
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\n"
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\n"
},

@@ -98,3 +99,3 @@ "dependencies": {

"locate-character": "^3.0.0",
"npm-run-all2": "^6.2.0",
"npm-run-all2": "^7.0.0",
"remeda": "^2.10.0",

@@ -108,18 +109,18 @@ "rollup": "^4.18.0",

"zod-to-json-schema": "^3.23.2",
"@rolldown/testing": "0.0.1",
"rolldown": "0.13.2-snapshot-88bcdcf-20241005003245"
"rolldown": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/testing": "0.0.1"
},
"optionalDependencies": {
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-88bcdcf-20241005003245",
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-88bcdcf-20241005003245"
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-918a4e0-20241103003536",
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-918a4e0-20241103003536"
},

@@ -126,0 +127,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc