vitest 0.0.129 → 0.0.130
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/cli.js +9 -9
- package/dist/{constants-868b9a2e.js → constants-5b9c0d41.js} +1 -1
- package/dist/{diff-be830986.js → diff-3adb959a.js} +1 -1
- package/dist/entry.js +5 -5
- package/dist/{global-0254dd68.js → global-4d67a585.js} +4 -4
- package/dist/{index-cb02ee01.js → index-648e7ab2.js} +0 -0
- package/dist/{index-cce5de77.js → index-6e709f57.js} +0 -0
- package/dist/{index-06712022.js → index-6f5d03b2.js} +1 -1
- package/dist/{index-42a3a132.js → index-9fdde2e8.js} +2 -2
- package/dist/{index-d30b5ed0.js → index-bc2183ca.js} +676 -782
- package/dist/{index-42d44ee5.js → index-ce49e384.js} +2 -2
- package/dist/{index-a73f33e0.js → index-e909c175.js} +0 -0
- package/dist/{index-93dcb598.js → index-fa899e66.js} +0 -0
- package/dist/index.d.ts +102 -3
- package/dist/index.js +3 -3
- package/dist/{magic-string.es-98a8bfa0.js → magic-string.es-94000aea.js} +0 -0
- package/dist/node.d.ts +102 -4
- package/dist/node.js +8 -8
- package/dist/{setup-6e09a65a.js → setup-a6f22d64.js} +4 -4
- package/dist/{vi-fe26a646.js → vi-8ac1afa2.js} +1 -1
- package/dist/worker.js +3 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -4,11 +4,11 @@ import { Buffer } from 'buffer';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import childProcess from 'child_process';
|
|
6
6
|
import process$1 from 'process';
|
|
7
|
-
import { m as mergeStream, g as getStream, c as crossSpawn } from './index-
|
|
7
|
+
import { m as mergeStream, g as getStream, c as crossSpawn } from './index-6e709f57.js';
|
|
8
8
|
import require$$0, { constants } from 'os';
|
|
9
|
-
import { s as signalExit } from './index-
|
|
10
|
-
import { e as ensurePackageInstalled } from './index-
|
|
11
|
-
import { c as createVitest } from './index-
|
|
9
|
+
import { s as signalExit } from './index-648e7ab2.js';
|
|
10
|
+
import { e as ensurePackageInstalled } from './index-9fdde2e8.js';
|
|
11
|
+
import { c as createVitest } from './index-bc2183ca.js';
|
|
12
12
|
import './_commonjsHelpers-c9e3b764.js';
|
|
13
13
|
import 'fs';
|
|
14
14
|
import 'stream';
|
|
@@ -18,14 +18,14 @@ import 'url';
|
|
|
18
18
|
import 'tty';
|
|
19
19
|
import 'local-pkg';
|
|
20
20
|
import 'vite';
|
|
21
|
-
import './constants-
|
|
22
|
-
import './magic-string.es-
|
|
21
|
+
import './constants-5b9c0d41.js';
|
|
22
|
+
import './magic-string.es-94000aea.js';
|
|
23
23
|
import 'perf_hooks';
|
|
24
|
-
import './diff-
|
|
24
|
+
import './diff-3adb959a.js';
|
|
25
25
|
import 'module';
|
|
26
26
|
import 'worker_threads';
|
|
27
27
|
import 'tinypool';
|
|
28
|
-
import './index-
|
|
28
|
+
import './index-e909c175.js';
|
|
29
29
|
|
|
30
30
|
function toArr(any) {
|
|
31
31
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
@@ -1700,7 +1700,7 @@ function execa(file, args, options) {
|
|
|
1700
1700
|
return mergePromise(spawned, handlePromiseOnce);
|
|
1701
1701
|
}
|
|
1702
1702
|
|
|
1703
|
-
var version = "0.0.
|
|
1703
|
+
var version = "0.0.130";
|
|
1704
1704
|
|
|
1705
1705
|
const CLOSE_TIMEOUT = 1e3;
|
|
1706
1706
|
const cli = cac("vitest");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import { k as resolve } from './index-
|
|
2
|
+
import { k as resolve } from './index-9fdde2e8.js';
|
|
3
3
|
|
|
4
4
|
const distDir = resolve(fileURLToPath(import.meta.url), "../../dist");
|
|
5
5
|
const defaultInclude = ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"];
|
package/dist/entry.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import fs, { promises } from 'fs';
|
|
2
|
-
import { f as format_1, h as getSerializers, p as plugins_1, j as equals, b as getState, k as iterableEquality, l as subsetEquality, m as isA, J as JestChaiExpect, n as clearContext, o as defaultSuite, q as setHooks, r as getHooks, u as context, s as setState, x as getFn, e as vi } from './vi-
|
|
2
|
+
import { f as format_1, h as getSerializers, p as plugins_1, j as equals, b as getState, k as iterableEquality, l as subsetEquality, m as isA, J as JestChaiExpect, n as clearContext, o as defaultSuite, q as setHooks, r as getHooks, u as context, s as setState, x as getFn, e as vi } from './vi-8ac1afa2.js';
|
|
3
3
|
import { Console } from 'console';
|
|
4
4
|
import { Writable } from 'stream';
|
|
5
5
|
import { importModule } from 'local-pkg';
|
|
6
6
|
import chai$1, { expect, util } from 'chai';
|
|
7
7
|
import { a as commonjsRequire, c as commonjsGlobal } from './_commonjsHelpers-c9e3b764.js';
|
|
8
|
-
import { u as index, s as slash, v as getNames, c, t as toArray, r as relative, w as partitionSuiteChildren, x as hasTests, h as hasFailed } from './index-
|
|
8
|
+
import { u as index, s as slash, v as getNames, c, t as toArray, r as relative, w as partitionSuiteChildren, x as hasTests, h as hasFailed } from './index-9fdde2e8.js';
|
|
9
9
|
import { r as rpc } from './rpc-8c7cc374.js';
|
|
10
|
-
import { l as getOriginalPos, m as posToNumber, n as parseStacktrace, u as unifiedDiff } from './diff-
|
|
10
|
+
import { l as getOriginalPos, m as posToNumber, n as parseStacktrace, u as unifiedDiff } from './diff-3adb959a.js';
|
|
11
11
|
import { performance as performance$1 } from 'perf_hooks';
|
|
12
12
|
import { createHash } from 'crypto';
|
|
13
13
|
import { format } from 'util';
|
|
@@ -385,7 +385,7 @@ var chaiSubset = {exports: {}};
|
|
|
385
385
|
var Subset = chaiSubset.exports;
|
|
386
386
|
|
|
387
387
|
async function saveInlineSnapshots(snapshots) {
|
|
388
|
-
const MagicString = (await import('./magic-string.es-
|
|
388
|
+
const MagicString = (await import('./magic-string.es-94000aea.js')).default;
|
|
389
389
|
const files = new Set(snapshots.map((i) => i.file));
|
|
390
390
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
391
391
|
const map = await rpc().getSourceMap(file);
|
|
@@ -1225,7 +1225,7 @@ async function setupGlobalEnv(config) {
|
|
|
1225
1225
|
setupConsoleLogSpy();
|
|
1226
1226
|
await setupChai();
|
|
1227
1227
|
if (config.global)
|
|
1228
|
-
(await import('./global-
|
|
1228
|
+
(await import('./global-4d67a585.js')).registerApiGlobally();
|
|
1229
1229
|
}
|
|
1230
1230
|
function setupConsoleLogSpy() {
|
|
1231
1231
|
const stdout = new Writable({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { g as globalApis } from './constants-
|
|
2
|
-
import { i as index } from './index-
|
|
1
|
+
import { g as globalApis } from './constants-5b9c0d41.js';
|
|
2
|
+
import { i as index } from './index-6f5d03b2.js';
|
|
3
3
|
import 'url';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-9fdde2e8.js';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
7
|
import 'path';
|
|
8
|
-
import './vi-
|
|
8
|
+
import './vi-8ac1afa2.js';
|
|
9
9
|
import './jest-mock-30625866.js';
|
|
10
10
|
import 'chai';
|
|
11
11
|
import 'tinyspy';
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, b as getState, s as setState, c as suite, t as test, d as describe, i as it, v as vitest, e as vi } from './vi-
|
|
1
|
+
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, b as getState, s as setState, c as suite, t as test, d as describe, i as it, v as vitest, e as vi } from './vi-8ac1afa2.js';
|
|
2
2
|
import chai, { assert, should } from 'chai';
|
|
3
3
|
import { s as spies, i as isMockFunction, a as spyOn, f as fn } from './jest-mock-30625866.js';
|
|
4
4
|
|
|
@@ -319,14 +319,14 @@ async function ensurePackageInstalled(dependency, promptInstall = !process.env.C
|
|
|
319
319
|
`));
|
|
320
320
|
if (!promptInstall)
|
|
321
321
|
return false;
|
|
322
|
-
const prompts = await import('./index-
|
|
322
|
+
const prompts = await import('./index-fa899e66.js').then(function (n) { return n.i; });
|
|
323
323
|
const { install } = await prompts.prompt({
|
|
324
324
|
type: "confirm",
|
|
325
325
|
name: "install",
|
|
326
326
|
message: c.reset(`Do you want to install ${c.green(dependency)}?`)
|
|
327
327
|
});
|
|
328
328
|
if (install) {
|
|
329
|
-
await (await import('./index-
|
|
329
|
+
await (await import('./index-ce49e384.js')).installPackage(dependency, { dev: true });
|
|
330
330
|
return true;
|
|
331
331
|
}
|
|
332
332
|
return false;
|