@rolldown/browser 1.0.0-beta.7-commit.46fbc61 → 1.0.0-beta.7-commit.a684277

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.
Files changed (128) hide show
  1. package/dist/browser.mjs +92 -3
  2. package/dist/cli.cjs +125 -18
  3. package/dist/cli.d.cts +1 -0
  4. package/dist/cli.d.mts +1 -0
  5. package/dist/cli.mjs +81 -16
  6. package/dist/experimental-index.cjs +32 -3
  7. package/dist/experimental-index.d.cts +94 -0
  8. package/dist/experimental-index.d.mts +94 -0
  9. package/dist/experimental-index.mjs +31 -2
  10. package/dist/index.cjs +2 -2
  11. package/dist/index.d.cts +3 -0
  12. package/dist/index.d.mts +3 -0
  13. package/dist/index.mjs +2 -2
  14. package/dist/parallel-plugin-worker.cjs +3 -3
  15. package/dist/parallel-plugin-worker.d.cts +1 -0
  16. package/dist/parallel-plugin-worker.d.mts +1 -0
  17. package/dist/parallel-plugin-worker.mjs +3 -3
  18. package/dist/parallel-plugin.d.cts +14 -0
  19. package/dist/parallel-plugin.d.mts +14 -0
  20. package/dist/parse-ast-index.cjs +1 -1
  21. package/dist/parse-ast-index.d.cts +9 -0
  22. package/dist/parse-ast-index.d.mts +9 -0
  23. package/dist/parse-ast-index.mjs +1 -1
  24. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  25. package/dist/shared/chunk-DSsiIF1Z.mjs +30 -0
  26. package/dist/shared/{chunk-Dc32QXFI.cjs → chunk-qZFfknuJ.cjs} +9 -0
  27. package/dist/shared/input-options.d-CJIzCDlR.d.mts +1072 -0
  28. package/dist/shared/input-options.d-sjdx_aVw.d.cts +1072 -0
  29. package/dist/shared/{parse-ast-index-Rn-i2y3M.cjs → parse-ast-index-B_-Eqolm.cjs} +11 -1
  30. package/dist/shared/{parse-ast-index-CaKd8BTZ.mjs → parse-ast-index-jK_Miocm.mjs} +11 -1
  31. package/dist/shared/{prompt-D713KUcE.mjs → prompt-B7SnYdwU.mjs} +1 -1
  32. package/dist/shared/{prompt-wpCBKCzA.cjs → prompt-_yrURmmm.cjs} +1 -1
  33. package/dist/shared/{src-whyHz3p3.mjs → src-DSCy0VBD.mjs} +72 -5
  34. package/dist/shared/{src-DoypqT02.cjs → src-sUNCnFpJ.cjs} +84 -5
  35. package/package.json +5 -12
  36. package/dist/shared/chunk-nENTdJ2K.mjs +0 -11
  37. package/dist/types/api/build.d.ts +0 -18
  38. package/dist/types/api/experimental.d.ts +0 -7
  39. package/dist/types/api/rolldown/index.d.ts +0 -3
  40. package/dist/types/api/rolldown/rolldown-build.d.ts +0 -15
  41. package/dist/types/api/watch/index.d.ts +0 -3
  42. package/dist/types/api/watch/watch-emitter.d.ts +0 -31
  43. package/dist/types/api/watch/watcher.d.ts +0 -13
  44. package/dist/types/binding.d.ts +0 -1507
  45. package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
  46. package/dist/types/builtin-plugin/constructors.d.ts +0 -23
  47. package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -27
  48. package/dist/types/builtin-plugin/transform-plugin.d.ts +0 -9
  49. package/dist/types/builtin-plugin/utils.d.ts +0 -8
  50. package/dist/types/cli/arguments/alias.d.ts +0 -16
  51. package/dist/types/cli/arguments/index.d.ts +0 -15
  52. package/dist/types/cli/arguments/normalize.d.ts +0 -16
  53. package/dist/types/cli/arguments/utils.d.ts +0 -8
  54. package/dist/types/cli/commands/bundle.d.ts +0 -3
  55. package/dist/types/cli/commands/help.d.ts +0 -1
  56. package/dist/types/cli/index.d.ts +0 -1
  57. package/dist/types/cli/load-config.d.ts +0 -5
  58. package/dist/types/cli/logger.d.ts +0 -5
  59. package/dist/types/constants/plugin-context.d.ts +0 -7
  60. package/dist/types/constants/plugin.d.ts +0 -45
  61. package/dist/types/experimental-index.d.ts +0 -9
  62. package/dist/types/index.d.ts +0 -31
  63. package/dist/types/log/log-handler.d.ts +0 -4
  64. package/dist/types/log/logger.d.ts +0 -6
  65. package/dist/types/log/logging.d.ts +0 -12
  66. package/dist/types/log/logs.d.ts +0 -18
  67. package/dist/types/options/generated/checks-options.d.ts +0 -57
  68. package/dist/types/options/input-options.d.ts +0 -185
  69. package/dist/types/options/normalized-input-options.d.ts +0 -18
  70. package/dist/types/options/normalized-output-options.d.ts +0 -70
  71. package/dist/types/options/output-options.d.ts +0 -182
  72. package/dist/types/options/watch-options.d.ts +0 -5
  73. package/dist/types/parallel-plugin-worker.d.ts +0 -1
  74. package/dist/types/parallel-plugin.d.ts +0 -1
  75. package/dist/types/parse-ast-index.d.ts +0 -5
  76. package/dist/types/plugin/bindingify-build-hooks.d.ts +0 -10
  77. package/dist/types/plugin/bindingify-hook-filter.d.ts +0 -7
  78. package/dist/types/plugin/bindingify-output-hooks.d.ts +0 -14
  79. package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +0 -8
  80. package/dist/types/plugin/bindingify-plugin.d.ts +0 -17
  81. package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
  82. package/dist/types/plugin/generated/hook-usage.d.ts +0 -29
  83. package/dist/types/plugin/hook-filter.d.ts +0 -49
  84. package/dist/types/plugin/index.d.ts +0 -141
  85. package/dist/types/plugin/minimal-plugin-context.d.ts +0 -24
  86. package/dist/types/plugin/parallel-plugin-implementation.d.ts +0 -10
  87. package/dist/types/plugin/parallel-plugin.d.ts +0 -9
  88. package/dist/types/plugin/plugin-context-data.d.ts +0 -22
  89. package/dist/types/plugin/plugin-context.d.ts +0 -67
  90. package/dist/types/plugin/plugin-driver.d.ts +0 -10
  91. package/dist/types/plugin/transform-plugin-context.d.ts +0 -28
  92. package/dist/types/plugin/with-filter.d.ts +0 -10
  93. package/dist/types/types/assert.d.ts +0 -14
  94. package/dist/types/types/config-export.d.ts +0 -5
  95. package/dist/types/types/misc.d.ts +0 -40
  96. package/dist/types/types/module-info.d.ts +0 -15
  97. package/dist/types/types/module-side-effects.d.ts +0 -12
  98. package/dist/types/types/output-bundle.d.ts +0 -4
  99. package/dist/types/types/rolldown-options.d.ts +0 -5
  100. package/dist/types/types/rolldown-output.d.ts +0 -66
  101. package/dist/types/types/schema.d.ts +0 -33
  102. package/dist/types/types/sourcemap.d.ts +0 -14
  103. package/dist/types/types/utils.d.ts +0 -13
  104. package/dist/types/types.d.ts +0 -7
  105. package/dist/types/utils/asset-source.d.ts +0 -4
  106. package/dist/types/utils/async-flatten.d.ts +0 -1
  107. package/dist/types/utils/bindingify-input-options.d.ts +0 -7
  108. package/dist/types/utils/bindingify-output-options.d.ts +0 -5
  109. package/dist/types/utils/code-frame.d.ts +0 -1
  110. package/dist/types/utils/compose-js-plugins.d.ts +0 -2
  111. package/dist/types/utils/create-bundler-option.d.ts +0 -11
  112. package/dist/types/utils/create-bundler.d.ts +0 -9
  113. package/dist/types/utils/define-config.d.ts +0 -5
  114. package/dist/types/utils/error.d.ts +0 -2
  115. package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -17
  116. package/dist/types/utils/misc.d.ts +0 -7
  117. package/dist/types/utils/normalize-hook.d.ts +0 -7
  118. package/dist/types/utils/normalize-plugin-option.d.ts +0 -13
  119. package/dist/types/utils/normalize-string-or-regex.d.ts +0 -2
  120. package/dist/types/utils/plugin/index.d.ts +0 -2
  121. package/dist/types/utils/resolved-external.d.ts +0 -4
  122. package/dist/types/utils/transform-module-info.d.ts +0 -4
  123. package/dist/types/utils/transform-rendered-chunk.d.ts +0 -4
  124. package/dist/types/utils/transform-rendered-module.d.ts +0 -3
  125. package/dist/types/utils/transform-side-effects.d.ts +0 -3
  126. package/dist/types/utils/transform-sourcemap.d.ts +0 -3
  127. package/dist/types/utils/transform-to-rollup-output.d.ts +0 -11
  128. package/dist/types/utils/validator.d.ts +0 -6
@@ -1,28 +0,0 @@
1
- import type { BindingPluginContext, BindingTransformPluginContext } from '../binding';
2
- import { OutputOptions } from '../options/output-options';
3
- import type { LoggingFunctionWithPosition, LogHandler, LogLevelOption, RollupError } from '../types/misc';
4
- import { SourceMap } from '../types/rolldown-output';
5
- import type { Plugin } from './index';
6
- import { type PluginContext, PluginContextImpl } from './plugin-context';
7
- import { PluginContextData } from './plugin-context-data';
8
- export interface TransformPluginContext extends PluginContext {
9
- debug: LoggingFunctionWithPosition;
10
- info: LoggingFunctionWithPosition;
11
- warn: LoggingFunctionWithPosition;
12
- error(e: RollupError | string, pos?: number | {
13
- column: number;
14
- line: number;
15
- }): never;
16
- getCombinedSourcemap(): SourceMap;
17
- }
18
- export declare class TransformPluginContextImpl extends PluginContextImpl {
19
- private inner;
20
- private moduleId;
21
- private moduleSource;
22
- constructor(outputOptions: OutputOptions, context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string, onLog: LogHandler, LogLevelOption: LogLevelOption, watchMode: boolean);
23
- error(e: RollupError | string, pos?: number | {
24
- column: number;
25
- line: number;
26
- }): never;
27
- getCombinedSourcemap(): SourceMap;
28
- }
@@ -1,10 +0,0 @@
1
- import { HookFilterExtension, RolldownPluginOption } from '..';
2
- import { StringOrRegExp } from '../types/utils';
3
- type OverrideFilterObject = {
4
- transform?: HookFilterExtension<'transform'>['filter'];
5
- resolveId?: HookFilterExtension<'resolveId'>['filter'];
6
- load?: HookFilterExtension<'load'>['filter'];
7
- pluginNamePattern?: StringOrRegExp[];
8
- };
9
- export declare function withFilter<A, T extends RolldownPluginOption<A>>(pluginOption: T, filterObject: OverrideFilterObject | OverrideFilterObject[]): T;
10
- export {};
@@ -1,14 +0,0 @@
1
- import type { IsEqual } from 'type-fest';
2
- export type TypeAssert<T extends true> = T;
3
- export type HasProperty<T, K extends string> = K extends keyof T ? true : false;
4
- export type IsPropertyEqual<A, B, Key extends keyof A & keyof B> = IsEqual<A[Key], B[Key]>;
5
- type IsValuesOfObjectAllTrue<T> = {
6
- [K in keyof T]: T[K] extends true ? true : false;
7
- }[keyof T] extends true ? true : false;
8
- export type ShowPropertiesEqualStatus<A, B> = {
9
- [K in keyof A]: K extends keyof B ? IsEqual<A[K], B[K]> : true;
10
- };
11
- export type IsPropertiesEqual<A, B> = IsValuesOfObjectAllTrue<ShowPropertiesEqualStatus<A, B>>;
12
- export type Extends<A, B> = A extends B ? true : false;
13
- export type AssertNever<T extends never> = T;
14
- export {};
@@ -1,5 +0,0 @@
1
- import type { RolldownOptions } from './rolldown-options';
2
- /**
3
- * Type for `default export` of `rolldown.config.js` file.
4
- */
5
- export type ConfigExport = RolldownOptions | RolldownOptions[];
@@ -1,40 +0,0 @@
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,15 +0,0 @@
1
- import { ModuleOptions } from '..';
2
- export interface ModuleInfo extends ModuleOptions {
3
- /**
4
- * Unsupported at rolldown
5
- */
6
- ast: any;
7
- code: string | null;
8
- id: string;
9
- importers: string[];
10
- dynamicImporters: string[];
11
- importedIds: string[];
12
- dynamicallyImportedIds: string[];
13
- exports: string[];
14
- isEntry: boolean;
15
- }
@@ -1,12 +0,0 @@
1
- export interface ModuleSideEffectsRule {
2
- test?: RegExp;
3
- external?: boolean;
4
- sideEffects: boolean;
5
- }
6
- export type ModuleSideEffectsOption = boolean | ModuleSideEffectsRule[] | ((id: string, isResolved: boolean) => boolean | undefined) | 'no-external';
7
- export type TreeshakingOptions = {
8
- moduleSideEffects?: ModuleSideEffectsOption;
9
- annotations?: boolean;
10
- manualPureFunctions?: string[];
11
- unknownGlobalSideEffects?: boolean;
12
- } | boolean;
@@ -1,4 +0,0 @@
1
- import type { OutputAsset, OutputChunk } from './rolldown-output';
2
- export interface OutputBundle {
3
- [fileName: string]: OutputAsset | OutputChunk;
4
- }
@@ -1,5 +0,0 @@
1
- import type { InputOptions } from '../options/input-options';
2
- import type { OutputOptions } from '../options/output-options';
3
- export interface RolldownOptions extends InputOptions {
4
- output?: OutputOptions | OutputOptions[];
5
- }
@@ -1,66 +0,0 @@
1
- import type { BindingRenderedChunk } from '../binding';
2
- import { AssetSource } from '../utils/asset-source';
3
- export interface OutputAsset {
4
- type: 'asset';
5
- fileName: string;
6
- /** @deprecated Use "originalFileNames" instead. */
7
- originalFileName: string | null;
8
- originalFileNames: string[];
9
- source: AssetSource;
10
- /** @deprecated Use "names" instead. */
11
- name: string | undefined;
12
- names: string[];
13
- }
14
- export interface SourceMap {
15
- file: string;
16
- mappings: string;
17
- names: string[];
18
- sources: string[];
19
- sourcesContent: string[];
20
- version: number;
21
- debugId?: string;
22
- x_google_ignoreList?: number[];
23
- toString(): string;
24
- toUrl(): string;
25
- }
26
- export interface RenderedModule {
27
- readonly code: string | null;
28
- renderedLength: number;
29
- renderedExports: string[];
30
- }
31
- export interface RenderedChunk extends Omit<BindingRenderedChunk, 'modules'> {
32
- modules: {
33
- [id: string]: RenderedModule;
34
- };
35
- name: string;
36
- isEntry: boolean;
37
- isDynamicEntry: boolean;
38
- facadeModuleId: string | null;
39
- moduleIds: Array<string>;
40
- exports: Array<string>;
41
- fileName: string;
42
- imports: Array<string>;
43
- dynamicImports: Array<string>;
44
- }
45
- export interface OutputChunk {
46
- type: 'chunk';
47
- code: string;
48
- name: string;
49
- isEntry: boolean;
50
- exports: string[];
51
- fileName: string;
52
- modules: {
53
- [id: string]: RenderedModule;
54
- };
55
- imports: string[];
56
- dynamicImports: string[];
57
- facadeModuleId: string | null;
58
- isDynamicEntry: boolean;
59
- moduleIds: string[];
60
- map: SourceMap | null;
61
- sourcemapFileName: string | null;
62
- preliminaryFileName: string;
63
- }
64
- export interface RolldownOutput {
65
- output: [OutputChunk, ...(OutputChunk | OutputAsset)[]];
66
- }
@@ -1,33 +0,0 @@
1
- export interface JsonSchema {
2
- type: string;
3
- description?: string;
4
- }
5
- export interface ObjectSchema extends JsonSchema {
6
- type: 'object';
7
- properties: Record<string, Schema>;
8
- required?: string[];
9
- additionalProperties?: boolean | {
10
- type: 'string';
11
- };
12
- }
13
- export interface ArraySchema extends JsonSchema {
14
- type: 'array';
15
- items: Schema;
16
- }
17
- export interface StringConstantSchema extends JsonSchema {
18
- type: 'string';
19
- const: string;
20
- }
21
- export interface StringEnumSchema extends JsonSchema {
22
- type: 'string';
23
- enum: string[];
24
- }
25
- export interface BooleanSchema extends JsonSchema {
26
- type: 'boolean';
27
- }
28
- export type StringSchema = StringConstantSchema | StringEnumSchema;
29
- export interface AnyOfSchema {
30
- anyOf: (StringSchema | ObjectSchema | BooleanSchema | ArraySchema)[];
31
- description?: string;
32
- }
33
- export type Schema = StringSchema | ObjectSchema | ArraySchema | BooleanSchema | AnyOfSchema | JsonSchema;
@@ -1,14 +0,0 @@
1
- import { BindingSourcemap } from '../binding';
2
- import type { SourceMap } from './rolldown-output';
3
- export interface ExistingRawSourceMap {
4
- file?: string | null;
5
- mappings: string;
6
- names?: string[];
7
- sources?: (string | null)[];
8
- sourcesContent?: (string | null)[];
9
- sourceRoot?: string;
10
- version?: number;
11
- x_google_ignoreList?: number[];
12
- }
13
- export type SourceMapInput = ExistingRawSourceMap | string | null;
14
- export declare function bindingifySourcemap(map?: SourceMapInput | SourceMap): undefined | BindingSourcemap;
@@ -1,13 +0,0 @@
1
- export type MaybePromise<T> = T | Promise<T>;
2
- export interface AnyFn {
3
- (...args: any[]): any;
4
- }
5
- export interface AnyObj {
6
- }
7
- export type NullValue<T = void> = T | undefined | null | void;
8
- export type PartialNull<T> = {
9
- [P in keyof T]: T[P] | null;
10
- };
11
- export type MakeAsync<Function_> = Function_ extends (this: infer This, ...parameters: infer Arguments) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
12
- export type MaybeArray<T> = T | T[];
13
- export type StringOrRegExp = string | RegExp;
@@ -1,7 +0,0 @@
1
- declare global {
2
- interface ImportMeta {
3
- browserBuild?: boolean;
4
- }
5
- }
6
-
7
- export {};
@@ -1,4 +0,0 @@
1
- import { BindingAssetSource } from '../binding';
2
- export type AssetSource = string | Uint8Array;
3
- export declare function transformAssetSource(bindingAssetSource: BindingAssetSource): AssetSource;
4
- export declare function bindingAssetSource(source: AssetSource): BindingAssetSource;
@@ -1 +0,0 @@
1
- export declare function asyncFlatten<T>(array: T[]): Promise<T[]>;
@@ -1,7 +0,0 @@
1
- import type { BindingInputOptions } from '../binding';
2
- import { LogLevelOption } from '../log/logging';
3
- import type { InputOptions } from '../options/input-options';
4
- import type { OutputOptions } from '../options/output-options';
5
- import type { RolldownPlugin } from '../plugin';
6
- import { LogHandler } from '../types/misc';
7
- export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions, normalizedOutputPlugins: RolldownPlugin[], onLog: LogHandler, logLevel: LogLevelOption, watchMode: boolean): BindingInputOptions;
@@ -1,5 +0,0 @@
1
- import type { BindingOutputOptions } from '../binding';
2
- import type { OutputOptions } from '../options/output-options';
3
- import { SourcemapIgnoreListOption } from '../types/misc';
4
- export declare function bindingifyOutputOptions(outputOptions: OutputOptions): BindingOutputOptions;
5
- export declare function bindingifySourcemapIgnoreList(sourcemapIgnoreList: OutputOptions['sourcemapIgnoreList']): SourcemapIgnoreListOption;
@@ -1 +0,0 @@
1
- export declare function getCodeFrame(source: string, line: number, column: number): string;
@@ -1,2 +0,0 @@
1
- import { RolldownPlugin } from '../plugin';
2
- export declare function composeJsPlugins(plugins: RolldownPlugin[]): RolldownPlugin[];
@@ -1,11 +0,0 @@
1
- import { BindingBundlerOptions } from '../binding';
2
- import type { InputOptions } from '../options/input-options';
3
- import type { OutputOptions } from '../options/output-options';
4
- import { LogHandler } from '../types/misc';
5
- export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions, watchMode: boolean, isClose?: boolean): Promise<BundlerOptionWithStopWorker>;
6
- export interface BundlerOptionWithStopWorker {
7
- bundlerOptions: BindingBundlerOptions;
8
- inputOptions: InputOptions;
9
- onLog: LogHandler;
10
- stopWorkers?: () => Promise<void>;
11
- }
@@ -1,9 +0,0 @@
1
- import { Bundler } from '../binding';
2
- import type { InputOptions } from '../options/input-options';
3
- import type { OutputOptions } from '../options/output-options';
4
- export declare function createBundler(inputOptions: InputOptions, outputOptions: OutputOptions, isClose?: boolean): Promise<BundlerWithStopWorker>;
5
- export interface BundlerWithStopWorker {
6
- bundler: Bundler;
7
- stopWorkers?: () => Promise<void>;
8
- shutdown: () => void;
9
- }
@@ -1,5 +0,0 @@
1
- import type { ConfigExport } from '../types/config-export';
2
- import type { RolldownOptions } from '../types/rolldown-options';
3
- export declare function defineConfig(config: RolldownOptions): RolldownOptions;
4
- export declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
5
- export declare function defineConfig(config: ConfigExport): ConfigExport;
@@ -1,2 +0,0 @@
1
- import { BindingError } from '../binding';
2
- export declare function normalizeErrors(rawErrors: (BindingError | Error)[]): Error;
@@ -1,17 +0,0 @@
1
- import { ParallelJsPluginRegistry } from '../binding';
2
- import type { RolldownPlugin } from '../plugin';
3
- export type WorkerData = {
4
- registryId: number;
5
- pluginInfos: ParallelPluginInfo[];
6
- threadNumber: number;
7
- };
8
- type ParallelPluginInfo = {
9
- index: number;
10
- fileUrl: string;
11
- options: unknown;
12
- };
13
- export declare function initializeParallelPlugins(plugins: RolldownPlugin[]): Promise<{
14
- registry: ParallelJsPluginRegistry;
15
- stopWorkers: () => Promise<void>;
16
- } | undefined>;
17
- export {};
@@ -1,7 +0,0 @@
1
- export declare function arraify<T>(value: T | T[]): T[];
2
- export declare function isNullish(value: any): value is null | undefined | void;
3
- export declare function isPromiseLike(value: any): value is PromiseLike<any>;
4
- export declare function unimplemented(info?: string): never;
5
- export declare function unreachable(info?: string): never;
6
- export declare function unsupported(info: string): never;
7
- export declare function noop(..._args: any[]): void;
@@ -1,7 +0,0 @@
1
- import type { ObjectHook, ObjectHookMeta } from '../plugin';
2
- import { AnyFn } from '../types/utils';
3
- export declare function normalizeHook<Hook extends ObjectHook<AnyFn | string>>(hook: Hook): Hook extends ObjectHook<infer RawHook, infer CustomOptions> ? Hook extends RawHook ? never : {
4
- handler: RawHook;
5
- options: CustomOptions;
6
- meta: ObjectHookMeta;
7
- } : never;
@@ -1,13 +0,0 @@
1
- import type { InputOptions } from '../options/input-options';
2
- import type { OutputOptions } from '../options/output-options';
3
- import type { RolldownOutputPlugin, RolldownPlugin } from '../plugin';
4
- import { LogHandler } from '../types/misc';
5
- export declare const normalizePluginOption: {
6
- (plugins: InputOptions['plugins']): Promise<RolldownPlugin[]>;
7
- (plugins: OutputOptions['plugins']): Promise<RolldownOutputPlugin[]>;
8
- (plugins: unknown): Promise<any[]>;
9
- };
10
- export declare function checkOutputPluginOption(plugins: RolldownOutputPlugin[], onLog: LogHandler): RolldownOutputPlugin[];
11
- export declare function normalizePlugins<T extends RolldownPlugin>(plugins: T[], anonymousPrefix: string): T[];
12
- export declare const ANONYMOUS_PLUGIN_PREFIX = "at position ";
13
- export declare const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
@@ -1,2 +0,0 @@
1
- import type { BindingStringOrRegex } from '../binding';
2
- export declare function normalizedStringOrRegex(pattern?: Array<string | RegExp> | (string | RegExp)): BindingStringOrRegex[] | undefined;
@@ -1,2 +0,0 @@
1
- import { PluginHookNames } from '../../constants/plugin';
2
- export declare const isPluginHookName: (hookName: string) => hookName is PluginHookNames;
@@ -1,4 +0,0 @@
1
- import { BindingResolvedExternal } from '../binding';
2
- import { PartialResolvedId, ResolvedId } from '../plugin';
3
- export declare function transformResolvedExternal(bindingResolvedExternal: BindingResolvedExternal): ResolvedId['external'];
4
- export declare function bindingResolvedExternal(external: PartialResolvedId['external']): BindingResolvedExternal | undefined;
@@ -1,4 +0,0 @@
1
- import { ModuleOptions } from '..';
2
- import type { BindingModuleInfo } from '../binding';
3
- import type { ModuleInfo } from '../types/module-info';
4
- export declare function transformModuleInfo(info: BindingModuleInfo, option: ModuleOptions): ModuleInfo;
@@ -1,4 +0,0 @@
1
- import { 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 +0,0 @@
1
- import { BindingRenderedModule } from '../binding';
2
- import { RenderedModule } from '../types/rolldown-output';
3
- export declare function transformToRenderedModule(bindingRenderedModule: BindingRenderedModule): RenderedModule;
@@ -1,3 +0,0 @@
1
- import { BindingHookSideEffects } from '../binding';
2
- import { ModuleSideEffects } from '../plugin';
3
- export declare function bindingifySideEffects(sideEffects?: ModuleSideEffects): BindingHookSideEffects | undefined;
@@ -1,3 +0,0 @@
1
- import { type ExistingRawSourceMap, SourceMapInput } from '../types/sourcemap';
2
- export declare function isEmptySourcemapFiled(array: undefined | (string | null)[]): boolean;
3
- export declare function normalizeTransformHookSourcemap(id: string, originalCode: string, rawMap?: SourceMapInput): ExistingRawSourceMap | undefined;
@@ -1,11 +0,0 @@
1
- import type { BindingOutputs, JsChangedOutputs } from '../binding';
2
- import type { OutputBundle } from '../types/output-bundle';
3
- import type { RolldownOutput } from '../types/rolldown-output';
4
- export declare function transformToRollupOutput(output: BindingOutputs, changed?: ChangedOutputs): RolldownOutput;
5
- export declare function handleOutputErrors(output: BindingOutputs): void;
6
- export declare function transformToOutputBundle(output: BindingOutputs, changed: ChangedOutputs): OutputBundle;
7
- export interface ChangedOutputs {
8
- updated: Set<string>;
9
- deleted: Set<string>;
10
- }
11
- export declare function collectChangedBundle(changed: ChangedOutputs, bundle: OutputBundle): JsChangedOutputs;
@@ -1,6 +0,0 @@
1
- import type { ObjectSchema } from '../types/schema';
2
- export declare function validateCliOptions<T>(options: T): [T, string[]?];
3
- export declare function validateOption<T>(key: 'input' | 'output', options: T): void;
4
- export declare function getInputCliKeys(): string[];
5
- export declare function getOutputCliKeys(): string[];
6
- export declare function getJsonSchema(): ObjectSchema;