rolldown 0.15.0-snapshot-3cea4f5-20241211003613 → 0.15.1-commit.4e41a08
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-0e08MJIp.mjs → src-Do1JlyLc.mjs} +118 -106
- package/dist/shared/{src-DYANT4eY.cjs → src-Dw217EaC.cjs} +118 -106
- 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/options/input-options.d.ts +10 -2
- package/dist/types/options/normalized-output-options.d.ts +2 -1
- package/dist/types/plugin/minimal-plugin-context.d.ts +3 -3
- package/dist/types/plugin/plugin-context.d.ts +14 -10
- package/dist/types/plugin/transform-plugin-context.d.ts +7 -4
- package/dist/types/types/module-info.d.ts +1 -0
- package/dist/types/utils/misc.d.ts +1 -2
- package/package.json +15 -15
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>;
|
|
@@ -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,4 +1,3 @@
|
|
|
1
|
-
import { type UnsupportedFnRet } from '../utils/misc';
|
|
2
1
|
import type { BindingNormalizedOptions } from '../binding';
|
|
3
2
|
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';
|
|
4
3
|
import type { ChunkFileNamesFunction, GlobalsFunction, OutputOptions } from './output-options';
|
|
@@ -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,15 +1,15 @@
|
|
|
1
1
|
import type { LoggingFunction, LogHandler, LogLevelOption, RollupError } from '../rollup';
|
|
2
|
-
import type { Plugin } from '../plugin';
|
|
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
|
}
|
|
@@ -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
|
}
|
|
@@ -5,10 +5,13 @@ 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
|
}
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1-commit.4e41a08",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"repository": {
|
|
@@ -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.4e41a08"
|
|
117
117
|
},
|
|
118
118
|
"optionalDependencies": {
|
|
119
|
-
"@rolldown/binding-
|
|
120
|
-
"@rolldown/binding-darwin-
|
|
121
|
-
"@rolldown/binding-
|
|
122
|
-
"@rolldown/binding-
|
|
123
|
-
"@rolldown/binding-linux-arm64-gnu": "0.15.
|
|
124
|
-
"@rolldown/binding-linux-
|
|
125
|
-
"@rolldown/binding-linux-x64-
|
|
126
|
-
"@rolldown/binding-
|
|
127
|
-
"@rolldown/binding-
|
|
128
|
-
"@rolldown/binding-win32-arm64-msvc": "0.15.
|
|
129
|
-
"@rolldown/binding-win32-
|
|
130
|
-
"@rolldown/binding-win32-
|
|
119
|
+
"@rolldown/binding-freebsd-x64": "0.15.1-commit.4e41a08",
|
|
120
|
+
"@rolldown/binding-darwin-arm64": "0.15.1-commit.4e41a08",
|
|
121
|
+
"@rolldown/binding-darwin-x64": "0.15.1-commit.4e41a08",
|
|
122
|
+
"@rolldown/binding-linux-arm-gnueabihf": "0.15.1-commit.4e41a08",
|
|
123
|
+
"@rolldown/binding-linux-arm64-gnu": "0.15.1-commit.4e41a08",
|
|
124
|
+
"@rolldown/binding-linux-x64-gnu": "0.15.1-commit.4e41a08",
|
|
125
|
+
"@rolldown/binding-linux-x64-musl": "0.15.1-commit.4e41a08",
|
|
126
|
+
"@rolldown/binding-linux-arm64-musl": "0.15.1-commit.4e41a08",
|
|
127
|
+
"@rolldown/binding-wasm32-wasi": "0.15.1-commit.4e41a08",
|
|
128
|
+
"@rolldown/binding-win32-arm64-msvc": "0.15.1-commit.4e41a08",
|
|
129
|
+
"@rolldown/binding-win32-ia32-msvc": "0.15.1-commit.4e41a08",
|
|
130
|
+
"@rolldown/binding-win32-x64-msvc": "0.15.1-commit.4e41a08"
|
|
131
131
|
},
|
|
132
132
|
"scripts": {
|
|
133
133
|
"# Scrips for binding #": "_",
|