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

rolldown

Package Overview
Dependencies
Maintainers
0
Versions
307
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rolldown - npm Package Compare versions

Comparing version 0.13.2-snapshot-167f46a-20241008003351 to 0.13.2-snapshot-1daf8e4-20241014003453

dist/shared/src_index-_6D8oVEl.mjs

116

dist/types/binding.d.ts

@@ -23,3 +23,2 @@ type MaybePromise<T> = T | Promise<T>

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

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

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

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

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

@@ -71,17 +65,9 @@

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

@@ -98,3 +84,3 @@ id: number

export interface ArrowFunctionsBindingOptions {
export interface ArrowFunctionsOptions {
/**

@@ -358,8 +344,10 @@ * This option enables the following:

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

@@ -449,5 +437,5 @@ bannerMeta?: BindingPluginHookMeta

export interface Es2015BindingOptions {
export interface Es2015Options {
/** Transform arrow functions into function expressions. */
arrowFunction?: ArrowFunctionsBindingOptions
arrowFunction?: ArrowFunctionsOptions
}

@@ -482,3 +470,16 @@

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

@@ -490,2 +491,10 @@ isEntry: boolean

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

@@ -498,3 +507,3 @@

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

@@ -579,7 +588,22 @@ * Decides which runtime to use.

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

@@ -617,7 +641,7 @@ * Specify the identifier of the refresh registration variable.

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

@@ -648,2 +672,4 @@ x_google_ignoreList?: Array<number>

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

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

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

@@ -677,2 +691,12 @@ *

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

@@ -700,3 +724,3 @@

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

@@ -707,3 +731,3 @@ */

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

@@ -722,3 +746,3 @@ */

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

@@ -725,0 +749,0 @@ jsxPragmaFrag?: string

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

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

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

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

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

version?: boolean | undefined;
watch?: boolean | undefined;
config?: string | boolean | undefined;

@@ -226,2 +228,3 @@ help?: boolean | undefined;

version?: boolean | undefined;
watch?: boolean | undefined;
config?: string | boolean | undefined;

@@ -228,0 +231,0 @@ help?: boolean | undefined;

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

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

@@ -8,3 +8,3 @@ import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output';

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

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

import { OutputBundle } from './types/output-bundle';
export { defineConfig, rolldown };
export { defineConfig, rolldown, watch };
export declare const VERSION: string;

@@ -25,0 +25,0 @@ 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, };

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

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

@@ -83,0 +87,0 @@ export type ObjectHookMeta<O = {}> = {

@@ -10,2 +10,3 @@ import type { OutputOptions } from './options/output-options';

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

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

import type { RolldownOutput } from '../types/rolldown-output';
import type { OutputBundle } from '../types/output-bundle';
import type { BindingOutputs, FinalBindingOutputs } from '../binding';
export declare function transformToRollupOutput(output: BindingOutputs | FinalBindingOutputs): RolldownOutput;
export declare function transformToOutputBundle(output: BindingOutputs): OutputBundle;
import type { BindingOutputs, JsChangedOutputs } from '../binding';
export declare function transformToRollupOutput(output: BindingOutputs, changed?: ChangedOutputs): RolldownOutput;
export declare function transformToOutputBundle(output: BindingOutputs, changed: ChangedOutputs): OutputBundle;
export interface ChangedOutputs {
updated: Set<string>;
deleted: Set<string>;
}
export declare function collectChangedBundle(changed: ChangedOutputs, bundle: OutputBundle): JsChangedOutputs;
{
"name": "rolldown",
"version": "0.13.2-snapshot-167f46a-20241008003351",
"version": "0.13.2-snapshot-1daf8e4-20241014003453",
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",

@@ -106,17 +106,17 @@ "homepage": "https://rolldown.rs/",

"@rolldown/testing": "0.0.1",
"rolldown": "0.13.2-snapshot-167f46a-20241008003351"
"rolldown": "0.13.2-snapshot-1daf8e4-20241014003453"
},
"optionalDependencies": {
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-167f46a-20241008003351",
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-167f46a-20241008003351"
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-1daf8e4-20241014003453",
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-1daf8e4-20241014003453"
},

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