@rspack/test-tools 1.1.2 → 1.1.4

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.
@@ -19,7 +19,7 @@ export declare class WatchProcessor<T extends ECompilerType> extends MultiTaskPr
19
19
  check(env: ITestEnv, context: ITestContext): Promise<void>;
20
20
  config(context: ITestContext): Promise<void>;
21
21
  static overrideOptions<T extends ECompilerType>({ tempDir, name, experiments, optimization }: IWatchProcessorOptions<T>): (index: number, context: ITestContext, options: TCompilerOptions<ECompilerType>) => void;
22
- static findBundle<T extends ECompilerType>(index: number, context: ITestContext, options: TCompilerOptions<T>): string | string[];
22
+ static findBundle<T extends ECompilerType>(this: IWatchProcessorOptions<T>, index: number, context: ITestContext, options: TCompilerOptions<T>): string | string[];
23
23
  }
24
24
  export interface IWatchStepProcessorOptions<T extends ECompilerType> extends Omit<IWatchProcessorOptions<T>, "experiments" | "optimization"> {
25
25
  }
@@ -171,7 +171,7 @@ class WatchProcessor extends multi_1.MultiTaskProcessor {
171
171
  static findBundle(index, context, options) {
172
172
  const testConfig = context.getTestConfig();
173
173
  if (typeof testConfig.findBundle === "function") {
174
- return testConfig.findBundle(index, options);
174
+ return testConfig.findBundle(index, options, this.stepName);
175
175
  }
176
176
  return "./bundle.js";
177
177
  }
package/dist/type.d.ts CHANGED
@@ -139,7 +139,7 @@ export type TTestConfig<T extends ECompilerType> = {
139
139
  afterExecute?: () => void;
140
140
  moduleScope?: (ms: IBasicModuleScope, stats?: TCompilerStatsCompilation<T>) => IBasicModuleScope;
141
141
  checkStats?: (stepName: string, stats: TCompilerStatsCompilation<T>) => boolean;
142
- findBundle?: (index: number, options: TCompilerOptions<T>) => string | string[];
142
+ findBundle?: (index: number, options: TCompilerOptions<T>, stepName?: string) => string | string[];
143
143
  bundlePath?: string[];
144
144
  nonEsmThis?: (p: string | string[]) => Object;
145
145
  modules?: Record<string, Object>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/test-tools",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -61,7 +61,7 @@
61
61
  "@rspack/plugin-preact-refresh": "1.1.0",
62
62
  "@rspack/plugin-react-refresh": "1.0.0",
63
63
  "@swc/helpers": "0.5.13",
64
- "@swc/plugin-remove-console": "^3.0.0",
64
+ "@swc/plugin-remove-console": "^5.0.0",
65
65
  "@types/babel__generator": "7.6.8",
66
66
  "@types/babel__traverse": "7.20.6",
67
67
  "@types/fs-extra": "11.0.4",
@@ -101,8 +101,9 @@
101
101
  "terser": "5.36.0",
102
102
  "typescript": "^5.6.3",
103
103
  "wast-loader": "^1.12.1",
104
- "@rspack/core": "1.1.2",
105
- "@rspack/cli": "1.1.2"
104
+ "worker-rspack-loader": "^3.1.2",
105
+ "@rspack/cli": "1.1.4",
106
+ "@rspack/core": "1.1.4"
106
107
  },
107
108
  "peerDependencies": {
108
109
  "@rspack/core": ">=1.0.0"