@rstest/core 0.8.5 → 0.9.0
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/{0~9348.js → 0~1240.js} +41 -41
- package/dist/0~1472.js +2 -2
- package/dist/0~2173.js +84 -71
- package/dist/{0~3919.js → 0~262.js} +31 -30
- package/dist/0~3062.js +1 -1
- package/dist/0~3346.js +1 -1
- package/dist/0~5835.js +1 -1
- package/dist/0~6588.js +1 -1
- package/dist/0~6923.js +2 -2
- package/dist/0~7583.js +1 -1
- package/dist/0~7882.js +24 -23
- package/dist/0~89.js +22 -23
- package/dist/0~9634.js +6 -6
- package/dist/1157.js +1 -1
- package/dist/1294.js +2 -1
- package/dist/3160.js +4 -49
- package/dist/{5960.js → 4597.js} +0 -1
- package/dist/487.js +1 -1
- package/dist/6151.js +108 -31
- package/dist/9131.js +31 -16
- package/dist/browser-runtime/389.js +144 -92
- package/dist/browser-runtime/index.d.ts +40 -10
- package/dist/browser.d.ts +53 -10
- package/dist/index.d.ts +41 -79
- package/dist/worker.d.ts +13 -1521
- package/dist/worker.js +10 -7
- package/package.json +13 -12
package/dist/worker.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
|
-
import { basename, isAbsolute,
|
|
3
|
+
import { basename, isAbsolute, color, dirname, resolve as pathe_M_eThtNZ_resolve, join } from "./3160.js";
|
|
4
4
|
import "./487.js";
|
|
5
|
-
import {
|
|
5
|
+
import { createWorkerMetaMessage, createBirpc } from "./4597.js";
|
|
6
6
|
import { createCoverageProvider } from "./5734.js";
|
|
7
7
|
import { formatTestError, setRealTimers, getRealTimers } from "./1294.js";
|
|
8
8
|
import { globalApis } from "./1157.js";
|
|
9
9
|
const processSend = process.send.bind(process);
|
|
10
10
|
const processOn = process.on.bind(process);
|
|
11
11
|
const processOff = process.off.bind(process);
|
|
12
|
-
function createForksRpcOptions({
|
|
12
|
+
function createForksRpcOptions({ dispose = [] }) {
|
|
13
13
|
return {
|
|
14
|
-
serialize: nodeV8.serialize,
|
|
15
|
-
deserialize: (v)=>nodeV8.deserialize(Buffer.from(v)),
|
|
16
14
|
post (v) {
|
|
17
15
|
processSend(v);
|
|
18
16
|
},
|
|
@@ -112,7 +110,6 @@ const preparePool = async ({ entryInfo: { distPath, testPath }, updateSnapshot,
|
|
|
112
110
|
});
|
|
113
111
|
globalCleanups.length = 0;
|
|
114
112
|
setRealTimers();
|
|
115
|
-
context.runtimeConfig = undoSerializableConfig(context.runtimeConfig);
|
|
116
113
|
process.env.RSTEST_WORKER_ID = String(process.__tinypool_state__.workerId || context.taskId);
|
|
117
114
|
const cleanupFns = [];
|
|
118
115
|
const disposeFns = [];
|
|
@@ -380,7 +377,13 @@ const runInPool = async (options)=>{
|
|
|
380
377
|
}
|
|
381
378
|
if (coverageProvider) {
|
|
382
379
|
const coverageMap = coverageProvider.collect();
|
|
383
|
-
if (coverageMap)
|
|
380
|
+
if (coverageMap) {
|
|
381
|
+
results.coverage = {};
|
|
382
|
+
Object.entries(coverageMap.toJSON()).forEach(([key, value])=>{
|
|
383
|
+
if ('toJSON' in value) results.coverage[key] = value.toJSON();
|
|
384
|
+
else results.coverage[key] = value;
|
|
385
|
+
});
|
|
386
|
+
}
|
|
384
387
|
coverageProvider.cleanup();
|
|
385
388
|
}
|
|
386
389
|
return results;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstest/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The Rsbuild-based test tool.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rstest/issues"
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
"importMeta.d.ts"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@rsbuild/core": "^
|
|
57
|
+
"@rsbuild/core": "^2.0.0-beta.6",
|
|
58
58
|
"@types/chai": "^5.2.3",
|
|
59
|
-
"tinypool": "^
|
|
59
|
+
"tinypool": "^2.1.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@babel/code-frame": "^7.
|
|
63
|
-
"@clack/prompts": "^0.
|
|
62
|
+
"@babel/code-frame": "^7.29.0",
|
|
63
|
+
"@clack/prompts": "^0.11.0",
|
|
64
64
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
65
|
-
"@microsoft/api-extractor": "^7.
|
|
66
|
-
"@rsbuild/plugin-node-polyfill": "^1.
|
|
67
|
-
"@rslib/core": "^0.19.
|
|
65
|
+
"@microsoft/api-extractor": "^7.57.6",
|
|
66
|
+
"@rsbuild/plugin-node-polyfill": "^1.4.4",
|
|
67
|
+
"@rslib/core": "^0.19.6",
|
|
68
68
|
"@sinonjs/fake-timers": "^15.1.0",
|
|
69
|
-
"@types/babel__code-frame": "^7.0
|
|
69
|
+
"@types/babel__code-frame": "^7.27.0",
|
|
70
70
|
"@types/istanbul-lib-coverage": "^2.0.6",
|
|
71
71
|
"@types/istanbul-lib-report": "^3.0.3",
|
|
72
72
|
"@types/istanbul-reports": "^3.0.4",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"cac": "^6.7.14",
|
|
81
81
|
"chai": "^5.3.3",
|
|
82
82
|
"chokidar": "^4.0.3",
|
|
83
|
-
"happy-dom": "^20.0
|
|
83
|
+
"happy-dom": "^20.7.0",
|
|
84
84
|
"jest-diff": "^30.2.0",
|
|
85
85
|
"jsdom": "^26.1.0",
|
|
86
|
-
"memfs": "^4.
|
|
86
|
+
"memfs": "^4.56.10",
|
|
87
87
|
"package-manager-detector": "^1.6.0",
|
|
88
88
|
"pathe": "^2.0.3",
|
|
89
89
|
"picocolors": "^1.1.1",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"tinyspy": "^4.0.4",
|
|
99
99
|
"url-extras": "^0.1.0",
|
|
100
100
|
"webpack-license-plugin": "^4.5.1",
|
|
101
|
+
"webpack": "^5.105.2",
|
|
101
102
|
"@rstest/browser-ui": "0.0.0",
|
|
102
103
|
"@rstest/tsconfig": "0.0.1"
|
|
103
104
|
},
|
|
@@ -114,7 +115,7 @@
|
|
|
114
115
|
}
|
|
115
116
|
},
|
|
116
117
|
"engines": {
|
|
117
|
-
"node": ">=
|
|
118
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
118
119
|
},
|
|
119
120
|
"publishConfig": {
|
|
120
121
|
"access": "public",
|