@rspack-canary/test-tools 1.6.0-canary-b6c91e1b-20251025173615 → 1.6.0-canary-aa4ad886-20251027174222

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.
@@ -279,9 +279,14 @@ class WebRunner extends node_1.NodeRunner {
279
279
  }
280
280
  const [m, code] = this.getModuleContent(file);
281
281
  this.preExecute(code, file);
282
- const script = new node_vm_1.Script(code);
283
- const vmContext = this.dom.getInternalVMContext();
284
- script.runInContext(vmContext);
282
+ try {
283
+ const script = new node_vm_1.Script(code);
284
+ const vmContext = this.dom.getInternalVMContext();
285
+ script.runInContext(vmContext);
286
+ }
287
+ catch (e) {
288
+ throw new Error(`Parse script '${file.path}' failed: ${e.message}`);
289
+ }
285
290
  this.postExecute(m, file);
286
291
  this.requireCache[file.path] = m;
287
292
  return m.exports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/test-tools",
3
- "version": "1.6.0-canary-b6c91e1b-20251025173615",
3
+ "version": "1.6.0-canary-aa4ad886-20251027174222",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -68,7 +68,7 @@
68
68
  "@types/jsdom": "^21.1.7",
69
69
  "typescript": "^5.9.3",
70
70
  "wast-loader": "^1.14.1",
71
- "@rspack/core": "npm:@rspack-canary/core@1.6.0-canary-b6c91e1b-20251025173615"
71
+ "@rspack/core": "npm:@rspack-canary/core@1.6.0-canary-aa4ad886-20251027174222"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@rspack/core": ">=1.0.0"