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

rolldown

Package Overview
Dependencies
Maintainers
0
Versions
355
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-11a6693-20241126041222 to 0.14.0-snapshot-12d7e71-20241201004055

dist/shared/chunk-BK2Ye-xa.cjs

45

dist/types/binding.d.ts

@@ -39,9 +39,30 @@ type MaybePromise<T> = T | Promise<T>

export declare class BindingNormalizedOptions {
get input(): Array<string> | Record<string, string>
get cwd(): string | null
get platform(): 'node' | 'browser' | 'neutral'
get shimMissingExports(): boolean
get input(): Array<string> | Record<string, string>
get name(): string | null
get cssEntryFilenames(): string | undefined
get cssChunkFilenames(): string | undefined
get entryFilenames(): string | undefined
get chunkFilenames(): string | undefined
get assetFilenames(): string
get dir(): string | null
get entryFilenames(): string | null
get file(): string | null
get format(): 'es' | 'cjs' | 'app' | 'iife' | 'umd'
get exports(): 'default' | 'named' | 'none' | 'auto'
get esModule(): boolean | 'if-default-prop'
get inlineDynamicImports(): boolean
get sourcemap(): boolean | 'inline' | 'hidden'
get banner(): string | undefined | null | undefined
get footer(): string | undefined | null | undefined
get intro(): string | undefined | null | undefined
get outro(): string | undefined | null | undefined
get externalLiveBindings(): boolean
get extend(): boolean
get globals(): Record<string, string> | undefined
get hashCharacters(): 'base64' | 'base36' | 'hex'
get sourcemapDebugIds(): boolean
get minify(): boolean
get comments(): 'none' | 'preserve-legal'
}

@@ -94,2 +115,3 @@

export declare class BindingTransformPluginContext {
getCombinedSourcemap(): string
inner(): BindingPluginContext

@@ -206,2 +228,3 @@ }

viteMode?: boolean
resolveNewUrlToAsset?: boolean
}

@@ -379,3 +402,3 @@

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

@@ -508,2 +531,3 @@ hashCharacters?: 'base64' | 'base36' | 'hex'

jsxInject?: string
reactRefresh?: boolean
targets?: string

@@ -802,2 +826,17 @@ }

jsx?: JsxOptions
/**
* Sets the target environment for the generated JavaScript.
*
* The lowest target is `es2015`.
*
* Example:
*
* * 'es2015'
* * ['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']
*
* @default `esnext` (No transformation)
*
* @see [esbuild#target](https://esbuild.github.io/api/#target)
*/
target?: string | Array<string>
/** Define Plugin */

@@ -804,0 +843,0 @@ define?: Record<string, string>

13

dist/types/cli/arguments/schema.d.ts

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

input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
plugins: z.ZodOptional<z.ZodArray<z.ZodType<import("../../plugin").RolldownPluginRec, z.ZodTypeDef, import("../../plugin").RolldownPluginRec>, "many">>;
plugins: z.ZodOptional<z.ZodType<import("../../plugin").RolldownPluginOption, z.ZodTypeDef, import("../../plugin").RolldownPluginOption>>;
external: z.ZodOptional<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]>>]>>;

@@ -131,5 +131,7 @@ resolve: z.ZodOptional<z.ZodObject<{

disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
strictExecutionOrder?: boolean | undefined;
disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -139,2 +141,3 @@ }, {

disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -296,3 +299,2 @@ }>>;

}>, "sourcemapIgnoreList" | "sourcemapPathTransform">>, "strict", z.ZodTypeAny, {
file?: string | undefined;
name?: string | undefined;

@@ -311,2 +313,3 @@ exports?: "auto" | "named" | "default" | "none" | undefined;

dir?: string | undefined;
file?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;

@@ -335,2 +338,3 @@ format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

} | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;

@@ -341,3 +345,2 @@ treeshake?: boolean | undefined;

cwd?: string | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
shimMissingExports?: boolean | undefined;

@@ -351,3 +354,2 @@ moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;

}, {
file?: string | undefined;
name?: string | undefined;

@@ -366,2 +368,3 @@ exports?: "auto" | "named" | "default" | "none" | undefined;

dir?: string | undefined;
file?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;

@@ -390,2 +393,3 @@ format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

} | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;

@@ -396,3 +400,2 @@ treeshake?: boolean | undefined;

cwd?: string | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
shimMissingExports?: boolean | undefined;

@@ -399,0 +402,0 @@ moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;

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

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

import type { RollupLog } from '../rollup';
export declare function logInvalidLogPosition(pluginName: string): RollupLog;
export declare function logInputHookInOutputPlugin(pluginName: string, hookName: string): RollupLog;
export declare function logCycleLoading(pluginName: string, moduleId: string): RollupLog;
export declare function logPluginError(error: Omit<RollupLog, 'code'> & {

@@ -4,0 +6,0 @@ code?: unknown;

import { z } from 'zod';
import type { RolldownPluginRec } from '../plugin';
import type { RolldownPluginOption } from '../plugin';
export declare const inputOptionsSchema: z.ZodObject<{
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
plugins: z.ZodOptional<z.ZodArray<z.ZodType<RolldownPluginRec, z.ZodTypeDef, RolldownPluginRec>, "many">>;
plugins: z.ZodOptional<z.ZodType<RolldownPluginOption, z.ZodTypeDef, RolldownPluginOption>>;
external: z.ZodOptional<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]>>]>>;

@@ -125,5 +125,7 @@ resolve: z.ZodOptional<z.ZodObject<{

disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
strictExecutionOrder?: boolean | undefined;
disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -133,2 +135,3 @@ }, {

disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -200,3 +203,3 @@ }>>;

}, "strict", z.ZodTypeAny, {
plugins?: RolldownPluginRec[] | undefined;
plugins?: RolldownPluginOption;
onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;

@@ -214,3 +217,4 @@ onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;

} | undefined;
input?: string | Record<string, string> | string[] | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
input?: string | string[] | Record<string, string> | undefined;
resolve?: {

@@ -268,2 +272,3 @@ modules?: string[] | undefined;

disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -273,3 +278,2 @@ } | undefined;

cwd?: string | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
shimMissingExports?: boolean | undefined;

@@ -280,3 +284,3 @@ moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;

}, {
plugins?: RolldownPluginRec[] | undefined;
plugins?: RolldownPluginOption;
onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;

@@ -294,3 +298,4 @@ onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;

} | undefined;
input?: string | Record<string, string> | string[] | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
input?: string | string[] | Record<string, string> | undefined;
resolve?: {

@@ -348,2 +353,3 @@ modules?: string[] | undefined;

disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -353,3 +359,2 @@ } | undefined;

cwd?: string | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
shimMissingExports?: boolean | undefined;

@@ -362,3 +367,3 @@ moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;

input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
plugins: z.ZodOptional<z.ZodArray<z.ZodType<RolldownPluginRec, z.ZodTypeDef, RolldownPluginRec>, "many">>;
plugins: z.ZodOptional<z.ZodType<RolldownPluginOption, z.ZodTypeDef, RolldownPluginOption>>;
external: z.ZodOptional<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]>>]>>;

@@ -483,5 +488,7 @@ resolve: z.ZodOptional<z.ZodObject<{

disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>;
}, "strict", z.ZodTypeAny, {
strictExecutionOrder?: boolean | undefined;
disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -491,2 +498,3 @@ }, {

disableLiveBindings?: boolean | undefined;
resolveNewUrlToAsset?: boolean | undefined;
enableComposingJsPlugins?: boolean | undefined;

@@ -572,2 +580,3 @@ }>>;

} | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;

@@ -577,3 +586,2 @@ treeshake?: boolean | undefined;

cwd?: string | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
shimMissingExports?: boolean | undefined;

@@ -594,2 +602,3 @@ moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;

} | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;

@@ -599,3 +608,2 @@ treeshake?: boolean | undefined;

cwd?: string | undefined;
platform?: "node" | "browser" | "neutral" | undefined;
shimMissingExports?: boolean | undefined;

@@ -602,0 +610,0 @@ moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;

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

import { RolldownPluginRec } from '../plugin';
import { RolldownPluginOption } from '../plugin';
import { LogLevel, LogLevelOption, LogLevelWithError, RollupLog, RollupLogWithString } from '../log/logging';

@@ -29,3 +29,3 @@ import { TreeshakingOptions } from '../treeshake';

input?: InputOption;
plugins?: RolldownPluginRec[];
plugins?: RolldownPluginOption;
external?: ExternalOption;

@@ -65,2 +65,3 @@ resolve?: {

viteMode?: boolean;
resolveNewUrlToAsset?: boolean;
};

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

import type { LogHandler } from '../rollup';
import { BindingNormalizedOptions } from '../binding';
import { InputOptions } from '..';
export interface NormalizedInputOptions {
input: string[] | Record<string, string>;
cwd: string | undefined;
platform: InputOptions['platform'];
shimMissingExports: boolean;
input: string[] | Record<string, string>;
}

@@ -12,3 +15,5 @@ export declare class NormalizedInputOptionsImpl implements NormalizedInputOptions {

get shimMissingExports(): boolean;
get input(): Record<string, string> | string[];
get input(): string[] | Record<string, string>;
get cwd(): string | undefined;
get platform(): "node" | "browser" | "neutral";
}
import type { BindingNormalizedOptions } from '../binding';
import { ChunkFileNamesFunction } from './output-options';
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';
import type { ChunkFileNamesFunction, GlobalsFunction, OutputOptions } from './output-options';
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app';
export interface NormalizedOutputOptions {
name: string | undefined;
file: string | undefined;
dir: string | undefined;
entryFileNames: string | ChunkFileNamesFunction;
chunkFileNames: string | ChunkFileNamesFunction;
assetFileNames: string;
format: InternalModuleFormat;
exports: NonNullable<OutputOptions['exports']>;
sourcemap: boolean | 'inline' | 'hidden';
cssEntryFileNames: string | ChunkFileNamesFunction;
cssChunkFileNames: string | ChunkFileNamesFunction;
inlineDynamicImports: boolean;
sourcemap: boolean | 'inline' | 'hidden';
externalLiveBindings: boolean;
banner: OutputOptions['banner'];
footer: OutputOptions['footer'];
intro: OutputOptions['intro'];
outro: OutputOptions['outro'];
esModule: boolean | 'if-default-prop';
extend: boolean;
globals: Record<string, string> | GlobalsFunction;
hashCharacters: 'base64' | 'base36' | 'hex';
sourcemapDebugIds: boolean;
sourcemapIgnoreList: SourcemapIgnoreListOption | undefined;
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
minify: boolean;
comments: 'none' | 'preserve-legal';
}

@@ -16,5 +38,27 @@ export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOptions {

get entryFileNames(): string | (() => never);
get chunkFileNames(): string | (() => never);
get assetFileNames(): string;
get format(): "es" | "cjs" | "iife" | "umd" | "app";
get exports(): "auto" | "named" | "default" | "none";
get sourcemap(): boolean | "inline" | "hidden";
get cssEntryFileNames(): string | (() => never);
get cssChunkFileNames(): string | (() => never);
get shimMissingExports(): boolean;
get name(): string | undefined;
get file(): string | undefined;
get inlineDynamicImports(): boolean;
get sourcemap(): boolean | "inline" | "hidden";
get externalLiveBindings(): boolean;
get banner(): string | (() => never) | undefined;
get footer(): string | (() => never) | undefined;
get intro(): string | (() => never) | undefined;
get outro(): string | (() => never) | undefined;
get esModule(): boolean | "if-default-prop";
get extend(): boolean;
get globals(): Record<string, string> | (() => never);
get hashCharacters(): "base64" | "base36" | "hex";
get sourcemapDebugIds(): boolean;
get sourcemapIgnoreList(): (() => never) | undefined;
get sourcemapPathTransform(): (() => never) | undefined;
get minify(): boolean;
get comments(): "none" | "preserve-legal";
}

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

}>, "sourcemapIgnoreList" | "sourcemapPathTransform">, "strict", z.ZodTypeAny, {
file?: string | undefined;
name?: string | undefined;

@@ -106,2 +105,3 @@ exports?: "auto" | "named" | "default" | "none" | undefined;

dir?: string | undefined;
file?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;

@@ -121,3 +121,2 @@ format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

}, {
file?: string | undefined;
name?: string | undefined;

@@ -136,2 +135,3 @@ exports?: "auto" | "named" | "default" | "none" | undefined;

dir?: string | undefined;
file?: string | undefined;
hashCharacters?: "base64" | "base36" | "hex" | undefined;

@@ -138,0 +138,0 @@ format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;

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

import { RolldownOutputPluginOption } from '../plugin';
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd';
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd' | 'experimental-app';
export type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;

@@ -8,0 +8,0 @@ export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;

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

import type { BindingPluginOptions } from '../binding';
import type { hookFilterExtension } from './index';
import type { BindingGeneralHookFilter, BindingPluginOptions, BindingTransformHookFilter } from '../binding';
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';

@@ -7,6 +6,6 @@ import type { BindingifyPluginArgs } from './bindingify-plugin';

export declare function bindingifyBuildEnd(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildEnd']>;
export declare function bindingifyResolveId(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveId'], hookFilterExtension<'transform'>>;
export declare function bindingifyResolveId(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveId'], BindingGeneralHookFilter | undefined>;
export declare function bindingifyResolveDynamicImport(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveDynamicImport']>;
export declare function bindingifyTransform(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['transform']>;
export declare function bindingifyLoad(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['load']>;
export declare function bindingifyTransform(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['transform'], BindingTransformHookFilter | undefined>;
export declare function bindingifyLoad(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['load'], BindingGeneralHookFilter | undefined>;
export declare function bindingifyModuleParsed(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['moduleParsed']>;

@@ -1,7 +0,7 @@

import { BindingGeneralHookFilter, BindingTransformHookFilter } from '../binding.d';
import { hookFilterExtension } from '.';
import type { StringFilter } from './hook-filter';
import type { HookFilterExtension } from '.';
import type { BindingGeneralHookFilter, BindingTransformHookFilter } from '../binding.d';
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;
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;

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

import type { OutputBundle } from '../types/output-bundle';
import { PluginContext } from './plugin-context';
import type { PluginContext } from './plugin-context';
import type { TransformPluginContext } from './transform-plugin-context';

@@ -14,9 +14,9 @@ import type { NormalizedOutputOptions } from '../options/normalized-output-options';

import type { MinimalPluginContext } from './minimal-plugin-context';
import { InputOptions, OutputOptions } from '..';
import { BuiltinPlugin } from '../builtin-plugin/constructors';
import { ParallelPlugin } from './parallel-plugin';
import type { InputOptions, OutputOptions } from '..';
import type { BuiltinPlugin } from '../builtin-plugin/constructors';
import type { ParallelPlugin } from './parallel-plugin';
import type { DefinedHookNames } from '../constants/plugin';
import { DEFINED_HOOK_NAMES } from '../constants/plugin';
import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
import { HookFilter } from './hook-filter';
import type { DEFINED_HOOK_NAMES } from '../constants/plugin';
import type { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
import type { HookFilter } from './hook-filter';
export type ModuleSideEffects = boolean | 'no-treeshake' | null;

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

export type PluginOrder = 'pre' | 'post' | null;
export type ObjectHookMeta<O = {}> = {
export type ObjectHookMeta = {
order?: PluginOrder;
} & O;
};
export type ObjectHook<T, O = {}> = T | ({
handler: T;
} & ObjectHookMeta<O>);
} & ObjectHookMeta & O);
export type SyncPluginHooks = DefinedHookNames['augmentChunkHash' | 'onLog' | 'outputOptions'];

@@ -104,3 +104,3 @@ export type AsyncPluginHooks = Exclude<keyof FunctionPluginHooks, SyncPluginHooks>;

export type ParallelPluginHooks = Exclude<keyof FunctionPluginHooks | AddonHooks, FirstPluginHooks | SequentialPluginHooks>;
export type hookFilterExtension<K extends keyof FunctionPluginHooks> = K extends 'transform' ? {
export type HookFilterExtension<K extends keyof FunctionPluginHooks> = K extends 'transform' ? {
filter?: HookFilter;

@@ -111,3 +111,3 @@ } : K extends 'load' | 'resolveId' ? {

export type PluginHooks = {
[K in keyof FunctionPluginHooks]: ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], hookFilterExtension<K>>;
[K in keyof FunctionPluginHooks]: ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], HookFilterExtension<K>>;
};

@@ -127,6 +127,5 @@ export type AddonHookFunction = (this: PluginContext, chunk: RenderedChunk) => string | Promise<string>;

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

@@ -40,3 +40,3 @@ import type { BindingPluginContext } from '../binding';

readonly parse: (input: string, options?: any) => any;
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption);
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption, currentLoadingModule?: string);
}

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

import { Plugin, RolldownPluginRec } from './';
import { Plugin } from './';
import { InputOptions, OutputOptions, RolldownPlugin } from '..';

@@ -7,3 +7,3 @@ export declare class PluginDriver {

}
export declare function getObjectPlugins(plugins: RolldownPluginRec[]): Plugin[];
export declare function getObjectPlugins(plugins: RolldownPlugin[]): Plugin[];
export declare function getSortedPlugins(hookName: 'options' | 'outputOptions' | 'onLog', plugins: readonly Plugin[]): Plugin[];

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

import type { Plugin } from './index';
import { SourceMap } from '../types/rolldown-output';
export declare class TransformPluginContext extends PluginContext {

@@ -12,3 +13,4 @@ error: (error: RollupError | string, pos?: number | {

}) => never;
getCombinedSourcemap: () => SourceMap;
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string, onLog: LogHandler, LogLevelOption: LogLevelOption);
}

@@ -1,5 +0,7 @@

import type { RolldownPlugin } from '..';
import type { RolldownPlugin } from 'rolldown';
import type { InputOptions } from '../options/input-options';
import type { OutputOptions } from '../options/output-options';
import type { BindingInputOptions } from '../binding';
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions): BindingInputOptions;
import { LogHandler } from '../rollup';
import { LogLevelOption } from '../log/logging';
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions, onLog: LogHandler, logLevel: LogLevelOption): BindingInputOptions;
import { AnyFn } from '../types/utils';
import type { ObjectHook, ObjectHookMeta } from '../plugin';
export declare function normalizeHook<Hook extends ObjectHook<AnyFn | string>>(hook: Hook): Hook extends ObjectHook<infer RawHook, infer CustomOptions> ? {
export declare function normalizeHook<Hook extends ObjectHook<AnyFn | string>>(hook: Hook): Hook extends ObjectHook<infer RawHook, infer CustomOptions> ? Hook extends RawHook ? never : {
handler: RawHook;

@@ -5,0 +5,0 @@ options: CustomOptions;

import type { RolldownPlugin, RolldownOutputPlugin } from '../plugin';
import type { InputOptions } from '../options/input-options';
import type { OutputOptions } from '../options/output-options';
import { LogHandler } from '../rollup';
export declare const normalizePluginOption: {

@@ -9,1 +10,5 @@ (plugins: InputOptions['plugins']): Promise<RolldownPlugin[]>;

};
export declare function checkOutputPluginOption(plugins: RolldownOutputPlugin[], onLog: LogHandler): RolldownOutputPlugin[];
export declare function normalizePlugins<T extends RolldownPlugin>(plugins: T[], anonymousPrefix: string): T[];
export declare const ANONYMOUS_PLUGIN_PREFIX = "at position ";
export declare const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";

@@ -0,1 +1,3 @@

import { ExistingRawSourceMap, SourceMapInput } from '../types/sourcemap';
export declare function isEmptySourcemapFiled(array: undefined | (string | null)[]): boolean;
export declare function normalizeTransformHookSourcemap(id: string, originalCode: string, rawMap?: SourceMapInput): ExistingRawSourceMap | undefined;
{
"name": "rolldown",
"version": "0.14.0-snapshot-11a6693-20241126041222",
"version": "0.14.0-snapshot-12d7e71-20241201004055",
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",

@@ -84,9 +84,18 @@ "homepage": "https://rolldown.rs/",

},
"peerDependencies": {
"@babel/runtime": ">=7"
},
"peerDependenciesMeta": {
"@babel/runtime": {
"optional": true
}
},
"devDependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0",
"@napi-rs/cli": "^3.0.0-alpha.60",
"@napi-rs/wasm-runtime": "^0.2.4",
"@types/fs-extra": "^11.0.4",
"@types/lodash-es": "^4.17.12",
"colorette": "^2.0.20",
"consola": "^3.2.3",
"cross-env": "^7.0.3",
"emnapi": "^1.2.0",

@@ -101,25 +110,24 @@ "execa": "^9.2.0",

"signal-exit": "4.1.0",
"source-map": "^0.7.4",
"tsx": "^4.19.2",
"type-fest": "^4.20.0",
"unbuild": "^2.0.0",
"vite": "^5.2.13",
"vitest": "^2.0.0",
"why-is-node-running": "^3.0.0",
"zod-to-json-schema": "^3.23.2",
"@rolldown/testing": "0.0.1",
"rolldown": "0.14.0-snapshot-11a6693-20241126041222"
"rolldown": "0.14.0-snapshot-12d7e71-20241201004055"
},
"optionalDependencies": {
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-11a6693-20241126041222",
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-11a6693-20241126041222"
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-12d7e71-20241201004055",
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-12d7e71-20241201004055"
},

@@ -135,3 +143,3 @@ "scripts": {

"bak_build-node": "unbuild",
"build-node": "node ../../node_modules/npm-rolldown/bin/cli.js -c ./rolldown.config.mjs",
"build-node": "tsx ./build.ts",
"build-types": "tsc -p ./tsconfig.dts.json",

@@ -141,6 +149,6 @@ "build-types-check": "tsc -p ./tsconfig.check.json",

"build-native:release": "run-s build-binding:release build-types build-node build-types-check",
"build-wasi:debug": "run-s build-binding:wasi build-node",
"build-wasi:release": "run-s build-binding:wasi:release build-node",
"build-wasi:debug": "run-s build-binding build-binding:wasi build-node",
"build-wasi:release": "run-s build-binding build-binding:wasi:release build-node",
"# Scrips for checking #": "_",
"test": "cross-env RUST_BACKTRACE=1 ROLLDOWN_TEST=1 vitest run --reporter verbose --hideSkippedTests",
"test": "pnpm run --filter rolldown-tests go",
"test:update": "vitest run -u",

@@ -147,0 +155,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

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