rolldown 0.15.0-snapshot-3cea4f5-20241211003613 → 0.15.1-commit.10b045b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.cjs +78 -26
- package/dist/cjs/experimental-index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +1 -1
- package/dist/esm/cli.mjs +80 -28
- package/dist/esm/experimental-index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{src-DYANT4eY.cjs → src--iQGF1P9.cjs} +127 -108
- package/dist/shared/{src-0e08MJIp.mjs → src-2pTf5dIo.mjs} +127 -108
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/binding.d.ts +8 -2
- package/dist/types/cli/load-config.d.ts +3 -0
- package/dist/types/cli/{utils.d.ts → logger.d.ts} +0 -2
- package/dist/types/index.d.ts +3 -4
- package/dist/types/log/logHandler.d.ts +1 -1
- package/dist/types/log/logger.d.ts +1 -1
- package/dist/types/log/logs.d.ts +2 -1
- package/dist/types/options/input-options.d.ts +10 -2
- package/dist/types/options/normalized-input-options.d.ts +1 -1
- package/dist/types/options/normalized-output-options.d.ts +3 -2
- package/dist/types/options/output-options.d.ts +3 -3
- package/dist/types/plugin/bindingify-plugin.d.ts +1 -1
- package/dist/types/plugin/index.d.ts +6 -6
- package/dist/types/plugin/minimal-plugin-context.d.ts +4 -4
- package/dist/types/plugin/plugin-context.d.ts +15 -11
- package/dist/types/plugin/transform-plugin-context.d.ts +8 -5
- package/dist/types/types/misc.d.ts +40 -0
- package/dist/types/types/module-info.d.ts +1 -0
- package/dist/types/types/output-bundle.d.ts +2 -2
- package/dist/types/types/rolldown-output.d.ts +8 -11
- package/dist/types/utils/bindingify-input-options.d.ts +1 -1
- package/dist/types/utils/create-bundler-option.d.ts +1 -1
- package/dist/types/utils/misc.d.ts +1 -2
- package/dist/types/utils/normalize-plugin-option.d.ts +1 -1
- package/dist/types/utils/transform-rendered-chunk.d.ts +4 -4
- package/dist/types/utils/transform-rendered-module.d.ts +2 -2
- package/package.json +16 -16
- package/dist/types/rollup-types.d.ts +0 -1
- package/dist/types/rollup.d.ts +0 -1118
package/dist/types/binding.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare class BindingModuleInfo {
|
|
|
31
31
|
dynamicImporters: Array<string>
|
|
32
32
|
importedIds: Array<string>
|
|
33
33
|
dynamicallyImportedIds: Array<string>
|
|
34
|
+
exports: Array<string>
|
|
34
35
|
isEntry: boolean
|
|
35
36
|
get code(): string | null
|
|
36
37
|
}
|
|
@@ -337,7 +338,7 @@ export interface BindingInputOptions {
|
|
|
337
338
|
inject?: Array<BindingInjectImportNamed | BindingInjectImportNamespace>
|
|
338
339
|
experimental?: BindingExperimentalOptions
|
|
339
340
|
profilerNames?: boolean
|
|
340
|
-
jsx?:
|
|
341
|
+
jsx?: BindingJsx
|
|
341
342
|
watch?: BindingWatchOption
|
|
342
343
|
keepNames?: boolean
|
|
343
344
|
checks?: BindingChecksOptions
|
|
@@ -365,6 +366,11 @@ export interface BindingJsWatchChangeEvent {
|
|
|
365
366
|
event: string
|
|
366
367
|
}
|
|
367
368
|
|
|
369
|
+
export type BindingJsx =
|
|
370
|
+
| { type: 'Disable' }
|
|
371
|
+
| { type: 'Preserve' }
|
|
372
|
+
| { type: 'Enable', field0: JsxOptions }
|
|
373
|
+
|
|
368
374
|
export declare enum BindingLogLevel {
|
|
369
375
|
Silent = 0,
|
|
370
376
|
Warn = 1,
|
|
@@ -891,7 +897,7 @@ export interface TransformOptions {
|
|
|
891
897
|
/** Configure how TypeScript is transformed. */
|
|
892
898
|
typescript?: TypeScriptOptions
|
|
893
899
|
/** Configure how TSX and JSX are transformed. */
|
|
894
|
-
jsx?: JsxOptions
|
|
900
|
+
jsx?: 'preserve' | JsxOptions
|
|
895
901
|
/**
|
|
896
902
|
* Sets the target environment for the generated JavaScript.
|
|
897
903
|
*
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { type ConsolaInstance } from 'consola';
|
|
2
|
-
import type { ConfigExport } from '../types/config-export';
|
|
3
2
|
/**
|
|
4
3
|
* Console logger
|
|
5
4
|
*/
|
|
6
5
|
export declare const logger: Record<string, any> | ConsolaInstance;
|
|
7
|
-
export declare function ensureConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RolldownOutput,
|
|
1
|
+
import { RolldownOutput, OutputAsset, OutputChunk, RenderedChunk, SourceMap } from './types/rolldown-output';
|
|
2
2
|
import type { InputOptions, InputOption, ExternalOption, JsxOptions } from './options/input-options';
|
|
3
3
|
import type { ModuleFormat, OutputOptions } from './options/output-options';
|
|
4
4
|
import type { RolldownOptions } from './types/rolldown-options';
|
|
@@ -24,6 +24,5 @@ import { RolldownWatcher } from './api/watch/watch-emitter';
|
|
|
24
24
|
import { build, type BuildOptions } from './api/build';
|
|
25
25
|
export { defineConfig, rolldown, watch, build };
|
|
26
26
|
export declare const VERSION: string;
|
|
27
|
-
export type {
|
|
28
|
-
export type {
|
|
29
|
-
export type { RollupError, RollupLog, LoggingFunction } from './rollup';
|
|
27
|
+
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, };
|
|
28
|
+
export type { RollupError, RollupLog, LoggingFunction } from './types/misc';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LoggingFunctionWithPosition, LogHandler, RollupLog } from '../
|
|
1
|
+
import type { LoggingFunctionWithPosition, LogHandler, RollupLog } from '../types/misc';
|
|
2
2
|
import { type LogLevel, type LogLevelOption } from './logging';
|
|
3
3
|
export declare const normalizeLog: (log: RollupLog | string | (() => RollupLog | string)) => RollupLog;
|
|
4
4
|
export declare function getLogHandler(level: LogLevel, code: string, logger: LogHandler, pluginName: string, logLevel: LogLevelOption): LoggingFunctionWithPosition;
|
package/dist/types/log/logs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { RollupLog } from '../
|
|
1
|
+
import type { RollupLog } from '../types/misc';
|
|
2
|
+
export declare function logMinifyWarning(): RollupLog;
|
|
2
3
|
export declare function logInvalidLogPosition(pluginName: string): RollupLog;
|
|
3
4
|
export declare function logInputHookInOutputPlugin(pluginName: string, hookName: string): RollupLog;
|
|
4
5
|
export declare function logCycleLoading(pluginName: string, moduleId: string): RollupLog;
|
|
@@ -6,7 +6,7 @@ export type InputOption = string | string[] | Record<string, string>;
|
|
|
6
6
|
export type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
7
7
|
export type ModuleTypes = Record<string, 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | 'css'>;
|
|
8
8
|
export interface JsxOptions {
|
|
9
|
-
mode?: 'classic' | 'automatic';
|
|
9
|
+
mode?: 'classic' | 'automatic' | 'preserve';
|
|
10
10
|
factory?: string;
|
|
11
11
|
fragment?: string;
|
|
12
12
|
importSource?: string;
|
|
@@ -102,7 +102,15 @@ export interface InputOptions {
|
|
|
102
102
|
*/
|
|
103
103
|
inject?: Record<string, string | [string, string]>;
|
|
104
104
|
profilerNames?: boolean;
|
|
105
|
-
|
|
105
|
+
/**
|
|
106
|
+
* JSX options.
|
|
107
|
+
* The `false` is disabled jsx parser, it will give you a syntax error if you use jsx syntax
|
|
108
|
+
* The `mode: preserve` is disabled jsx transformer, it perverse original jsx syntax in the output.
|
|
109
|
+
* The `mode: classic` is enabled jsx `classic` transformer.
|
|
110
|
+
* The `mode: automatic` is enabled jsx `automatic` transformer.
|
|
111
|
+
* @default mode = 'automatic'
|
|
112
|
+
*/
|
|
113
|
+
jsx?: false | JsxOptions;
|
|
106
114
|
watch?: WatchOptions | false;
|
|
107
115
|
dropLabels?: string[];
|
|
108
116
|
keepNames?: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type UnsupportedFnRet } from '../utils/misc';
|
|
2
1
|
import type { BindingNormalizedOptions } from '../binding';
|
|
3
|
-
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../
|
|
2
|
+
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc';
|
|
4
3
|
import type { ChunkFileNamesFunction, GlobalsFunction, OutputOptions } from './output-options';
|
|
5
4
|
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app';
|
|
6
5
|
export interface NormalizedOutputOptions {
|
|
@@ -32,6 +31,7 @@ export interface NormalizedOutputOptions {
|
|
|
32
31
|
comments: 'none' | 'preserve-legal';
|
|
33
32
|
polyfillRequire: boolean;
|
|
34
33
|
}
|
|
34
|
+
type UnsupportedFnRet = () => never;
|
|
35
35
|
export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOptions {
|
|
36
36
|
inner: BindingNormalizedOptions;
|
|
37
37
|
constructor(inner: BindingNormalizedOptions);
|
|
@@ -64,3 +64,4 @@ export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOpti
|
|
|
64
64
|
get comments(): 'none' | 'preserve-legal';
|
|
65
65
|
get polyfillRequire(): boolean;
|
|
66
66
|
}
|
|
67
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { StringOrRegExp } from '../types/utils';
|
|
2
2
|
import type { PreRenderedChunk } from '../binding';
|
|
3
|
-
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../
|
|
3
|
+
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc';
|
|
4
4
|
import { RolldownOutputPluginOption } from '../plugin';
|
|
5
|
-
import {
|
|
5
|
+
import { RenderedChunk } from '../types/rolldown-output';
|
|
6
6
|
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd' | 'experimental-app';
|
|
7
|
-
export type AddonFunction = (chunk:
|
|
7
|
+
export type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
|
|
8
8
|
export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;
|
|
9
9
|
export type GlobalsFunction = (name: string) => string;
|
|
10
10
|
export interface OutputOptions {
|
|
@@ -2,7 +2,7 @@ import type { BindingPluginOptions } from '../binding';
|
|
|
2
2
|
import type { Plugin } from './index';
|
|
3
3
|
import type { OutputOptions } from '../options/output-options';
|
|
4
4
|
import { PluginContextData } from './plugin-context-data';
|
|
5
|
-
import type { LogHandler, LogLevelOption } from '../
|
|
5
|
+
import type { LogHandler, LogLevelOption } from '../types/misc';
|
|
6
6
|
import type { InputOptions } from '../options/input-options';
|
|
7
7
|
export interface BindingifyPluginArgs {
|
|
8
8
|
plugin: Plugin;
|
|
@@ -8,7 +8,7 @@ import type { PluginContext } from './plugin-context';
|
|
|
8
8
|
import type { TransformPluginContext } from './transform-plugin-context';
|
|
9
9
|
import type { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
10
10
|
import type { LogLevel } from '../log/logging';
|
|
11
|
-
import type { RollupLog } from '../
|
|
11
|
+
import type { RollupLog } from '../types/misc';
|
|
12
12
|
import type { MinimalPluginContext } from './minimal-plugin-context';
|
|
13
13
|
import type { InputOptions, OutputOptions } from '..';
|
|
14
14
|
import type { BuiltinPlugin } from '../builtin-plugin/constructors';
|
|
@@ -17,7 +17,7 @@ import type { DefinedHookNames } from '../constants/plugin';
|
|
|
17
17
|
import type { DEFINED_HOOK_NAMES } from '../constants/plugin';
|
|
18
18
|
import type { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
19
19
|
import type { HookFilter } from './hook-filter';
|
|
20
|
-
import {
|
|
20
|
+
import { RenderedChunk } from '../types/rolldown-output';
|
|
21
21
|
export type ModuleSideEffects = boolean | 'no-treeshake' | null;
|
|
22
22
|
export type ModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
|
23
23
|
export type ImportKind = BindingHookResolveIdExtraArgs['kind'];
|
|
@@ -70,11 +70,11 @@ export interface FunctionPluginHooks {
|
|
|
70
70
|
[DEFINED_HOOK_NAMES.moduleParsed]: (this: PluginContext, moduleInfo: ModuleInfo) => void;
|
|
71
71
|
[DEFINED_HOOK_NAMES.buildEnd]: (this: PluginContext, err?: Error) => void;
|
|
72
72
|
[DEFINED_HOOK_NAMES.renderStart]: (this: PluginContext, outputOptions: NormalizedOutputOptions, inputOptions: NormalizedInputOptions) => void;
|
|
73
|
-
[DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk:
|
|
73
|
+
[DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk: RenderedChunk, outputOptions: NormalizedOutputOptions) => NullValue | string | {
|
|
74
74
|
code: string;
|
|
75
75
|
map?: SourceMapInput;
|
|
76
76
|
};
|
|
77
|
-
[DEFINED_HOOK_NAMES.augmentChunkHash]: (this: PluginContext, chunk:
|
|
77
|
+
[DEFINED_HOOK_NAMES.augmentChunkHash]: (this: PluginContext, chunk: RenderedChunk) => string | void;
|
|
78
78
|
[DEFINED_HOOK_NAMES.renderError]: (this: PluginContext, error: Error) => void;
|
|
79
79
|
[DEFINED_HOOK_NAMES.generateBundle]: (this: PluginContext, outputOptions: NormalizedOutputOptions, bundle: OutputBundle, isWrite: boolean) => void;
|
|
80
80
|
[DEFINED_HOOK_NAMES.writeBundle]: (this: PluginContext, outputOptions: NormalizedOutputOptions, bundle: OutputBundle) => void;
|
|
@@ -107,14 +107,14 @@ export type HookFilterExtension<K extends keyof FunctionPluginHooks> = K extends
|
|
|
107
107
|
export type PluginHooks = {
|
|
108
108
|
[K in keyof FunctionPluginHooks]: ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], HookFilterExtension<K>>;
|
|
109
109
|
};
|
|
110
|
-
export type AddonHookFunction = (this: PluginContext, chunk:
|
|
110
|
+
export type AddonHookFunction = (this: PluginContext, chunk: RenderedChunk) => string | Promise<string>;
|
|
111
111
|
export type AddonHook = string | AddonHookFunction;
|
|
112
112
|
export interface OutputPlugin extends Partial<{
|
|
113
113
|
[K in OutputPluginHooks]: PluginHooks[K];
|
|
114
114
|
}>, Partial<{
|
|
115
115
|
[K in AddonHooks]: ObjectHook<AddonHook>;
|
|
116
116
|
}> {
|
|
117
|
-
name
|
|
117
|
+
name: string;
|
|
118
118
|
}
|
|
119
119
|
export interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
|
|
120
120
|
api?: A;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { LoggingFunction, LogHandler, LogLevelOption, RollupError } from '../
|
|
2
|
-
import type { Plugin } from '../plugin';
|
|
1
|
+
import type { LoggingFunction, LogHandler, LogLevelOption, RollupError } from '../types/misc';
|
|
3
2
|
export interface PluginContextMeta {
|
|
4
3
|
rollupVersion: string;
|
|
5
4
|
rolldownVersion: string;
|
|
6
5
|
watchMode: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare class MinimalPluginContext {
|
|
8
|
+
readonly pluginName: string;
|
|
9
9
|
info: LoggingFunction;
|
|
10
10
|
warn: LoggingFunction;
|
|
11
11
|
debug: LoggingFunction;
|
|
12
12
|
meta: PluginContextMeta;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
constructor(onLog: LogHandler, logLevel: LogLevelOption, pluginName: string);
|
|
14
|
+
error(e: RollupError | string): never;
|
|
15
15
|
}
|
|
@@ -6,7 +6,7 @@ import { ModuleInfo } from '../types/module-info';
|
|
|
6
6
|
import { PluginContextData } from './plugin-context-data';
|
|
7
7
|
import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
8
8
|
import { PartialNull } from '../types/utils';
|
|
9
|
-
import type { LogHandler, LogLevelOption } from '../
|
|
9
|
+
import type { LogHandler, LogLevelOption } from '../types/misc';
|
|
10
10
|
export interface EmittedAsset {
|
|
11
11
|
type: 'asset';
|
|
12
12
|
name?: string;
|
|
@@ -23,19 +23,23 @@ export interface PrivatePluginContextResolveOptions extends PluginContextResolve
|
|
|
23
23
|
[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF]?: symbol;
|
|
24
24
|
}
|
|
25
25
|
export declare class PluginContext extends MinimalPluginContext {
|
|
26
|
-
|
|
26
|
+
private context;
|
|
27
|
+
private data;
|
|
28
|
+
private onLog;
|
|
29
|
+
private currentLoadingModule?;
|
|
30
|
+
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption, currentLoadingModule?: string | undefined);
|
|
31
|
+
load(options: {
|
|
27
32
|
id: string;
|
|
28
33
|
resolveDependencies?: boolean;
|
|
29
|
-
} & Partial<PartialNull<ModuleOptions>>)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
} & Partial<PartialNull<ModuleOptions>>): Promise<ModuleInfo>;
|
|
35
|
+
resolve(source: string, importer?: string, options?: PluginContextResolveOptions): Promise<ResolvedId | null>;
|
|
36
|
+
emitFile(file: EmittedAsset): string;
|
|
37
|
+
getFileName(referenceId: string): string;
|
|
38
|
+
getModuleInfo(id: string): ModuleInfo | null;
|
|
39
|
+
getModuleIds(): IterableIterator<string>;
|
|
40
|
+
addWatchFile(id: string): void;
|
|
36
41
|
/**
|
|
37
42
|
* @deprecated This rollup API won't be supported by rolldown. Using this API will cause runtime error.
|
|
38
43
|
*/
|
|
39
|
-
|
|
40
|
-
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption, currentLoadingModule?: string);
|
|
44
|
+
parse(_input: string, _options?: any): any;
|
|
41
45
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import type { BindingPluginContext, BindingTransformPluginContext } from '../binding';
|
|
2
|
-
import type { LogHandler, LogLevelOption, RollupError } from '../
|
|
2
|
+
import type { LogHandler, LogLevelOption, RollupError } from '../types/misc';
|
|
3
3
|
import { PluginContext } from './plugin-context';
|
|
4
4
|
import { PluginContextData } from './plugin-context-data';
|
|
5
5
|
import type { Plugin } from './index';
|
|
6
6
|
import { SourceMap } from '../types/rolldown-output';
|
|
7
7
|
export declare class TransformPluginContext extends PluginContext {
|
|
8
|
-
|
|
8
|
+
private inner;
|
|
9
|
+
private moduleId;
|
|
10
|
+
private moduleSource;
|
|
11
|
+
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string, onLog: LogHandler, LogLevelOption: LogLevelOption);
|
|
12
|
+
error(e: RollupError | string, pos?: number | {
|
|
9
13
|
column: number;
|
|
10
14
|
line: number;
|
|
11
|
-
})
|
|
12
|
-
getCombinedSourcemap
|
|
13
|
-
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string, onLog: LogHandler, LogLevelOption: LogLevelOption);
|
|
15
|
+
}): never;
|
|
16
|
+
getCombinedSourcemap(): SourceMap;
|
|
14
17
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface RollupLog {
|
|
2
|
+
binding?: string;
|
|
3
|
+
cause?: unknown;
|
|
4
|
+
code?: string;
|
|
5
|
+
exporter?: string;
|
|
6
|
+
frame?: string;
|
|
7
|
+
hook?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
ids?: string[];
|
|
10
|
+
loc?: {
|
|
11
|
+
column: number;
|
|
12
|
+
file?: string;
|
|
13
|
+
line: number;
|
|
14
|
+
};
|
|
15
|
+
message: string;
|
|
16
|
+
meta?: any;
|
|
17
|
+
names?: string[];
|
|
18
|
+
plugin?: string;
|
|
19
|
+
pluginCode?: unknown;
|
|
20
|
+
pos?: number;
|
|
21
|
+
reexporter?: string;
|
|
22
|
+
stack?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface RollupError extends RollupLog {
|
|
26
|
+
name?: string;
|
|
27
|
+
stack?: string;
|
|
28
|
+
watchFiles?: string[];
|
|
29
|
+
}
|
|
30
|
+
export type LogLevel = 'warn' | 'info' | 'debug';
|
|
31
|
+
export type LogLevelOption = LogLevel | 'silent';
|
|
32
|
+
export type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
33
|
+
export type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
|
|
34
|
+
column: number;
|
|
35
|
+
line: number;
|
|
36
|
+
}) => void;
|
|
37
|
+
export type LogHandler = (level: LogLevel, log: RollupLog) => void;
|
|
38
|
+
export type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
39
|
+
export type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
40
|
+
export type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OutputAsset, OutputChunk } from './rolldown-output';
|
|
2
2
|
export interface OutputBundle {
|
|
3
|
-
[fileName: string]:
|
|
3
|
+
[fileName: string]: OutputAsset | OutputChunk;
|
|
4
4
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AssetSource } from '../utils/asset-source';
|
|
2
|
-
import type { RenderedChunk } from '../binding';
|
|
3
|
-
export interface
|
|
2
|
+
import type { RenderedChunk as BindingRenderedChunk } from '../binding';
|
|
3
|
+
export interface OutputAsset {
|
|
4
4
|
type: 'asset';
|
|
5
5
|
fileName: string;
|
|
6
6
|
/** @deprecated Use "originalFileNames" instead. */
|
|
@@ -21,16 +21,16 @@ export interface SourceMap {
|
|
|
21
21
|
toString(): string;
|
|
22
22
|
toUrl(): string;
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface RenderedModule {
|
|
25
25
|
readonly code: string | null;
|
|
26
26
|
renderedLength: number;
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface RenderedChunk extends Omit<BindingRenderedChunk, 'modules'> {
|
|
29
29
|
modules: {
|
|
30
|
-
[id: string]:
|
|
30
|
+
[id: string]: RenderedModule;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface OutputChunk {
|
|
34
34
|
type: 'chunk';
|
|
35
35
|
code: string;
|
|
36
36
|
name: string;
|
|
@@ -38,7 +38,7 @@ export interface RolldownOutputChunk {
|
|
|
38
38
|
exports: string[];
|
|
39
39
|
fileName: string;
|
|
40
40
|
modules: {
|
|
41
|
-
[id: string]:
|
|
41
|
+
[id: string]: RenderedModule;
|
|
42
42
|
};
|
|
43
43
|
imports: string[];
|
|
44
44
|
dynamicImports: string[];
|
|
@@ -50,8 +50,5 @@ export interface RolldownOutputChunk {
|
|
|
50
50
|
preliminaryFileName: string;
|
|
51
51
|
}
|
|
52
52
|
export interface RolldownOutput {
|
|
53
|
-
output: [
|
|
54
|
-
RolldownOutputChunk,
|
|
55
|
-
...(RolldownOutputChunk | RolldownOutputAsset)[]
|
|
56
|
-
];
|
|
53
|
+
output: [OutputChunk, ...(OutputChunk | OutputAsset)[]];
|
|
57
54
|
}
|
|
@@ -2,6 +2,6 @@ import type { RolldownPlugin } from '../plugin';
|
|
|
2
2
|
import type { InputOptions } from '../options/input-options';
|
|
3
3
|
import type { OutputOptions } from '../options/output-options';
|
|
4
4
|
import type { BindingInputOptions } from '../binding';
|
|
5
|
-
import { LogHandler } from '../
|
|
5
|
+
import { LogHandler } from '../types/misc';
|
|
6
6
|
import { LogLevelOption } from '../log/logging';
|
|
7
7
|
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions, onLog: LogHandler, logLevel: LogLevelOption): BindingInputOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BindingBundlerOptions } from '../binding';
|
|
2
|
+
import { LogHandler } from '../types/misc';
|
|
2
3
|
import type { InputOptions } from '../options/input-options';
|
|
3
4
|
import type { OutputOptions } from '../options/output-options';
|
|
4
|
-
import { LogHandler } from '../rollup';
|
|
5
5
|
export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerOptionWithStopWorker>;
|
|
6
6
|
export interface BundlerOptionWithStopWorker {
|
|
7
7
|
bundlerOptions: BindingBundlerOptions;
|
|
@@ -2,6 +2,5 @@ export declare function arraify<T>(value: T | T[]): T[];
|
|
|
2
2
|
export declare function isNullish(value: any): value is null | undefined | void;
|
|
3
3
|
export declare function unimplemented(info?: string): never;
|
|
4
4
|
export declare function unreachable(info?: string): never;
|
|
5
|
-
export declare function unsupported(info: string):
|
|
6
|
-
export type UnsupportedFnRet = ReturnType<typeof unsupported>;
|
|
5
|
+
export declare function unsupported(info: string): never;
|
|
7
6
|
export declare function noop(..._args: any[]): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RolldownPlugin, RolldownOutputPlugin } from '../plugin';
|
|
2
2
|
import type { InputOptions } from '../options/input-options';
|
|
3
3
|
import type { OutputOptions } from '../options/output-options';
|
|
4
|
-
import { LogHandler } from '../
|
|
4
|
+
import { LogHandler } from '../types/misc';
|
|
5
5
|
export declare const normalizePluginOption: {
|
|
6
6
|
(plugins: InputOptions['plugins']): Promise<RolldownPlugin[]>;
|
|
7
7
|
(plugins: OutputOptions['plugins']): Promise<RolldownOutputPlugin[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RenderedChunk } from '../binding';
|
|
2
|
-
import {
|
|
3
|
-
export declare function transformRenderedChunk(chunk:
|
|
4
|
-
export declare function transformChunkModules(modules:
|
|
1
|
+
import { RenderedChunk as BindingRenderedChunk } from '../binding';
|
|
2
|
+
import { RenderedChunk } from '../types/rolldown-output';
|
|
3
|
+
export declare function transformRenderedChunk(chunk: BindingRenderedChunk): RenderedChunk;
|
|
4
|
+
export declare function transformChunkModules(modules: BindingRenderedChunk['modules']): RenderedChunk['modules'];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BindingRenderedModule } from '../binding';
|
|
2
|
-
import {
|
|
3
|
-
export declare function transformToRenderedModule(bindingRenderedModule: BindingRenderedModule):
|
|
2
|
+
import { RenderedModule } from '../types/rolldown-output';
|
|
3
|
+
export declare function transformToRenderedModule(bindingRenderedModule: BindingRenderedModule): RenderedModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1-commit.10b045b",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"repository": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@jridgewell/sourcemap-codec": "^1.5.0",
|
|
94
|
-
"@napi-rs/cli": "^3.0.0-alpha.
|
|
94
|
+
"@napi-rs/cli": "^3.0.0-alpha.65",
|
|
95
95
|
"@napi-rs/wasm-runtime": "^0.2.4",
|
|
96
96
|
"@types/fs-extra": "^11.0.4",
|
|
97
97
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -109,25 +109,25 @@
|
|
|
109
109
|
"source-map": "^0.7.4",
|
|
110
110
|
"tsx": "^4.19.2",
|
|
111
111
|
"type-fest": "^4.20.0",
|
|
112
|
-
"unbuild": "^
|
|
112
|
+
"unbuild": "^3.0.0",
|
|
113
113
|
"why-is-node-running": "^3.0.0",
|
|
114
114
|
"zod-to-json-schema": "^3.23.2",
|
|
115
115
|
"@rolldown/testing": "0.0.1",
|
|
116
|
-
"rolldown": "0.15.
|
|
116
|
+
"rolldown": "0.15.1-commit.10b045b"
|
|
117
117
|
},
|
|
118
118
|
"optionalDependencies": {
|
|
119
|
-
"@rolldown/binding-darwin-arm64": "0.15.
|
|
120
|
-
"@rolldown/binding-darwin-x64": "0.15.
|
|
121
|
-
"@rolldown/binding-
|
|
122
|
-
"@rolldown/binding-
|
|
123
|
-
"@rolldown/binding-linux-arm64-gnu": "0.15.
|
|
124
|
-
"@rolldown/binding-linux-arm64-musl": "0.15.
|
|
125
|
-
"@rolldown/binding-linux-x64-gnu": "0.15.
|
|
126
|
-
"@rolldown/binding-
|
|
127
|
-
"@rolldown/binding-
|
|
128
|
-
"@rolldown/binding-
|
|
129
|
-
"@rolldown/binding-win32-
|
|
130
|
-
"@rolldown/binding-win32-
|
|
119
|
+
"@rolldown/binding-darwin-arm64": "0.15.1-commit.10b045b",
|
|
120
|
+
"@rolldown/binding-darwin-x64": "0.15.1-commit.10b045b",
|
|
121
|
+
"@rolldown/binding-freebsd-x64": "0.15.1-commit.10b045b",
|
|
122
|
+
"@rolldown/binding-linux-arm-gnueabihf": "0.15.1-commit.10b045b",
|
|
123
|
+
"@rolldown/binding-linux-arm64-gnu": "0.15.1-commit.10b045b",
|
|
124
|
+
"@rolldown/binding-linux-arm64-musl": "0.15.1-commit.10b045b",
|
|
125
|
+
"@rolldown/binding-linux-x64-gnu": "0.15.1-commit.10b045b",
|
|
126
|
+
"@rolldown/binding-linux-x64-musl": "0.15.1-commit.10b045b",
|
|
127
|
+
"@rolldown/binding-win32-arm64-msvc": "0.15.1-commit.10b045b",
|
|
128
|
+
"@rolldown/binding-wasm32-wasi": "0.15.1-commit.10b045b",
|
|
129
|
+
"@rolldown/binding-win32-ia32-msvc": "0.15.1-commit.10b045b",
|
|
130
|
+
"@rolldown/binding-win32-x64-msvc": "0.15.1-commit.10b045b"
|
|
131
131
|
},
|
|
132
132
|
"scripts": {
|
|
133
133
|
"# Scrips for binding #": "_",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { OutputOptions, InputOptions, Plugin, OutputPlugin, OutputChunk, NormalizedInputOptions, OutputAsset, OutputBundle, SourceMapInput, RenderedChunk, } from './rollup';
|