@rspack-canary/test-tools 1.7.3-canary-58d41d16-20260115035302 → 1.7.3-canary-1138ed18-20260115124957

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.
@@ -33,6 +33,8 @@ class LazyCompilationTestPlugin {
33
33
  resolve(null);
34
34
  });
35
35
  server.on('request', (req, res) => {
36
+ // Set CORS headers for jsdom's XMLHttpRequest
37
+ res.setHeader('Access-Control-Allow-Origin', '*');
36
38
  middleware(req, res, () => { });
37
39
  });
38
40
  server.on('connection', (socket) => {
@@ -152,7 +152,11 @@ class WebRunner extends node_1.NodeRunner {
152
152
  createBaseModuleScope() {
153
153
  const moduleScope = super.createBaseModuleScope();
154
154
  moduleScope.EventSource = EventSourceForNode_1.default;
155
- moduleScope.fetch = async (url) => {
155
+ moduleScope.fetch = async (url, options) => {
156
+ // For Lazy Compilation Proxy the POST request to the real dev server.
157
+ if (options?.method === 'POST') {
158
+ return fetch(url, options);
159
+ }
156
160
  try {
157
161
  const filePath = this.urlToPath(url);
158
162
  this.log(`fetch: ${url} -> ${filePath}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/test-tools",
3
- "version": "1.7.3-canary-58d41d16-20260115035302",
3
+ "version": "1.7.3-canary-1138ed18-20260115124957",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -35,14 +35,14 @@
35
35
  "directory": "packages/rspack-test-tools"
36
36
  },
37
37
  "dependencies": {
38
- "@babel/generator": "7.28.5",
39
- "@babel/parser": "7.28.5",
40
- "@babel/traverse": "7.28.5",
41
- "@babel/types": "7.28.5",
38
+ "@babel/generator": "7.28.6",
39
+ "@babel/parser": "7.28.6",
40
+ "@babel/traverse": "7.28.6",
41
+ "@babel/types": "7.28.6",
42
42
  "cross-env": "^10.1.0",
43
43
  "filenamify": "4.3.0",
44
44
  "fs-extra": "^11.3.3",
45
- "iconv-lite": "^0.7.1",
45
+ "iconv-lite": "^0.7.2",
46
46
  "javascript-stringify": "^2.1.0",
47
47
  "jest-diff": "^30.2.0",
48
48
  "jest-snapshot": "29.7.0",
@@ -65,7 +65,7 @@
65
65
  "@types/jsdom": "^21.1.7",
66
66
  "typescript": "^5.9.3",
67
67
  "wast-loader": "^1.14.1",
68
- "@rspack/core": "npm:@rspack-canary/core@1.7.3-canary-58d41d16-20260115035302"
68
+ "@rspack/core": "npm:@rspack-canary/core@1.7.3-canary-1138ed18-20260115124957"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@rspack/core": ">=1.0.0"