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

rolldown

Package Overview
Dependencies
Maintainers
3
Versions
364
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.10.0-snapshot-ed402b2-20240328002407 to 0.10.0-snapshot-f466fdb-20240402002447

dist/shared/rolldown.04482f71.mjs

201

dist/index.d.ts

@@ -40,4 +40,4 @@ interface RenderedModule$1 {

// utils
type NullValue = null | undefined | void
type MaybePromise<T> = T | Promise<T>
type NullValue$1 = null | undefined | void
type MaybePromise$1<T> = T | Promise<T>

@@ -248,3 +248,3 @@ type PartialNull<T> = {

interface PluginContext extends MinimalPluginContext {
interface PluginContext$1 extends MinimalPluginContext {
addWatchFile: (id: string) => void

@@ -306,6 +306,6 @@ cache: PluginCache

type ResolveIdResult = string | NullValue | false | PartialResolvedId
type ResolveIdResult = string | NullValue$1 | false | PartialResolvedId
type ResolveIdHook = (
this: PluginContext,
this: PluginContext$1,
source: string,

@@ -321,3 +321,3 @@ importer: string | undefined,

type ShouldTransformCachedModuleHook = (
this: PluginContext,
this: PluginContext$1,
options: {

@@ -332,3 +332,3 @@ ast: AcornNode

},
) => boolean | NullValue
) => boolean | NullValue$1

@@ -343,7 +343,7 @@ type IsExternal = (

type LoadResult = SourceDescription | string | NullValue
type LoadResult = SourceDescription | string | NullValue$1
type LoadHook = (this: PluginContext, id: string) => LoadResult
type LoadHook = (this: PluginContext$1, id: string) => LoadResult
interface TransformPluginContext extends PluginContext {
interface TransformPluginContext extends PluginContext$1 {
debug: LoggingFunctionWithPosition

@@ -359,3 +359,3 @@ error: (

type TransformResult = string | NullValue | Partial<SourceDescription>
type TransformResult = string | NullValue$1 | Partial<SourceDescription>

@@ -368,14 +368,14 @@ type TransformHook = (

type ModuleParsedHook = (this: PluginContext, info: ModuleInfo) => void
type ModuleParsedHook = (this: PluginContext$1, info: ModuleInfo) => void
type RenderChunkHook = (
this: PluginContext,
this: PluginContext$1,
code: string,
chunk: RenderedChunk,
chunk: RenderedChunk$1,
options: NormalizedOutputOptions,
meta: { chunks: Record<string, RenderedChunk> },
) => { code: string; map?: SourceMapInput } | string | NullValue
meta: { chunks: Record<string, RenderedChunk$1> },
) => { code: string; map?: SourceMapInput } | string | NullValue$1
type ResolveDynamicImportHook = (
this: PluginContext,
this: PluginContext$1,
specifier: string | AcornNode,

@@ -387,9 +387,9 @@ importer: string,

type ResolveImportMetaHook = (
this: PluginContext,
this: PluginContext$1,
property: string | null,
options: { chunkId: string; format: InternalModuleFormat; moduleId: string },
) => string | NullValue
) => string | NullValue$1
type ResolveFileUrlHook = (
this: PluginContext,
this: PluginContext$1,
options: {

@@ -403,7 +403,7 @@ chunkId: string

},
) => string | NullValue
) => string | NullValue$1
type AddonHookFunction = (
this: PluginContext,
chunk: RenderedChunk,
this: PluginContext$1,
chunk: RenderedChunk$1,
) => string | Promise<string>

@@ -414,3 +414,3 @@ type AddonHook = string | AddonHookFunction

type WatchChangeHook = (
this: PluginContext,
this: PluginContext$1,
id: string,

@@ -425,9 +425,9 @@ change: { event: ChangeEvent },

interface FunctionPluginHooks {
augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void
buildEnd: (this: PluginContext, error?: Error) => void
buildStart: (this: PluginContext, options: NormalizedInputOptions) => void
closeBundle: (this: PluginContext) => void
closeWatcher: (this: PluginContext) => void
augmentChunkHash: (this: PluginContext$1, chunk: RenderedChunk$1) => string | void
buildEnd: (this: PluginContext$1, error?: Error) => void
buildStart: (this: PluginContext$1, options: NormalizedInputOptions) => void
closeBundle: (this: PluginContext$1) => void
closeWatcher: (this: PluginContext$1) => void
generateBundle: (
this: PluginContext,
this: PluginContext$1,
options: NormalizedOutputOptions,

@@ -443,14 +443,14 @@ bundle: OutputBundle,

log: RollupLog,
) => boolean | NullValue
) => boolean | NullValue$1
options: (
this: MinimalPluginContext,
options: InputOptions$1,
) => InputOptions$1 | NullValue
) => InputOptions$1 | NullValue$1
outputOptions: (
this: PluginContext,
this: PluginContext$1,
options: OutputOptions$1,
) => OutputOptions$1 | NullValue
) => OutputOptions$1 | NullValue$1
renderChunk: RenderChunkHook
renderDynamicImport: (
this: PluginContext,
this: PluginContext$1,
options: {

@@ -462,6 +462,6 @@ customResolution: string | null

},
) => { left: string; right: string } | NullValue
renderError: (this: PluginContext, error?: Error) => void
) => { left: string; right: string } | NullValue$1
renderError: (this: PluginContext$1, error?: Error) => void
renderStart: (
this: PluginContext,
this: PluginContext$1,
outputOptions: NormalizedOutputOptions,

@@ -478,3 +478,3 @@ inputOptions: NormalizedInputOptions,

writeBundle: (
this: PluginContext,
this: PluginContext$1,
options: NormalizedOutputOptions,

@@ -565,3 +565,3 @@ bundle: OutputBundle,

interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
interface Plugin$1<A = any> extends OutputPlugin, Partial<PluginHooks> {
// for inter-plugin communication

@@ -596,3 +596,3 @@ api?: A

meta: ManualChunkMeta,
) => string | NullValue
) => string | NullValue$1

@@ -607,3 +607,3 @@ type ExternalOption =

isResolved: boolean,
) => boolean | NullValue)
) => boolean | NullValue$1)

@@ -655,4 +655,4 @@ type GlobalsOption =

type InputPluginOption = MaybePromise<
Plugin | NullValue | false | InputPluginOption[]
type InputPluginOption = MaybePromise$1<
Plugin$1 | NullValue$1 | false | InputPluginOption[]
>

@@ -681,3 +681,3 @@

moduleContext?:
| ((id: string) => string | NullValue)
| ((id: string) => string | NullValue$1)
| { [id: string]: string }

@@ -720,3 +720,3 @@ onLog?: LogHandlerWithDefault

perf: boolean
plugins: Plugin[]
plugins: Plugin$1[]
preserveEntrySignatures: PreserveEntrySignaturesOption

@@ -804,6 +804,6 @@ /** @deprecated Use the "preserveModules" output option instead. */

type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>
type AddonFunction = (chunk: RenderedChunk$1) => string | Promise<string>
type OutputPluginOption = MaybePromise<
OutputPlugin | NullValue | false | OutputPluginOption[]
type OutputPluginOption = MaybePromise$1<
OutputPlugin | NullValue$1 | false | OutputPluginOption[]
>

@@ -963,3 +963,3 @@

interface RenderedChunk extends PreRenderedChunk {
interface RenderedChunk$1 extends PreRenderedChunk {
dynamicImports: string[]

@@ -978,3 +978,3 @@ fileName: string

interface OutputChunk extends RenderedChunk {
interface OutputChunk extends RenderedChunk$1 {
code: string

@@ -1033,2 +1033,46 @@ map: SourceMap | null

declare class BindingOutputAsset {
get fileName(): string
get source(): string
}
declare class BindingOutputChunk {
get isEntry(): boolean
get isDynamicEntry(): boolean
get facadeModuleId(): string | null
get moduleIds(): Array<string>
get exports(): Array<string>
get fileName(): string
get modules(): Record<string, BindingRenderedModule>
get code(): string
get map(): string | null
get sourcemapFileName(): string | null
}
declare class BindingOutputs {
get chunks(): Array<BindingOutputChunk>
get assets(): Array<BindingOutputAsset>
}
declare class BindingPluginContext {
resolve(
specifier: string,
importer: string | undefined | null,
extraOptions: BindingPluginContextResolveOptions,
): void
}
interface BindingHookResolveIdExtraOptions {
isEntry: boolean
kind: string
}
interface BindingPluginContextResolveOptions {
importKind: string
}
interface BindingRenderedModule {
code?: string
}
interface BindingResolveOptions {

@@ -1046,8 +1090,52 @@ alias?: Record<string, Array<string>>

type RolldownPlugin = Plugin;
interface RenderedChunk {
isEntry: boolean
isDynamicEntry: boolean
facadeModuleId?: string
moduleIds: Array<string>
exports: Array<string>
fileName: string
modules: Record<string, BindingRenderedModule>
}
interface AnyFn {
(...args: any[]): any;
}
interface AnyObj {
}
type NullValue<T = void> = T | undefined | null | void;
type MaybePromise<T> = T | Promise<T>;
type PluginContext = BindingPluginContext;
type FormalHook<Handler extends AnyFn, HookOptions extends AnyObj = AnyObj> = {
handler: Handler;
} & HookOptions;
type Hook<Handler extends AnyFn, HookOptions extends AnyObj = AnyObj> = FormalHook<Handler, HookOptions> | Handler;
interface Plugin {
name?: string;
buildStart?: Hook<(this: PluginContext, options: RolldownNormalizedInputOptions) => MaybePromise<NullValue>>;
resolveId?: Hook<(this: null, source: string, importer: string | undefined, extraOptions: BindingHookResolveIdExtraOptions) => MaybePromise<string | NullValue | false | {
id: string;
external?: boolean;
}>>;
load?: Hook<(this: null, id: string) => MaybePromise<NullValue | string | {
code: string;
map?: string | null;
}>>;
transform?: Hook<(this: null, code: string, id: string) => MaybePromise<NullValue | string | {
code: string;
map?: string | null;
}>>;
renderChunk?: Hook<(this: null, code: string, chunk: RenderedChunk) => MaybePromise<NullValue | string>>;
buildEnd?: Hook<(this: null, err?: string) => MaybePromise<NullValue>>;
generateBundle?: Hook<(bundle: BindingOutputs, isWrite: boolean) => MaybePromise<NullValue>>;
writeBundle?: Hook<(bundle: BindingOutputs) => MaybePromise<NullValue>>;
}
interface InputOptions {
input?: InputOptions$1['input'];
plugins?: RolldownPlugin[];
plugins?: Plugin[];
external?: InputOptions$1['external'];
resolve?: RolldownResolveOptions;
cwd?: string;
}

@@ -1057,2 +1145,5 @@ type RolldownResolveOptions = Omit<BindingResolveOptions, 'alias'> & {

};
type RolldownNormalizedInputOptions = NormalizedInputOptions & {
resolve?: BindingResolveOptions;
};

@@ -1064,2 +1155,4 @@ interface OutputOptions {

sourcemap?: OutputOptions$1['sourcemap'];
banner?: OutputOptions$1['banner'];
footer?: OutputOptions$1['footer'];
}

@@ -1090,2 +1183,2 @@

export { type InputOptions, type OutputOptions, type RolldownPlugin as Plugin, type RolldownOptions, type RolldownOutput, type RolldownOptions as RollupOptions, type RolldownOutput as RollupOutput, defineConfig, experimental_scan, rolldown };
export { type InputOptions, type OutputOptions, type Plugin, type RolldownOptions, type RolldownOutput, type RolldownOutputChunk, type RolldownOptions as RollupOptions, type RolldownOutput as RollupOutput, defineConfig, experimental_scan, rolldown };
{
"name": "rolldown",
"version": "0.10.0-snapshot-ed402b2-20240328002407",
"version": "0.10.0-snapshot-f466fdb-20240402002447",
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",

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

"consola": "^3.2.3",
"fast-glob": "^3.3.2",
"glob": "^10.3.10",

@@ -69,16 +68,17 @@ "rollup": "^4.12.1",

"unbuild": "^2.0.0",
"vite": "^5.1.5",
"vitest": "^1.3.1",
"rolldown": "0.10.0-snapshot-ed402b2-20240328002407"
"rolldown": "0.10.0-snapshot-f466fdb-20240402002447"
},
"optionalDependencies": {
"@rolldown/binding-darwin-arm64": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-darwin-x64": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-linux-arm-gnueabihf": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-linux-arm64-gnu": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-linux-x64-gnu": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-linux-arm64-musl": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-win32-arm64-msvc": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-linux-x64-musl": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-win32-ia32-msvc": "0.10.0-snapshot-ed402b2-20240328002407",
"@rolldown/binding-win32-x64-msvc": "0.10.0-snapshot-ed402b2-20240328002407"
"@rolldown/binding-darwin-x64": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-darwin-arm64": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-linux-arm64-gnu": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-linux-arm-gnueabihf": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-linux-x64-gnu": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-linux-arm64-musl": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-linux-x64-musl": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-win32-arm64-msvc": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-win32-ia32-msvc": "0.10.0-snapshot-f466fdb-20240402002447",
"@rolldown/binding-win32-x64-msvc": "0.10.0-snapshot-f466fdb-20240402002447"
},

@@ -89,4 +89,4 @@ "scripts": {

"format-generated-binding-files": "prettier --write src/binding.js src/binding.d.ts",
"build-binding": "napi build -o=./src --manifest-path ../../crates/rolldown_binding/Cargo.toml --platform -p rolldown_binding --js binding.js --dts binding.d.ts --dts-header \"type MaybePromise<T> = T | Promise<T>\"",
"build-binding:release": "napi build -o=./src --release --manifest-path ../../crates/rolldown_binding/Cargo.toml --platform -p rolldown_binding --js binding.js --dts binding.d.ts --dts-header \"type MaybePromise<T> = T | Promise<T>\"",
"build-binding": "napi build -o=./src --manifest-path ../../crates/rolldown_binding/Cargo.toml --platform -p rolldown_binding --js binding.js --dts binding.d.ts --dts-header \"type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\"",
"build-binding:release": "napi build -o=./src --release --manifest-path ../../crates/rolldown_binding/Cargo.toml --platform -p rolldown_binding --js binding.js --dts binding.d.ts --dts-header \"type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\"",
"# Scrips for node #": "_",

@@ -97,3 +97,3 @@ "build-node": "unbuild",

"# Scrips for checking #": "_",
"test": "vitest run --reporter verbose",
"test": "vitest run --reporter verbose --hideSkippedTests",
"test:update": "vitest run -u",

@@ -100,0 +100,0 @@ "type-check": "tsc"

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