@rspack-canary/test-tools 1.6.3-canary-e52c63da-20251113070149 → 1.6.4-canary-a85877a5-20251114174101
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.
- package/dist/helper/setup-env.js +11 -2
- package/package.json +2 -2
package/dist/helper/setup-env.js
CHANGED
|
@@ -89,10 +89,19 @@ if (process.env.DEBUG_INFO) {
|
|
|
89
89
|
// eslint-disable-next-line no-global-assign
|
|
90
90
|
it = addDebugInfo(it);
|
|
91
91
|
}
|
|
92
|
+
const uncaughtExceptionListenersLength = process.listeners("uncaughtException").length;
|
|
93
|
+
const unhandledRejectionListenersLength = process.listeners("unhandledRejection").length;
|
|
92
94
|
// cspell:word wabt
|
|
93
95
|
// Workaround for a memory leak in wabt
|
|
94
96
|
// It leaks an Error object on construction
|
|
95
97
|
// so it leaks the whole stack trace
|
|
96
98
|
require("wast-loader");
|
|
97
|
-
|
|
98
|
-
process.
|
|
99
|
+
// remove the last uncaughtException / unhandledRejection listener added by wast-loader
|
|
100
|
+
const listeners = process.listeners("uncaughtException");
|
|
101
|
+
if (listeners.length > uncaughtExceptionListenersLength) {
|
|
102
|
+
process.off("uncaughtException", listeners[listeners.length - 1]);
|
|
103
|
+
}
|
|
104
|
+
const listeners1 = process.listeners("unhandledRejection");
|
|
105
|
+
if (listeners1.length > unhandledRejectionListenersLength) {
|
|
106
|
+
process.off("unhandledRejection", listeners1[listeners1.length - 1]);
|
|
107
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/test-tools",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4-canary-a85877a5-20251114174101",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Test tools for rspack",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -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.6.
|
|
68
|
+
"@rspack/core": "npm:@rspack-canary/core@1.6.4-canary-a85877a5-20251114174101"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@rspack/core": ">=1.0.0"
|