vitest 0.26.3 → 0.27.1
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/LICENSE.md +15 -66
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +15 -15
- package/dist/{chunk-api-setup.47a09f0f.js → chunk-api-setup.2be3cc38.js} +60 -31
- package/dist/{chunk-install-pkg.6dd2bae6.js → chunk-install-pkg.7b006b3e.js} +8 -8
- package/dist/{chunk-integrations-coverage.befed097.js → chunk-integrations-coverage.44413252.js} +19 -1
- package/dist/chunk-integrations-globals.02f1259c.js +27 -0
- package/dist/{chunk-typecheck-constants.06e1fe5b.js → chunk-mock-date.149ed990.js} +19 -32
- package/dist/{chunk-node-git.a90c0582.js → chunk-node-git.125c9008.js} +3 -4
- package/dist/{chunk-runtime-chain.f51aa930.js → chunk-runtime-chain.4e2aa823.js} +1193 -1029
- package/dist/{chunk-runtime-error.f5c8aaf2.js → chunk-runtime-error.97854396.js} +2 -2
- package/dist/{chunk-runtime-mocker.887bf8c8.js → chunk-runtime-mocker.4755840f.js} +10 -8
- package/dist/{chunk-runtime-rpc.54d72169.js → chunk-runtime-rpc.25cc9413.js} +2 -2
- package/dist/{chunk-runtime-setup.a06d5c72.js → chunk-runtime-setup.56d71d30.js} +51 -52
- package/dist/{chunk-snapshot-manager.70695b70.js → chunk-snapshot-manager.1a2dbf96.js} +468 -302
- package/dist/{chunk-utils-env.3fdc1793.js → chunk-utils-env.f4a39d2c.js} +8 -70
- package/dist/{chunk-utils-import.e7f64637.js → chunk-utils-import.16d9fb0d.js} +22 -8
- package/dist/chunk-utils-source-map.4e9b891d.js +408 -0
- package/dist/{chunk-utils-timers.715da787.js → chunk-utils-timers.52534f96.js} +2977 -3458
- package/dist/cli-wrapper.js +15 -15
- package/dist/cli.js +15 -627
- package/dist/config.cjs +2 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -1
- package/dist/entry.js +14 -14
- package/dist/environments.d.ts +1 -1
- package/dist/{index-761e769b.d.ts → index-1cfc7f58.d.ts} +4 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -12
- package/dist/loader.js +9 -10
- package/dist/node.d.ts +2 -2
- package/dist/node.js +14 -12
- package/dist/spy.js +2 -102
- package/dist/suite.js +10 -10
- package/dist/{types-bae746aa.d.ts → types-5617096e.d.ts} +97 -77
- package/dist/{vendor-index.b2fdde54.js → vendor-index.451e37bc.js} +1 -1
- package/dist/vendor-index.723a074f.js +102 -0
- package/dist/vendor-index.b0346fe4.js +395 -0
- package/dist/{vendor-index.7a2cebfe.js → vendor-index.e6c27006.js} +12 -12
- package/dist/worker.js +24 -19
- package/package.json +13 -8
- package/dist/chunk-integrations-globals.ee28730b.js +0 -27
- package/dist/chunk-utils-source-map.5278ee22.js +0 -86
- package/dist/vendor-index.2e96c50b.js +0 -215
package/dist/cli-wrapper.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import
|
|
3
|
-
import { e as execa } from './vendor-index.
|
|
4
|
-
import '
|
|
5
|
-
import 'node:url';
|
|
6
|
-
import 'path';
|
|
2
|
+
import c from 'picocolors';
|
|
3
|
+
import { e as execa } from './vendor-index.451e37bc.js';
|
|
4
|
+
import { E as EXIT_CODE_RESTART } from './chunk-utils-env.f4a39d2c.js';
|
|
7
5
|
import 'node:buffer';
|
|
8
6
|
import 'node:path';
|
|
9
7
|
import 'node:child_process';
|
|
10
8
|
import 'node:process';
|
|
11
|
-
import './vendor-index.
|
|
9
|
+
import './vendor-index.e6c27006.js';
|
|
12
10
|
import 'child_process';
|
|
11
|
+
import 'path';
|
|
13
12
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
14
13
|
import 'fs';
|
|
15
14
|
import 'assert';
|
|
@@ -17,6 +16,7 @@ import 'events';
|
|
|
17
16
|
import 'buffer';
|
|
18
17
|
import 'stream';
|
|
19
18
|
import 'util';
|
|
19
|
+
import 'node:url';
|
|
20
20
|
import 'os';
|
|
21
21
|
import 'node:os';
|
|
22
22
|
|
|
@@ -51,10 +51,10 @@ async function main() {
|
|
|
51
51
|
retries = +process.env.VITEST_SEGFAULT_RETRY;
|
|
52
52
|
} else {
|
|
53
53
|
for (let i = 0; i < args.length; i++) {
|
|
54
|
-
if (args[i].startsWith("--segfault-retry=")) {
|
|
54
|
+
if (args[i].startsWith("--segfault-retry=") || args[i].startsWith("--segfaultRetry=")) {
|
|
55
55
|
retries = +args[i].split("=")[1];
|
|
56
56
|
break;
|
|
57
|
-
} else if (args[i] === "--segfault-retry" && ((_a = args[i + 1]) == null ? void 0 : _a.match(/^\d+$/))) {
|
|
57
|
+
} else if ((args[i] === "--segfault-retry" || args[i] === "--segfaultRetry") && ((_a = args[i + 1]) == null ? void 0 : _a.match(/^\d+$/))) {
|
|
58
58
|
retries = +args[i + 1];
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
@@ -86,13 +86,13 @@ async function main() {
|
|
|
86
86
|
continue;
|
|
87
87
|
}
|
|
88
88
|
if (i === 1 && retries === 1) {
|
|
89
|
-
console.log(
|
|
90
|
-
you could pass ${
|
|
89
|
+
console.log(c.yellow(`It seems to be an upstream bug of Node.js. To improve the test stability,
|
|
90
|
+
you could pass ${c.bold(c.green("--segfault-retry=3"))} or set env ${c.bold(c.green("VITEST_SEGFAULT_RETRY=3"))} to
|
|
91
91
|
have Vitest auto retries on flaky segfaults.
|
|
92
92
|
`));
|
|
93
93
|
}
|
|
94
94
|
if (i !== retries)
|
|
95
|
-
console.log(`${
|
|
95
|
+
console.log(`${c.inverse(c.bold(c.magenta(" Retrying ")))} vitest ${args.join(" ")} ${c.gray(`(${i + 1} of ${retries})`)}`);
|
|
96
96
|
}
|
|
97
97
|
process.exit(1);
|
|
98
98
|
}
|
|
@@ -125,11 +125,11 @@ async function start(preArgs, postArgs) {
|
|
|
125
125
|
if (process.env.GITHUB_ACTIONS)
|
|
126
126
|
console.log(`::warning:: Segmentfault Error Detected: ${error.trigger}
|
|
127
127
|
Refer to ${error.url}`);
|
|
128
|
-
const RED_BLOCK =
|
|
128
|
+
const RED_BLOCK = c.inverse(c.red(" "));
|
|
129
129
|
console.log(`
|
|
130
|
-
${
|
|
131
|
-
${RED_BLOCK} ${
|
|
132
|
-
${RED_BLOCK} ${
|
|
130
|
+
${c.inverse(c.bold(c.red(" Segmentfault Error Detected ")))}
|
|
131
|
+
${RED_BLOCK} ${c.red(error.trigger)}
|
|
132
|
+
${RED_BLOCK} ${c.red(`Refer to ${error.url}`)}
|
|
133
133
|
`);
|
|
134
134
|
return "error";
|
|
135
135
|
}
|