diff --git a/packages/rspack-dev-server/temp/api.md b/packages/rspack-dev-server/temp/api.md
new file mode 100644
index 00000000000..3f97d09cd2b
--- /dev/null
+++ b/packages/rspack-dev-server/temp/api.md
@@ -0,0 +1,39 @@
+## API Report File for "@rspack/dev-server"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+///
+
+import { Compiler } from '@rspack/core';
+import { DevServer as Configuration } from '@rspack/core';
+import type { FSWatcher } from 'chokidar';
+import { MultiCompiler } from '@rspack/core';
+import type { Server } from 'http';
+import type { Socket } from 'net';
+import WebpackDevServer from 'webpack-dev-server';
+
+export { Configuration }
+
+// @public (undocumented)
+export class RspackDevServer extends WebpackDevServer {
+ constructor(options: Configuration, compiler: Compiler | MultiCompiler);
+ compiler: Compiler | MultiCompiler;
+ // (undocumented)
+ initialize(): Promise;
+ // Warning: (ae-forgotten-export) The symbol "ResolvedDevServer" needs to be exported by the entry point index.d.ts
+ options: ResolvedDevServer;
+ // (undocumented)
+ server: Server;
+ // (undocumented)
+ sockets: Socket[];
+ // (undocumented)
+ staticWatchers: FSWatcher[];
+ // (undocumented)
+ webSocketServer: WebpackDevServer.WebSocketServerImplementation | undefined;
+}
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/packages/rspack-plugin-react-refresh/temp/api.md b/packages/rspack-plugin-react-refresh/temp/api.md
new file mode 100644
index 00000000000..c9b4e1aa2df
--- /dev/null
+++ b/packages/rspack-plugin-react-refresh/temp/api.md
@@ -0,0 +1,17 @@
+## API Report File for "@rspack/plugin-react-refresh"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+// @public (undocumented)
+export type PluginOptions = {
+ include?: string | RegExp | (string | RegExp)[] | null;
+ exclude?: string | RegExp | (string | RegExp)[] | null;
+ library?: string;
+ forceEnable?: boolean;
+};
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/packages/rspack-test-tools/temp/api.md b/packages/rspack-test-tools/temp/api.md
new file mode 100644
index 00000000000..5fecd25ea71
--- /dev/null
+++ b/packages/rspack-test-tools/temp/api.md
@@ -0,0 +1,1162 @@
+## API Report File for "@rspack/test-tools"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+///
+///
+
+import { Compiler } from '@rspack/core';
+import { Compiler as Compiler_2 } from 'webpack';
+import type { Configuration } from 'webpack';
+import EventEmitter from 'events';
+import { ITestCompilerManager as ITestCompilerManager_2 } from '../type';
+import { RspackOptions } from '@rspack/core';
+import { RspackOptionsNormalized } from '@rspack/core';
+import { RspackPluginInstance } from '@rspack/core';
+import { Stats } from '@rspack/core';
+import type { Stats as Stats_2 } from 'webpack';
+import { StatsCompilation } from '@rspack/core';
+import { WebpackOptionsNormalized } from 'webpack';
+
+// @public (undocumented)
+export class BasicRunnerFactory implements TRunnerFactory {
+ constructor(name: string, context: ITestContext);
+ // (undocumented)
+ protected context: ITestContext;
+ // (undocumented)
+ create(file: string, compilerOptions: TCompilerOptions, env: ITestEnv): ITestRunner;
+ // (undocumented)
+ protected createRunner(file: string, compilerOptions: TCompilerOptions, env: ITestEnv): ITestRunner;
+ // (undocumented)
+ protected getRunnerKey(file: string): string;
+ // (undocumented)
+ protected name: string;
+}
+
+// @public (undocumented)
+export class BasicTaskProcessor implements ITestProcessor {
+ constructor(_options: IBasicProcessorOptions);
+ // (undocumented)
+ after(context: ITestContext): Promise;
+ // (undocumented)
+ afterAll(context: ITestContext): Promise;
+ // (undocumented)
+ before(context: ITestContext): Promise;
+ // (undocumented)
+ beforeAll(context: ITestContext): Promise;
+ // (undocumented)
+ build(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ config(context: ITestContext): Promise;
+ // (undocumented)
+ protected getCompiler(context: ITestContext): ITestCompilerManager_2;
+ // (undocumented)
+ protected _options: IBasicProcessorOptions;
+ // (undocumented)
+ run(env: ITestEnv, context: ITestContext): Promise;
+}
+
+// @public (undocumented)
+export function compareContent(sourceContent: string | false, distContent: string | false, compareOptions: ICompareOptions): TCompareResult;
+
+// @public (undocumented)
+export function compareFile(sourceFile: string, distFile: string, compareOptions: ICompareOptions): TFileCompareResult;
+
+// @public (undocumented)
+export function compareModules(modules: string[], sourceModules: Map, distModules: Map, compareOptions: ICompareOptions): TModuleCompareResult[];
+
+// @public (undocumented)
+export function createBuiltinCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createConfigCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createDefaultsCase(src: string): void;
+
+// @public (undocumented)
+export function createDiagnosticCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createDiffCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createHashCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createHotCase(name: string, src: string, dist: string, target: TCompilerOptions["target"]): void;
+
+// @public (undocumented)
+export function createHotStepCase(name: string, src: string, dist: string, target: TCompilerOptions["target"]): void;
+
+// @public (undocumented)
+export function createNormalCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createStatsCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createTreeShakingCase(name: string, src: string, dist: string): void;
+
+// @public (undocumented)
+export function createWatchCase(name: string, src: string, dist: string, temp: string): void;
+
+// @public (undocumented)
+export class DefaultsConfigTaskProcessor extends SimpleTaskProcessor {
+ constructor(_defaultsConfigOptions: IDefaultsConfigProcessorOptions);
+ // (undocumented)
+ static addSnapshotSerializer(): void;
+ // (undocumented)
+ after(context: ITestContext): Promise;
+ // (undocumented)
+ afterAll(context: ITestContext): Promise;
+ // (undocumented)
+ before(context: ITestContext): Promise;
+ // (undocumented)
+ beforeAll(context: ITestContext): Promise;
+ // (undocumented)
+ build(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ protected _defaultsConfigOptions: IDefaultsConfigProcessorOptions;
+ // (undocumented)
+ protected getCompiler(context: ITestContext): ITestCompilerManager_2;
+ // (undocumented)
+ static getDefaultConfig(cwd: string, config: TCompilerOptions): TCompilerOptions;
+ // (undocumented)
+ run(env: ITestEnv, context: ITestContext): Promise;
+}
+
+// @public (undocumented)
+export function describeByWalk(name: string, sourceBase: string, distBase: string, createCase: (name: string, src: string, dist: string) => void, whitelist?: {
+ cat?: RegExp;
+ case?: RegExp;
+}): void;
+
+// @public (undocumented)
+export class DiffComparator {
+ constructor(options: IDiffComparatorOptions);
+ // (undocumented)
+ compare(): Promise;
+}
+
+// @public (undocumented)
+export class DiffHtmlReporter implements ITestReporter {
+ constructor(options: IDiffHtmlReporterOptions);
+ // (undocumented)
+ failure(id: string): Promise;
+ // (undocumented)
+ increment(id: string, data: TModuleCompareResult[]): Promise;
+ // (undocumented)
+ init(data?: TModuleCompareResult[]): Promise;
+ // (undocumented)
+ output(): Promise;
+}
+
+// @public (undocumented)
+export class DiffProcessor implements ITestProcessor {
+ constructor(options: IDiffProcessorOptions);
+ // (undocumented)
+ build(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ config(context: ITestContext): Promise;
+}
+
+// @public (undocumented)
+export class DiffStatsReporter implements ITestReporter {
+ constructor(options: IDiffStatsReporterOptions);
+ // (undocumented)
+ failure(id: string): Promise;
+ // (undocumented)
+ increment(id: string, data: TModuleCompareResult[]): Promise;
+ // (undocumented)
+ init(data?: TModuleCompareResult[]): Promise;
+ // (undocumented)
+ output(): Promise;
+}
+
+// @public (undocumented)
+export enum ECompareResultType {
+ // (undocumented)
+ Different = "different",
+ // (undocumented)
+ Missing = "missing",
+ // (undocumented)
+ OnlyDist = "only-dist",
+ // (undocumented)
+ OnlySource = "only-source",
+ // (undocumented)
+ Same = "same"
+}
+
+// @public (undocumented)
+export enum ECompilerType {
+ // (undocumented)
+ Rspack = "rspack",
+ // (undocumented)
+ Webpack = "webpack"
+}
+
+// @public (undocumented)
+export enum EEsmMode {
+ // (undocumented)
+ Evaluated = 1,
+ // (undocumented)
+ Unknown = 0,
+ // (undocumented)
+ Unlinked = 2
+}
+
+// @public (undocumented)
+export function formatCode(name: string, raw: string, options: IFormatCodeOptions): string;
+
+// @public (undocumented)
+export class HotRunnerFactory extends BasicRunnerFactory {
+ // (undocumented)
+ protected createRunner(file: string, compilerOptions: TCompilerOptions, env: ITestEnv): ITestRunner;
+}
+
+// @public (undocumented)
+export class HotStepRunnerFactory extends HotRunnerFactory {
+ // (undocumented)
+ protected createRunner(file: string, compilerOptions: TCompilerOptions, env: ITestEnv): ITestRunner;
+}
+
+// @public (undocumented)
+export interface IBasicGlobalContext {
+ // (undocumented)
+ [key: string]: any;
+ // (undocumented)
+ clearTimeout: typeof clearTimeout;
+ // (undocumented)
+ console: Console;
+ // (undocumented)
+ expect: jest.Expect;
+ // (undocumented)
+ setTimeout: typeof setTimeout;
+}
+
+// @public (undocumented)
+export interface IBasicModuleScope extends ITestEnv {
+ // (undocumented)
+ [key: string]: any;
+ // (undocumented)
+ console: Console;
+ // (undocumented)
+ expect: jest.Expect;
+ // (undocumented)
+ jest: typeof jest;
+}
+
+// @public (undocumented)
+export interface IBasicProcessorOptions {
+ // (undocumented)
+ compilerType: T;
+ // (undocumented)
+ configFiles?: string[];
+ // (undocumented)
+ defaultOptions?: (context: ITestContext) => TCompilerOptions;
+ // (undocumented)
+ findBundle?: (context: ITestContext, options: TCompilerOptions) => string[] | string | void;
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ overrideOptions?: (context: ITestContext, options: TCompilerOptions) => void;
+ // (undocumented)
+ runable: boolean;
+}
+
+// @public (undocumented)
+export interface IBasicRunnerOptions {
+ // (undocumented)
+ compilerOptions: TCompilerOptions;
+ // (undocumented)
+ dist: string;
+ // (undocumented)
+ env: ITestEnv;
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ runInNewContext?: boolean;
+ // (undocumented)
+ source: string;
+ // (undocumented)
+ stats?: TCompilerStats;
+ // (undocumented)
+ testConfig: TTestConfig;
+}
+
+// @public (undocumented)
+export interface ICompareOptions {
+ // (undocumented)
+ bootstrap?: boolean;
+ // (undocumented)
+ detail?: boolean;
+ // (undocumented)
+ format: IFormatCodeOptions;
+ // (undocumented)
+ modules?: TCompareModules;
+ // (undocumented)
+ renameModule?: (name: string) => string;
+ // (undocumented)
+ runtimeModules?: TCompareModules;
+}
+
+// @public (undocumented)
+export interface IDefaultsConfigProcessorOptions {
+ // (undocumented)
+ cwd?: string;
+ // (undocumented)
+ diff: (diff: any, defaults: any) => Promise;
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ options?: (context: ITestContext) => TCompilerOptions;
+}
+
+// @public (undocumented)
+export interface IDiffComparatorOptions {
+ // (undocumented)
+ bootstrap?: boolean;
+ // (undocumented)
+ files: string[];
+ // (undocumented)
+ formatOptions?: IFormatCodeOptions;
+ // (undocumented)
+ modules?: TCompareModules;
+ // (undocumented)
+ reporters: ITestReporter[];
+ // (undocumented)
+ rspackDist: string;
+ // (undocumented)
+ runtimeModules?: TCompareModules;
+ // (undocumented)
+ webpackDist: string;
+}
+
+// @public (undocumented)
+export interface IDiffHtmlReporterOptions {
+ // (undocumented)
+ dist: string;
+ // (undocumented)
+ ignore?: RegExp;
+}
+
+// @public (undocumented)
+export interface IDiffProcessorOptions extends IFormatCodeOptions {
+ // (undocumented)
+ bootstrap?: boolean;
+ // (undocumented)
+ detail?: boolean;
+ // (undocumented)
+ files?: string[];
+ // (undocumented)
+ modules?: TCompareModules;
+ // (undocumented)
+ onCompareFile?: (file: string, result: TFileCompareResult) => void;
+ // (undocumented)
+ onCompareModules?: (file: string, results: TModuleCompareResult[]) => void;
+ // (undocumented)
+ onCompareRuntimeModules?: (file: string, results: TModuleCompareResult[]) => void;
+ // (undocumented)
+ rspackPath: string;
+ // (undocumented)
+ runtimeModules?: TCompareModules;
+ // (undocumented)
+ webpackPath: string;
+}
+
+// @public (undocumented)
+export interface IDiffStatsReporterOptions {
+ // (undocumented)
+ file: string;
+ // (undocumented)
+ footer?: string[];
+ // (undocumented)
+ header?: string[];
+ // (undocumented)
+ report?: boolean;
+}
+
+// @public (undocumented)
+export interface IFormatCodeOptions {
+ // (undocumented)
+ ignoreBlockOnlyStatement: boolean;
+ // (undocumented)
+ ignoreCssFilePath: boolean;
+ // (undocumented)
+ ignoreIfCertainCondition: boolean;
+ // (undocumented)
+ ignoreModuleArguments: boolean;
+ // (undocumented)
+ ignoreModuleId: boolean;
+ // (undocumented)
+ ignoreObjectPropertySequence: boolean;
+ // (undocumented)
+ ignorePropertyQuotationMark: boolean;
+ // (undocumented)
+ ignoreSwcHelpersPath: boolean;
+ // (undocumented)
+ replacements?: Record;
+}
+
+// @public (undocumented)
+export interface IMultiTaskProcessorOptions {
+ // (undocumented)
+ compilerType: ECompilerType.Rspack;
+ // (undocumented)
+ configFiles?: string[];
+ // (undocumented)
+ defaultOptions?: (index: number, context: ITestContext) => TCompilerOptions;
+ // (undocumented)
+ findBundle?: (index: number, context: ITestContext, options: TCompilerOptions) => string[] | string | void;
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ overrideOptions?: (index: number, context: ITestContext, options: TCompilerOptions) => void;
+ // (undocumented)
+ runable: boolean;
+}
+
+// @public (undocumented)
+export interface IRspackBuiltinProcessorOptions {
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ snapshot: string;
+ // (undocumented)
+ snapshotFileFilter?: ISnapshotProcessorOptions["snapshotFileFilter"];
+}
+
+// @public (undocumented)
+export interface IRspackConfigProcessorOptions {
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ runable: boolean;
+}
+
+// @public (undocumented)
+export interface IRspackDiagnosticProcessorOptions {
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ root: string;
+}
+
+// @public (undocumented)
+export interface IRspackHashProcessorOptions {
+ // (undocumented)
+ name: string;
+}
+
+// @public (undocumented)
+export interface IRspackHotProcessorOptions {
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ target: TCompilerOptions["target"];
+}
+
+// @public (undocumented)
+export interface IRspackHotStepProcessorOptions extends IRspackHotProcessorOptions {
+}
+
+// @public (undocumented)
+export interface IRspackStatsProcessorOptions {
+ // (undocumented)
+ name: string;
+}
+
+// @public (undocumented)
+export interface IRspackWatchProcessorOptions {
+ // Warning: (ae-forgotten-export) The symbol "TRspackExperiments" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ experiments?: TRspackExperiments;
+ // (undocumented)
+ name: string;
+ // Warning: (ae-forgotten-export) The symbol "TRspackOptimization" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ optimization?: TRspackOptimization;
+ // (undocumented)
+ runable: boolean;
+ // (undocumented)
+ stepName: string;
+ // (undocumented)
+ tempDir: string;
+}
+
+// @public (undocumented)
+export interface IRspackWatchStepProcessorOptions {
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ runable: boolean;
+ // (undocumented)
+ stepName: string;
+ // (undocumented)
+ tempDir: string;
+}
+
+// @public (undocumented)
+export const isDirectory: (p: string) => boolean;
+
+// @public (undocumented)
+export interface ISimpleProcessorOptions {
+ // (undocumented)
+ build?: (context: ITestContext, compiler: TCompiler) => Promise;
+ // (undocumented)
+ check?: (context: ITestContext, compiler: TCompiler, stats: TCompilerStats) => Promise;
+ // (undocumented)
+ compiler?: (context: ITestContext, compiler: TCompiler) => Promise;
+ // (undocumented)
+ compilerType: T;
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ options?: (context: ITestContext) => TCompilerOptions;
+}
+
+// @public (undocumented)
+export interface ISnapshotProcessorOptions extends IBasicProcessorOptions {
+ // (undocumented)
+ snapshot: string;
+ // (undocumented)
+ snapshotFileFilter?: (file: string) => boolean;
+}
+
+// @public (undocumented)
+export interface IStatsAPITaskProcessorOptions {
+ // (undocumented)
+ build?: (context: ITestContext, compiler: TCompiler) => Promise;
+ // (undocumented)
+ check?: (stats: TCompilerStats, compiler: TCompiler) => Promise;
+ // (undocumented)
+ compilerType: T;
+ // (undocumented)
+ cwd?: string;
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ options?: (context: ITestContext) => TCompilerOptions;
+}
+
+// @public (undocumented)
+export const isValidCaseDirectory: (name: string) => boolean;
+
+// @public (undocumented)
+export interface ITestCompilerManager {
+ // (undocumented)
+ build(): Promise>;
+ // (undocumented)
+ close(): Promise;
+ // (undocumented)
+ createCompiler(): TCompiler;
+ // (undocumented)
+ getCompiler(): TCompiler | null;
+ // (undocumented)
+ getEmitter(): EventEmitter;
+ // (undocumented)
+ getOptions(): TCompilerOptions;
+ // (undocumented)
+ getStats(): TCompilerStats | null;
+ // (undocumented)
+ mergeOptions(newOptions: TCompilerOptions): TCompilerOptions;
+ // (undocumented)
+ setOptions(newOptions: TCompilerOptions): TCompilerOptions;
+ // (undocumented)
+ watch(timeout?: number): void;
+}
+
+// @public (undocumented)
+export interface ITestContext {
+ // (undocumented)
+ clearError(name?: string): void;
+ // (undocumented)
+ emitError(name: string, err: Error | string): void;
+ // (undocumented)
+ getCompiler(name: string, type: T | void): ITestCompilerManager;
+ // (undocumented)
+ getDist(sub?: string): string;
+ // (undocumented)
+ getError(name?: string): Error[];
+ // (undocumented)
+ getNames(): string[];
+ // (undocumented)
+ getRunner(key: string): ITestRunner | null;
+ // (undocumented)
+ getRunnerFactory(name: string): TRunnerFactory | null;
+ // (undocumented)
+ getSource(sub?: string): string;
+ // (undocumented)
+ getTemp(sub?: string): string | null;
+ // (undocumented)
+ getTestConfig(): TTestConfig;
+ // (undocumented)
+ getValue(name: string, key: string): T | void;
+ // (undocumented)
+ hasError(name?: string): boolean;
+ // (undocumented)
+ setRunner(key: string, runner: ITestRunner): void;
+ // (undocumented)
+ setValue(name: string, key: string, value: T): void;
+}
+
+// @public (undocumented)
+export interface ITestEnv {
+ // (undocumented)
+ afterEach: (...args: any[]) => void;
+ // (undocumented)
+ beforeEach: (...args: any[]) => void;
+ // (undocumented)
+ it: (...args: any[]) => void;
+}
+
+// @public (undocumented)
+export interface ITester {
+ // (undocumented)
+ check(env: ITestEnv): Promise;
+ // (undocumented)
+ compile(): Promise;
+ // (undocumented)
+ next(): boolean;
+ // (undocumented)
+ prepare(): Promise;
+ // (undocumented)
+ resume(): Promise;
+ // (undocumented)
+ step: number;
+ // (undocumented)
+ total: number;
+}
+
+// @public (undocumented)
+export interface ITesterConfig {
+ // (undocumented)
+ dist: string;
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ runnerFactory?: new (name: string, context: ITestContext) => TRunnerFactory;
+ // (undocumented)
+ src: string;
+ // (undocumented)
+ steps?: ITestProcessor[];
+ // (undocumented)
+ temp?: string;
+ // (undocumented)
+ testConfig?: TTestConfig;
+}
+
+// @public (undocumented)
+export interface ITestLoader {
+ // (undocumented)
+ walk(): Promise;
+}
+
+// @public (undocumented)
+export interface ITestProcessor {
+ // (undocumented)
+ after?(context: ITestContext): Promise;
+ // (undocumented)
+ afterAll?(context: ITestContext): Promise;
+ // (undocumented)
+ before?(context: ITestContext): Promise;
+ // (undocumented)
+ beforeAll?(context: ITestContext): Promise;
+ // (undocumented)
+ build?(context: ITestContext): Promise;
+ // (undocumented)
+ check?(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler?(context: ITestContext): Promise;
+ // (undocumented)
+ config?(context: ITestContext): Promise;
+ // (undocumented)
+ run?(env: ITestEnv, context: ITestContext): Promise;
+}
+
+// @public (undocumented)
+export interface ITestReporter {
+ // (undocumented)
+ failure(id: string): Promise;
+ // (undocumented)
+ increment(id: string, data: T): Promise;
+ // (undocumented)
+ init(data?: T): Promise;
+ // (undocumented)
+ output(): Promise;
+}
+
+// @public (undocumented)
+export interface ITestRunner {
+ // (undocumented)
+ getRequire(): TRunnerRequirer;
+ // (undocumented)
+ run(file: string): Promise;
+}
+
+// @public (undocumented)
+export class MultipleRunnerFactory extends BasicRunnerFactory {
+ // (undocumented)
+ protected createRunner(file: string, compilerOptions: TCompilerOptions, env: ITestEnv): ITestRunner;
+ // (undocumented)
+ protected getFileIndexHandler(file: string): {
+ getIndex: () => number[];
+ flagIndex: () => Set;
+ };
+ // (undocumented)
+ protected getRunnerKey(file: string): string;
+ // (undocumented)
+ protected runned: Set;
+}
+
+// @public (undocumented)
+export class MultiTaskProcessor extends BasicTaskProcessor implements ITestProcessor {
+ constructor(_multiOptions: IMultiTaskProcessorOptions);
+ // (undocumented)
+ config(context: ITestContext): Promise;
+ // (undocumented)
+ protected multiCompilerOptions: TCompilerOptions[];
+ // (undocumented)
+ protected _multiOptions: IMultiTaskProcessorOptions;
+}
+
+// @public (undocumented)
+export class NormalRunnerFactory extends BasicRunnerFactory {
+ // (undocumented)
+ protected createRunner(file: string, compilerOptions: TCompilerOptions, env: ITestEnv): ITestRunner;
+}
+
+// @public (undocumented)
+export function parseModules(content: string, options?: {
+ bootstrap?: boolean;
+}): {
+ modules: Map;
+ runtimeModules: Map;
+};
+
+// @public (undocumented)
+export function readConfigFile(files: string[]): TCompilerOptions[];
+
+// @public (undocumented)
+export function replaceModuleArgument(raw: string): string;
+
+// @public (undocumented)
+export function replaceRuntimeModuleName(raw: string): string;
+
+// @public (undocumented)
+export class RspackBuiltinProcessor extends SnapshotProcessor {
+ constructor(_builtinOptions: IRspackBuiltinProcessorOptions);
+ // (undocumented)
+ protected _builtinOptions: IRspackBuiltinProcessorOptions;
+ // (undocumented)
+ static defaultOptions(context: ITestContext): TCompilerOptions;
+}
+
+// @public (undocumented)
+export class RspackConfigProcessor extends MultiTaskProcessor {
+ constructor(options: IRspackConfigProcessorOptions);
+ // (undocumented)
+ static defaultOptions(index: number, context: ITestContext): TCompilerOptions;
+ // (undocumented)
+ static findBundle(index: number, context: ITestContext, options: TCompilerOptions): string | string[] | undefined;
+ // (undocumented)
+ static overrideOptions(index: number, context: ITestContext, options: TCompilerOptions): void;
+}
+
+// @public (undocumented)
+export class RspackDiagnosticProcessor extends BasicTaskProcessor {
+ constructor(_diagnosticOptions: IRspackDiagnosticProcessorOptions);
+ // (undocumented)
+ after(context: ITestContext): Promise;
+ // (undocumented)
+ before(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ static defaultOptions(context: ITestContext): TCompilerOptions;
+ // (undocumented)
+ protected _diagnosticOptions: IRspackDiagnosticProcessorOptions;
+}
+
+// @public (undocumented)
+export class RspackDiffConfigPlugin implements RspackPluginInstance {
+ constructor(modifier?: ((options: RspackOptionsNormalized) => RspackOptionsNormalized) | undefined);
+ // (undocumented)
+ apply(compiler: Compiler): void;
+ // (undocumented)
+ name: string;
+}
+
+// @public (undocumented)
+export class RspackHashProcessor extends MultiTaskProcessor {
+ constructor(options: IRspackHashProcessorOptions);
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ static defaultOptions(index: number, context: ITestContext): TCompilerOptions;
+ // (undocumented)
+ static overrideOptions(index: number, context: ITestContext, options: TCompilerOptions): void;
+}
+
+// @public (undocumented)
+export class RspackHotProcessor extends BasicTaskProcessor {
+ constructor(_hotOptions: IRspackHotProcessorOptions);
+ // (undocumented)
+ static defaultOptions(hotOptions: IRspackHotProcessorOptions, updateOptions: TUpdateOptions): IBasicProcessorOptions["defaultOptions"];
+ // (undocumented)
+ static findBundle(hotOptions: IRspackHotProcessorOptions): IBasicProcessorOptions["findBundle"];
+ // (undocumented)
+ protected _hotOptions: IRspackHotProcessorOptions;
+ // (undocumented)
+ static overrideOptions(hotOptions: IRspackHotProcessorOptions, updateOptions: TUpdateOptions): IBasicProcessorOptions["overrideOptions"];
+ // (undocumented)
+ run(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ protected runner: ITestRunner | null;
+ // (undocumented)
+ protected updateOptions: TUpdateOptions;
+}
+
+// @public (undocumented)
+export class RspackHotStepProcessor extends RspackHotProcessor {
+ constructor(_hotOptions: IRspackHotProcessorOptions);
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ protected _hotOptions: IRspackHotProcessorOptions;
+ // (undocumented)
+ protected matchStepSnapshot(context: ITestContext, step: number, stats: StatsCompilation): void;
+ // (undocumented)
+ run(env: ITestEnv, context: ITestContext): Promise;
+}
+
+// @public (undocumented)
+export class RspackStatsProcessor extends MultiTaskProcessor {
+ constructor(options: IRspackStatsProcessorOptions);
+ // (undocumented)
+ after(context: ITestContext): Promise;
+ // (undocumented)
+ before(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ static defaultOptions(index: number, context: ITestContext): TCompilerOptions;
+ // (undocumented)
+ static overrideOptions(index: number, context: ITestContext, options: TCompilerOptions): void;
+}
+
+// @public (undocumented)
+export class RspackWatchProcessor extends MultiTaskProcessor {
+ constructor(_watchOptions: IRspackWatchProcessorOptions);
+ // (undocumented)
+ build(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ protected currentTriggerFilename: string | null;
+ // (undocumented)
+ protected lastHash: string | null;
+ // (undocumented)
+ static overrideOptions({ tempDir, name, experiments, optimization }: IRspackWatchProcessorOptions): (index: number, context: ITestContext, options: TCompilerOptions) => void;
+ // (undocumented)
+ run(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ protected _watchOptions: IRspackWatchProcessorOptions;
+}
+
+// @public (undocumented)
+export class RspackWatchStepProcessor extends RspackWatchProcessor {
+ constructor(_watchOptions: IRspackWatchStepProcessorOptions);
+ // (undocumented)
+ build(context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ protected _watchOptions: IRspackWatchStepProcessorOptions;
+}
+
+// @public (undocumented)
+export class SimpleTaskProcessor implements ITestProcessor {
+ constructor(_options: ISimpleProcessorOptions);
+ // (undocumented)
+ after(context: ITestContext): Promise;
+ // (undocumented)
+ afterAll(context: ITestContext): Promise;
+ // (undocumented)
+ before(context: ITestContext): Promise;
+ // (undocumented)
+ beforeAll(context: ITestContext): Promise;
+ // (undocumented)
+ build(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ config(context: ITestContext): Promise;
+ // (undocumented)
+ protected getCompiler(context: ITestContext): ITestCompilerManager_2;
+ // (undocumented)
+ protected _options: ISimpleProcessorOptions;
+ // (undocumented)
+ run(env: ITestEnv, context: ITestContext): Promise;
+}
+
+// @public (undocumented)
+export class SnapshotProcessor extends BasicTaskProcessor {
+ constructor(_snapshotOptions: ISnapshotProcessorOptions);
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ protected _snapshotOptions: ISnapshotProcessorOptions;
+}
+
+// @public (undocumented)
+export class StatsAPITaskProcessor extends SimpleTaskProcessor {
+ constructor(_statsAPIOptions: IStatsAPITaskProcessorOptions);
+ // (undocumented)
+ static addSnapshotSerializer(): void;
+ // (undocumented)
+ after(context: ITestContext): Promise;
+ // (undocumented)
+ before(context: ITestContext): Promise;
+ // (undocumented)
+ check(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ compiler(context: ITestContext): Promise;
+ // (undocumented)
+ run(env: ITestEnv, context: ITestContext): Promise;
+ // (undocumented)
+ protected _statsAPIOptions: IStatsAPITaskProcessorOptions;
+}
+
+// @public (undocumented)
+export type TBasicRunnerFile = {
+ path: string;
+ content: string;
+ subPath: string;
+};
+
+// @public (undocumented)
+export type TCaseSummary = Record;
+
+// @public (undocumented)
+export type TCaseSummaryId = `${TCompilerTypeId}|${TModuleTypeId}|${TDimenTypeId}`;
+
+// @public (undocumented)
+export type TCompareModules = string[] | true;
+
+// @public (undocumented)
+export type TCompareResult = {
+ type: ECompareResultType;
+ detail?: unknown;
+ source?: string;
+ dist?: string;
+ lines?: {
+ common: number;
+ source: number;
+ dist: number;
+ };
+};
+
+// @public (undocumented)
+export type TCompiler = T extends ECompilerType.Rspack ? Compiler : Compiler_2;
+
+// @public (undocumented)
+export type TCompilerFactory = (options: TCompilerOptions | TCompilerOptions[]) => TCompiler;
+
+// @public (undocumented)
+export type TCompilerOptions = T extends ECompilerType.Rspack ? RspackOptions : Configuration;
+
+// @public (undocumented)
+export type TCompilerStats = T extends ECompilerType.Rspack ? Stats : Stats_2;
+
+// @public (undocumented)
+export type TCompilerTypeId = ECompilerType.Rspack | ECompilerType.Webpack | "common";
+
+// @public (undocumented)
+export type TDiffStats = {
+ root: string;
+ data: Array;
+};
+
+// @public (undocumented)
+export type TDiffStatsItem = {
+ name: string;
+ source: string;
+ dist: string;
+ type: ECompareResultType;
+};
+
+// @public (undocumented)
+export type TDimenTypeId = "modules" | "lines" | "lines-in-common";
+
+// @public (undocumented)
+export class TestContext implements ITestContext {
+ constructor(config: TTestContextOptions);
+ // (undocumented)
+ clearError(name?: string): void;
+ // (undocumented)
+ protected compilers: Map>;
+ // (undocumented)
+ emitError(name: string, err: Error | string): void;
+ // (undocumented)
+ protected errors: Map;
+ // (undocumented)
+ getCompiler(name: string, type: T | void): ITestCompilerManager;
+ // (undocumented)
+ getDist(sub?: string): string;
+ // (undocumented)
+ getError(name?: string): Error[];
+ // (undocumented)
+ getNames(): string[];
+ // (undocumented)
+ getRunner(key: string): ITestRunner | null;
+ // (undocumented)
+ getRunnerFactory(name: string): TRunnerFactory | null;
+ // (undocumented)
+ getSource(sub?: string): string;
+ // (undocumented)
+ getTemp(sub?: string): string | null;
+ // (undocumented)
+ getTestConfig(): TTestConfig;
+ // (undocumented)
+ getValue(name: string, key: string): T | void;
+ // (undocumented)
+ hasError(name?: string): boolean;
+ // (undocumented)
+ protected runnerFactory: TRunnerFactory | null;
+ // (undocumented)
+ protected runners: Map;
+ // (undocumented)
+ setRunner(key: string, runner: ITestRunner): void;
+ // (undocumented)
+ setValue(name: string, key: string, value: T): void;
+ // (undocumented)
+ protected store: Map>;
+}
+
+// @public (undocumented)
+export class Tester implements ITester {
+ constructor(config: ITesterConfig);
+ // (undocumented)
+ check(env: ITestEnv): Promise;
+ // (undocumented)
+ compile(): Promise;
+ // (undocumented)
+ next(): boolean;
+ // (undocumented)
+ prepare(): Promise;
+ // (undocumented)
+ resume(): Promise;
+ // (undocumented)
+ step: number;
+ // (undocumented)
+ total: number;
+}
+
+// @public (undocumented)
+export type TFileCompareResult = TCompareResult & {
+ file: {
+ source: string;
+ dist: string;
+ };
+ modules: Partial>;
+};
+
+// @public (undocumented)
+export type TModuleCompareResult = TCompareResult & {
+ name: string;
+};
+
+// @public (undocumented)
+export type TModuleTypeId = "normal" | "runtime";
+
+// @public (undocumented)
+export interface TRunnerFactory {
+ // (undocumented)
+ create(file: string, compilerOptions: TCompilerOptions, env: ITestEnv): ITestRunner;
+}
+
+// @public (undocumented)
+export type TRunnerRequirer = (currentDirectory: string, modulePath: string[] | string, context?: {
+ file?: TBasicRunnerFile;
+ esmMode?: EEsmMode;
+}) => Object | Promise