vitest 0.32.1 → 0.32.3
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 +33 -4
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +22 -5
- package/dist/child.js +3 -3
- package/dist/{chunk-api-setup.05e3917b.js → chunk-api-setup.8f785c4a.js} +18 -11
- package/dist/{chunk-install-pkg.65daeadb.js → chunk-install-pkg.0716919d.js} +69 -55
- package/dist/{chunk-integrations-globals.a56dee90.js → chunk-integrations-globals.0093e2ed.js} +5 -5
- package/dist/{chunk-node-git.4c43bd73.js → chunk-node-git.c410fed8.js} +3 -2
- package/dist/cli-wrapper.js +2 -2
- package/dist/cli.js +8 -8
- package/dist/config.d.ts +1 -1
- package/dist/coverage.d.ts +1 -1
- package/dist/entry.js +9 -9
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/index.d.ts +60 -40
- package/dist/index.js +6 -6
- package/dist/loader.js +140 -4
- package/dist/node.d.ts +3 -3
- package/dist/node.js +9 -9
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +24 -19
- package/dist/suite.d.ts +1 -0
- package/dist/{types-2b1c412e.d.ts → types-198fd1d9.d.ts} +302 -77
- package/dist/vendor-_commonjsHelpers.7d1333e8.js +7 -0
- package/dist/{vendor-cli-api.17011d0a.js → vendor-cli-api.ff679aa2.js} +281 -229
- package/dist/{vendor-coverage.de2180ed.js → vendor-coverage.2e41927a.js} +1 -1
- package/dist/{vendor-execute.001ae440.js → vendor-execute.3576af13.js} +14 -16
- package/dist/{vendor-index.c1e09929.js → vendor-index.1f85e5f1.js} +52 -39
- package/dist/{vendor-index.fad2598b.js → vendor-index.23ac4e13.js} +1 -1
- package/dist/{vendor-index.0f133dbe.js → vendor-index.2af39fbb.js} +5 -3
- package/dist/{vendor-index.fc98d30f.js → vendor-index.98139333.js} +4 -22
- package/dist/{vendor-index.87ab04c3.js → vendor-index.cc463d9e.js} +2 -1
- package/dist/{vendor-rpc.4d3d7a54.js → vendor-rpc.ad5b08c7.js} +10 -10
- package/dist/{vendor-run-once.69ce7172.js → vendor-run-once.1fa85ba7.js} +2 -2
- package/dist/vendor-vi.dd6706cb.js +3421 -0
- package/dist/worker.js +3 -3
- package/package.json +21 -22
- package/dist/vendor-_commonjsHelpers.76cdd49e.js +0 -3
- package/dist/vendor-setup.common.f1cf2231.js +0 -20
- package/dist/vendor-vi.74cf3ef7.js +0 -3354
- /package/dist/{vendor-index.75f2b63d.js → vendor-environments.75f2b63d.js} +0 -0
package/LICENSE.md
CHANGED
|
@@ -1151,7 +1151,7 @@ Repository: ehmicky/human-signals
|
|
|
1151
1151
|
> same "printed page" as the copyright notice for easier
|
|
1152
1152
|
> identification within third-party archives.
|
|
1153
1153
|
>
|
|
1154
|
-
> Copyright
|
|
1154
|
+
> Copyright 2019 ehmicky <ehmicky@gmail.com>
|
|
1155
1155
|
>
|
|
1156
1156
|
> Licensed under the Apache License, Version 2.0 (the "License");
|
|
1157
1157
|
> you may not use this file except in compliance with the License.
|
|
@@ -1467,7 +1467,7 @@ Repository: sindresorhus/mimic-fn
|
|
|
1467
1467
|
|
|
1468
1468
|
> MIT License
|
|
1469
1469
|
>
|
|
1470
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
1470
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
1471
1471
|
>
|
|
1472
1472
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
1473
1473
|
>
|
|
@@ -1512,7 +1512,7 @@ Repository: sindresorhus/npm-run-path
|
|
|
1512
1512
|
|
|
1513
1513
|
> MIT License
|
|
1514
1514
|
>
|
|
1515
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (
|
|
1515
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
1516
1516
|
>
|
|
1517
1517
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
1518
1518
|
>
|
|
@@ -1693,6 +1693,35 @@ Repository: git://github.com/feross/queue-microtask.git
|
|
|
1693
1693
|
|
|
1694
1694
|
---------------------------------------
|
|
1695
1695
|
|
|
1696
|
+
## resolve-pkg-maps
|
|
1697
|
+
License: MIT
|
|
1698
|
+
By: Hiroki Osame
|
|
1699
|
+
Repository: privatenumber/resolve-pkg-maps
|
|
1700
|
+
|
|
1701
|
+
> MIT License
|
|
1702
|
+
>
|
|
1703
|
+
> Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
|
|
1704
|
+
>
|
|
1705
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1706
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
1707
|
+
> in the Software without restriction, including without limitation the rights
|
|
1708
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1709
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
1710
|
+
> furnished to do so, subject to the following conditions:
|
|
1711
|
+
>
|
|
1712
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
1713
|
+
> copies or substantial portions of the Software.
|
|
1714
|
+
>
|
|
1715
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1716
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1717
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1718
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1719
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1720
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1721
|
+
> SOFTWARE.
|
|
1722
|
+
|
|
1723
|
+
---------------------------------------
|
|
1724
|
+
|
|
1696
1725
|
## restore-cursor
|
|
1697
1726
|
License: MIT
|
|
1698
1727
|
By: Sindre Sorhus
|
|
@@ -1912,7 +1941,7 @@ Repository: sindresorhus/strip-final-newline
|
|
|
1912
1941
|
|
|
1913
1942
|
> MIT License
|
|
1914
1943
|
>
|
|
1915
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (
|
|
1944
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
1916
1945
|
>
|
|
1917
1946
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
1918
1947
|
>
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { startTests } from '@vitest/runner';
|
|
2
|
-
import {
|
|
2
|
+
import { R as ResolvedConfig, C as CoverageOptions, a as CoverageProvider, b as CoverageProviderModule } from './types-198fd1d9.js';
|
|
3
3
|
import '@vitest/snapshot';
|
|
4
4
|
import '@vitest/expect';
|
|
5
5
|
import 'vite';
|
package/dist/browser.js
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
export { startTests } from '@vitest/runner';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import './vendor-
|
|
6
|
-
import './vendor-index.fad2598b.js';
|
|
2
|
+
import { setSafeTimers } from '@vitest/utils';
|
|
3
|
+
import { a as resetRunOnceCounter } from './vendor-run-once.1fa85ba7.js';
|
|
4
|
+
export { g as getCoverageProvider, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor-coverage.2e41927a.js';
|
|
5
|
+
import './vendor-index.23ac4e13.js';
|
|
7
6
|
import 'pathe';
|
|
8
7
|
import 'std-env';
|
|
9
8
|
import '@vitest/runner/utils';
|
|
10
9
|
import './vendor-global.6795f91f.js';
|
|
10
|
+
|
|
11
|
+
let globalSetup = false;
|
|
12
|
+
async function setupCommonEnv(config) {
|
|
13
|
+
resetRunOnceCounter();
|
|
14
|
+
setupDefines(config.defines);
|
|
15
|
+
if (globalSetup)
|
|
16
|
+
return;
|
|
17
|
+
globalSetup = true;
|
|
18
|
+
setSafeTimers();
|
|
19
|
+
if (config.globals)
|
|
20
|
+
(await import('./chunk-integrations-globals.0093e2ed.js')).registerApiGlobally();
|
|
21
|
+
}
|
|
22
|
+
function setupDefines(defines) {
|
|
23
|
+
for (const key in defines)
|
|
24
|
+
globalThis[key] = defines[key];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { setupCommonEnv };
|
package/dist/child.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import v8 from 'node:v8';
|
|
3
|
-
import { c as createBirpc } from './vendor-index.
|
|
3
|
+
import { c as createBirpc } from './vendor-index.cc463d9e.js';
|
|
4
4
|
import { parseRegexp } from '@vitest/utils';
|
|
5
|
-
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.
|
|
6
|
-
import {
|
|
5
|
+
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.3576af13.js';
|
|
6
|
+
import { r as rpcDone } from './vendor-rpc.ad5b08c7.js';
|
|
7
7
|
import { s as setupInspect } from './vendor-inspector.47fc8cbb.js';
|
|
8
8
|
import 'node:url';
|
|
9
9
|
import 'vite-node/client';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { promises, existsSync } from 'node:fs';
|
|
2
2
|
import { dirname } from 'pathe';
|
|
3
|
-
import { c as createBirpc, i as isPrimitive } from './vendor-index.
|
|
3
|
+
import { c as createBirpc, i as isPrimitive } from './vendor-index.cc463d9e.js';
|
|
4
4
|
import require$$0$2 from 'stream';
|
|
5
5
|
import require$$0 from 'zlib';
|
|
6
6
|
import require$$0$1 from 'buffer';
|
|
@@ -11,8 +11,9 @@ import require$$2 from 'events';
|
|
|
11
11
|
import require$$1 from 'https';
|
|
12
12
|
import require$$2$1 from 'http';
|
|
13
13
|
import require$$7 from 'url';
|
|
14
|
+
import { g as getDefaultExportFromCjs } from './vendor-_commonjsHelpers.7d1333e8.js';
|
|
14
15
|
import { A as API_PATH } from './vendor-constants.538d9b49.js';
|
|
15
|
-
import './vendor-index.
|
|
16
|
+
import './vendor-index.23ac4e13.js';
|
|
16
17
|
import { parseErrorStacktrace } from '@vitest/utils';
|
|
17
18
|
import 'std-env';
|
|
18
19
|
import '@vitest/runner/utils';
|
|
@@ -290,6 +291,8 @@ if (!process.env.WS_NO_BUFFER_UTIL) {
|
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
293
|
|
|
294
|
+
var bufferUtilExports = bufferUtil$1.exports;
|
|
295
|
+
|
|
293
296
|
const kDone = Symbol('kDone');
|
|
294
297
|
const kRun = Symbol('kRun');
|
|
295
298
|
|
|
@@ -346,7 +349,7 @@ var limiter = Limiter$1;
|
|
|
346
349
|
|
|
347
350
|
const zlib = require$$0;
|
|
348
351
|
|
|
349
|
-
const bufferUtil =
|
|
352
|
+
const bufferUtil = bufferUtilExports;
|
|
350
353
|
const Limiter = limiter;
|
|
351
354
|
const { kStatusCode: kStatusCode$2 } = constants;
|
|
352
355
|
|
|
@@ -990,6 +993,8 @@ if (isUtf8) {
|
|
|
990
993
|
}
|
|
991
994
|
}
|
|
992
995
|
|
|
996
|
+
var validationExports = validation.exports;
|
|
997
|
+
|
|
993
998
|
const { Writable } = require$$0$2;
|
|
994
999
|
|
|
995
1000
|
const PerMessageDeflate$3 = permessageDeflate;
|
|
@@ -999,8 +1004,8 @@ const {
|
|
|
999
1004
|
kStatusCode: kStatusCode$1,
|
|
1000
1005
|
kWebSocket: kWebSocket$2
|
|
1001
1006
|
} = constants;
|
|
1002
|
-
const { concat, toArrayBuffer, unmask } =
|
|
1003
|
-
const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } =
|
|
1007
|
+
const { concat, toArrayBuffer, unmask } = bufferUtilExports;
|
|
1008
|
+
const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = validationExports;
|
|
1004
1009
|
|
|
1005
1010
|
const FastBuffer = Buffer[Symbol.species];
|
|
1006
1011
|
const GET_INFO = 0;
|
|
@@ -1621,8 +1626,8 @@ const { randomFillSync } = require$$5;
|
|
|
1621
1626
|
|
|
1622
1627
|
const PerMessageDeflate$2 = permessageDeflate;
|
|
1623
1628
|
const { EMPTY_BUFFER: EMPTY_BUFFER$1 } = constants;
|
|
1624
|
-
const { isValidStatusCode } =
|
|
1625
|
-
const { mask: applyMask, toBuffer: toBuffer$1 } =
|
|
1629
|
+
const { isValidStatusCode } = validationExports;
|
|
1630
|
+
const { mask: applyMask, toBuffer: toBuffer$1 } = bufferUtilExports;
|
|
1626
1631
|
|
|
1627
1632
|
const kByteLength = Symbol('kByteLength');
|
|
1628
1633
|
const maskBuffer = Buffer.alloc(4);
|
|
@@ -2381,7 +2386,7 @@ function callListener(listener, thisArg, event) {
|
|
|
2381
2386
|
}
|
|
2382
2387
|
}
|
|
2383
2388
|
|
|
2384
|
-
const { tokenChars: tokenChars$1 } =
|
|
2389
|
+
const { tokenChars: tokenChars$1 } = validationExports;
|
|
2385
2390
|
|
|
2386
2391
|
/**
|
|
2387
2392
|
* Adds an offer to the map of extension offers or a parameter to the map of
|
|
@@ -2610,7 +2615,7 @@ const {
|
|
|
2610
2615
|
EventTarget: { addEventListener, removeEventListener }
|
|
2611
2616
|
} = eventTarget;
|
|
2612
2617
|
const { format, parse: parse$1 } = extension$1;
|
|
2613
|
-
const { toBuffer } =
|
|
2618
|
+
const { toBuffer } = bufferUtilExports;
|
|
2614
2619
|
|
|
2615
2620
|
const closeTimeout = 30 * 1000;
|
|
2616
2621
|
const kAborted = Symbol('kAborted');
|
|
@@ -3892,7 +3897,7 @@ function socketOnError$1() {
|
|
|
3892
3897
|
}
|
|
3893
3898
|
}
|
|
3894
3899
|
|
|
3895
|
-
const { tokenChars } =
|
|
3900
|
+
const { tokenChars } = validationExports;
|
|
3896
3901
|
|
|
3897
3902
|
/**
|
|
3898
3903
|
* Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
|
|
@@ -4484,10 +4489,12 @@ function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
|
4484
4489
|
}
|
|
4485
4490
|
}
|
|
4486
4491
|
|
|
4492
|
+
var WebSocketServer$1 = /*@__PURE__*/getDefaultExportFromCjs(websocketServer);
|
|
4493
|
+
|
|
4487
4494
|
function setup(vitestOrWorkspace, server) {
|
|
4488
4495
|
var _a;
|
|
4489
4496
|
const ctx = "ctx" in vitestOrWorkspace ? vitestOrWorkspace.ctx : vitestOrWorkspace;
|
|
4490
|
-
const wss = new
|
|
4497
|
+
const wss = new WebSocketServer$1({ noServer: true });
|
|
4491
4498
|
const clients = /* @__PURE__ */ new Map();
|
|
4492
4499
|
(_a = (server || ctx.server).httpServer) == null ? void 0 : _a.on("upgrade", (request, socket, head) => {
|
|
4493
4500
|
if (!request.url)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import require$$
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import $ from 'fs';
|
|
2
|
+
import f from 'path';
|
|
3
|
+
import { g as getDefaultExportFromCjs } from './vendor-_commonjsHelpers.7d1333e8.js';
|
|
4
|
+
import require$$2 from 'util';
|
|
5
|
+
import require$$0$1 from 'child_process';
|
|
6
|
+
import { p as pathKeyExports, s as signalExitExports, m as mergeStream$1, g as getStreamExports, c as crossSpawnExports } from './vendor-index.1f85e5f1.js';
|
|
7
|
+
import { o as onetimeExports } from './vendor-cli-api.ff679aa2.js';
|
|
8
|
+
import require$$0 from 'os';
|
|
8
9
|
import 'node:buffer';
|
|
9
10
|
import 'node:path';
|
|
10
11
|
import 'node:child_process';
|
|
11
12
|
import 'node:process';
|
|
12
|
-
import './vendor-_commonjsHelpers.76cdd49e.js';
|
|
13
13
|
import 'node:url';
|
|
14
14
|
import 'node:os';
|
|
15
15
|
import 'assert';
|
|
@@ -20,12 +20,12 @@ import 'stream';
|
|
|
20
20
|
import 'node:util';
|
|
21
21
|
import 'pathe';
|
|
22
22
|
import './vendor-constants.538d9b49.js';
|
|
23
|
-
import './vendor-coverage.
|
|
24
|
-
import './vendor-
|
|
23
|
+
import './vendor-coverage.2e41927a.js';
|
|
24
|
+
import './vendor-environments.75f2b63d.js';
|
|
25
25
|
import 'node:console';
|
|
26
26
|
import 'local-pkg';
|
|
27
27
|
import 'picocolors';
|
|
28
|
-
import './vendor-index.
|
|
28
|
+
import './vendor-index.23ac4e13.js';
|
|
29
29
|
import 'std-env';
|
|
30
30
|
import '@vitest/runner/utils';
|
|
31
31
|
import '@vitest/utils';
|
|
@@ -37,7 +37,7 @@ import '@vitest/snapshot/manager';
|
|
|
37
37
|
import 'vite-node/server';
|
|
38
38
|
import './vendor-paths.84fc7a99.js';
|
|
39
39
|
import 'node:v8';
|
|
40
|
-
import './vendor-index.
|
|
40
|
+
import './vendor-index.cc463d9e.js';
|
|
41
41
|
import 'node:worker_threads';
|
|
42
42
|
import 'tinypool';
|
|
43
43
|
import 'node:perf_hooks';
|
|
@@ -247,9 +247,9 @@ const pLocate$1 = async (iterable, tester, options) => {
|
|
|
247
247
|
|
|
248
248
|
var pLocate_1 = pLocate$1;
|
|
249
249
|
|
|
250
|
-
const path$1 =
|
|
251
|
-
const fs$1 =
|
|
252
|
-
const {promisify: promisify$1} = require$$
|
|
250
|
+
const path$1 = f;
|
|
251
|
+
const fs$1 = $;
|
|
252
|
+
const {promisify: promisify$1} = require$$2;
|
|
253
253
|
const pLocate = pLocate_1;
|
|
254
254
|
|
|
255
255
|
const fsStat = promisify$1(fs$1.stat);
|
|
@@ -315,10 +315,12 @@ locatePath.exports.sync = (paths, options) => {
|
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
317
|
|
|
318
|
+
var locatePathExports = locatePath.exports;
|
|
319
|
+
|
|
318
320
|
var pathExists = {exports: {}};
|
|
319
321
|
|
|
320
|
-
const fs =
|
|
321
|
-
const {promisify} = require$$
|
|
322
|
+
const fs = $;
|
|
323
|
+
const {promisify} = require$$2;
|
|
322
324
|
|
|
323
325
|
const pAccess = promisify(fs.access);
|
|
324
326
|
|
|
@@ -340,10 +342,12 @@ pathExists.exports.sync = path => {
|
|
|
340
342
|
}
|
|
341
343
|
};
|
|
342
344
|
|
|
345
|
+
var pathExistsExports = pathExists.exports;
|
|
346
|
+
|
|
343
347
|
(function (module) {
|
|
344
|
-
const path =
|
|
345
|
-
const locatePath
|
|
346
|
-
const pathExists
|
|
348
|
+
const path = f;
|
|
349
|
+
const locatePath = locatePathExports;
|
|
350
|
+
const pathExists = pathExistsExports;
|
|
347
351
|
|
|
348
352
|
const stop = Symbol('findUp.stop');
|
|
349
353
|
|
|
@@ -354,12 +358,12 @@ pathExists.exports.sync = path => {
|
|
|
354
358
|
|
|
355
359
|
const runMatcher = async locateOptions => {
|
|
356
360
|
if (typeof name !== 'function') {
|
|
357
|
-
return locatePath
|
|
361
|
+
return locatePath(paths, locateOptions);
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
const foundPath = await name(locateOptions.cwd);
|
|
361
365
|
if (typeof foundPath === 'string') {
|
|
362
|
-
return locatePath
|
|
366
|
+
return locatePath([foundPath], locateOptions);
|
|
363
367
|
}
|
|
364
368
|
|
|
365
369
|
return foundPath;
|
|
@@ -393,12 +397,12 @@ pathExists.exports.sync = path => {
|
|
|
393
397
|
|
|
394
398
|
const runMatcher = locateOptions => {
|
|
395
399
|
if (typeof name !== 'function') {
|
|
396
|
-
return locatePath
|
|
400
|
+
return locatePath.sync(paths, locateOptions);
|
|
397
401
|
}
|
|
398
402
|
|
|
399
403
|
const foundPath = name(locateOptions.cwd);
|
|
400
404
|
if (typeof foundPath === 'string') {
|
|
401
|
-
return locatePath
|
|
405
|
+
return locatePath.sync([foundPath], locateOptions);
|
|
402
406
|
}
|
|
403
407
|
|
|
404
408
|
return foundPath;
|
|
@@ -424,16 +428,17 @@ pathExists.exports.sync = path => {
|
|
|
424
428
|
}
|
|
425
429
|
};
|
|
426
430
|
|
|
427
|
-
module.exports.exists = pathExists
|
|
431
|
+
module.exports.exists = pathExists;
|
|
428
432
|
|
|
429
|
-
module.exports.sync.exists = pathExists
|
|
433
|
+
module.exports.sync.exists = pathExists.sync;
|
|
430
434
|
|
|
431
|
-
module.exports.stop = stop;
|
|
435
|
+
module.exports.stop = stop;
|
|
432
436
|
} (findUp$1));
|
|
433
437
|
|
|
434
|
-
var
|
|
438
|
+
var findUpExports = findUp$1.exports;
|
|
439
|
+
var findUp = /*@__PURE__*/getDefaultExportFromCjs(findUpExports);
|
|
435
440
|
|
|
436
|
-
var execa$
|
|
441
|
+
var execa$2 = {exports: {}};
|
|
437
442
|
|
|
438
443
|
var stripFinalNewline$1 = input => {
|
|
439
444
|
const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
|
|
@@ -452,14 +457,16 @@ var stripFinalNewline$1 = input => {
|
|
|
452
457
|
|
|
453
458
|
var npmRunPath$1 = {exports: {}};
|
|
454
459
|
|
|
460
|
+
npmRunPath$1.exports;
|
|
461
|
+
|
|
455
462
|
(function (module) {
|
|
456
|
-
const path =
|
|
457
|
-
const pathKey
|
|
463
|
+
const path = f;
|
|
464
|
+
const pathKey = pathKeyExports;
|
|
458
465
|
|
|
459
466
|
const npmRunPath = options => {
|
|
460
467
|
options = {
|
|
461
468
|
cwd: process.cwd(),
|
|
462
|
-
path: process.env[pathKey
|
|
469
|
+
path: process.env[pathKey()],
|
|
463
470
|
execPath: process.execPath,
|
|
464
471
|
...options
|
|
465
472
|
};
|
|
@@ -492,15 +499,17 @@ var npmRunPath$1 = {exports: {}};
|
|
|
492
499
|
};
|
|
493
500
|
|
|
494
501
|
const env = {...options.env};
|
|
495
|
-
const path = pathKey
|
|
502
|
+
const path = pathKey({env});
|
|
496
503
|
|
|
497
504
|
options.path = env[path];
|
|
498
505
|
env[path] = module.exports(options);
|
|
499
506
|
|
|
500
507
|
return env;
|
|
501
|
-
};
|
|
508
|
+
};
|
|
502
509
|
} (npmRunPath$1));
|
|
503
510
|
|
|
511
|
+
var npmRunPathExports = npmRunPath$1.exports;
|
|
512
|
+
|
|
504
513
|
var main = {};
|
|
505
514
|
|
|
506
515
|
var signals = {};
|
|
@@ -801,7 +810,7 @@ standard:"posix"};
|
|
|
801
810
|
const SIGRTMIN=34;
|
|
802
811
|
const SIGRTMAX=64;realtime.SIGRTMAX=SIGRTMAX;
|
|
803
812
|
|
|
804
|
-
Object.defineProperty(signals,"__esModule",{value:true});signals.getSignals=void 0;var _os$1=require$$0
|
|
813
|
+
Object.defineProperty(signals,"__esModule",{value:true});signals.getSignals=void 0;var _os$1=require$$0;
|
|
805
814
|
|
|
806
815
|
var _core=core;
|
|
807
816
|
var _realtime$1=realtime;
|
|
@@ -836,7 +845,7 @@ const number=supported?constantSignal:defaultNumber;
|
|
|
836
845
|
return {name,number,description,supported,action,forced,standard};
|
|
837
846
|
};
|
|
838
847
|
|
|
839
|
-
Object.defineProperty(main,"__esModule",{value:true});main.signalsByNumber=main.signalsByName=void 0;var _os=require$$0
|
|
848
|
+
Object.defineProperty(main,"__esModule",{value:true});main.signalsByNumber=main.signalsByName=void 0;var _os=require$$0;
|
|
840
849
|
|
|
841
850
|
var _signals=signals;
|
|
842
851
|
var _realtime=realtime;
|
|
@@ -1049,8 +1058,10 @@ stdio.exports.node = options => {
|
|
|
1049
1058
|
return [...stdio, 'ipc'];
|
|
1050
1059
|
};
|
|
1051
1060
|
|
|
1052
|
-
|
|
1053
|
-
|
|
1061
|
+
var stdioExports = stdio.exports;
|
|
1062
|
+
|
|
1063
|
+
const os = require$$0;
|
|
1064
|
+
const onExit = signalExitExports;
|
|
1054
1065
|
|
|
1055
1066
|
const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
|
|
1056
1067
|
|
|
@@ -1192,7 +1203,7 @@ isStream$1.transform = stream =>
|
|
|
1192
1203
|
var isStream_1 = isStream$1;
|
|
1193
1204
|
|
|
1194
1205
|
const isStream = isStream_1;
|
|
1195
|
-
const getStream =
|
|
1206
|
+
const getStream = getStreamExports;
|
|
1196
1207
|
const mergeStream = mergeStream$1;
|
|
1197
1208
|
|
|
1198
1209
|
// `input` option
|
|
@@ -1383,14 +1394,14 @@ var command = {
|
|
|
1383
1394
|
parseCommand: parseCommand$1
|
|
1384
1395
|
};
|
|
1385
1396
|
|
|
1386
|
-
const path =
|
|
1387
|
-
const childProcess = require$$0$
|
|
1388
|
-
const crossSpawn =
|
|
1397
|
+
const path = f;
|
|
1398
|
+
const childProcess = require$$0$1;
|
|
1399
|
+
const crossSpawn = crossSpawnExports;
|
|
1389
1400
|
const stripFinalNewline = stripFinalNewline$1;
|
|
1390
|
-
const npmRunPath =
|
|
1391
|
-
const onetime =
|
|
1401
|
+
const npmRunPath = npmRunPathExports;
|
|
1402
|
+
const onetime = onetimeExports;
|
|
1392
1403
|
const makeError = error;
|
|
1393
|
-
const normalizeStdio =
|
|
1404
|
+
const normalizeStdio = stdioExports;
|
|
1394
1405
|
const {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} = kill;
|
|
1395
1406
|
const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = stream;
|
|
1396
1407
|
const {mergePromise, getSpawnedPromise} = promise;
|
|
@@ -1544,9 +1555,9 @@ const execa = (file, args, options) => {
|
|
|
1544
1555
|
return mergePromise(spawned, handlePromiseOnce);
|
|
1545
1556
|
};
|
|
1546
1557
|
|
|
1547
|
-
execa$
|
|
1558
|
+
execa$2.exports = execa;
|
|
1548
1559
|
|
|
1549
|
-
execa$
|
|
1560
|
+
execa$2.exports.sync = (file, args, options) => {
|
|
1550
1561
|
const parsed = handleArguments(file, args, options);
|
|
1551
1562
|
const command = joinCommand(file, args);
|
|
1552
1563
|
const escapedCommand = getEscapedCommand(file, args);
|
|
@@ -1609,17 +1620,17 @@ execa$1.exports.sync = (file, args, options) => {
|
|
|
1609
1620
|
};
|
|
1610
1621
|
};
|
|
1611
1622
|
|
|
1612
|
-
execa$
|
|
1623
|
+
execa$2.exports.command = (command, options) => {
|
|
1613
1624
|
const [file, ...args] = parseCommand(command);
|
|
1614
1625
|
return execa(file, args, options);
|
|
1615
1626
|
};
|
|
1616
1627
|
|
|
1617
|
-
execa$
|
|
1628
|
+
execa$2.exports.commandSync = (command, options) => {
|
|
1618
1629
|
const [file, ...args] = parseCommand(command);
|
|
1619
1630
|
return execa.sync(file, args, options);
|
|
1620
1631
|
};
|
|
1621
1632
|
|
|
1622
|
-
execa$
|
|
1633
|
+
execa$2.exports.node = (scriptPath, args, options = {}) => {
|
|
1623
1634
|
if (args && !Array.isArray(args) && typeof args === 'object') {
|
|
1624
1635
|
options = args;
|
|
1625
1636
|
args = [];
|
|
@@ -1651,6 +1662,9 @@ execa$1.exports.node = (scriptPath, args, options = {}) => {
|
|
|
1651
1662
|
);
|
|
1652
1663
|
};
|
|
1653
1664
|
|
|
1665
|
+
var execaExports = execa$2.exports;
|
|
1666
|
+
var execa$1 = /*@__PURE__*/getDefaultExportFromCjs(execaExports);
|
|
1667
|
+
|
|
1654
1668
|
// src/detect.ts
|
|
1655
1669
|
var AGENTS = ["pnpm", "yarn", "npm", "pnpm@6", "yarn@berry", "bun"];
|
|
1656
1670
|
var LOCKS = {
|
|
@@ -1665,12 +1679,12 @@ async function detectPackageManager(cwd = process.cwd()) {
|
|
|
1665
1679
|
const lockPath = await findUp(Object.keys(LOCKS), { cwd });
|
|
1666
1680
|
let packageJsonPath;
|
|
1667
1681
|
if (lockPath)
|
|
1668
|
-
packageJsonPath =
|
|
1682
|
+
packageJsonPath = f.resolve(lockPath, "../package.json");
|
|
1669
1683
|
else
|
|
1670
1684
|
packageJsonPath = await findUp("package.json", { cwd });
|
|
1671
|
-
if (packageJsonPath &&
|
|
1685
|
+
if (packageJsonPath && $.existsSync(packageJsonPath)) {
|
|
1672
1686
|
try {
|
|
1673
|
-
const pkg = JSON.parse(
|
|
1687
|
+
const pkg = JSON.parse($.readFileSync(packageJsonPath, "utf8"));
|
|
1674
1688
|
if (typeof pkg.packageManager === "string") {
|
|
1675
1689
|
const [name, version] = pkg.packageManager.split("@");
|
|
1676
1690
|
if (name === "yarn" && parseInt(version) > 1)
|
|
@@ -1686,7 +1700,7 @@ async function detectPackageManager(cwd = process.cwd()) {
|
|
|
1686
1700
|
}
|
|
1687
1701
|
}
|
|
1688
1702
|
if (!agent && lockPath)
|
|
1689
|
-
agent = LOCKS[
|
|
1703
|
+
agent = LOCKS[f.basename(lockPath)];
|
|
1690
1704
|
return agent;
|
|
1691
1705
|
}
|
|
1692
1706
|
async function installPackage(names, options = {}) {
|
|
@@ -1701,7 +1715,7 @@ async function installPackage(names, options = {}) {
|
|
|
1701
1715
|
else
|
|
1702
1716
|
args.unshift("--prefer-offline");
|
|
1703
1717
|
}
|
|
1704
|
-
return execa$1
|
|
1718
|
+
return execa$1(
|
|
1705
1719
|
agent,
|
|
1706
1720
|
[
|
|
1707
1721
|
agent === "yarn" ? "add" : "install",
|
package/dist/{chunk-integrations-globals.a56dee90.js → chunk-integrations-globals.0093e2ed.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { g as globalApis } from './vendor-constants.538d9b49.js';
|
|
2
|
-
import { i as index } from './vendor-index.
|
|
2
|
+
import { i as index } from './vendor-index.2af39fbb.js';
|
|
3
3
|
import '@vitest/runner';
|
|
4
|
-
import './vendor-vi.
|
|
4
|
+
import './vendor-vi.dd6706cb.js';
|
|
5
5
|
import '@vitest/runner/utils';
|
|
6
6
|
import '@vitest/utils';
|
|
7
|
-
import './vendor-index.
|
|
7
|
+
import './vendor-index.23ac4e13.js';
|
|
8
8
|
import 'pathe';
|
|
9
9
|
import 'std-env';
|
|
10
10
|
import './vendor-global.6795f91f.js';
|
|
11
11
|
import 'chai';
|
|
12
|
-
import './vendor-_commonjsHelpers.
|
|
12
|
+
import './vendor-_commonjsHelpers.7d1333e8.js';
|
|
13
13
|
import '@vitest/expect';
|
|
14
14
|
import '@vitest/snapshot';
|
|
15
15
|
import '@vitest/utils/error';
|
|
16
16
|
import './vendor-tasks.f9d75aed.js';
|
|
17
17
|
import 'util';
|
|
18
18
|
import '@vitest/spy';
|
|
19
|
-
import './vendor-run-once.
|
|
19
|
+
import './vendor-run-once.1fa85ba7.js';
|
|
20
20
|
|
|
21
21
|
function registerApiGlobally() {
|
|
22
22
|
globalApis.forEach((api) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolve } from 'pathe';
|
|
2
|
-
import { e as execa } from './vendor-index.
|
|
2
|
+
import { e as execa } from './vendor-index.1f85e5f1.js';
|
|
3
3
|
import 'node:buffer';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'node:child_process';
|
|
6
6
|
import 'node:process';
|
|
7
|
+
import './vendor-_commonjsHelpers.7d1333e8.js';
|
|
7
8
|
import 'child_process';
|
|
8
9
|
import 'path';
|
|
9
|
-
import './vendor-_commonjsHelpers.76cdd49e.js';
|
|
10
10
|
import 'fs';
|
|
11
11
|
import 'node:url';
|
|
12
12
|
import 'node:os';
|
|
@@ -22,6 +22,7 @@ class VitestGit {
|
|
|
22
22
|
constructor(cwd) {
|
|
23
23
|
this.cwd = cwd;
|
|
24
24
|
}
|
|
25
|
+
root;
|
|
25
26
|
async resolveFilesWithGitCommand(args) {
|
|
26
27
|
let result;
|
|
27
28
|
try {
|
package/dist/cli-wrapper.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
import c from 'picocolors';
|
|
3
|
-
import { e as execa } from './vendor-index.
|
|
3
|
+
import { e as execa } from './vendor-index.1f85e5f1.js';
|
|
4
4
|
import { E as EXIT_CODE_RESTART } from './vendor-constants.538d9b49.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-_commonjsHelpers.7d1333e8.js';
|
|
9
10
|
import 'child_process';
|
|
10
11
|
import 'path';
|
|
11
|
-
import './vendor-_commonjsHelpers.76cdd49e.js';
|
|
12
12
|
import 'fs';
|
|
13
13
|
import 'node:os';
|
|
14
14
|
import 'assert';
|