rolldown 0.15.0 → 0.15.1-commit.09cccaf
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 +249 -183
- package/dist/cjs/experimental-index.cjs +2 -2
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +2 -2
- package/dist/esm/cli.mjs +343 -277
- 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/{chunk-BK2Ye-xa.cjs → chunk-BFvIen8E.cjs} +0 -11
- package/dist/shared/{consola_36c0034f-_8_dG1Nr.cjs → consola_36c0034f-B7L-radJ.cjs} +2 -2
- package/dist/shared/{consola_36c0034f-DWsVjwtA.mjs → consola_36c0034f-D9ce-831.mjs} +10 -10
- package/dist/shared/{prompt-RFvZMmjc.cjs → prompt-BiXtYIJ2.cjs} +3 -3
- package/dist/shared/{prompt-DGW8ZJmn.mjs → prompt-DlQ-08lk.mjs} +2 -2
- package/dist/shared/{src-COU7qQBJ.cjs → src-BKghi7SX.cjs} +321 -216
- package/dist/shared/{src-DEPa5yhI.mjs → src-BKlslLnW.mjs} +332 -233
- package/dist/tsconfig.dts.tsbuildinfo +1 -0
- package/dist/types/api/build.d.ts +2 -0
- package/dist/types/api/watch/index.d.ts +2 -2
- package/dist/types/api/watch/watch-emitter.d.ts +31 -0
- package/dist/types/api/watch/watcher.d.ts +7 -27
- package/dist/types/binding.d.ts +114 -19
- package/dist/types/builtin-plugin/constructors.d.ts +1 -5
- package/dist/types/cli/arguments/index.d.ts +5 -3
- package/dist/types/cli/arguments/schema.d.ts +10 -397
- package/dist/types/cli/colors.d.ts +11 -1
- package/dist/types/cli/load-config.d.ts +3 -0
- package/dist/types/cli/logger.d.ts +5 -0
- package/dist/types/constants/plugin.d.ts +8 -1
- package/dist/types/index.d.ts +4 -5
- package/dist/types/log/logHandler.d.ts +1 -1
- package/dist/types/log/logger.d.ts +1 -1
- package/dist/types/log/logging.d.ts +6 -6
- package/dist/types/log/logs.d.ts +3 -1
- package/dist/types/options/input-options-schema.d.ts +3 -595
- package/dist/types/options/input-options.d.ts +26 -3
- package/dist/types/options/normalized-input-options.d.ts +2 -2
- package/dist/types/options/normalized-output-options.d.ts +22 -18
- package/dist/types/options/output-options-schema.d.ts +2 -146
- package/dist/types/options/output-options.d.ts +4 -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-data.d.ts +2 -1
- package/dist/types/plugin/plugin-context.d.ts +15 -11
- package/dist/types/plugin/transform-plugin-context.d.ts +8 -5
- package/dist/types/treeshake/module-side-effects.d.ts +14 -115
- 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 +14 -11
- package/dist/types/utils/bindingify-input-options.d.ts +2 -2
- package/dist/types/utils/create-bundler-option.d.ts +11 -0
- package/dist/types/utils/error.d.ts +2 -1
- package/dist/types/utils/misc.d.ts +1 -1
- 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/dist/types/utils/transform-sourcemap.d.ts +1 -1
- package/dist/types/utils/zod-ext.d.ts +6 -5
- package/package.json +17 -17
- package/dist/types/cli/utils.d.ts +0 -6
- package/dist/types/log/locate-character/index.d.ts +0 -13
- package/dist/types/rollup-types.d.ts +0 -1
- package/dist/types/rollup.d.ts +0 -1114
|
@@ -1,11 +1,15 @@
|
|
|
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
|
+
/** @deprecated Use "originalFileNames" instead. */
|
|
6
7
|
originalFileName: string | null;
|
|
8
|
+
originalFileNames: string[];
|
|
7
9
|
source: AssetSource;
|
|
10
|
+
/** @deprecated Use "names" instead. */
|
|
8
11
|
name: string | undefined;
|
|
12
|
+
names: string[];
|
|
9
13
|
}
|
|
10
14
|
export interface SourceMap {
|
|
11
15
|
file: string;
|
|
@@ -14,17 +18,19 @@ export interface SourceMap {
|
|
|
14
18
|
sources: string[];
|
|
15
19
|
sourcesContent: string[];
|
|
16
20
|
version: number;
|
|
21
|
+
toString(): string;
|
|
22
|
+
toUrl(): string;
|
|
17
23
|
}
|
|
18
|
-
export interface
|
|
24
|
+
export interface RenderedModule {
|
|
19
25
|
readonly code: string | null;
|
|
20
26
|
renderedLength: number;
|
|
21
27
|
}
|
|
22
|
-
export interface
|
|
28
|
+
export interface RenderedChunk extends Omit<BindingRenderedChunk, 'modules'> {
|
|
23
29
|
modules: {
|
|
24
|
-
[id: string]:
|
|
30
|
+
[id: string]: RenderedModule;
|
|
25
31
|
};
|
|
26
32
|
}
|
|
27
|
-
export interface
|
|
33
|
+
export interface OutputChunk {
|
|
28
34
|
type: 'chunk';
|
|
29
35
|
code: string;
|
|
30
36
|
name: string;
|
|
@@ -32,7 +38,7 @@ export interface RolldownOutputChunk {
|
|
|
32
38
|
exports: string[];
|
|
33
39
|
fileName: string;
|
|
34
40
|
modules: {
|
|
35
|
-
[id: string]:
|
|
41
|
+
[id: string]: RenderedModule;
|
|
36
42
|
};
|
|
37
43
|
imports: string[];
|
|
38
44
|
dynamicImports: string[];
|
|
@@ -44,8 +50,5 @@ export interface RolldownOutputChunk {
|
|
|
44
50
|
preliminaryFileName: string;
|
|
45
51
|
}
|
|
46
52
|
export interface RolldownOutput {
|
|
47
|
-
output: [
|
|
48
|
-
RolldownOutputChunk,
|
|
49
|
-
...(RolldownOutputChunk | RolldownOutputAsset)[]
|
|
50
|
-
];
|
|
53
|
+
output: [OutputChunk, ...(OutputChunk | OutputAsset)[]];
|
|
51
54
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { RolldownPlugin } from '
|
|
1
|
+
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BindingBundlerOptions } from '../binding';
|
|
2
|
+
import { LogHandler } from '../types/misc';
|
|
3
|
+
import type { InputOptions } from '../options/input-options';
|
|
4
|
+
import type { OutputOptions } from '../options/output-options';
|
|
5
|
+
export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerOptionWithStopWorker>;
|
|
6
|
+
export interface BundlerOptionWithStopWorker {
|
|
7
|
+
bundlerOptions: BindingBundlerOptions;
|
|
8
|
+
inputOptions: InputOptions;
|
|
9
|
+
onLog: LogHandler;
|
|
10
|
+
stopWorkers?: () => Promise<void>;
|
|
11
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { BindingError } from '../binding';
|
|
2
|
+
export declare function normalizeErrors(rawErrors: (BindingError | Error)[]): Error;
|
|
@@ -2,5 +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):
|
|
5
|
+
export declare function unsupported(info: string): never;
|
|
6
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;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ExistingRawSourceMap, SourceMapInput } from '../types/sourcemap';
|
|
1
|
+
import { type ExistingRawSourceMap, SourceMapInput } from '../types/sourcemap';
|
|
2
2
|
export declare function isEmptySourcemapFiled(array: undefined | (string | null)[]): boolean;
|
|
3
3
|
export declare function normalizeTransformHookSourcemap(id: string, originalCode: string, rawMap?: SourceMapInput): ExistingRawSourceMap | undefined;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import type Z from 'zod';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
export declare const stringOrRegExp: () =>
|
|
3
|
-
export declare const optionalStringArray: () =>
|
|
3
|
+
export declare const stringOrRegExp: () => Z.ZodUnion<[Z.ZodString, Z.ZodType<RegExp, Z.ZodTypeDef, RegExp>]>;
|
|
4
|
+
export declare const optionalStringArray: () => Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
|
|
4
5
|
/**
|
|
5
6
|
* We use this to ensure the type of a value is `T` but the value is not checked.
|
|
6
7
|
*/
|
|
7
|
-
export declare const phantom: <T>() =>
|
|
8
|
+
export declare const phantom: <T>() => Z.ZodType<T>;
|
|
8
9
|
/**
|
|
9
10
|
* @description Shortcut for `T | null | undefined | void`
|
|
10
11
|
*/
|
|
11
|
-
export declare const voidNullableWith: <T extends z.ZodTypeAny>(t: T) =>
|
|
12
|
+
export declare const voidNullableWith: <T extends z.ZodTypeAny>(t: T) => Z.ZodUnion<[Z.ZodUnion<[Z.ZodUnion<[Z.ZodVoid, Z.ZodNull]>, Z.ZodUndefined]>, T]>;
|
|
12
13
|
/**
|
|
13
14
|
* @description Shortcut for `T | null | undefined | void`
|
|
14
15
|
*/
|
|
15
|
-
export declare const voidNullable: () =>
|
|
16
|
+
export declare const voidNullable: () => Z.ZodUnion<[Z.ZodUnion<[Z.ZodVoid, Z.ZodNull]>, Z.ZodUndefined]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1-commit.09cccaf",
|
|
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
|
-
"
|
|
116
|
-
"rolldown": "0.
|
|
115
|
+
"rolldown": "0.15.1-commit.09cccaf",
|
|
116
|
+
"@rolldown/testing": "0.0.1"
|
|
117
117
|
},
|
|
118
118
|
"optionalDependencies": {
|
|
119
|
-
"@rolldown/binding-darwin-arm64": "0.15.
|
|
120
|
-
"@rolldown/binding-
|
|
121
|
-
"@rolldown/binding-
|
|
122
|
-
"@rolldown/binding-
|
|
123
|
-
"@rolldown/binding-linux-arm64-
|
|
124
|
-
"@rolldown/binding-linux-
|
|
125
|
-
"@rolldown/binding-linux-x64-
|
|
126
|
-
"@rolldown/binding-linux-x64-
|
|
127
|
-
"@rolldown/binding-
|
|
128
|
-
"@rolldown/binding-
|
|
129
|
-
"@rolldown/binding-win32-ia32-msvc": "0.15.
|
|
130
|
-
"@rolldown/binding-win32-x64-msvc": "0.15.
|
|
119
|
+
"@rolldown/binding-darwin-arm64": "0.15.1-commit.09cccaf",
|
|
120
|
+
"@rolldown/binding-darwin-x64": "0.15.1-commit.09cccaf",
|
|
121
|
+
"@rolldown/binding-freebsd-x64": "0.15.1-commit.09cccaf",
|
|
122
|
+
"@rolldown/binding-linux-arm64-gnu": "0.15.1-commit.09cccaf",
|
|
123
|
+
"@rolldown/binding-linux-arm64-musl": "0.15.1-commit.09cccaf",
|
|
124
|
+
"@rolldown/binding-linux-arm-gnueabihf": "0.15.1-commit.09cccaf",
|
|
125
|
+
"@rolldown/binding-linux-x64-musl": "0.15.1-commit.09cccaf",
|
|
126
|
+
"@rolldown/binding-linux-x64-gnu": "0.15.1-commit.09cccaf",
|
|
127
|
+
"@rolldown/binding-win32-arm64-msvc": "0.15.1-commit.09cccaf",
|
|
128
|
+
"@rolldown/binding-wasm32-wasi": "0.15.1-commit.09cccaf",
|
|
129
|
+
"@rolldown/binding-win32-ia32-msvc": "0.15.1-commit.09cccaf",
|
|
130
|
+
"@rolldown/binding-win32-x64-msvc": "0.15.1-commit.09cccaf"
|
|
131
131
|
},
|
|
132
132
|
"scripts": {
|
|
133
133
|
"# Scrips for binding #": "_",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {string} source
|
|
3
|
-
* @param {import('./types').Options} [options]
|
|
4
|
-
*/
|
|
5
|
-
export function getLocator(source: string, options?: import("./types").Options | undefined): (search: string | number, index?: number | undefined) => Location | undefined;
|
|
6
|
-
/**
|
|
7
|
-
* @param {string} source
|
|
8
|
-
* @param {string | number} search
|
|
9
|
-
* @param {import('./types').Options} [options]
|
|
10
|
-
* @returns {Location | undefined}
|
|
11
|
-
*/
|
|
12
|
-
export function locate(source: string, search: string | number, options?: import("./types").Options | undefined): Location | undefined;
|
|
13
|
-
export type Location = import("./types").Location;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { OutputOptions, InputOptions, Plugin, OutputPlugin, OutputChunk, NormalizedInputOptions, OutputAsset, OutputBundle, SourceMapInput, RenderedChunk, } from './rollup';
|