@rspack-canary/test-tools 1.6.7-canary-3faa835a-20251204182618 → 1.6.7-canary-5041023c-20251206175847
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/directory.js
CHANGED
|
@@ -18,7 +18,7 @@ function describeByWalk(testFile, createCase, options = {}) {
|
|
|
18
18
|
const describeFn = options.describe || describe;
|
|
19
19
|
const testBasename = node_path_1.default
|
|
20
20
|
.basename(testFile)
|
|
21
|
-
.replace(
|
|
21
|
+
.replace(/(\.part\d+)?\.(diff|hot)?test\.(j|t)s/, "");
|
|
22
22
|
const testId = testBasename.charAt(0).toLowerCase() + testBasename.slice(1);
|
|
23
23
|
const sourceBase = options.source || node_path_1.default.join(node_path_1.default.dirname(testFile), `${testId}Cases`);
|
|
24
24
|
const testSourceId = node_path_1.default.basename(sourceBase);
|
|
@@ -116,6 +116,7 @@ class HotUpdatePlugin {
|
|
|
116
116
|
return this.tempDir;
|
|
117
117
|
}
|
|
118
118
|
apply(compiler) {
|
|
119
|
+
const RuntimeGlobals = compiler.rspack.RuntimeGlobals;
|
|
119
120
|
const options = compiler.options;
|
|
120
121
|
options.context = this.tempDir;
|
|
121
122
|
options.module.rules ??= [];
|
|
@@ -134,14 +135,14 @@ class HotUpdatePlugin {
|
|
|
134
135
|
});
|
|
135
136
|
compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
|
|
136
137
|
compilation.hooks.additionalTreeRuntimeRequirements.tap(PLUGIN_NAME, (_chunk, set) => {
|
|
137
|
-
set.add(compiler.
|
|
138
|
+
set.add(compiler.rspack.RuntimeGlobals.moduleCache);
|
|
138
139
|
});
|
|
139
140
|
compilation.hooks.runtimeModule.tap(PLUGIN_NAME, (module, _set) => {
|
|
140
141
|
if (module.constructorName === "DefinePropertyGettersRuntimeModule") {
|
|
141
142
|
module.source.source = Buffer.from(`
|
|
142
|
-
|
|
143
|
+
${RuntimeGlobals.definePropertyGetters} = function (exports, definition) {
|
|
143
144
|
for (var key in definition) {
|
|
144
|
-
if (
|
|
145
|
+
if (${RuntimeGlobals.hasOwnProperty}(definition, key) && !${RuntimeGlobals.hasOwnProperty}(exports, key)) {
|
|
145
146
|
Object.defineProperty(exports, key, { configurable: true, enumerable: true, get: definition[key] });
|
|
146
147
|
}
|
|
147
148
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/test-tools",
|
|
3
|
-
"version": "1.6.7-canary-
|
|
3
|
+
"version": "1.6.7-canary-5041023c-20251206175847",
|
|
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.7-canary-
|
|
68
|
+
"@rspack/core": "npm:@rspack-canary/core@1.6.7-canary-5041023c-20251206175847"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@rspack/core": ">=1.0.0"
|