@rspack/test-tools 1.2.0-alpha.0 → 1.2.0-beta.0

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.
@@ -37,7 +37,7 @@ class CacheProcessor extends basic_1.BasicProcessor {
37
37
  experiments.cache.type === "persistent") {
38
38
  directory = experiments.cache.storage?.directory || directory;
39
39
  }
40
- (0, fs_extra_1.removeSync)(node_path_1.default.join(context.getSource(), directory || "node_modules/.cache"));
40
+ (0, fs_extra_1.removeSync)(node_path_1.default.resolve(context.getSource(), directory || "node_modules/.cache"));
41
41
  await super.build(context);
42
42
  }
43
43
  async run(env, context) {
@@ -63,12 +63,14 @@ class CacheRunnerFactory extends basic_1.BasicRunnerFactory {
63
63
  const nextStart = async () => {
64
64
  await compiler.close();
65
65
  compiler.createCompiler();
66
- await Promise.all(hotUpdateContext.changedFiles.map(async (file) => {
66
+ const oldChangedFiles = hotUpdateContext.changedFiles;
67
+ await Promise.all(oldChangedFiles.map(async (file) => {
67
68
  await (0, refreshModifyTime_1.refreshModifyTime)(file);
68
69
  }));
69
70
  hotUpdateContext.changedFiles = [];
70
71
  hotUpdateContext.updateIndex++;
71
72
  const stats = await compiler.build();
73
+ hotUpdateContext.changedFiles = oldChangedFiles;
72
74
  if (!stats) {
73
75
  throw new Error("Should generate stats during build");
74
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/test-tools",
3
- "version": "1.2.0-alpha.0",
3
+ "version": "1.2.0-beta.0",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -50,7 +50,7 @@
50
50
  "path-serializer": "0.3.4",
51
51
  "pretty-format": "29.7.0",
52
52
  "rimraf": "^5.0.10",
53
- "webpack": "^5.94.0",
53
+ "webpack": "5.95.0",
54
54
  "webpack-merge": "5.9.0",
55
55
  "webpack-sources": "3.2.3"
56
56
  },
@@ -101,8 +101,8 @@
101
101
  "typescript": "^5.7.2",
102
102
  "wast-loader": "^1.12.1",
103
103
  "worker-rspack-loader": "^3.1.2",
104
- "@rspack/cli": "1.2.0-alpha.0",
105
- "@rspack/core": "1.2.0-alpha.0"
104
+ "@rspack/cli": "1.2.0-beta.0",
105
+ "@rspack/core": "1.2.0-beta.0"
106
106
  },
107
107
  "peerDependencies": {
108
108
  "@rspack/core": ">=1.0.0"