@rspack/test-tools 1.4.9 → 1.4.11

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.
@@ -47,8 +47,7 @@ const creator = new creator_1.BasicCaseCreator({
47
47
  configFiles: ["rspack.config.js", "webpack.config.js"]
48
48
  }, watchState));
49
49
  },
50
- // TODO: support more concurrency
51
- concurrent: 4
50
+ concurrent: true
52
51
  });
53
52
  function createNativeWatcher(name, src, dist, temp) {
54
53
  creator.create(name, src, dist, temp);
@@ -60,7 +60,7 @@ class HotUpdatePlugin {
60
60
  }
61
61
  // default
62
62
  const { content: oldContent } = this.getContent(filePath, this.updateIndex - 1);
63
- if (content === oldContent) {
63
+ if (this.updateIndex !== 0 && content === oldContent) {
64
64
  return;
65
65
  }
66
66
  await promises_1.default.writeFile(filePath, content);
@@ -82,7 +82,8 @@ class CacheProcessor extends basic_1.BasicProcessor {
82
82
  library: { type: "commonjs2" }
83
83
  },
84
84
  optimization: {
85
- moduleIds: "named"
85
+ moduleIds: "named",
86
+ emitOnErrors: true
86
87
  },
87
88
  target: this._cacheOptions.target,
88
89
  experiments: {
@@ -233,11 +233,7 @@ class WatchStepProcessor extends WatchProcessor {
233
233
  });
234
234
  });
235
235
  // wait compiler to ready watch the files and diretories
236
- // TODO: native watcher will call ignored js function in rust
237
- // but it will block the watch step processor. Then, native watcher maybe spend more time.
238
- // So we need to wait a while to ensure the files and directories are ready.
239
- const timeout = this._watchOptions.nativeWatcher ? 500 : 100;
240
- await new Promise(resolve => setTimeout(resolve, timeout));
236
+ await new Promise(resolve => setTimeout(resolve, 100));
241
237
  (0, copyDiff_1.default)(node_path_1.default.join(context.getSource(), this._watchOptions.stepName), this._watchOptions.tempDir, false);
242
238
  await task;
243
239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/test-tools",
3
- "version": "1.4.9",
3
+ "version": "1.4.11",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "@babel/generator": "7.28.0",
36
36
  "@babel/parser": "7.28.0",
37
37
  "@babel/traverse": "7.28.0",
38
- "@babel/types": "7.28.1",
38
+ "@babel/types": "7.28.2",
39
39
  "cross-env": "^7.0.3",
40
40
  "csv-to-markdown-table": "^1.5.0",
41
41
  "deepmerge": "^4.3.1",
@@ -47,12 +47,12 @@
47
47
  "jest-diff": "^29.7.0",
48
48
  "jest-snapshot": "29.7.0",
49
49
  "jsdom": "^26.1.0",
50
- "memfs": "4.17.2",
50
+ "memfs": "4.20.0",
51
51
  "loader-utils": "^2.0.4",
52
52
  "path-serializer": "0.5.0",
53
53
  "pretty-format": "29.7.0",
54
54
  "rimraf": "^5.0.10",
55
- "source-map": "^0.7.4",
55
+ "source-map": "^0.7.6",
56
56
  "terser-webpack-plugin": "^5.3.14",
57
57
  "webpack": "5.99.9",
58
58
  "webpack-merge": "6.0.1",
@@ -62,7 +62,7 @@
62
62
  "@rspack/plugin-preact-refresh": "1.1.2",
63
63
  "@rspack/plugin-react-refresh": "^1.4.3",
64
64
  "@swc/helpers": "0.5.17",
65
- "@swc/plugin-remove-console": "^7.0.4",
65
+ "@swc/plugin-remove-console": "^9.0.0",
66
66
  "@types/babel__generator": "7.27.0",
67
67
  "@types/babel__traverse": "7.20.7",
68
68
  "@types/fs-extra": "11.0.4",
@@ -89,16 +89,16 @@
89
89
  "react-dom": "^19.1.0",
90
90
  "react-refresh": "^0.17.0",
91
91
  "sass-loader": "^16.0.5",
92
- "source-map": "^0.7.4",
92
+ "source-map": "^0.7.6",
93
93
  "source-map-loader": "^5.0.0",
94
94
  "style-loader": "^4.0.0",
95
95
  "terser": "5.43.1",
96
96
  "typescript": "^5.8.3",
97
97
  "wast-loader": "^1.14.1",
98
98
  "worker-rspack-loader": "^3.1.2",
99
- "@rspack/cli": "1.4.9",
100
- "@rspack/core": "1.4.9",
101
- "@rspack/test-tools": "1.4.9",
99
+ "@rspack/cli": "1.4.11",
100
+ "@rspack/core": "1.4.11",
101
+ "@rspack/test-tools": "1.4.11",
102
102
  "@rspack/binding-testing": "1.4.1"
103
103
  },
104
104
  "peerDependencies": {