Comparing version 0.15.1 to 1.0.0-beta.1
@@ -1,4 +0,5 @@ | ||
import type { RolldownOptions } from '../types/rolldown-options'; | ||
import { InputOptions } from '../options/input-options'; | ||
import { OutputOptions } from '../options/output-options'; | ||
import type { RolldownOutput } from '../types/rolldown-output'; | ||
export interface BuildOptions extends RolldownOptions { | ||
export interface BuildOptions extends InputOptions { | ||
/** | ||
@@ -10,2 +11,3 @@ * Write the output to the file system | ||
write?: boolean; | ||
output?: OutputOptions; | ||
} | ||
@@ -12,0 +14,0 @@ declare function build(options: BuildOptions): Promise<RolldownOutput>; |
@@ -341,3 +341,3 @@ type MaybePromise<T> = T | Promise<T> | ||
profilerNames?: boolean | ||
jsx?: JsxOptions | ||
jsx?: BindingJsx | ||
watch?: BindingWatchOption | ||
@@ -370,2 +370,7 @@ keepNames?: boolean | ||
export type BindingJsx = | ||
| { type: 'Disable' } | ||
| { type: 'Preserve' } | ||
| { type: 'Enable', field0: JsxOptions } | ||
export declare enum BindingLogLevel { | ||
@@ -897,3 +902,3 @@ Silent = 0, | ||
/** Configure how TSX and JSX are transformed. */ | ||
jsx?: JsxOptions | ||
jsx?: 'preserve' | JsxOptions | ||
/** | ||
@@ -900,0 +905,0 @@ * Sets the target environment for the generated JavaScript. |
@@ -1,2 +0,2 @@ | ||
import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, RolldownRenderedChunk, SourceMap } from './types/rolldown-output'; | ||
import { RolldownOutput, OutputAsset, OutputChunk, RenderedChunk, SourceMap } from './types/rolldown-output'; | ||
import type { InputOptions, InputOption, ExternalOption, JsxOptions } from './options/input-options'; | ||
@@ -27,4 +27,3 @@ import type { ModuleFormat, OutputOptions } from './options/output-options'; | ||
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, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, JsxOptions, WatchOptions, RolldownWatcher, BuildOptions, }; | ||
export type { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, RolldownRenderedChunk as RenderedChunk, RolldownWatcher as RollupWatcher, }; | ||
export type { RollupError, RollupLog, LoggingFunction } from './rollup'; | ||
export type { OutputAsset, OutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, JsxOptions, WatchOptions, RolldownWatcher, BuildOptions, RenderedChunk, }; | ||
export type { RollupError, RollupLog, LoggingFunction } from './types/misc'; |
@@ -1,2 +0,2 @@ | ||
import type { LogHandler } from '../rollup'; | ||
import type { LogHandler } from '../types/misc'; | ||
import type { Plugin } from '../plugin'; | ||
@@ -3,0 +3,0 @@ import { type LogLevelOption } from './logging'; |
@@ -1,4 +0,4 @@ | ||
import type { LoggingFunctionWithPosition, LogHandler, RollupLog } from '../rollup'; | ||
import type { LoggingFunctionWithPosition, LogHandler, RollupLog } from '../types/misc'; | ||
import { type LogLevel, type LogLevelOption } from './logging'; | ||
export declare const normalizeLog: (log: RollupLog | string | (() => RollupLog | string)) => RollupLog; | ||
export declare function getLogHandler(level: LogLevel, code: string, logger: LogHandler, pluginName: string, logLevel: LogLevelOption): LoggingFunctionWithPosition; |
@@ -1,2 +0,3 @@ | ||
import type { RollupLog } from '../rollup'; | ||
import type { RollupLog } from '../types/misc'; | ||
export declare function logMinifyWarning(): RollupLog; | ||
export declare function logInvalidLogPosition(pluginName: string): RollupLog; | ||
@@ -3,0 +4,0 @@ export declare function logInputHookInOutputPlugin(pluginName: string, hookName: string): RollupLog; |
@@ -9,3 +9,3 @@ import { RolldownPluginOption } from '../plugin'; | ||
export interface JsxOptions { | ||
mode?: 'classic' | 'automatic'; | ||
mode?: 'classic' | 'automatic' | 'preserve'; | ||
factory?: string; | ||
@@ -106,3 +106,11 @@ fragment?: string; | ||
profilerNames?: boolean; | ||
jsx?: JsxOptions; | ||
/** | ||
* JSX options. | ||
* The `false` is disabled jsx parser, it will give you a syntax error if you use jsx syntax | ||
* The `mode: preserve` is disabled jsx transformer, it perverse original jsx syntax in the output. | ||
* The `mode: classic` is enabled jsx `classic` transformer. | ||
* The `mode: automatic` is enabled jsx `automatic` transformer. | ||
* @default mode = 'automatic' | ||
*/ | ||
jsx?: false | JsxOptions; | ||
watch?: WatchOptions | false; | ||
@@ -109,0 +117,0 @@ dropLabels?: string[]; |
@@ -1,2 +0,2 @@ | ||
import type { LogHandler } from '../rollup'; | ||
import type { LogHandler } from '../types/misc'; | ||
import { BindingNormalizedOptions } from '../binding'; | ||
@@ -3,0 +3,0 @@ import { InputOptions } from '..'; |
import type { BindingNormalizedOptions } from '../binding'; | ||
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup'; | ||
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc'; | ||
import type { ChunkFileNamesFunction, GlobalsFunction, OutputOptions } from './output-options'; | ||
@@ -4,0 +4,0 @@ export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app'; |
import type { StringOrRegExp } from '../types/utils'; | ||
import type { PreRenderedChunk } from '../binding'; | ||
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup'; | ||
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc'; | ||
import { RolldownOutputPluginOption } from '../plugin'; | ||
import { RolldownRenderedChunk } from '../types/rolldown-output'; | ||
import { RenderedChunk } from '../types/rolldown-output'; | ||
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd' | 'experimental-app'; | ||
export type AddonFunction = (chunk: RolldownRenderedChunk) => string | Promise<string>; | ||
export type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>; | ||
export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string; | ||
@@ -9,0 +9,0 @@ export type GlobalsFunction = (name: string) => string; |
import { InputOptions } from '../options/input-options'; | ||
import { OutputOptions } from '../options/output-options'; | ||
export interface WatchOptions extends InputOptions { | ||
output?: OutputOptions; | ||
output?: OutputOptions | OutputOptions[]; | ||
} |
@@ -5,3 +5,3 @@ import type { BindingPluginOptions } from '../binding'; | ||
import { PluginContextData } from './plugin-context-data'; | ||
import type { LogHandler, LogLevelOption } from '../rollup'; | ||
import type { LogHandler, LogLevelOption } from '../types/misc'; | ||
import type { InputOptions } from '../options/input-options'; | ||
@@ -8,0 +8,0 @@ export interface BindingifyPluginArgs { |
@@ -11,3 +11,3 @@ import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs } from '../binding'; | ||
import type { LogLevel } from '../log/logging'; | ||
import type { RollupLog } from '../rollup'; | ||
import type { RollupLog } from '../types/misc'; | ||
import type { MinimalPluginContext } from './minimal-plugin-context'; | ||
@@ -21,3 +21,3 @@ import type { InputOptions, OutputOptions } from '..'; | ||
import type { HookFilter } from './hook-filter'; | ||
import { RolldownRenderedChunk } from '../types/rolldown-output'; | ||
import { RenderedChunk } from '../types/rolldown-output'; | ||
export type ModuleSideEffects = boolean | 'no-treeshake' | null; | ||
@@ -75,7 +75,7 @@ export type ModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {}); | ||
[DEFINED_HOOK_NAMES.renderStart]: (this: PluginContext, outputOptions: NormalizedOutputOptions, inputOptions: NormalizedInputOptions) => void; | ||
[DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk: RolldownRenderedChunk, outputOptions: NormalizedOutputOptions) => NullValue | string | { | ||
[DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk: RenderedChunk, outputOptions: NormalizedOutputOptions) => NullValue | string | { | ||
code: string; | ||
map?: SourceMapInput; | ||
}; | ||
[DEFINED_HOOK_NAMES.augmentChunkHash]: (this: PluginContext, chunk: RolldownRenderedChunk) => string | void; | ||
[DEFINED_HOOK_NAMES.augmentChunkHash]: (this: PluginContext, chunk: RenderedChunk) => string | void; | ||
[DEFINED_HOOK_NAMES.renderError]: (this: PluginContext, error: Error) => void; | ||
@@ -113,3 +113,3 @@ [DEFINED_HOOK_NAMES.generateBundle]: (this: PluginContext, outputOptions: NormalizedOutputOptions, bundle: OutputBundle, isWrite: boolean) => void; | ||
}; | ||
export type AddonHookFunction = (this: PluginContext, chunk: RolldownRenderedChunk) => string | Promise<string>; | ||
export type AddonHookFunction = (this: PluginContext, chunk: RenderedChunk) => string | Promise<string>; | ||
export type AddonHook = string | AddonHookFunction; | ||
@@ -121,3 +121,3 @@ export interface OutputPlugin extends Partial<{ | ||
}> { | ||
name?: string; | ||
name: string; | ||
} | ||
@@ -124,0 +124,0 @@ export interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> { |
@@ -1,2 +0,2 @@ | ||
import type { LoggingFunction, LogHandler, LogLevelOption, RollupError } from '../rollup'; | ||
import type { LoggingFunction, LogHandler, LogLevelOption, RollupError } from '../types/misc'; | ||
export interface PluginContextMeta { | ||
@@ -3,0 +3,0 @@ rollupVersion: string; |
@@ -9,3 +9,3 @@ import type { BindingPluginContext } from '../binding'; | ||
import { PartialNull } from '../types/utils'; | ||
import type { LogHandler, LogLevelOption } from '../rollup'; | ||
import type { LogHandler, LogLevelOption } from '../types/misc'; | ||
export interface EmittedAsset { | ||
@@ -12,0 +12,0 @@ type: 'asset'; |
import type { BindingPluginContext, BindingTransformPluginContext } from '../binding'; | ||
import type { LogHandler, LogLevelOption, RollupError } from '../rollup'; | ||
import type { LogHandler, LogLevelOption, RollupError } from '../types/misc'; | ||
import { PluginContext } from './plugin-context'; | ||
@@ -4,0 +4,0 @@ import { PluginContextData } from './plugin-context-data'; |
@@ -1,4 +0,4 @@ | ||
import type { RolldownOutputAsset, RolldownOutputChunk } from './rolldown-output'; | ||
import type { OutputAsset, OutputChunk } from './rolldown-output'; | ||
export interface OutputBundle { | ||
[fileName: string]: RolldownOutputAsset | RolldownOutputChunk; | ||
[fileName: string]: OutputAsset | OutputChunk; | ||
} |
import type { InputOptions } from '../options/input-options'; | ||
import type { OutputOptions } from '../options/output-options'; | ||
export interface RolldownOptions extends InputOptions { | ||
output?: OutputOptions; | ||
output?: OutputOptions | OutputOptions[]; | ||
} |
import { AssetSource } from '../utils/asset-source'; | ||
import type { RenderedChunk } from '../binding'; | ||
export interface RolldownOutputAsset { | ||
import type { RenderedChunk as BindingRenderedChunk } from '../binding'; | ||
export interface OutputAsset { | ||
type: 'asset'; | ||
@@ -24,12 +24,12 @@ fileName: string; | ||
} | ||
export interface RolldownRenderedModule { | ||
export interface RenderedModule { | ||
readonly code: string | null; | ||
renderedLength: number; | ||
} | ||
export interface RolldownRenderedChunk extends Omit<RenderedChunk, 'modules'> { | ||
export interface RenderedChunk extends Omit<BindingRenderedChunk, 'modules'> { | ||
modules: { | ||
[id: string]: RolldownRenderedModule; | ||
[id: string]: RenderedModule; | ||
}; | ||
} | ||
export interface RolldownOutputChunk { | ||
export interface OutputChunk { | ||
type: 'chunk'; | ||
@@ -42,3 +42,3 @@ code: string; | ||
modules: { | ||
[id: string]: RolldownRenderedModule; | ||
[id: string]: RenderedModule; | ||
}; | ||
@@ -55,6 +55,3 @@ imports: string[]; | ||
export interface RolldownOutput { | ||
output: [ | ||
RolldownOutputChunk, | ||
...(RolldownOutputChunk | RolldownOutputAsset)[] | ||
]; | ||
output: [OutputChunk, ...(OutputChunk | OutputAsset)[]]; | ||
} |
@@ -5,4 +5,4 @@ import type { RolldownPlugin } from '../plugin'; | ||
import type { BindingInputOptions } from '../binding'; | ||
import { LogHandler } from '../rollup'; | ||
import { LogHandler } from '../types/misc'; | ||
import { LogLevelOption } from '../log/logging'; | ||
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions, onLog: LogHandler, logLevel: LogLevelOption): BindingInputOptions; |
import { BindingBundlerOptions } from '../binding'; | ||
import { LogHandler } from '../types/misc'; | ||
import type { InputOptions } from '../options/input-options'; | ||
import type { OutputOptions } from '../options/output-options'; | ||
import { LogHandler } from '../rollup'; | ||
export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerOptionWithStopWorker>; | ||
@@ -6,0 +6,0 @@ export interface BundlerOptionWithStopWorker { |
import type { RolldownPlugin, RolldownOutputPlugin } from '../plugin'; | ||
import type { InputOptions } from '../options/input-options'; | ||
import type { OutputOptions } from '../options/output-options'; | ||
import { LogHandler } from '../rollup'; | ||
import { LogHandler } from '../types/misc'; | ||
export declare const normalizePluginOption: { | ||
@@ -6,0 +6,0 @@ (plugins: InputOptions['plugins']): Promise<RolldownPlugin[]>; |
@@ -1,4 +0,4 @@ | ||
import { RenderedChunk } from '../binding'; | ||
import { RolldownRenderedChunk } from '../types/rolldown-output'; | ||
export declare function transformRenderedChunk(chunk: RenderedChunk): RolldownRenderedChunk; | ||
export declare function transformChunkModules(modules: RenderedChunk['modules']): RolldownRenderedChunk['modules']; | ||
import { RenderedChunk as BindingRenderedChunk } from '../binding'; | ||
import { RenderedChunk } from '../types/rolldown-output'; | ||
export declare function transformRenderedChunk(chunk: BindingRenderedChunk): RenderedChunk; | ||
export declare function transformChunkModules(modules: BindingRenderedChunk['modules']): RenderedChunk['modules']; |
import { BindingRenderedModule } from '../binding'; | ||
import { RolldownRenderedModule } from '../types/rolldown-output'; | ||
export declare function transformToRenderedModule(bindingRenderedModule: BindingRenderedModule): RolldownRenderedModule; | ||
import { RenderedModule } from '../types/rolldown-output'; | ||
export declare function transformToRenderedModule(bindingRenderedModule: BindingRenderedModule): RenderedModule; |
{ | ||
"name": "rolldown", | ||
"version": "0.15.1", | ||
"version": "1.0.0-beta.1", | ||
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.", | ||
@@ -94,3 +94,3 @@ "homepage": "https://rolldown.rs/", | ||
"@jridgewell/sourcemap-codec": "^1.5.0", | ||
"@napi-rs/cli": "^3.0.0-alpha.60", | ||
"@napi-rs/cli": "^3.0.0-alpha.65", | ||
"@napi-rs/wasm-runtime": "^0.2.4", | ||
@@ -116,18 +116,18 @@ "@types/fs-extra": "^11.0.4", | ||
"zod-to-json-schema": "^3.23.2", | ||
"rolldown": "0.15.1", | ||
"rolldown": "1.0.0-beta.1", | ||
"@rolldown/testing": "0.0.1" | ||
}, | ||
"optionalDependencies": { | ||
"@rolldown/binding-darwin-arm64": "0.15.1", | ||
"@rolldown/binding-darwin-x64": "0.15.1", | ||
"@rolldown/binding-freebsd-x64": "0.15.1", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.15.1", | ||
"@rolldown/binding-linux-arm64-gnu": "0.15.1", | ||
"@rolldown/binding-linux-arm64-musl": "0.15.1", | ||
"@rolldown/binding-linux-x64-gnu": "0.15.1", | ||
"@rolldown/binding-linux-x64-musl": "0.15.1", | ||
"@rolldown/binding-wasm32-wasi": "0.15.1", | ||
"@rolldown/binding-win32-arm64-msvc": "0.15.1", | ||
"@rolldown/binding-win32-ia32-msvc": "0.15.1", | ||
"@rolldown/binding-win32-x64-msvc": "0.15.1" | ||
"@rolldown/binding-darwin-arm64": "1.0.0-beta.1", | ||
"@rolldown/binding-freebsd-x64": "1.0.0-beta.1", | ||
"@rolldown/binding-darwin-x64": "1.0.0-beta.1", | ||
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.1", | ||
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.1", | ||
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.1", | ||
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.1", | ||
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.1", | ||
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.1", | ||
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.1", | ||
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.1", | ||
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.1" | ||
}, | ||
@@ -134,0 +134,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
771428
111
15718