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

rolldown

Package Overview
Dependencies
Maintainers
3
Versions
319
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.14.0-snapshot-beec3a9-20241107221705 to 0.14.0-snapshot-bf06e41-20241122003530

dist/shared/src_index-D1EsJHoA.cjs

120

dist/types/binding.d.ts

@@ -6,2 +6,20 @@ type MaybePromise<T> = T | Promise<T>

export interface RenderedModule {
readonly code: string | null
renderedLength: number
}
export declare class BindingBundleEndEventData {
output: string
duration: number
}
export declare class BindingCallableBuiltinPlugin {
name: string
constructor(plugin: BindingBuiltinPlugin)
resolveId(id: string, importer?: string | undefined | null, options?: BindingHookJsResolveIdOptions | undefined | null): Promise<BindingHookJsResolveIdOutput | null>
load(id: string): Promise<BindingHookJsLoadOutput | null>
watchChange(path: string, event: BindingJsWatchChangeEvent): Promise<void>
}
export declare class BindingLog {

@@ -36,3 +54,3 @@ code: string

get fileName(): string
get modules(): Record<string, BindingRenderedModule>
get modules(): Record<string, RenderedModule>
get imports(): Array<string>

@@ -50,5 +68,7 @@ get dynamicImports(): Array<string>

get assets(): Array<BindingOutputAsset>
get errors(): Array<unknown>
}
export declare class BindingPluginContext {
load(specifier: string, sideEffects: BindingHookSideEffects | undefined, fn: () => void): Promise<void>
resolve(specifier: string, importer?: string | undefined | null, extraOptions?: BindingPluginContextResolveOptions | undefined | null): Promise<BindingPluginContextResolvedId | null>

@@ -62,2 +82,6 @@ emitFile(file: BindingEmittedAsset): string

export declare class BindingRenderedModule {
get code(): string | null
}
export declare class BindingTransformPluginContext {

@@ -69,5 +93,18 @@ inner(): BindingPluginContext

close(): Promise<void>
on(event: BindingWatcherEvent, listener: (data?: Record<string, string>) => void): void
start(listener: (data: BindingWatcherEvent) => void): Promise<void>
}
export declare class BindingWatcherChangeData {
path: string
kind: string
}
export declare class BindingWatcherEvent {
eventKind(): string
watchChangeData(): BindingWatcherChangeData
bundleEndData(): BindingBundleEndEventData
bundleEventKind(): string
error(): string
}
export declare class Bundler {

@@ -77,5 +114,6 @@ constructor(inputOptions: BindingInputOptions, outputOptions: BindingOutputOptions, parallelPluginsRegistry?: ParallelJsPluginRegistry | undefined | null)

generate(): Promise<BindingOutputs>
scan(): Promise<void>
scan(): Promise<BindingOutputs>
close(): Promise<void>
watch(): Promise<BindingWatcher>
get closed(): boolean
}

@@ -150,3 +188,4 @@

BuildImportAnalysisPlugin = 10,
ReplacePlugin = 11
ReplacePlugin = 11,
ViteResolvePlugin = 12
}

@@ -164,2 +203,3 @@

disableLiveBindings?: boolean
viteMode?: boolean
}

@@ -177,2 +217,18 @@

export interface BindingHookJsLoadOutput {
code: string
map?: string
sideEffects: boolean | 'no-treeshake'
}
export interface BindingHookJsResolveIdOptions {
scan?: boolean
}
export interface BindingHookJsResolveIdOutput {
id: string
external?: boolean
sideEffects: boolean | 'no-treeshake'
}
export interface BindingHookLoadOutput {

@@ -268,2 +324,6 @@ code: string

export interface BindingJsWatchChangeEvent {
event: string
}
export declare enum BindingLogLevel {

@@ -293,2 +353,8 @@ Silent = 0,

export interface BindingModuleSideEffectsRule {
test?: RegExp | undefined
sideEffects: boolean
external?: boolean | undefined
}
export interface BindingNotifyOption {

@@ -315,3 +381,4 @@ pollInterval?: number

format?: 'es' | 'cjs' | 'iife' | 'umd'
globals?: Record<string, string>
globals?: Record<string, string> | ((name: string) => string)
hashCharacters?: 'base64' | 'base36' | 'hex'
inlineDynamicImports?: boolean

@@ -327,2 +394,3 @@ intro?: (chunk: RenderedChunk) => MaybePromise<VoidNullable<string>>

advancedChunks?: BindingAdvancedChunksOptions
comments?: 'none' | 'preserve-legal'
}

@@ -402,6 +470,2 @@

export interface BindingRenderedModule {
code?: string
}
export interface BindingReplacePluginConfig {

@@ -451,12 +515,32 @@ values: Record<string, string>

export interface BindingTreeshake {
moduleSideEffects: string
moduleSideEffects: boolean | BindingModuleSideEffectsRule[]
}
export declare enum BindingWatcherEvent {
Close = 0,
Event = 1,
ReStart = 2,
Change = 3
export interface BindingViteResolvePluginConfig {
resolveOptions: BindingViteResolvePluginResolveOptions
environmentConsumer: string
environmentName: string
external: true | string[]
noExternal: true | string[]
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>
runtime: string
}
export interface BindingViteResolvePluginResolveOptions {
isBuild: boolean
isProduction: boolean
asSrc: boolean
preferRelative: boolean
root: string
scan: boolean
mainFields: Array<string>
conditions: Array<string>
externalConditions: Array<string>
extensions: Array<string>
tryIndex: boolean
tryPrefix?: string
preserveSymlinks: boolean
}
export interface BindingWatchOption {

@@ -479,2 +563,4 @@ skipWrite?: boolean

export declare function isCallableCompatibleBuiltinPlugin(plugin: BindingBuiltinPlugin): boolean
/** TypeScript Isolated Declarations for Standalone DTS Emit */

@@ -523,3 +609,3 @@ export declare function isolatedDeclaration(filename: string, sourceText: string, options?: IsolatedDeclarationsOptions | undefined | null): IsolatedDeclarationsResult

filename: string
modules: Record<string, BindingRenderedModule>
modules: Record<string, RenderedModule>
imports: Array<string>

@@ -663,3 +749,3 @@ dynamicImports: Array<string>

fileName: string
modules: Record<string, BindingRenderedModule>
modules: Record<string, RenderedModule>
imports: Array<string>

@@ -666,0 +752,0 @@ dynamicImports: Array<string>

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

shimMissingExports: z.ZodOptional<z.ZodBoolean>;
treeshake: z.ZodOptional<z.ZodType<boolean | import("../../treeshake").TreeshakingOptions, z.ZodTypeDef, boolean | import("../../treeshake").TreeshakingOptions>>;
treeshake: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>;
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;

@@ -142,2 +208,3 @@ onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;

exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
hashCharacters: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"base64">, z.ZodLiteral<"base36">]>, z.ZodLiteral<"hex">]>>;
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">]>>;

@@ -160,3 +227,3 @@ sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;

name: z.ZodOptional<z.ZodString>;
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
globals: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodString>]>>;
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;

@@ -175,11 +242,11 @@ inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;

name: string;
test?: string | RegExp | undefined;
minSize?: number | undefined;
minShareCount?: number | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;
}, {
name: string;
test?: string | RegExp | undefined;
minSize?: number | undefined;
minShareCount?: number | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -192,5 +259,5 @@ }>, "many">>;

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

@@ -203,8 +270,9 @@ }[] | undefined;

name: string;
test?: string | RegExp | undefined;
minSize?: number | undefined;
minShareCount?: number | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;
}[] | undefined;
}>>;
comments: z.ZodOptional<z.ZodEnum<["none", "preserve-legal"]>>;
}, {

@@ -216,2 +284,3 @@ banner: z.ZodOptional<z.ZodString>;

esModule: z.ZodOptional<z.ZodBoolean>;
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
advancedChunks: z.ZodOptional<z.ZodObject<{

@@ -228,4 +297,4 @@ minSize: z.ZodOptional<z.ZodNumber>;

}>, "sourcemapIgnoreList" | "sourcemapPathTransform">>, "strict", z.ZodTypeAny, {
external?: string[] | undefined;
treeshake?: boolean | undefined;
external?: string[] | undefined;
cwd?: string | undefined;

@@ -235,3 +304,3 @@ platform?: "node" | "browser" | "neutral" | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;

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

esModule?: boolean | undefined;
globals?: Record<string, string> | undefined;
advancedChunks?: {

@@ -264,2 +334,3 @@ minSize?: number | undefined;

dir?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

@@ -274,5 +345,5 @@ sourcemap?: boolean | "inline" | "hidden" | undefined;

minify?: boolean | undefined;
globals?: Record<string, string> | undefined;
externalLiveBindings?: boolean | undefined;
inlineDynamicImports?: boolean | undefined;
comments?: "none" | "preserve-legal" | undefined;
version?: boolean | undefined;

@@ -282,4 +353,4 @@ config?: string | boolean | undefined;

}, {
external?: string[] | undefined;
treeshake?: boolean | undefined;
external?: string[] | undefined;
cwd?: string | undefined;

@@ -289,3 +360,3 @@ platform?: "node" | "browser" | "neutral" | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;

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

esModule?: boolean | undefined;
globals?: Record<string, string> | undefined;
advancedChunks?: {

@@ -318,2 +390,3 @@ minSize?: number | undefined;

dir?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

@@ -328,5 +401,5 @@ sourcemap?: boolean | "inline" | "hidden" | undefined;

minify?: boolean | undefined;
globals?: Record<string, string> | undefined;
externalLiveBindings?: boolean | undefined;
inlineDynamicImports?: boolean | undefined;
comments?: "none" | "preserve-legal" | undefined;
version?: boolean | undefined;

@@ -333,0 +406,0 @@ config?: string | boolean | undefined;

2

dist/types/experimental-index.d.ts

@@ -6,2 +6,2 @@ export { defineParallelPlugin } from './plugin/parallel-plugin';

export { composeJsPlugins as composePlugins } from './utils/compose-js-plugins';
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, aliasPlugin, jsonPlugin, buildImportAnalysisPlugin, replacePlugin, } from './plugin/builtin-plugin';
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, aliasPlugin, jsonPlugin, buildImportAnalysisPlugin, replacePlugin, viteResolvePlugin, isCallableCompatibleBuiltinPlugin, makeBuiltinPluginCallable, isCallableBuiltinPlugin, } from './plugin/builtin-plugin';

@@ -22,6 +22,7 @@ import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output';

import { WatchOptions } from './options/watch-option';
import { Watcher } from './watcher';
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, JsxOptions, WatchOptions, };
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, Watcher, };
export type { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, };
export type { RollupError, RollupLog, LoggingFunction } from './rollup';
import { z } from 'zod';
import type { RolldownPluginRec } from '../plugin';
import type { TreeshakingOptions } from '../treeshake';
export declare const inputOptionsSchema: z.ZodObject<{

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

shimMissingExports: z.ZodOptional<z.ZodBoolean>;
treeshake: z.ZodOptional<z.ZodType<boolean | TreeshakingOptions, z.ZodTypeDef, boolean | TreeshakingOptions>>;
treeshake: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>;
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;

@@ -131,6 +196,28 @@ onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;

}, "strict", z.ZodTypeAny, {
treeshake?: boolean | TreeshakingOptions | undefined;
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
treeshake?: boolean | z.objectOutputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough"> | undefined;
input?: string | string[] | Record<string, string> | undefined;
plugins?: RolldownPluginRec[] | undefined;
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
resolve?: {

@@ -155,3 +242,3 @@ modules?: string[] | undefined;

onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
experimental?: {

@@ -186,6 +273,28 @@ strictExecutionOrder?: boolean | undefined;

}, {
treeshake?: boolean | TreeshakingOptions | undefined;
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
treeshake?: boolean | z.objectInputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough"> | undefined;
input?: string | string[] | Record<string, string> | undefined;
plugins?: RolldownPluginRec[] | undefined;
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
resolve?: {

@@ -210,3 +319,3 @@ modules?: string[] | undefined;

onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
experimental?: {

@@ -285,3 +394,69 @@ strictExecutionOrder?: boolean | undefined;

shimMissingExports: z.ZodOptional<z.ZodBoolean>;
treeshake: z.ZodOptional<z.ZodType<boolean | TreeshakingOptions, z.ZodTypeDef, boolean | TreeshakingOptions>>;
treeshake: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>;
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;

@@ -372,4 +547,4 @@ onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;

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

@@ -379,3 +554,3 @@ platform?: "node" | "browser" | "neutral" | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;

@@ -394,4 +569,4 @@ inject?: Record<string, string> | undefined;

}, {
external?: string[] | undefined;
treeshake?: boolean | undefined;
external?: string[] | undefined;
cwd?: string | undefined;

@@ -401,3 +576,3 @@ platform?: "node" | "browser" | "neutral" | undefined;

logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
define?: Record<string, string> | undefined;

@@ -404,0 +579,0 @@ inject?: Record<string, string> | undefined;

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

plugins: RolldownPlugin[];
format: InternalModuleFormat;
exports: 'auto' | 'named' | 'default' | 'none';
sourcemap: boolean | 'inline' | 'hidden';
sourcemapIgnoreList: SourcemapIgnoreListOption;

@@ -16,5 +13,2 @@ banner: AddonFunction;

outro: AddonFunction;
esModule: boolean | 'if-default-prop';
assetFileNames: string;
inlineDynamicImports: boolean;
}

@@ -8,2 +8,3 @@ import { z } from 'zod';

exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
hashCharacters: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"base64">, z.ZodLiteral<"base36">]>, z.ZodLiteral<"hex">]>>;
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">]>>;

@@ -26,3 +27,3 @@ sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;

name: z.ZodOptional<z.ZodString>;
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
globals: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodString>]>>;
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;

@@ -41,11 +42,11 @@ inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;

name: string;
test?: string | RegExp | undefined;
minSize?: number | undefined;
minShareCount?: number | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;
}, {
name: string;
test?: string | RegExp | undefined;
minSize?: number | undefined;
minShareCount?: number | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;

@@ -58,5 +59,5 @@ }>, "many">>;

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

@@ -69,8 +70,9 @@ }[] | undefined;

name: string;
test?: string | RegExp | undefined;
minSize?: number | undefined;
minShareCount?: number | undefined;
test?: string | RegExp | undefined;
priority?: number | undefined;
}[] | undefined;
}>>;
comments: z.ZodOptional<z.ZodEnum<["none", "preserve-legal"]>>;
}, {

@@ -82,2 +84,3 @@ banner: z.ZodOptional<z.ZodString>;

esModule: z.ZodOptional<z.ZodBoolean>;
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
advancedChunks: z.ZodOptional<z.ZodObject<{

@@ -102,2 +105,3 @@ minSize: z.ZodOptional<z.ZodNumber>;

esModule?: boolean | undefined;
globals?: Record<string, string> | undefined;
advancedChunks?: {

@@ -108,2 +112,3 @@ minSize?: number | undefined;

dir?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

@@ -118,5 +123,5 @@ sourcemap?: boolean | "inline" | "hidden" | undefined;

minify?: boolean | undefined;
globals?: Record<string, string> | undefined;
externalLiveBindings?: boolean | undefined;
inlineDynamicImports?: boolean | undefined;
comments?: "none" | "preserve-legal" | undefined;
}, {

@@ -131,2 +136,3 @@ footer?: string | undefined;

esModule?: boolean | undefined;
globals?: Record<string, string> | undefined;
advancedChunks?: {

@@ -137,2 +143,3 @@ minSize?: number | undefined;

dir?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

@@ -147,5 +154,5 @@ sourcemap?: boolean | "inline" | "hidden" | undefined;

minify?: boolean | undefined;
globals?: Record<string, string> | undefined;
externalLiveBindings?: boolean | undefined;
inlineDynamicImports?: boolean | undefined;
comments?: "none" | "preserve-legal" | undefined;
}>;
import { TransformPluginConfig } from '../options/normalized-ecma-transform-plugin-config';
import { AliasPluginConfig } from '../options/normalized-alias-plugin-config';
import { BindingBuiltinPluginName, BindingGlobImportPluginConfig, BindingBuiltinPlugin, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingJsonPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingReplacePluginConfig } from '../binding';
import { BindingBuiltinPluginName, BindingGlobImportPluginConfig, BindingBuiltinPlugin, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingJsonPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingReplacePluginConfig, type BindingViteResolvePluginConfig, BindingCallableBuiltinPlugin } from '../binding';
export declare class BuiltinPlugin {

@@ -45,2 +45,5 @@ name: BindingBuiltinPluginName;

}
export declare class ViteResolvePlugin extends BuiltinPlugin {
constructor(config?: BindingViteResolvePluginConfig);
}
export declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): ModulePreloadPolyfillPlugin;

@@ -57,2 +60,3 @@ export declare function dynamicImportVarsPlugin(): DynamicImportVarsPlugin;

export declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuildImportAnalysisPlugin;
export declare function viteResolvePlugin(config: Omit<BindingViteResolvePluginConfig, 'runtime'>): ViteResolvePlugin;
/**

@@ -83,2 +87,11 @@ * ## Usage

export declare function replacePlugin(values?: BindingReplacePluginConfig['values'], options?: Omit<BindingReplacePluginConfig, 'values'>): ReplacePlugin;
export declare function isCallableCompatibleBuiltinPlugin(plugin: any): plugin is BuiltinPlugin;
type BindingCallableBuiltinPluginLike = {
[K in keyof BindingCallableBuiltinPlugin]: BindingCallableBuiltinPlugin[K];
};
export declare function makeBuiltinPluginCallable(plugin: BuiltinPlugin): BindingCallableBuiltinPluginLike & {
_original: BindingCallableBuiltinPlugin;
};
export declare function isCallableBuiltinPlugin(plugin: any): boolean;
export declare function bindingifyBuiltInPlugin(plugin: BuiltinPlugin): BindingBuiltinPlugin;
export {};
import type { MaybeArray } from '../types/utils';
import type { StringOrRegExp } from '../constants/types';
import type { StringOrRegExp } from '../types/utils';
import type { ModuleType } from '../index';

@@ -4,0 +4,0 @@ export type StringFilter = MaybeArray<StringOrRegExp> | {

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

export type RolldownPlugin<A = any> = Plugin<A> | BuiltinPlugin | ParallelPlugin;
export type RolldownPluginRec<A = any> = RolldownPlugin<A> | RolldownPlugin<A>[];
export type RolldownPluginOption<A = any> = NullValue<RolldownPlugin<A>> | false;
export type RolldownPluginRec<A = any> = RolldownPluginOption<A> | RolldownPluginOption<A>[];
export {};

@@ -7,2 +7,3 @@ import { BindingPluginContext } from '../binding';

resolveOptionsMap: Map<number, PluginContextResolveOptions>;
loadModulePromiseMap: Map<string, Promise<void>>;
updateModuleOption(id: string, option: ModuleOptions): void;

@@ -9,0 +10,0 @@ getModuleOption(id: string): ModuleOptions | undefined;

import type { BindingPluginContext } from '../binding';
import type { NormalizedInputOptions } from '../options/normalized-input-options';
import type { CustomPluginOptions, Plugin, ResolvedId } from './index';
import type { CustomPluginOptions, ModuleOptions, Plugin, ResolvedId } from './index';
import { MinimalPluginContext } from '../log/logger';

@@ -9,2 +9,3 @@ import { AssetSource } from '../utils/asset-source';

import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
import { PartialNull } from '../types/utils';
export interface EmittedAsset {

@@ -26,2 +27,6 @@ type: 'asset';

export declare class PluginContext extends MinimalPluginContext {
readonly load: (options: {
id: string;
resolveDependencies?: boolean;
} & Partial<PartialNull<ModuleOptions>>) => Promise<ModuleInfo>;
readonly resolve: (source: string, importer?: string, options?: PluginContextResolveOptions) => Promise<ResolvedId | null>;

@@ -28,0 +33,0 @@ readonly emitFile: (file: EmittedAsset) => string;

@@ -7,5 +7,7 @@ import type { InputOptions } from './types/input-options';

constructor(inputOptions: InputOptions);
get closed(): boolean;
generate(outputOptions?: OutputOptions): Promise<RolldownOutput>;
write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
close(): Promise<void>;
[Symbol.asyncDispose](): Promise<void>;
}

@@ -1,13 +0,5 @@

export declare const TreeshakingOptionsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
moduleSideEffects: import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>;
}, {
moduleSideEffects: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>;
}>, "strict", import("zod").ZodTypeAny, {
moduleSideEffects?: string | boolean | undefined;
}, {
moduleSideEffects?: string | boolean | undefined;
}>;
export interface TreeshakingOptions {
moduleSideEffects?: boolean | RegExp;
import { ModuleSideEffectsRule } from './module-side-effects';
export interface NormalizedTreeshakingOptions {
moduleSideEffects: boolean | ModuleSideEffectsRule[];
}
export * from './module-side-effects';
import { z } from 'zod';
export declare const HasModuleSideEffectsSchema: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodBoolean], z.ZodUnknown>, z.ZodBoolean>;
export type HasModuleSideEffects = z.infer<typeof HasModuleSideEffectsSchema>;
export type ModuleSideEffectsOption = z.infer<typeof ModuleSideEffectsOptionSchema>;
export declare const ModuleSideEffectsOptionSchema: z.ZodUnion<[z.ZodBoolean, z.ZodString]>;
export declare const NormalizedTreeshakingOptionsSchema: z.ZodObject<{
moduleSideEffects: z.ZodUnion<[z.ZodBoolean, z.ZodString]>;
}, "strict", z.ZodTypeAny, {
moduleSideEffects: string | boolean;
export declare const ModuleSideEffectsRuleSchema: z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
moduleSideEffects: string | boolean;
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>;
export type NormalizedTreeshakingOptions = {
moduleSideEffects: string;
};
export type ModuleSideEffectsRule = z.infer<typeof ModuleSideEffectsRuleSchema>;
export declare const ModuleSideEffectsOptionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>;
export declare const TreeshakingOptionsSchema: z.ZodUnion<[z.ZodObject<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
external: z.ZodOptional<z.ZodBoolean>;
sideEffects: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}, {
sideEffects: boolean;
test?: RegExp | undefined;
external?: boolean | undefined;
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>;
export type TreeshakingOptions = z.infer<typeof TreeshakingOptionsSchema>;

@@ -45,2 +45,9 @@ import { RolldownPluginRec } from '../plugin';

cwd?: string;
/**
* Expected platform where the code run.
*
* @default
* - 'node' if the format is 'cjs'
* - 'browser' for other formats
*/
platform?: 'node' | 'browser' | 'neutral';

@@ -57,2 +64,3 @@ shimMissingExports?: boolean;

disableLiveBindings?: boolean;
viteMode?: boolean;
};

@@ -59,0 +67,0 @@ define?: Record<string, string>;

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

export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;
export type GlobalsFunction = (name: string) => string;
export interface OutputOptions {

@@ -12,2 +13,12 @@ dir?: string;

exports?: 'auto' | 'named' | 'default' | 'none';
hashCharacters?: 'base64' | 'base36' | 'hex';
/**
* Expected format of generated code.
* - `'es'`, `'esm'` and `'module'` are the same format, all stand for ES module.
* - `'cjs'` and `'commonjs'` are the same format, all stand for CommonJS module.
* - `'iife'` stands for [Immediately Invoked Function Expression](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
* - `'umd'` stands for [Universal Module Definition](https://github.com/umdjs/umd).
*
* @default 'esm'
*/
format?: ModuleFormat;

@@ -30,3 +41,3 @@ sourcemap?: boolean | 'inline' | 'hidden';

name?: string;
globals?: Record<string, string>;
globals?: Record<string, string> | GlobalsFunction;
externalLiveBindings?: boolean;

@@ -45,2 +56,9 @@ inlineDynamicImports?: boolean;

};
/**
* Control comments in the output.
*
* - `none`: no comments
* - `preserve-legal`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
*/
comments?: 'none' | 'preserve-legal';
}

@@ -53,2 +71,3 @@ interface OverwriteOutputOptionsForCli {

esModule?: boolean;
globals?: Record<string, string>;
advancedChunks?: {

@@ -55,0 +74,0 @@ minSize?: number;

import { AssetSource } from '../utils/asset-source';
import type { RenderedModule } from './rendered-module';
import type { RenderedModule } from '../binding';
export interface RolldownOutputAsset {

@@ -4,0 +4,0 @@ type: 'asset';

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

import type { RolldownOptions } from '../types/rolldown-options';
import type { ConfigExport } from '../types/config-export';
export declare function defineConfig(config: RolldownOptions): RolldownOptions;
export declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
export declare function defineConfig(config: ConfigExport): ConfigExport;

@@ -5,2 +5,3 @@ import type { RolldownOutput } from '../types/rolldown-output';

export declare function transformToRollupOutput(output: BindingOutputs, changed?: ChangedOutputs): RolldownOutput;
export declare function handleOutputErrors(output: BindingOutputs): void;
export declare function transformToOutputBundle(output: BindingOutputs, changed: ChangedOutputs): OutputBundle;

@@ -7,0 +8,0 @@ export interface ChangedOutputs {

@@ -8,2 +8,3 @@ import { BindingWatcher } from './binding';

stopWorkers?: () => Promise<void>;
listeners: Map<WatcherEvent, Array<(...parameters: any[]) => MaybePromise<void>>>;
constructor(inner: BindingWatcher, stopWorkers?: () => Promise<void>);

@@ -31,3 +32,6 @@ close(): Promise<void>;

} | {
code: 'ERROR'; /** error: RollupError; result: RollupBuild | null **/
code: 'ERROR';
error: {
message: string;
};
};
{
"name": "rolldown",
"version": "0.14.0-snapshot-beec3a9-20241107221705",
"version": "0.14.0-snapshot-bf06e41-20241122003530",
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",

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

},
"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"
"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\nexport interface RenderedModule {\n readonly code: string | null\n renderedLength: number\n}\n\n"
},

@@ -101,2 +101,3 @@ "dependencies": {

"signal-exit": "4.1.0",
"tsx": "^4.19.2",
"type-fest": "^4.20.0",

@@ -109,17 +110,17 @@ "unbuild": "^2.0.0",

"@rolldown/testing": "0.0.1",
"rolldown": "0.14.0-snapshot-beec3a9-20241107221705"
"rolldown": "0.14.0-snapshot-bf06e41-20241122003530"
},
"optionalDependencies": {
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-beec3a9-20241107221705",
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-beec3a9-20241107221705"
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-bf06e41-20241122003530",
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-bf06e41-20241122003530"
},

@@ -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