vitest 0.27.0 → 0.27.2
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 +13 -12
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +10 -10
- package/dist/{chunk-api-setup.16ac28c0.js → chunk-api-setup.029198e3.js} +54 -30
- package/dist/{chunk-env-node.b3664da2.js → chunk-env-node.787e9561.js} +7 -0
- package/dist/{chunk-install-pkg.6dd2bae6.js → chunk-install-pkg.7b006b3e.js} +8 -8
- package/dist/{chunk-integrations-globals.3dfaeb99.js → chunk-integrations-globals.0024ce21.js} +6 -6
- package/dist/{chunk-mock-date.a1c85759.js → chunk-mock-date.c543fa3e.js} +15 -7
- package/dist/{chunk-node-git.543e964a.js → chunk-node-git.125c9008.js} +3 -3
- package/dist/{chunk-runtime-chain.6df5a66b.js → chunk-runtime-chain.2da9e75c.js} +6 -6
- package/dist/{chunk-runtime-error.fad2c32b.js → chunk-runtime-error.de671af0.js} +1 -1
- package/dist/{chunk-runtime-mocker.a677dd28.js → chunk-runtime-mocker.58511c38.js} +4 -4
- package/dist/{chunk-runtime-rpc.7f83c8a9.js → chunk-runtime-rpc.d709e91b.js} +1 -1
- package/dist/{chunk-runtime-setup.731b2b04.js → chunk-runtime-setup.35da9209.js} +15 -12
- package/dist/{chunk-snapshot-manager.700322bf.js → chunk-snapshot-manager.ce714e21.js} +127 -57
- package/dist/{chunk-utils-env.b861e3a0.js → chunk-utils-env.f4a39d2c.js} +7 -7
- package/dist/{chunk-utils-import.2baa69a9.js → chunk-utils-import.054ab315.js} +47 -4
- package/dist/{chunk-utils-source-map.60562959.js → chunk-utils-source-map.5f5d12cf.js} +2 -2
- package/dist/cli-wrapper.js +5 -5
- package/dist/cli.js +8 -8
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/entry.js +9 -9
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/{index-2d10c3fd.d.ts → index-50755efe.d.ts} +4 -2
- package/dist/index.d.ts +8 -4
- package/dist/index.js +7 -7
- package/dist/loader.js +8 -9
- package/dist/node.d.ts +2 -2
- package/dist/node.js +12 -10
- package/dist/suite.js +5 -5
- package/dist/{types-e1e1d1e5.d.ts → types-d97c72c7.d.ts} +17 -3
- package/dist/{vendor-index.b2fdde54.js → vendor-index.451e37bc.js} +1 -1
- package/dist/vendor-index.b0346fe4.js +395 -0
- package/dist/{vendor-index.7a2cebfe.js → vendor-index.e6c27006.js} +12 -12
- package/dist/worker.js +23 -18
- package/package.json +10 -9
- package/dist/vendor-index.2e96c50b.js +0 -215
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import url from 'node:url';
|
|
2
|
-
import
|
|
2
|
+
import k from 'path';
|
|
3
3
|
|
|
4
4
|
function normalizeWindowsPath(input = "") {
|
|
5
5
|
if (!input.includes("\\")) {
|
|
@@ -144,22 +144,22 @@ const toNamespacedPath = function(p) {
|
|
|
144
144
|
return normalizeWindowsPath(p);
|
|
145
145
|
};
|
|
146
146
|
const extname = function(p) {
|
|
147
|
-
return
|
|
147
|
+
return k.posix.extname(normalizeWindowsPath(p));
|
|
148
148
|
};
|
|
149
149
|
const relative = function(from, to) {
|
|
150
|
-
return
|
|
150
|
+
return k.posix.relative(normalizeWindowsPath(from), normalizeWindowsPath(to));
|
|
151
151
|
};
|
|
152
152
|
const dirname = function(p) {
|
|
153
|
-
return
|
|
153
|
+
return k.posix.dirname(normalizeWindowsPath(p));
|
|
154
154
|
};
|
|
155
155
|
const format = function(p) {
|
|
156
|
-
return normalizeWindowsPath(
|
|
156
|
+
return normalizeWindowsPath(k.posix.format(p));
|
|
157
157
|
};
|
|
158
158
|
const basename = function(p, ext) {
|
|
159
|
-
return
|
|
159
|
+
return k.posix.basename(normalizeWindowsPath(p), ext);
|
|
160
160
|
};
|
|
161
161
|
const parse = function(p) {
|
|
162
|
-
return
|
|
162
|
+
return k.posix.parse(normalizeWindowsPath(p));
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
const _path = /*#__PURE__*/Object.freeze({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, s as suite, t as test, d as describe, i as it, b as bench, c as createExpect, e as globalExpect } from './chunk-runtime-chain.
|
|
2
|
-
import { g as getWorkerState, R as RealDate, r as resetDate, m as mockDate, a as resetModules } from './chunk-mock-date.
|
|
3
|
-
import { p as parseSingleStack } from './chunk-utils-source-map.
|
|
1
|
+
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, s as suite, t as test, d as describe, i as it, b as bench, c as createExpect, e as globalExpect } from './chunk-runtime-chain.2da9e75c.js';
|
|
2
|
+
import { g as getWorkerState, R as RealDate, r as resetDate, m as mockDate, a as resetModules } from './chunk-mock-date.c543fa3e.js';
|
|
3
|
+
import { p as parseSingleStack } from './chunk-utils-source-map.5f5d12cf.js';
|
|
4
4
|
import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
|
|
5
5
|
import util from 'util';
|
|
6
6
|
import { s as spyOn, f as fn, i as isMockFunction, a as spies } from './vendor-index.723a074f.js';
|
|
@@ -2665,10 +2665,18 @@ class FakeTimers {
|
|
|
2665
2665
|
if (this._checkFakeTimers())
|
|
2666
2666
|
this._clock.runAll();
|
|
2667
2667
|
}
|
|
2668
|
+
async runAllTimersAsync() {
|
|
2669
|
+
if (this._checkFakeTimers())
|
|
2670
|
+
await this._clock.runAllAsync();
|
|
2671
|
+
}
|
|
2668
2672
|
runOnlyPendingTimers() {
|
|
2669
2673
|
if (this._checkFakeTimers())
|
|
2670
2674
|
this._clock.runToLast();
|
|
2671
2675
|
}
|
|
2676
|
+
async runOnlyPendingTimersAsync() {
|
|
2677
|
+
if (this._checkFakeTimers())
|
|
2678
|
+
await this._clock.runToLastAsync();
|
|
2679
|
+
}
|
|
2672
2680
|
advanceTimersToNextTimer(steps = 1) {
|
|
2673
2681
|
if (this._checkFakeTimers()) {
|
|
2674
2682
|
for (let i = steps; i > 0; i--) {
|
|
@@ -2679,10 +2687,24 @@ class FakeTimers {
|
|
|
2679
2687
|
}
|
|
2680
2688
|
}
|
|
2681
2689
|
}
|
|
2690
|
+
async advanceTimersToNextTimerAsync(steps = 1) {
|
|
2691
|
+
if (this._checkFakeTimers()) {
|
|
2692
|
+
for (let i = steps; i > 0; i--) {
|
|
2693
|
+
await this._clock.nextAsync();
|
|
2694
|
+
this._clock.tick(0);
|
|
2695
|
+
if (this._clock.countTimers() === 0)
|
|
2696
|
+
break;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2682
2700
|
advanceTimersByTime(msToRun) {
|
|
2683
2701
|
if (this._checkFakeTimers())
|
|
2684
2702
|
this._clock.tick(msToRun);
|
|
2685
2703
|
}
|
|
2704
|
+
async advanceTimersByTimeAsync(msToRun) {
|
|
2705
|
+
if (this._checkFakeTimers())
|
|
2706
|
+
await this._clock.tickAsync(msToRun);
|
|
2707
|
+
}
|
|
2686
2708
|
runAllTicks() {
|
|
2687
2709
|
if (this._checkFakeTimers()) {
|
|
2688
2710
|
this._clock.runMicrotasks();
|
|
@@ -2788,10 +2810,18 @@ class VitestUtils {
|
|
|
2788
2810
|
this._timers.runOnlyPendingTimers();
|
|
2789
2811
|
return this;
|
|
2790
2812
|
}
|
|
2813
|
+
async runOnlyPendingTimersAsync() {
|
|
2814
|
+
await this._timers.runOnlyPendingTimersAsync();
|
|
2815
|
+
return this;
|
|
2816
|
+
}
|
|
2791
2817
|
runAllTimers() {
|
|
2792
2818
|
this._timers.runAllTimers();
|
|
2793
2819
|
return this;
|
|
2794
2820
|
}
|
|
2821
|
+
async runAllTimersAsync() {
|
|
2822
|
+
await this._timers.runAllTimersAsync();
|
|
2823
|
+
return this;
|
|
2824
|
+
}
|
|
2795
2825
|
runAllTicks() {
|
|
2796
2826
|
this._timers.runAllTicks();
|
|
2797
2827
|
return this;
|
|
@@ -2800,10 +2830,18 @@ class VitestUtils {
|
|
|
2800
2830
|
this._timers.advanceTimersByTime(ms);
|
|
2801
2831
|
return this;
|
|
2802
2832
|
}
|
|
2833
|
+
async advanceTimersByTimeAsync(ms) {
|
|
2834
|
+
await this._timers.advanceTimersByTimeAsync(ms);
|
|
2835
|
+
return this;
|
|
2836
|
+
}
|
|
2803
2837
|
advanceTimersToNextTimer() {
|
|
2804
2838
|
this._timers.advanceTimersToNextTimer();
|
|
2805
2839
|
return this;
|
|
2806
2840
|
}
|
|
2841
|
+
async advanceTimersToNextTimerAsync() {
|
|
2842
|
+
await this._timers.advanceTimersToNextTimerAsync();
|
|
2843
|
+
return this;
|
|
2844
|
+
}
|
|
2807
2845
|
getTimerCount() {
|
|
2808
2846
|
return this._timers.getTimerCount();
|
|
2809
2847
|
}
|
|
@@ -2873,7 +2911,12 @@ class VitestUtils {
|
|
|
2873
2911
|
stubGlobal(name, value) {
|
|
2874
2912
|
if (!this._stubsGlobal.has(name))
|
|
2875
2913
|
this._stubsGlobal.set(name, Object.getOwnPropertyDescriptor(globalThis, name));
|
|
2876
|
-
globalThis
|
|
2914
|
+
Object.defineProperty(globalThis, name, {
|
|
2915
|
+
value,
|
|
2916
|
+
writable: true,
|
|
2917
|
+
configurable: true,
|
|
2918
|
+
enumerable: true
|
|
2919
|
+
});
|
|
2877
2920
|
return this;
|
|
2878
2921
|
}
|
|
2879
2922
|
stubEnv(name, value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as ansiStyles, e as eastAsianWidth } from './chunk-utils-timers.52534f96.js';
|
|
2
|
-
import { b as resolve } from './chunk-utils-env.
|
|
3
|
-
import { j as notNullish } from './chunk-mock-date.
|
|
2
|
+
import { b as resolve } from './chunk-utils-env.f4a39d2c.js';
|
|
3
|
+
import { j as notNullish } from './chunk-mock-date.c543fa3e.js';
|
|
4
4
|
|
|
5
5
|
/* eslint-disable yoda */
|
|
6
6
|
|
package/dist/cli-wrapper.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
2
|
import c from 'picocolors';
|
|
3
|
-
import { e as execa } from './vendor-index.
|
|
4
|
-
import { E as EXIT_CODE_RESTART } from './chunk-utils-env.
|
|
3
|
+
import { e as execa } from './vendor-index.451e37bc.js';
|
|
4
|
+
import { E as EXIT_CODE_RESTART } from './chunk-utils-env.f4a39d2c.js';
|
|
5
5
|
import 'node:buffer';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'node:child_process';
|
|
8
8
|
import 'node:process';
|
|
9
|
-
import './vendor-index.
|
|
9
|
+
import './vendor-index.e6c27006.js';
|
|
10
10
|
import 'child_process';
|
|
11
11
|
import 'path';
|
|
12
12
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
@@ -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
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as normalize } from './chunk-utils-env.
|
|
1
|
+
import { n as normalize } from './chunk-utils-env.f4a39d2c.js';
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import c from 'picocolors';
|
|
4
|
-
import { v as version, s as startVitest, d as divider } from './chunk-snapshot-manager.
|
|
4
|
+
import { v as version, s as startVitest, d as divider } from './chunk-snapshot-manager.ce714e21.js';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'path';
|
|
7
7
|
import './chunk-integrations-coverage.44413252.js';
|
|
8
8
|
import 'local-pkg';
|
|
9
|
-
import './chunk-env-node.
|
|
9
|
+
import './chunk-env-node.787e9561.js';
|
|
10
10
|
import 'node:console';
|
|
11
|
-
import './chunk-mock-date.
|
|
11
|
+
import './chunk-mock-date.c543fa3e.js';
|
|
12
12
|
import 'node:path';
|
|
13
13
|
import 'vite';
|
|
14
14
|
import 'node:process';
|
|
@@ -22,10 +22,10 @@ import './vendor-_commonjsHelpers.addc3445.js';
|
|
|
22
22
|
import 'vite-node/client';
|
|
23
23
|
import 'vite-node/server';
|
|
24
24
|
import 'node:fs/promises';
|
|
25
|
-
import './vendor-index.
|
|
25
|
+
import './vendor-index.451e37bc.js';
|
|
26
26
|
import 'node:buffer';
|
|
27
27
|
import 'node:child_process';
|
|
28
|
-
import './vendor-index.
|
|
28
|
+
import './vendor-index.e6c27006.js';
|
|
29
29
|
import 'child_process';
|
|
30
30
|
import 'assert';
|
|
31
31
|
import 'buffer';
|
|
@@ -38,7 +38,7 @@ import 'node:worker_threads';
|
|
|
38
38
|
import 'tinypool';
|
|
39
39
|
import './vendor-index.783e7f3e.js';
|
|
40
40
|
import 'perf_hooks';
|
|
41
|
-
import './chunk-utils-source-map.
|
|
41
|
+
import './chunk-utils-source-map.5f5d12cf.js';
|
|
42
42
|
import './chunk-utils-timers.52534f96.js';
|
|
43
43
|
import 'crypto';
|
|
44
44
|
import 'vite-node/utils';
|
|
@@ -50,7 +50,7 @@ import 'readline';
|
|
|
50
50
|
import './vendor-index.9f20a9be.js';
|
|
51
51
|
|
|
52
52
|
const cli = cac("vitest");
|
|
53
|
-
cli.version(version).option("-r, --root <path>", "
|
|
53
|
+
cli.version(version).option("-r, --root <path>", "Root path").option("-c, --config <path>", "Path to config file").option("-u, --update", "Update snapshot").option("-w, --watch", "Enable watch mode").option("-t, --testNamePattern <pattern>", "Run tests with full names matching the specified regexp pattern").option("--dir <path>", "Base directory to scan for the test files").option("--ui", "Enable UI").option("--open", "Open UI automatically (default: !process.env.CI))").option("--api [api]", "Serve API, available options: --api.port <port>, --api.host [host] and --api.strictPort").option("--threads", "Enabled threads (default: true)").option("--silent", "Silent console output from tests").option("--isolate", "Isolate environment for each test file (default: true)").option("--reporter <name>", "Specify reporters").option("--outputDiffMaxSize <length>", "Object diff output max size (default: 10000)").option("--outputDiffMaxLines <length>", "Max lines in diff output window (default: 50)").option("--outputTruncateLength <length>", "Diff output line length (default: 80)").option("--outputDiffLines <lines>", "Number of lines in single diff (default: 15)").option("--outputFile <filename/-s>", "Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters").option("--coverage", "Enable coverage report").option("--run", "Disable watch mode").option("--mode <name>", "Override Vite mode (default: test)").option("--globals", "Inject apis globally").option("--dom", "Mock browser api with happy-dom").option("--browser", "Run tests in browser").option("--environment <env>", "Specify runner environment (default: node)").option("--passWithNoTests", "Pass when no tests found").option("--logHeapUsage", "Show the size of heap for each test").option("--allowOnly", "Allow tests and suites that are marked as only (default: !process.env.CI)").option("--dangerouslyIgnoreUnhandledErrors", "Ignore any unhandled errors that occur").option("--shard <shard>", "Test suite shard to execute in a format of <index>/<count>").option("--changed [since]", "Run tests that are affected by the changed files (default: false)").option("--sequence <options>", "Define in what order to run tests (use --sequence.shuffle to run tests in random order)").option("--segfaultRetry <times>", "Return tests on segment fault (default: 0)", { default: 0 }).option("--no-color", "Removes colors from the console output").option("--inspect", "Enable Node.js inspector").option("--inspect-brk", "Enable Node.js inspector with break").help();
|
|
54
54
|
cli.command("run [...filters]").action(run);
|
|
55
55
|
cli.command("related [...filters]").action(runRelated);
|
|
56
56
|
cli.command("watch [...filters]").action(watch);
|
package/dist/config.cjs
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$2, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv } from 'vite';
|
|
3
|
-
import { U as UserConfig$1,
|
|
3
|
+
import { U as UserConfig$1, ao as ResolvedCoverageOptions, F as FakeTimerInstallOpts } from './types-d97c72c7.js';
|
|
4
4
|
import 'tinybench';
|
|
5
5
|
import 'vite-node/client';
|
|
6
6
|
import 'vite-node/server';
|
package/dist/config.js
CHANGED
package/dist/entry.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { promises } from 'node:fs';
|
|
2
|
-
import { g as getWorkerState, a as resetModules } from './chunk-mock-date.
|
|
3
|
-
import { v as vi } from './chunk-utils-import.
|
|
4
|
-
import { a as envs } from './chunk-env-node.
|
|
5
|
-
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-setup.
|
|
2
|
+
import { g as getWorkerState, a as resetModules } from './chunk-mock-date.c543fa3e.js';
|
|
3
|
+
import { v as vi } from './chunk-utils-import.054ab315.js';
|
|
4
|
+
import { a as envs } from './chunk-env-node.787e9561.js';
|
|
5
|
+
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-setup.35da9209.js';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'picocolors';
|
|
8
8
|
import 'local-pkg';
|
|
9
|
-
import './chunk-utils-env.
|
|
9
|
+
import './chunk-utils-env.f4a39d2c.js';
|
|
10
10
|
import 'node:url';
|
|
11
11
|
import 'path';
|
|
12
|
-
import './chunk-runtime-chain.
|
|
12
|
+
import './chunk-runtime-chain.2da9e75c.js';
|
|
13
13
|
import 'util';
|
|
14
14
|
import 'chai';
|
|
15
15
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
16
16
|
import './chunk-utils-timers.52534f96.js';
|
|
17
17
|
import './vendor-index.723a074f.js';
|
|
18
18
|
import 'tinyspy';
|
|
19
|
-
import './chunk-utils-source-map.
|
|
20
|
-
import './chunk-runtime-rpc.
|
|
19
|
+
import './chunk-utils-source-map.5f5d12cf.js';
|
|
20
|
+
import './chunk-runtime-rpc.d709e91b.js';
|
|
21
21
|
import 'fs';
|
|
22
22
|
import 'node:console';
|
|
23
23
|
import 'perf_hooks';
|
|
24
24
|
import './chunk-integrations-coverage.44413252.js';
|
|
25
|
-
import './chunk-runtime-error.
|
|
25
|
+
import './chunk-runtime-error.de671af0.js';
|
|
26
26
|
import 'vite-node/source-map';
|
|
27
27
|
|
|
28
28
|
function groupBy(collection, iteratee) {
|
package/dist/environments.d.ts
CHANGED
package/dist/environments.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpyImpl } from 'tinyspy';
|
|
2
|
-
import { w as SuiteAPI, v as TestAPI,
|
|
2
|
+
import { w as SuiteAPI, v as TestAPI, aw as BenchmarkAPI, y as SuiteHooks, H as HookListener, L as TestContext, q as Suite, x as HookCleanupCallback, O as OnTestFailedHandler, r as Test } from './types-d97c72c7.js';
|
|
3
3
|
|
|
4
4
|
declare type Not<T extends boolean> = T extends true ? false : true;
|
|
5
5
|
declare type And<Types extends boolean[]> = Types[number] extends true ? true : false;
|
|
@@ -234,7 +234,9 @@ type Mocked<T> = {
|
|
|
234
234
|
type EnhancedSpy<TArgs extends any[] = any[], TReturns = any> = SpyInstance<TArgs, TReturns> & SpyImpl<TArgs, TReturns>;
|
|
235
235
|
declare function spyOn<T, S extends Properties<Required<T>>>(obj: T, methodName: S, accessType: 'get'): SpyInstance<[], T[S]>;
|
|
236
236
|
declare function spyOn<T, G extends Properties<Required<T>>>(obj: T, methodName: G, accessType: 'set'): SpyInstance<[T[G]], void>;
|
|
237
|
-
declare function spyOn<T, M extends (
|
|
237
|
+
declare function spyOn<T, M extends (Classes<Required<T>> | Methods<Required<T>>)>(obj: T, methodName: M): Required<T>[M] extends ({
|
|
238
|
+
new (...args: infer A): infer R;
|
|
239
|
+
}) | ((...args: infer A) => infer R) ? SpyInstance<A, R> : never;
|
|
238
240
|
declare function fn<TArgs extends any[] = any[], R = any>(): Mock<TArgs, R>;
|
|
239
241
|
declare function fn<TArgs extends any[] = any[], R = any>(implementation: (...args: TArgs) => R): Mock<TArgs, R>;
|
|
240
242
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-
|
|
2
|
-
export { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-
|
|
3
|
-
import { D as DoneCallback, F as FakeTimerInstallOpts, M as MockFactoryWithHelper, R as RuntimeConfig, a as File, T as TaskResultPack, b as ResolvedConfig, c as ModuleGraphData, d as Reporter } from './types-
|
|
4
|
-
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable,
|
|
1
|
+
import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-50755efe.js';
|
|
2
|
+
export { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-50755efe.js';
|
|
3
|
+
import { D as DoneCallback, F as FakeTimerInstallOpts, M as MockFactoryWithHelper, R as RuntimeConfig, a as File, T as TaskResultPack, b as ResolvedConfig, c as ModuleGraphData, d as Reporter } from './types-d97c72c7.js';
|
|
4
|
+
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ap as BaseCoverageOptions, av as BenchFunction, at as Benchmark, aw as BenchmarkAPI, au as BenchmarkResult, as as BenchmarkUserOptions, B as BuiltinEnvironment, j as CSSModuleScopeStrategy, C as CollectLineNumbers, g as CollectLines, ab as Constructable, i as Context, ar as CoverageC8Options, aq as CoverageIstanbulOptions, an as CoverageOptions, aj as CoverageProvider, al as CoverageProviderModule, am as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ah as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, c as ModuleGraphData, aa as MutableArray, a5 as Nullable, ai as OnServerRestartHandler, O as OnTestFailedHandler, ag as ParsedStack, e as RawErrsMap, ak as ReportContext, d as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, ao as ResolvedCoverageOptions, h as RootAndTarget, m as RunMode, R as RuntimeConfig, K as RuntimeContext, S as SequenceHooks, P as SnapshotData, X as SnapshotMatchOptions, Y as SnapshotResult, W as SnapshotStateOptions, _ as SnapshotSummary, Q as SnapshotUpdateState, q as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, o as TaskBase, p as TaskResult, T as TaskResultPack, n as TaskState, r as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, f as TscErrorInfo, l as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, k as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-d97c72c7.js';
|
|
5
5
|
import { TransformResult } from 'vite';
|
|
6
6
|
import * as chai from 'chai';
|
|
7
7
|
export { chai };
|
|
@@ -46,10 +46,14 @@ declare class VitestUtils {
|
|
|
46
46
|
useFakeTimers(config?: FakeTimerInstallOpts): this;
|
|
47
47
|
useRealTimers(): this;
|
|
48
48
|
runOnlyPendingTimers(): this;
|
|
49
|
+
runOnlyPendingTimersAsync(): Promise<this>;
|
|
49
50
|
runAllTimers(): this;
|
|
51
|
+
runAllTimersAsync(): Promise<this>;
|
|
50
52
|
runAllTicks(): this;
|
|
51
53
|
advanceTimersByTime(ms: number): this;
|
|
54
|
+
advanceTimersByTimeAsync(ms: number): Promise<this>;
|
|
52
55
|
advanceTimersToNextTimer(): this;
|
|
56
|
+
advanceTimersToNextTimerAsync(): Promise<this>;
|
|
53
57
|
getTimerCount(): number;
|
|
54
58
|
setSystemTime(time: number | string | Date): this;
|
|
55
59
|
getMockedSystemTime(): string | number | Date | null;
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export { b as bench, c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.
|
|
2
|
-
import { e as dist } from './chunk-utils-import.
|
|
3
|
-
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, k as getRunningMode, h as isFirstRun, l as isWatchMode, o as onTestFailed, g as runOnce, v as vi, j as vitest, w as withCallback } from './chunk-utils-import.
|
|
1
|
+
export { b as bench, c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.2da9e75c.js';
|
|
2
|
+
import { e as dist } from './chunk-utils-import.054ab315.js';
|
|
3
|
+
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, k as getRunningMode, h as isFirstRun, l as isWatchMode, o as onTestFailed, g as runOnce, v as vi, j as vitest, w as withCallback } from './chunk-utils-import.054ab315.js';
|
|
4
4
|
import * as chai from 'chai';
|
|
5
5
|
export { chai };
|
|
6
6
|
export { assert, should } from 'chai';
|
|
7
7
|
import 'util';
|
|
8
|
-
import './chunk-mock-date.
|
|
8
|
+
import './chunk-mock-date.c543fa3e.js';
|
|
9
9
|
import 'node:path';
|
|
10
10
|
import 'picocolors';
|
|
11
11
|
import 'local-pkg';
|
|
12
|
-
import './chunk-utils-env.
|
|
12
|
+
import './chunk-utils-env.f4a39d2c.js';
|
|
13
13
|
import 'node:url';
|
|
14
14
|
import 'path';
|
|
15
15
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
16
16
|
import './chunk-utils-timers.52534f96.js';
|
|
17
17
|
import './vendor-index.723a074f.js';
|
|
18
18
|
import 'tinyspy';
|
|
19
|
-
import './chunk-utils-source-map.
|
|
20
|
-
import './chunk-runtime-rpc.
|
|
19
|
+
import './chunk-utils-source-map.5f5d12cf.js';
|
|
20
|
+
import './chunk-runtime-rpc.d709e91b.js';
|
|
21
21
|
import 'node:fs';
|
|
22
22
|
import 'fs';
|
|
23
23
|
|
package/dist/loader.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { pathToFileURL } from 'node:url';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
|
-
import { i as isNodeBuiltin, h as hasCJSSyntax } from './vendor-index.
|
|
3
|
+
import { i as isNodeBuiltin, h as hasCJSSyntax } from './vendor-index.b0346fe4.js';
|
|
4
4
|
import { normalizeModuleId } from 'vite-node/utils';
|
|
5
|
-
import { g as getWorkerState } from './chunk-mock-date.
|
|
5
|
+
import { g as getWorkerState } from './chunk-mock-date.c543fa3e.js';
|
|
6
6
|
import 'acorn';
|
|
7
7
|
import 'node:module';
|
|
8
8
|
import 'node:fs';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
import 'path';
|
|
12
|
-
import 'module';
|
|
13
|
-
import 'assert';
|
|
14
|
-
import 'util';
|
|
9
|
+
import 'node:assert';
|
|
10
|
+
import 'node:process';
|
|
15
11
|
import 'node:path';
|
|
12
|
+
import 'node:v8';
|
|
13
|
+
import 'node:util';
|
|
16
14
|
import 'picocolors';
|
|
17
15
|
import 'local-pkg';
|
|
18
|
-
import './chunk-utils-env.
|
|
16
|
+
import './chunk-utils-env.f4a39d2c.js';
|
|
17
|
+
import 'path';
|
|
19
18
|
|
|
20
19
|
var ModuleFormat = /* @__PURE__ */ ((ModuleFormat2) => {
|
|
21
20
|
ModuleFormat2["Builtin"] = "builtin";
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as VitestRunMode, U as UserConfig, N as Vitest,
|
|
2
|
-
export {
|
|
1
|
+
import { k as VitestRunMode, U as UserConfig, N as Vitest, ax as MockFactory, ay as MockMap, az as TestSequencer } from './types-d97c72c7.js';
|
|
2
|
+
export { az as TestSequencer, aB as TestSequencerConstructor, N as Vitest, aA as startVitest } from './types-d97c72c7.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
5
5
|
import { ViteNodeRunnerOptions } from 'vite-node';
|
package/dist/node.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-snapshot-manager.
|
|
2
|
-
export { V as VitestRunner } from './chunk-runtime-mocker.
|
|
3
|
-
import './chunk-utils-env.
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-snapshot-manager.ce714e21.js';
|
|
2
|
+
export { V as VitestRunner } from './chunk-runtime-mocker.58511c38.js';
|
|
3
|
+
import './chunk-utils-env.f4a39d2c.js';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'path';
|
|
6
6
|
import './chunk-integrations-coverage.44413252.js';
|
|
7
7
|
import 'local-pkg';
|
|
8
|
-
import './chunk-env-node.
|
|
8
|
+
import './chunk-env-node.787e9561.js';
|
|
9
9
|
import 'node:console';
|
|
10
|
-
import './chunk-mock-date.
|
|
10
|
+
import './chunk-mock-date.c543fa3e.js';
|
|
11
11
|
import 'node:path';
|
|
12
12
|
import 'picocolors';
|
|
13
13
|
import 'vite';
|
|
@@ -22,10 +22,10 @@ import './vendor-_commonjsHelpers.addc3445.js';
|
|
|
22
22
|
import 'vite-node/client';
|
|
23
23
|
import 'vite-node/server';
|
|
24
24
|
import 'node:fs/promises';
|
|
25
|
-
import './vendor-index.
|
|
25
|
+
import './vendor-index.451e37bc.js';
|
|
26
26
|
import 'node:buffer';
|
|
27
27
|
import 'node:child_process';
|
|
28
|
-
import './vendor-index.
|
|
28
|
+
import './vendor-index.e6c27006.js';
|
|
29
29
|
import 'child_process';
|
|
30
30
|
import 'assert';
|
|
31
31
|
import 'buffer';
|
|
@@ -38,7 +38,7 @@ import 'node:worker_threads';
|
|
|
38
38
|
import 'tinypool';
|
|
39
39
|
import './vendor-index.783e7f3e.js';
|
|
40
40
|
import 'perf_hooks';
|
|
41
|
-
import './chunk-utils-source-map.
|
|
41
|
+
import './chunk-utils-source-map.5f5d12cf.js';
|
|
42
42
|
import './chunk-utils-timers.52534f96.js';
|
|
43
43
|
import 'crypto';
|
|
44
44
|
import 'vite-node/utils';
|
|
@@ -48,6 +48,8 @@ import './chunk-magic-string.3a794426.js';
|
|
|
48
48
|
import 'strip-literal';
|
|
49
49
|
import 'readline';
|
|
50
50
|
import './vendor-index.9f20a9be.js';
|
|
51
|
-
import './vendor-index.
|
|
51
|
+
import './vendor-index.b0346fe4.js';
|
|
52
52
|
import 'node:module';
|
|
53
|
-
import '
|
|
53
|
+
import 'node:assert';
|
|
54
|
+
import 'node:v8';
|
|
55
|
+
import 'node:util';
|
package/dist/suite.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import 'util';
|
|
2
2
|
import 'chai';
|
|
3
|
-
import './chunk-mock-date.
|
|
4
|
-
export { b as bench, f as clearCollectorContext, r as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.
|
|
3
|
+
import './chunk-mock-date.c543fa3e.js';
|
|
4
|
+
export { b as bench, f as clearCollectorContext, r as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.2da9e75c.js';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'picocolors';
|
|
7
7
|
import 'local-pkg';
|
|
8
|
-
import './chunk-utils-env.
|
|
8
|
+
import './chunk-utils-env.f4a39d2c.js';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'path';
|
|
11
11
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
12
12
|
import './chunk-utils-timers.52534f96.js';
|
|
13
13
|
import './vendor-index.723a074f.js';
|
|
14
14
|
import 'tinyspy';
|
|
15
|
-
import './chunk-utils-source-map.
|
|
16
|
-
import './chunk-runtime-rpc.
|
|
15
|
+
import './chunk-utils-source-map.5f5d12cf.js';
|
|
16
|
+
import './chunk-runtime-rpc.d709e91b.js';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'fs';
|
|
@@ -226,6 +226,7 @@ declare class Typechecker {
|
|
|
226
226
|
protected collectFileTests(filepath: string): Promise<FileInformation | null>;
|
|
227
227
|
protected getFiles(): string[];
|
|
228
228
|
collectTests(): Promise<Record<string, FileInformation>>;
|
|
229
|
+
protected markPassed(file: File): void;
|
|
229
230
|
protected prepareResults(output: string): Promise<{
|
|
230
231
|
files: File[];
|
|
231
232
|
sourceErrors: TypeCheckError[];
|
|
@@ -404,6 +405,7 @@ declare class Vitest {
|
|
|
404
405
|
* @returns A value indicating whether rerun is needed (changedTests was mutated)
|
|
405
406
|
*/
|
|
406
407
|
private handleFileChanged;
|
|
408
|
+
private reportCoverage;
|
|
407
409
|
close(): Promise<void>;
|
|
408
410
|
/**
|
|
409
411
|
* Close the thread pool and exit the process
|
|
@@ -553,6 +555,12 @@ declare class TapFlatReporter extends TapReporter {
|
|
|
553
555
|
onFinished(files?: File[]): Promise<void>;
|
|
554
556
|
}
|
|
555
557
|
|
|
558
|
+
declare class HangingProcessReporter implements Reporter {
|
|
559
|
+
whyRunning: (() => void) | undefined;
|
|
560
|
+
onInit(): void;
|
|
561
|
+
onProcessTimeout(): void;
|
|
562
|
+
}
|
|
563
|
+
|
|
556
564
|
declare class JsonReporter implements Reporter {
|
|
557
565
|
start: number;
|
|
558
566
|
ctx: Vitest;
|
|
@@ -606,6 +614,7 @@ declare const ReportersMap: {
|
|
|
606
614
|
tap: typeof TapReporter;
|
|
607
615
|
'tap-flat': typeof TapFlatReporter;
|
|
608
616
|
junit: typeof JUnitReporter;
|
|
617
|
+
'hanging-process': typeof HangingProcessReporter;
|
|
609
618
|
};
|
|
610
619
|
type BuiltinReporters = keyof typeof ReportersMap;
|
|
611
620
|
|
|
@@ -1166,7 +1175,7 @@ interface WorkerRPC {
|
|
|
1166
1175
|
resolveId: ResolveIdFunction;
|
|
1167
1176
|
getSourceMap: (id: string, force?: boolean) => Promise<RawSourceMap | undefined>;
|
|
1168
1177
|
onFinished: (files: File[], errors?: unknown[]) => void;
|
|
1169
|
-
onWorkerExit: (code?: number) => void;
|
|
1178
|
+
onWorkerExit: (error: unknown, code?: number) => void;
|
|
1170
1179
|
onPathsCollected: (paths: string[]) => void;
|
|
1171
1180
|
onUserConsoleLog: (log: UserConsoleLog) => void;
|
|
1172
1181
|
onUnhandledRejection: (err: unknown) => void;
|
|
@@ -1194,9 +1203,13 @@ interface CoverageProvider {
|
|
|
1194
1203
|
clean(clean?: boolean): void | Promise<void>;
|
|
1195
1204
|
onBeforeFilesRun?(): void | Promise<void>;
|
|
1196
1205
|
onAfterSuiteRun(meta: AfterSuiteRunMeta): void | Promise<void>;
|
|
1197
|
-
reportCoverage(): void | Promise<void>;
|
|
1206
|
+
reportCoverage(reportContext: ReportContext): void | Promise<void>;
|
|
1198
1207
|
onFileTransform?(sourceCode: string, id: string, pluginCtx: TransformPluginContext): TransformResult | Promise<TransformResult>;
|
|
1199
1208
|
}
|
|
1209
|
+
interface ReportContext {
|
|
1210
|
+
/** Indicates whether all tests were run. False when only specific tests were run. */
|
|
1211
|
+
allTestsRun?: boolean;
|
|
1212
|
+
}
|
|
1200
1213
|
interface CoverageProviderModule {
|
|
1201
1214
|
/**
|
|
1202
1215
|
* Factory for creating a new coverage provider
|
|
@@ -1445,6 +1458,7 @@ interface Reporter {
|
|
|
1445
1458
|
onWatcherRerun?: (files: string[], trigger?: string) => Awaitable<void>;
|
|
1446
1459
|
onServerRestart?: (reason?: string) => Awaitable<void>;
|
|
1447
1460
|
onUserConsoleLog?: (log: UserConsoleLog) => Awaitable<void>;
|
|
1461
|
+
onProcessTimeout?: () => Awaitable<void>;
|
|
1448
1462
|
}
|
|
1449
1463
|
|
|
1450
1464
|
type BuiltinEnvironment = 'node' | 'jsdom' | 'happy-dom' | 'edge-runtime';
|
|
@@ -2257,4 +2271,4 @@ type Context = RootAndTarget & {
|
|
|
2257
2271
|
lastActivePath?: string;
|
|
2258
2272
|
};
|
|
2259
2273
|
|
|
2260
|
-
export { WorkerContext as $, ApiConfig as A, BuiltinEnvironment as B, CollectLineNumbers as C, DoneCallback as D, EnvironmentOptions as E, FakeTimerInstallOpts as F, SuiteFactory as G, HookListener as H, InlineConfig as I, JSDOMOptions as J, RuntimeContext as K, TestContext as L, MockFactoryWithHelper as M, Vitest as N, OnTestFailedHandler as O, SnapshotData as P, SnapshotUpdateState as Q, RuntimeConfig as R, SequenceHooks as S, TaskResultPack as T, UserConfig as U, VitestEnvironment as V, SnapshotStateOptions as W, SnapshotMatchOptions as X, SnapshotResult as Y, UncheckedSnapshot as Z, SnapshotSummary as _, File as a, ResolveIdFunction as a0, AfterSuiteRunMeta as a1, WorkerRPC as a2, WorkerGlobalState as a3, Awaitable as a4, Nullable as a5, Arrayable as a6, ArgumentsType$1 as a7, MergeInsertions as a8, DeepMerge as a9,
|
|
2274
|
+
export { WorkerContext as $, ApiConfig as A, BuiltinEnvironment as B, CollectLineNumbers as C, DoneCallback as D, EnvironmentOptions as E, FakeTimerInstallOpts as F, SuiteFactory as G, HookListener as H, InlineConfig as I, JSDOMOptions as J, RuntimeContext as K, TestContext as L, MockFactoryWithHelper as M, Vitest as N, OnTestFailedHandler as O, SnapshotData as P, SnapshotUpdateState as Q, RuntimeConfig as R, SequenceHooks as S, TaskResultPack as T, UserConfig as U, VitestEnvironment as V, SnapshotStateOptions as W, SnapshotMatchOptions as X, SnapshotResult as Y, UncheckedSnapshot as Z, SnapshotSummary as _, File as a, ResolveIdFunction as a0, AfterSuiteRunMeta as a1, WorkerRPC as a2, WorkerGlobalState as a3, Awaitable as a4, Nullable as a5, Arrayable as a6, ArgumentsType$1 as a7, MergeInsertions as a8, DeepMerge as a9, startVitest as aA, TestSequencerConstructor as aB, MutableArray as aa, Constructable as ab, ModuleCache as ac, EnvironmentReturn as ad, Environment as ae, UserConsoleLog as af, ParsedStack as ag, ErrorWithDiff as ah, OnServerRestartHandler as ai, CoverageProvider as aj, ReportContext as ak, CoverageProviderModule as al, CoverageReporter as am, CoverageOptions as an, ResolvedCoverageOptions as ao, BaseCoverageOptions as ap, CoverageIstanbulOptions as aq, CoverageC8Options as ar, BenchmarkUserOptions as as, Benchmark as at, BenchmarkResult as au, BenchFunction as av, BenchmarkAPI as aw, MockFactory as ax, MockMap as ay, TestSequencer as az, ResolvedConfig as b, ModuleGraphData as c, Reporter as d, RawErrsMap as e, TscErrorInfo as f, CollectLines as g, RootAndTarget as h, Context as i, CSSModuleScopeStrategy as j, VitestRunMode as k, TypecheckConfig as l, RunMode as m, TaskState as n, TaskBase as o, TaskResult as p, Suite as q, Test as r, Task as s, TestFunction as t, TestOptions as u, TestAPI as v, SuiteAPI as w, HookCleanupCallback as x, SuiteHooks as y, SuiteCollector as z };
|
|
@@ -2,7 +2,7 @@ import { Buffer } from 'node:buffer';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import childProcess from 'node:child_process';
|
|
4
4
|
import process$1 from 'node:process';
|
|
5
|
-
import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.
|
|
5
|
+
import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.e6c27006.js';
|
|
6
6
|
import url from 'node:url';
|
|
7
7
|
import { constants } from 'os';
|
|
8
8
|
import os from 'node:os';
|