@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/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, undoSerializableConfig, dirname, color, resolve as pathe_M_eThtNZ_resolve, join } from "./3160.js";
3
+ import { basename, isAbsolute, color, dirname, resolve as pathe_M_eThtNZ_resolve, join } from "./3160.js";
4
4
  import "./487.js";
5
- import { node_v8, createWorkerMetaMessage, createBirpc } from "./5960.js";
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({ nodeV8 = node_v8, dispose = [] }) {
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) results.coverage = coverageMap.toJSON();
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.8.5",
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": "^1.7.3",
57
+ "@rsbuild/core": "^2.0.0-beta.6",
58
58
  "@types/chai": "^5.2.3",
59
- "tinypool": "^1.1.1"
59
+ "tinypool": "^2.1.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@babel/code-frame": "^7.27.1",
63
- "@clack/prompts": "^0.10.1",
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.55.2",
66
- "@rsbuild/plugin-node-polyfill": "^1.3.0",
67
- "@rslib/core": "^0.19.0",
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.6",
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.11",
83
+ "happy-dom": "^20.7.0",
84
84
  "jest-diff": "^30.2.0",
85
85
  "jsdom": "^26.1.0",
86
- "memfs": "^4.51.1",
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": ">=18.12.0"
118
+ "node": "^20.19.0 || >=22.12.0"
118
119
  },
119
120
  "publishConfig": {
120
121
  "access": "public",