rolldown 1.0.0-beta.7-commit.51b53fd → 1.0.0-beta.7-commit.25f3c61
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/bin/cli.js +1 -1
- package/dist/cjs/cli.cjs +457 -457
- package/dist/cjs/experimental-index.cjs +24 -24
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/parallel-plugin-worker.cjs +2 -2
- package/dist/cjs/parse-ast-index.cjs +1 -1
- package/dist/esm/cli.mjs +457 -457
- package/dist/esm/experimental-index.mjs +24 -24
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/parallel-plugin-worker.mjs +2 -2
- package/dist/esm/parse-ast-index.mjs +1 -1
- package/dist/shared/{parse-ast-index-DbQWN9pL.cjs → parse-ast-index-0ei4fTjl.cjs} +253 -252
- package/dist/shared/{parse-ast-index-B-UemHTj.mjs → parse-ast-index-DNOUVcBy.mjs} +253 -252
- package/dist/shared/{src-eC0JqPTa.cjs → src-BPcsb-4N.cjs} +464 -464
- package/dist/shared/{src-DJ0d0UY6.mjs → src-DllTyFDp.mjs} +464 -464
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/binding.d.ts +5 -1
- package/dist/types/builtin-plugin/constructors.d.ts +1 -1
- package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -1
- package/dist/types/cli/arguments/index.d.ts +1 -1
- package/dist/types/cli/arguments/normalize.d.ts +5 -1
- package/dist/types/experimental-index.d.ts +5 -5
- package/dist/types/index.d.ts +23 -23
- package/dist/types/log/logger.d.ts +2 -2
- package/dist/types/options/generated/checks-options.d.ts +11 -11
- package/dist/types/options/input-options.d.ts +4 -4
- package/dist/types/options/normalized-input-options.d.ts +2 -2
- package/dist/types/options/normalized-output-options.d.ts +1 -1
- package/dist/types/options/output-options.d.ts +2 -2
- package/dist/types/parallel-plugin.d.ts +1 -1
- package/dist/types/plugin/bindingify-build-hooks.d.ts +1 -1
- package/dist/types/plugin/bindingify-hook-filter.d.ts +2 -2
- package/dist/types/plugin/bindingify-output-hooks.d.ts +2 -2
- package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +1 -1
- package/dist/types/plugin/bindingify-plugin.d.ts +3 -3
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +1 -1
- package/dist/types/plugin/hook-filter.d.ts +1 -1
- package/dist/types/plugin/index.d.ts +15 -16
- package/dist/types/plugin/plugin-context-data.d.ts +2 -2
- package/dist/types/plugin/plugin-context.d.ts +7 -7
- package/dist/types/plugin/plugin-driver.d.ts +2 -2
- package/dist/types/plugin/transform-plugin-context.d.ts +4 -4
- package/dist/types/types/rolldown-output.d.ts +1 -1
- package/dist/types/utils/bindingify-input-options.d.ts +3 -3
- package/dist/types/utils/create-bundler-option.d.ts +1 -1
- package/dist/types/utils/define-config.d.ts +1 -1
- package/dist/types/utils/initialize-parallel-plugins.d.ts +1 -1
- package/dist/types/utils/normalize-hook.d.ts +1 -1
- package/dist/types/utils/normalize-plugin-option.d.ts +1 -1
- package/dist/types/utils/transform-module-info.d.ts +2 -2
- package/dist/types/utils/transform-to-rollup-output.d.ts +2 -2
- package/package.json +25 -26
package/dist/types/binding.d.ts
CHANGED
|
@@ -119,6 +119,10 @@ export declare class BindingRenderedChunk {
|
|
|
119
119
|
get dynamicImports(): Array<string>
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
export declare class BindingRenderedChunkMeta {
|
|
123
|
+
get chunks(): Record<string, BindingRenderedChunk>
|
|
124
|
+
}
|
|
125
|
+
|
|
122
126
|
export declare class BindingRenderedModule {
|
|
123
127
|
get code(): string | null
|
|
124
128
|
get renderedExports(): Array<string>
|
|
@@ -576,7 +580,7 @@ export interface BindingPluginOptions {
|
|
|
576
580
|
moduleParsedMeta?: BindingPluginHookMeta
|
|
577
581
|
buildEnd?: (ctx: BindingPluginContext, error?: (Error | BindingError)[]) => MaybePromise<VoidNullable>
|
|
578
582
|
buildEndMeta?: BindingPluginHookMeta
|
|
579
|
-
renderChunk?: (ctx: BindingPluginContext, code: string, chunk: BindingRenderedChunk, opts: BindingNormalizedOptions,
|
|
583
|
+
renderChunk?: (ctx: BindingPluginContext, code: string, chunk: BindingRenderedChunk, opts: BindingNormalizedOptions, meta: BindingRenderedChunkMeta) => MaybePromise<VoidNullable<BindingHookRenderChunkOutput>>
|
|
580
584
|
renderChunkMeta?: BindingPluginHookMeta
|
|
581
585
|
augmentChunkHash?: (ctx: BindingPluginContext, chunk: BindingRenderedChunk) => MaybePromise<void | string>
|
|
582
586
|
augmentChunkHashMeta?: BindingPluginHookMeta
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BindingBuiltinPluginName, BindingGlobImportPluginConfig,
|
|
1
|
+
import { BindingBuildImportAnalysisPluginConfig, type BindingBuiltinPluginName, BindingGlobImportPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, type BindingViteResolvePluginConfig } from '../binding';
|
|
2
2
|
export declare class BuiltinPlugin {
|
|
3
3
|
name: BindingBuiltinPluginName;
|
|
4
4
|
_options?: unknown | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type NormalizedCliOptions } from './normalize';
|
|
2
1
|
import type { Schema } from '../../types/schema';
|
|
2
|
+
import { type NormalizedCliOptions } from './normalize';
|
|
3
3
|
export declare const flattenedSchema: Record<string, Schema>;
|
|
4
4
|
export declare const options: {
|
|
5
5
|
[k: string]: {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @description This file is used for normalize the options.
|
|
3
|
+
* In CLI, the input options and output options are mixed together. We need to tell them apart.
|
|
4
|
+
*/
|
|
2
5
|
import type { InputOptions } from '../../options/input-options';
|
|
3
6
|
import type { OutputOptions } from '../../options/output-options';
|
|
7
|
+
import type { CliOptions } from './alias';
|
|
4
8
|
export interface NormalizedCliOptions {
|
|
5
9
|
input: InputOptions;
|
|
6
10
|
output: OutputOptions;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { defineParallelPlugin } from './plugin/parallel-plugin';
|
|
2
1
|
export { experimental_scan as scan } from './api/experimental';
|
|
3
|
-
export {
|
|
2
|
+
export { moduleRunnerTransform, transform } from './binding';
|
|
4
3
|
export type { TransformOptions, TransformResult } from './binding';
|
|
4
|
+
export { defineParallelPlugin } from './plugin/parallel-plugin';
|
|
5
5
|
export { composeJsPlugins as composePlugins } from './utils/compose-js-plugins';
|
|
6
|
-
export {
|
|
7
|
-
export { transformPlugin } from './builtin-plugin/transform-plugin';
|
|
8
|
-
export { replacePlugin } from './builtin-plugin/replace-plugin';
|
|
6
|
+
export { buildImportAnalysisPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, } from './builtin-plugin/constructors';
|
|
9
7
|
export { aliasPlugin } from './builtin-plugin/alias-plugin';
|
|
8
|
+
export { replacePlugin } from './builtin-plugin/replace-plugin';
|
|
9
|
+
export { transformPlugin } from './builtin-plugin/transform-plugin';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { InputOptions, InputOption, ExternalOption, JsxOptions } from './options/input-options';
|
|
3
|
-
import type { ModuleFormat, OutputOptions, PreRenderedAsset } from './options/output-options';
|
|
4
|
-
import type { RolldownOptions } from './types/rolldown-options';
|
|
5
|
-
import type { AsyncPluginHooks, CustomPluginOptions, FunctionPluginHooks, ImportKind, LoadResult, ModuleOptions, ModuleType, ObjectHook, ParallelPluginHooks, PartialResolvedId, Plugin, RolldownPlugin, RolldownPluginOption, ResolveIdResult, ResolvedId, SourceDescription, TransformResult, HookFilterExtension } from './plugin';
|
|
6
|
-
import type { HookFilter, StringFilter, ModuleTypeFilter } from './plugin/hook-filter';
|
|
7
|
-
import type { LogOrStringHandler } from './log/logging';
|
|
8
|
-
import { DefineParallelPluginResult } from './plugin/parallel-plugin';
|
|
9
|
-
import { defineConfig } from './utils/define-config';
|
|
1
|
+
import { build, type BuildOptions } from './api/build';
|
|
10
2
|
import { rolldown } from './api/rolldown';
|
|
11
|
-
import { watch } from './api/watch';
|
|
12
|
-
import { ConfigExport } from './types/config-export';
|
|
13
3
|
import { RolldownBuild } from './api/rolldown/rolldown-build';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { InternalModuleFormat, NormalizedOutputOptions } from './options/normalized-output-options';
|
|
4
|
+
import { watch } from './api/watch';
|
|
5
|
+
import { RolldownWatcher } from './api/watch/watch-emitter';
|
|
17
6
|
import { PreRenderedChunk } from './binding';
|
|
18
|
-
import {
|
|
7
|
+
import type { LogOrStringHandler } from './log/logging';
|
|
8
|
+
import type { ExternalOption, InputOption, InputOptions, JsxOptions } from './options/input-options';
|
|
19
9
|
import { NormalizedInputOptions } from './options/normalized-input-options';
|
|
10
|
+
import { InternalModuleFormat, NormalizedOutputOptions } from './options/normalized-output-options';
|
|
11
|
+
import type { ModuleFormat, OutputOptions, PreRenderedAsset } from './options/output-options';
|
|
12
|
+
import { WatchOptions } from './options/watch-options';
|
|
13
|
+
import type { AsyncPluginHooks, CustomPluginOptions, FunctionPluginHooks, HookFilterExtension, ImportKind, LoadResult, ModuleOptions, ModuleType, ObjectHook, ParallelPluginHooks, PartialResolvedId, Plugin, ResolvedId, ResolveIdExtraOptions, ResolveIdResult, RolldownPlugin, RolldownPluginOption, SourceDescription, TransformResult } from './plugin';
|
|
14
|
+
import type { HookFilter, ModuleTypeFilter, StringFilter } from './plugin/hook-filter';
|
|
15
|
+
import { MinimalPluginContext, PluginContextMeta } from './plugin/minimal-plugin-context';
|
|
16
|
+
import { DefineParallelPluginResult } from './plugin/parallel-plugin';
|
|
17
|
+
import { EmittedAsset, EmittedFile, GetModuleInfo, PluginContext } from './plugin/plugin-context';
|
|
18
|
+
import { TransformPluginContext } from './plugin/transform-plugin-context';
|
|
19
|
+
import { ConfigExport } from './types/config-export';
|
|
20
20
|
import { ModuleInfo } from './types/module-info';
|
|
21
|
-
import { PluginContextMeta, MinimalPluginContext } from './plugin/minimal-plugin-context';
|
|
22
|
-
import { ExistingRawSourceMap, SourceMapInput } from './types/sourcemap';
|
|
23
21
|
import { OutputBundle } from './types/output-bundle';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
22
|
+
import type { RolldownOptions } from './types/rolldown-options';
|
|
23
|
+
import { OutputAsset, OutputChunk, RenderedChunk, RenderedModule, RolldownOutput, SourceMap } from './types/rolldown-output';
|
|
24
|
+
import { ExistingRawSourceMap, SourceMapInput } from './types/sourcemap';
|
|
25
|
+
import { PartialNull } from './types/utils';
|
|
26
|
+
import { defineConfig } from './utils/define-config';
|
|
27
|
+
export { build, defineConfig, rolldown, watch };
|
|
28
28
|
export declare const VERSION: string;
|
|
29
|
-
export type {
|
|
30
|
-
export type {
|
|
29
|
+
export type { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogOrStringHandler, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolvedId, ResolveIdExtraOptions, ResolveIdResult, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, WatchOptions, };
|
|
30
|
+
export type { LoggingFunction, LogLevel, RollupError, RollupLog, WarningHandlerWithDefault, } from './types/misc';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InputOptions } from '../options/input-options';
|
|
2
2
|
import type { Plugin } from '../plugin';
|
|
3
|
+
import type { LogHandler } from '../types/misc';
|
|
3
4
|
import { type LogLevelOption } from './logging';
|
|
4
|
-
import type { InputOptions } from '../options/input-options';
|
|
5
5
|
export declare function getLogger(plugins: Plugin[], onLog: LogHandler, logLevel: LogLevelOption, watchMode: boolean): LogHandler;
|
|
6
6
|
export declare const getOnLog: (config: InputOptions, logLevel: LogLevelOption, printLog?: LogHandler) => LogHandler;
|
|
@@ -2,56 +2,56 @@ export interface ChecksOptions {
|
|
|
2
2
|
/**
|
|
3
3
|
* Whether to emit warning when detecting circular dependency
|
|
4
4
|
* @default false
|
|
5
|
-
|
|
5
|
+
*/
|
|
6
6
|
circularDependency?: boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Whether to emit warning when detecting eval
|
|
9
9
|
* @default true
|
|
10
|
-
|
|
10
|
+
*/
|
|
11
11
|
eval?: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Whether to emit warning when detecting missing global name
|
|
14
14
|
* @default true
|
|
15
|
-
|
|
15
|
+
*/
|
|
16
16
|
missingGlobalName?: boolean;
|
|
17
17
|
/**
|
|
18
18
|
* Whether to emit warning when detecting missing name option for iife export
|
|
19
19
|
* @default true
|
|
20
|
-
|
|
20
|
+
*/
|
|
21
21
|
missingNameOptionForIifeExport?: boolean;
|
|
22
22
|
/**
|
|
23
23
|
* Whether to emit warning when detecting mixed export
|
|
24
24
|
* @default true
|
|
25
|
-
|
|
25
|
+
*/
|
|
26
26
|
mixedExport?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* Whether to emit warning when detecting unresolved entry
|
|
29
29
|
* @default true
|
|
30
|
-
|
|
30
|
+
*/
|
|
31
31
|
unresolvedEntry?: boolean;
|
|
32
32
|
/**
|
|
33
33
|
* Whether to emit warning when detecting unresolved import
|
|
34
34
|
* @default true
|
|
35
|
-
|
|
35
|
+
*/
|
|
36
36
|
unresolvedImport?: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Whether to emit warning when detecting filename conflict
|
|
39
39
|
* @default true
|
|
40
|
-
|
|
40
|
+
*/
|
|
41
41
|
filenameConflict?: boolean;
|
|
42
42
|
/**
|
|
43
43
|
* Whether to emit warning when detecting common js variable in esm
|
|
44
44
|
* @default true
|
|
45
|
-
|
|
45
|
+
*/
|
|
46
46
|
commonJsVariableInEsm?: boolean;
|
|
47
47
|
/**
|
|
48
48
|
* Whether to emit warning when detecting import is undefined
|
|
49
49
|
* @default true
|
|
50
|
-
|
|
50
|
+
*/
|
|
51
51
|
importIsUndefined?: boolean;
|
|
52
52
|
/**
|
|
53
53
|
* Whether to emit warning when detecting configuration field conflict
|
|
54
54
|
* @default true
|
|
55
|
-
|
|
55
|
+
*/
|
|
56
56
|
configurationFieldConflict?: boolean;
|
|
57
57
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TransformOptions } from '../binding';
|
|
2
2
|
import type { LogLevel, LogLevelOption, LogOrStringHandler, RollupLog, RollupLogWithString } from '../log/logging';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RolldownPluginOption } from '../plugin';
|
|
4
4
|
import type { TreeshakingOptions } from '../types/module-side-effects';
|
|
5
|
-
import {
|
|
5
|
+
import type { NullValue, StringOrRegExp } from '../types/utils';
|
|
6
6
|
import type { ChecksOptions } from './generated/checks-options';
|
|
7
7
|
export type InputOption = string | string[] | Record<string, string>;
|
|
8
8
|
type OxcTransformOption = Omit<TransformOptions, 'sourceType' | 'lang' | 'cwd' | 'sourcemap' | 'jsx' | 'define' | 'inject' | 'target'>;
|
|
@@ -103,7 +103,7 @@ export interface InputOptions {
|
|
|
103
103
|
* if (true) {
|
|
104
104
|
* console.log('Production mode')
|
|
105
105
|
* }
|
|
106
|
-
|
|
106
|
+
* ```
|
|
107
107
|
*
|
|
108
108
|
* - Replace the property accessor `process.env.NODE_ENV` with `'production'`
|
|
109
109
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LogHandler } from '../types/misc';
|
|
2
|
-
import { BindingNormalizedOptions } from '../binding';
|
|
3
1
|
import { InputOptions } from '..';
|
|
2
|
+
import { BindingNormalizedOptions } from '../binding';
|
|
3
|
+
import type { LogHandler } from '../types/misc';
|
|
4
4
|
export interface NormalizedInputOptions {
|
|
5
5
|
input: string[] | Record<string, string>;
|
|
6
6
|
cwd: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { RolldownPlugin } from '..';
|
|
1
2
|
import type { BindingMinifyOptions, BindingNormalizedOptions } from '../binding';
|
|
2
3
|
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc';
|
|
3
4
|
import type { AddonFunction, AssetFileNamesFunction, ChunkFileNamesFunction, GlobalsFunction, OutputOptions } from './output-options';
|
|
4
|
-
import { RolldownPlugin } from '..';
|
|
5
5
|
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app';
|
|
6
6
|
export interface NormalizedOutputOptions {
|
|
7
7
|
name: string | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { StringOrRegExp } from '../types/utils';
|
|
2
1
|
import type { PreRenderedChunk } from '../binding';
|
|
3
|
-
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc';
|
|
4
2
|
import { RolldownOutputPluginOption } from '../plugin';
|
|
3
|
+
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc';
|
|
5
4
|
import { RenderedChunk } from '../types/rolldown-output';
|
|
5
|
+
import type { StringOrRegExp } from '../types/utils';
|
|
6
6
|
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd' | 'experimental-app';
|
|
7
7
|
export type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
|
|
8
8
|
export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { defineParallelPluginImplementation, type ParallelPluginImplementation,
|
|
1
|
+
export { type Context, defineParallelPluginImplementation, type ParallelPluginImplementation, } from './plugin/parallel-plugin-implementation';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BindingGeneralHookFilter, BindingPluginOptions, BindingTransformHookFilter } from '../binding';
|
|
2
|
-
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
3
2
|
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
3
|
+
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
4
4
|
export declare function bindingifyBuildStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildStart']>;
|
|
5
5
|
export declare function bindingifyBuildEnd(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildEnd']>;
|
|
6
6
|
export declare function bindingifyResolveId(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveId'], BindingGeneralHookFilter | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { StringFilter } from './hook-filter';
|
|
2
|
-
import type { HookFilterExtension } from '.';
|
|
3
1
|
import type { BindingGeneralHookFilter, BindingTransformHookFilter } from '../binding.d';
|
|
2
|
+
import type { HookFilterExtension } from '.';
|
|
3
|
+
import type { StringFilter } from './hook-filter';
|
|
4
4
|
export declare function bindingifyStringFilter(matcher: StringFilter): BindingGeneralHookFilter;
|
|
5
5
|
export declare function bindingifyResolveIdFilter(filterOption?: HookFilterExtension<'resolveId'>['filter']): BindingGeneralHookFilter | undefined;
|
|
6
6
|
export declare function bindingifyLoadFilter(filterOption?: HookFilterExtension<'load'>['filter']): BindingGeneralHookFilter | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
2
|
-
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
3
1
|
import type { BindingPluginOptions } from '../binding';
|
|
2
|
+
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
3
|
+
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
4
4
|
export declare function bindingifyRenderStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderStart']>;
|
|
5
5
|
export declare function bindingifyRenderChunk(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderChunk']>;
|
|
6
6
|
export declare function bindingifyAugmentChunkHash(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['augmentChunkHash']>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ObjectHookMeta } from '.';
|
|
2
1
|
import { BindingPluginHookMeta } from '../binding';
|
|
2
|
+
import { ObjectHookMeta } from '.';
|
|
3
3
|
export declare function bindingifyPluginHookMeta(options: ObjectHookMeta): BindingPluginHookMeta;
|
|
4
4
|
export type PluginHookWithBindingExt<T, F = undefined> = {
|
|
5
5
|
plugin?: T;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import type {
|
|
2
|
+
import type { InputOptions } from '../options/input-options';
|
|
3
3
|
import type { OutputOptions } from '../options/output-options';
|
|
4
|
-
import { PluginContextData } from './plugin-context-data';
|
|
5
4
|
import type { LogHandler, LogLevelOption } from '../types/misc';
|
|
6
|
-
import type {
|
|
5
|
+
import type { Plugin, RolldownPlugin } from './index';
|
|
6
|
+
import { PluginContextData } from './plugin-context-data';
|
|
7
7
|
export interface BindingifyPluginArgs {
|
|
8
8
|
plugin: Plugin;
|
|
9
9
|
options: InputOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
3
2
|
import { BindingifyPluginArgs } from './bindingify-plugin';
|
|
3
|
+
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
4
4
|
export declare function bindingifyWatchChange(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['watchChange']>;
|
|
5
5
|
export declare function bindingifyCloseWatcher(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['closeWatcher']>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { ModuleType } from '../index';
|
|
1
2
|
import type { MaybeArray } from '../types/utils';
|
|
2
3
|
import type { StringOrRegExp } from '../types/utils';
|
|
3
|
-
import type { ModuleType } from '../index';
|
|
4
4
|
export type StringFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
5
5
|
include?: MaybeArray<Value>;
|
|
6
6
|
exclude?: MaybeArray<Value>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs } from '../binding';
|
|
2
|
-
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
3
|
-
import type { NullValue, MaybePromise, PartialNull, MakeAsync } from '../types/utils';
|
|
4
|
-
import type { SourceMapInput } from '../types/sourcemap';
|
|
5
|
-
import type { ModuleInfo } from '../types/module-info';
|
|
6
|
-
import type { OutputBundle } from '../types/output-bundle';
|
|
7
|
-
import type { PluginContext } from './plugin-context';
|
|
8
|
-
import type { TransformPluginContext } from './transform-plugin-context';
|
|
9
|
-
import type { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
10
|
-
import type { LogLevel } from '../log/logging';
|
|
11
|
-
import type { RollupLog } from '../types/misc';
|
|
12
|
-
import type { MinimalPluginContext } from './minimal-plugin-context';
|
|
13
1
|
import type { InputOptions, OutputOptions } from '..';
|
|
2
|
+
import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs } from '../binding';
|
|
14
3
|
import type { BuiltinPlugin } from '../builtin-plugin/constructors';
|
|
15
|
-
import type { ParallelPlugin } from './parallel-plugin';
|
|
16
4
|
import type { DefinedHookNames } from '../constants/plugin';
|
|
17
5
|
import type { DEFINED_HOOK_NAMES } from '../constants/plugin';
|
|
18
6
|
import type { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
19
|
-
import type {
|
|
7
|
+
import type { LogLevel } from '../log/logging';
|
|
8
|
+
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
9
|
+
import type { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
10
|
+
import type { RollupLog } from '../types/misc';
|
|
11
|
+
import type { ModuleInfo } from '../types/module-info';
|
|
12
|
+
import type { OutputBundle } from '../types/output-bundle';
|
|
20
13
|
import { RenderedChunk } from '../types/rolldown-output';
|
|
14
|
+
import type { SourceMapInput } from '../types/sourcemap';
|
|
15
|
+
import type { MakeAsync, MaybePromise, NullValue, PartialNull } from '../types/utils';
|
|
16
|
+
import type { HookFilter, StringFilter } from './hook-filter';
|
|
17
|
+
import type { MinimalPluginContext } from './minimal-plugin-context';
|
|
18
|
+
import type { ParallelPlugin } from './parallel-plugin';
|
|
19
|
+
import type { PluginContext } from './plugin-context';
|
|
20
|
+
import type { TransformPluginContext } from './transform-plugin-context';
|
|
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'];
|
|
@@ -42,7 +42,7 @@ export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
|
|
|
42
42
|
map?: SourceMapInput;
|
|
43
43
|
moduleType?: ModuleType;
|
|
44
44
|
}
|
|
45
|
-
interface ResolveIdExtraOptions {
|
|
45
|
+
export interface ResolveIdExtraOptions {
|
|
46
46
|
custom?: CustomPluginOptions;
|
|
47
47
|
isEntry: boolean;
|
|
48
48
|
kind: 'import' | 'dynamic-import' | 'require-call';
|
|
@@ -138,4 +138,3 @@ export type RolldownPlugin<A = any> = Plugin<A> | BuiltinPlugin | ParallelPlugin
|
|
|
138
138
|
export type RolldownPluginOption<A = any> = MaybePromise<NullValue<RolldownPlugin<A>> | false | RolldownPluginOption[]>;
|
|
139
139
|
export type RolldownOutputPlugin = OutputPlugin | BuiltinPlugin;
|
|
140
140
|
export type RolldownOutputPluginOption = MaybePromise<NullValue<RolldownOutputPlugin> | false | RolldownOutputPluginOption[]>;
|
|
141
|
-
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BindingPluginContext } from '../binding';
|
|
2
1
|
import { ModuleOptions } from '..';
|
|
3
|
-
import {
|
|
2
|
+
import { BindingPluginContext } from '../binding';
|
|
4
3
|
import type { ModuleInfo } from '../types/module-info';
|
|
5
4
|
import { RenderedChunkMeta } from '.';
|
|
5
|
+
import { PluginContextResolveOptions } from './plugin-context';
|
|
6
6
|
export declare class PluginContextData {
|
|
7
7
|
moduleOptionMap: Map<string, ModuleOptions>;
|
|
8
8
|
resolveOptionsMap: Map<number, PluginContextResolveOptions>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { Program } from '@oxc-project/types';
|
|
1
2
|
import type { BindingPluginContext, ParserOptions } from '../binding';
|
|
2
|
-
import
|
|
3
|
+
import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
4
|
+
import { OutputOptions } from '../options/output-options';
|
|
3
5
|
import { MinimalPluginContext, MinimalPluginContextImpl } from '../plugin/minimal-plugin-context';
|
|
4
|
-
import {
|
|
6
|
+
import type { LogHandler, LogLevelOption } from '../types/misc';
|
|
5
7
|
import { ModuleInfo } from '../types/module-info';
|
|
6
|
-
import { PluginContextData } from './plugin-context-data';
|
|
7
|
-
import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
8
8
|
import { PartialNull } from '../types/utils';
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { AssetSource } from '../utils/asset-source';
|
|
10
|
+
import type { CustomPluginOptions, ModuleOptions, Plugin, ResolvedId } from './index';
|
|
11
|
+
import { PluginContextData } from './plugin-context-data';
|
|
12
12
|
export interface EmittedAsset {
|
|
13
13
|
type: 'asset';
|
|
14
14
|
name?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type LogLevelOption } from '../log/logging';
|
|
2
|
-
import { Plugin } from './';
|
|
3
1
|
import { InputOptions, OutputOptions, RolldownPlugin } from '..';
|
|
2
|
+
import { type LogLevelOption } from '../log/logging';
|
|
4
3
|
import type { LogHandler } from '../types/misc';
|
|
4
|
+
import { Plugin } from './';
|
|
5
5
|
export declare class PluginDriver {
|
|
6
6
|
static callOptionsHook(inputOptions: InputOptions, watchMode?: boolean): Promise<InputOptions>;
|
|
7
7
|
static callOutputOptionsHook(rawPlugins: RolldownPlugin[], outputOptions: OutputOptions, onLog: LogHandler, logLevel: LogLevelOption, watchMode: boolean): OutputOptions;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BindingPluginContext, BindingTransformPluginContext } from '../binding';
|
|
2
|
+
import { OutputOptions } from '../options/output-options';
|
|
2
3
|
import type { LoggingFunctionWithPosition, LogHandler, LogLevelOption, RollupError } from '../types/misc';
|
|
3
|
-
import { PluginContextImpl, type PluginContext } from './plugin-context';
|
|
4
|
-
import { PluginContextData } from './plugin-context-data';
|
|
5
|
-
import type { Plugin } from './index';
|
|
6
4
|
import { SourceMap } from '../types/rolldown-output';
|
|
7
|
-
import {
|
|
5
|
+
import type { Plugin } from './index';
|
|
6
|
+
import { type PluginContext, PluginContextImpl } from './plugin-context';
|
|
7
|
+
import { PluginContextData } from './plugin-context-data';
|
|
8
8
|
export interface TransformPluginContext extends PluginContext {
|
|
9
9
|
debug: LoggingFunctionWithPosition;
|
|
10
10
|
info: LoggingFunctionWithPosition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BindingInputOptions } from '../binding';
|
|
2
|
+
import { LogLevelOption } from '../log/logging';
|
|
2
3
|
import type { InputOptions } from '../options/input-options';
|
|
3
4
|
import type { OutputOptions } from '../options/output-options';
|
|
4
|
-
import type {
|
|
5
|
+
import type { RolldownPlugin } from '../plugin';
|
|
5
6
|
import { LogHandler } from '../types/misc';
|
|
6
|
-
import { LogLevelOption } from '../log/logging';
|
|
7
7
|
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions, normalizedOutputPlugins: RolldownPlugin[], onLog: LogHandler, logLevel: LogLevelOption, watchMode: boolean): BindingInputOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BindingBundlerOptions } from '../binding';
|
|
2
|
-
import { LogHandler } from '../types/misc';
|
|
3
2
|
import type { InputOptions } from '../options/input-options';
|
|
4
3
|
import type { OutputOptions } from '../options/output-options';
|
|
4
|
+
import { LogHandler } from '../types/misc';
|
|
5
5
|
export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions, watchMode: boolean, isClose?: boolean): Promise<BundlerOptionWithStopWorker>;
|
|
6
6
|
export interface BundlerOptionWithStopWorker {
|
|
7
7
|
bundlerOptions: BindingBundlerOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RolldownOptions } from '../types/rolldown-options';
|
|
2
1
|
import type { ConfigExport } from '../types/config-export';
|
|
2
|
+
import type { RolldownOptions } from '../types/rolldown-options';
|
|
3
3
|
export declare function defineConfig(config: RolldownOptions): RolldownOptions;
|
|
4
4
|
export declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
5
5
|
export declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Worker } from 'node:worker_threads';
|
|
2
|
-
import type { RolldownPlugin } from '../plugin';
|
|
3
2
|
import { ParallelJsPluginRegistry } from '../binding';
|
|
3
|
+
import type { RolldownPlugin } from '../plugin';
|
|
4
4
|
export type WorkerData = {
|
|
5
5
|
registryId: number;
|
|
6
6
|
pluginInfos: ParallelPluginInfo[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyFn } from '../types/utils';
|
|
2
1
|
import type { ObjectHook, ObjectHookMeta } from '../plugin';
|
|
2
|
+
import { AnyFn } from '../types/utils';
|
|
3
3
|
export declare function normalizeHook<Hook extends ObjectHook<AnyFn | string>>(hook: Hook): Hook extends ObjectHook<infer RawHook, infer CustomOptions> ? Hook extends RawHook ? never : {
|
|
4
4
|
handler: RawHook;
|
|
5
5
|
options: CustomOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RolldownPlugin, RolldownOutputPlugin } from '../plugin';
|
|
2
1
|
import type { InputOptions } from '../options/input-options';
|
|
3
2
|
import type { OutputOptions } from '../options/output-options';
|
|
3
|
+
import type { RolldownOutputPlugin, RolldownPlugin } from '../plugin';
|
|
4
4
|
import { LogHandler } from '../types/misc';
|
|
5
5
|
export declare const normalizePluginOption: {
|
|
6
6
|
(plugins: InputOptions['plugins']): Promise<RolldownPlugin[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModuleInfo } from '../types/module-info';
|
|
2
|
-
import type { BindingModuleInfo } from '../binding';
|
|
3
1
|
import { ModuleOptions } from '..';
|
|
2
|
+
import type { BindingModuleInfo } from '../binding';
|
|
3
|
+
import type { ModuleInfo } from '../types/module-info';
|
|
4
4
|
export declare function transformModuleInfo(info: BindingModuleInfo, option: ModuleOptions): ModuleInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RolldownOutput } from '../types/rolldown-output';
|
|
2
|
-
import type { OutputBundle } from '../types/output-bundle';
|
|
3
1
|
import type { BindingOutputs, JsChangedOutputs } from '../binding';
|
|
2
|
+
import type { OutputBundle } from '../types/output-bundle';
|
|
3
|
+
import type { RolldownOutput } from '../types/rolldown-output';
|
|
4
4
|
export declare function transformToRollupOutput(output: BindingOutputs, changed?: ChangedOutputs): RolldownOutput;
|
|
5
5
|
export declare function handleOutputErrors(output: BindingOutputs): void;
|
|
6
6
|
export declare function transformToOutputBundle(output: BindingOutputs, changed: ChangedOutputs): OutputBundle;
|