vitest 0.21.0 → 0.22.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 +61 -4
- package/dist/browser.d.ts +4 -5
- package/dist/browser.mjs +9 -9
- package/dist/{chunk-api-setup.89eb0e7a.mjs → chunk-api-setup.377c28aa.mjs} +9 -9
- package/dist/chunk-constants.71e8a211.mjs +284 -0
- package/dist/{chunk-install-pkg.6c6dc0c2.mjs → chunk-install-pkg.3aa3eae6.mjs} +3 -2
- package/dist/{chunk-defaults.8390340d.mjs → chunk-integrations-coverage.d205bd87.mjs} +23 -152
- package/dist/{chunk-integrations-globals.a798d352.mjs → chunk-integrations-globals.60af7da3.mjs} +8 -8
- package/dist/{chunk-mock-date.ea3b3121.mjs → chunk-mock-date.304e29b1.mjs} +11 -255
- package/dist/chunk-node-git.9a7e3153.mjs +78 -0
- package/dist/{chunk-runtime-chain.44b4224d.mjs → chunk-runtime-chain.be610650.mjs} +4 -3
- package/dist/{chunk-runtime-error.95e53764.mjs → chunk-runtime-error.1104e45a.mjs} +13 -12
- package/dist/{chunk-runtime-hooks.291644ec.mjs → chunk-runtime-hooks.5d7073db.mjs} +3 -3
- package/dist/{chunk-runtime-mocker.6190d6a3.mjs → chunk-runtime-mocker.49d21aa6.mjs} +19 -5
- package/dist/{chunk-runtime-rpc.fc50dcc0.mjs → chunk-runtime-rpc.57586b73.mjs} +1 -1
- package/dist/{chunk-utils-source-map.d307e4ea.mjs → chunk-utils-source-map.bbf3ad19.mjs} +2 -1
- package/dist/{chunk-vite-node-client.b59ba135.mjs → chunk-vite-node-client.cddda63d.mjs} +49 -21
- package/dist/{chunk-vite-node-debug.dbce2e1f.mjs → chunk-vite-node-debug.536c4c5b.mjs} +3 -3
- package/dist/{chunk-vite-node-externalize.80bed9b3.mjs → chunk-vite-node-externalize.c843f497.mjs} +186 -50
- package/dist/chunk-vite-node-utils.b432150c.mjs +6921 -0
- package/dist/cli-wrapper.mjs +124 -0
- package/dist/cli.mjs +16 -15
- package/dist/config.cjs +3 -0
- package/dist/config.d.ts +6 -3
- package/dist/config.mjs +2 -1
- package/dist/entry.mjs +9 -9
- package/dist/{global-644546f7.d.ts → global-fe52f84b.d.ts} +512 -177
- package/dist/{index-3f764034.d.ts → index-ea17aa0c.d.ts} +4 -52
- package/dist/index.d.ts +5 -6
- package/dist/index.mjs +7 -5
- package/dist/loader.mjs +4 -3
- package/dist/node.d.ts +3 -3
- package/dist/node.mjs +16 -15
- package/dist/suite.mjs +6 -4
- package/dist/{vendor-index.61438b77.mjs → vendor-index.29636037.mjs} +1 -61
- package/dist/{vendor-index.62ce5c33.mjs → vendor-index.2ae8040a.mjs} +0 -0
- package/dist/vendor-index.9d9196cc.mjs +61 -0
- package/dist/{vendor-index.de788b6a.mjs → vendor-index.ae96af6e.mjs} +14 -14
- package/dist/{chunk-node-git.e0dc0a7e.mjs → vendor-index.fbec8a81.mjs} +5 -73
- package/dist/worker.mjs +9 -9
- package/package.json +9 -13
- package/vitest.mjs +1 -1
- package/dist/chunk-constants.9da1ef26.mjs +0 -38
- package/dist/chunk-vite-node-utils.96438e82.mjs +0 -1114
- package/dist/mocker-5e2a8e41.d.ts +0 -3
package/LICENSE.md
CHANGED
|
@@ -197,6 +197,35 @@ Repository: https://github.com/sinonjs/fake-timers.git
|
|
|
197
197
|
|
|
198
198
|
---------------------------------------
|
|
199
199
|
|
|
200
|
+
## acorn
|
|
201
|
+
License: MIT
|
|
202
|
+
By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
|
|
203
|
+
Repository: https://github.com/acornjs/acorn.git
|
|
204
|
+
|
|
205
|
+
> MIT License
|
|
206
|
+
>
|
|
207
|
+
> Copyright (C) 2012-2022 by various contributors (see AUTHORS)
|
|
208
|
+
>
|
|
209
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
210
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
211
|
+
> in the Software without restriction, including without limitation the rights
|
|
212
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
213
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
214
|
+
> furnished to do so, subject to the following conditions:
|
|
215
|
+
>
|
|
216
|
+
> The above copyright notice and this permission notice shall be included in
|
|
217
|
+
> all copies or substantial portions of the Software.
|
|
218
|
+
>
|
|
219
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
220
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
221
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
222
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
223
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
224
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
225
|
+
> THE SOFTWARE.
|
|
226
|
+
|
|
227
|
+
---------------------------------------
|
|
228
|
+
|
|
200
229
|
## ansi-escapes
|
|
201
230
|
License: MIT
|
|
202
231
|
By: Sindre Sorhus
|
|
@@ -869,7 +898,7 @@ Repository: ehmicky/human-signals
|
|
|
869
898
|
> same "printed page" as the copyright notice for easier
|
|
870
899
|
> identification within third-party archives.
|
|
871
900
|
>
|
|
872
|
-
> Copyright
|
|
901
|
+
> Copyright 2021 ehmicky <ehmicky@gmail.com>
|
|
873
902
|
>
|
|
874
903
|
> Licensed under the Apache License, Version 2.0 (the "License");
|
|
875
904
|
> you may not use this file except in compliance with the License.
|
|
@@ -1281,7 +1310,7 @@ Repository: sindresorhus/npm-run-path
|
|
|
1281
1310
|
|
|
1282
1311
|
> MIT License
|
|
1283
1312
|
>
|
|
1284
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
1313
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
1285
1314
|
>
|
|
1286
1315
|
> 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:
|
|
1287
1316
|
>
|
|
@@ -1366,7 +1395,7 @@ Repository: sindresorhus/path-key
|
|
|
1366
1395
|
|
|
1367
1396
|
> MIT License
|
|
1368
1397
|
>
|
|
1369
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
1398
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
1370
1399
|
>
|
|
1371
1400
|
> 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:
|
|
1372
1401
|
>
|
|
@@ -1882,7 +1911,7 @@ Repository: sindresorhus/strip-final-newline
|
|
|
1882
1911
|
|
|
1883
1912
|
> MIT License
|
|
1884
1913
|
>
|
|
1885
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
1914
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
1886
1915
|
>
|
|
1887
1916
|
> 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:
|
|
1888
1917
|
>
|
|
@@ -1948,6 +1977,34 @@ Repository: git+ssh://git@github.com/chaijs/type-detect.git
|
|
|
1948
1977
|
|
|
1949
1978
|
---------------------------------------
|
|
1950
1979
|
|
|
1980
|
+
## ufo
|
|
1981
|
+
License: MIT
|
|
1982
|
+
Repository: unjs/ufo
|
|
1983
|
+
|
|
1984
|
+
> MIT License
|
|
1985
|
+
>
|
|
1986
|
+
> Copyright (c) 2020 Nuxt Contrib
|
|
1987
|
+
>
|
|
1988
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1989
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
1990
|
+
> in the Software without restriction, including without limitation the rights
|
|
1991
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1992
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
1993
|
+
> furnished to do so, subject to the following conditions:
|
|
1994
|
+
>
|
|
1995
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
1996
|
+
> copies or substantial portions of the Software.
|
|
1997
|
+
>
|
|
1998
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1999
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2000
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2001
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2002
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2003
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2004
|
+
> SOFTWARE.
|
|
2005
|
+
|
|
2006
|
+
---------------------------------------
|
|
2007
|
+
|
|
1951
2008
|
## vite-node
|
|
1952
2009
|
License: MIT
|
|
1953
2010
|
By: Anthony Fu
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export { E as EnhancedSpy, q as Mock, r as MockContext, p as MockInstance, u as Mocked, v as MockedClass, n as MockedFunction, o as MockedObject,
|
|
2
|
-
import { R as ResolvedConfig } from './global-
|
|
3
|
-
export { A as ApiConfig,
|
|
1
|
+
export { E as EnhancedSpy, q as Mock, r as MockContext, p as MockInstance, u as Mocked, v as MockedClass, n as MockedFunction, o as MockedObject, S as SpyInstance, h as afterAll, k as afterEach, g as beforeAll, j as beforeEach, m as createExpect, e as describe, l as expect, i as it, d as suite, t as test } from './index-ea17aa0c.js';
|
|
2
|
+
import { R as ResolvedConfig } from './global-fe52f84b.js';
|
|
3
|
+
export { z as AfterSuiteRunMeta, A as ApiConfig, O as ArgumentsType, L as Arrayable, K as Awaitable, aa as BaseCoverageOptions, B as BuiltinEnvironment, Y as Constructable, ac as CoverageC8Options, ab as CoverageIstanbulOptions, a8 as CoverageOptions, a5 as CoverageProvider, a6 as CoverageProviderModule, a7 as CoverageReporter, Q as DeepMerge, D as DoneCallback, $ as Environment, E as EnvironmentOptions, _ as EnvironmentReturn, a3 as ErrorWithDiff, a as File, l as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, P as MergeInsertions, Z as ModuleCache, M as ModuleGraphData, X as MutableArray, N as Nullable, a4 as OnServerRestartHandler, a2 as ParsedStack, a1 as Position, b as Reporter, y as ResolveIdFunction, R as ResolvedConfig, a9 as ResolvedCoverageOptions, c as RunMode, p as RuntimeContext, r as SnapshotData, u as SnapshotMatchOptions, v as SnapshotResult, t as SnapshotStateOptions, x as SnapshotSummary, s as SnapshotUpdateState, S as Suite, k as SuiteAPI, n as SuiteCollector, o as SuiteFactory, m as SuiteHooks, h as Task, e as TaskBase, f as TaskResult, T as TaskResultPack, d as TaskState, g as Test, j as TestAPI, q as TestContext, i as TestFunction, w as UncheckedSnapshot, U as UserConfig, a0 as UserConsoleLog, V as Vitest, W as WorkerContext, G as WorkerGlobalState, C as WorkerRPC } from './global-fe52f84b.js';
|
|
4
4
|
import * as chai from 'chai';
|
|
5
5
|
export { chai };
|
|
6
6
|
export { assert, should } from 'chai';
|
|
7
|
-
import 'worker_threads';
|
|
8
|
-
import './mocker-5e2a8e41.js';
|
|
9
7
|
import 'tinyspy';
|
|
10
8
|
import 'vite';
|
|
9
|
+
import 'worker_threads';
|
|
11
10
|
import 'fs';
|
|
12
11
|
|
|
13
12
|
declare function startTests(paths: string[], config: ResolvedConfig): Promise<void>;
|
package/dist/browser.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export { c as createExpect, d as describe, b as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.
|
|
2
|
-
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach } from './chunk-runtime-hooks.
|
|
3
|
-
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-error.
|
|
1
|
+
export { c as createExpect, d as describe, b as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.be610650.mjs';
|
|
2
|
+
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach } from './chunk-runtime-hooks.5d7073db.mjs';
|
|
3
|
+
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-error.1104e45a.mjs';
|
|
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.304e29b1.mjs';
|
|
9
9
|
import 'path';
|
|
10
|
+
import './chunk-constants.71e8a211.mjs';
|
|
10
11
|
import 'tty';
|
|
12
|
+
import 'url';
|
|
11
13
|
import 'local-pkg';
|
|
12
14
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
13
|
-
import './chunk-runtime-rpc.
|
|
15
|
+
import './chunk-runtime-rpc.57586b73.mjs';
|
|
14
16
|
import './chunk-utils-global.fa20c2f6.mjs';
|
|
15
17
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
16
18
|
import 'fs';
|
|
17
|
-
import './chunk-utils-source-map.
|
|
19
|
+
import './chunk-utils-source-map.bbf3ad19.mjs';
|
|
18
20
|
import './spy.mjs';
|
|
19
21
|
import 'tinyspy';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import 'module';
|
|
22
|
-
import 'url';
|
|
22
|
+
import './chunk-integrations-coverage.d205bd87.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import { c as createBirpc } from './chunk-vite-node-client.
|
|
2
|
+
import { c as createBirpc } from './chunk-vite-node-client.cddda63d.mjs';
|
|
3
3
|
import require$$0$1 from 'stream';
|
|
4
4
|
import require$$0 from 'zlib';
|
|
5
5
|
import require$$3 from 'net';
|
|
@@ -8,19 +8,19 @@ import require$$5 from 'crypto';
|
|
|
8
8
|
import require$$2 from 'events';
|
|
9
9
|
import require$$1 from 'https';
|
|
10
10
|
import require$$2$1 from 'http';
|
|
11
|
-
import
|
|
12
|
-
import { A as API_PATH } from './chunk-constants.
|
|
13
|
-
import { j as interpretSourcePos, p as parseStacktrace } from './chunk-utils-source-map.
|
|
11
|
+
import url from 'url';
|
|
12
|
+
import { A as API_PATH } from './chunk-constants.71e8a211.mjs';
|
|
13
|
+
import { j as interpretSourcePos, p as parseStacktrace } from './chunk-utils-source-map.bbf3ad19.mjs';
|
|
14
14
|
import 'module';
|
|
15
15
|
import 'vm';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-vite-node-utils.b432150c.mjs';
|
|
17
17
|
import 'path';
|
|
18
|
-
import 'tty';
|
|
19
|
-
import 'local-pkg';
|
|
20
|
-
import './chunk-vite-node-utils.96438e82.mjs';
|
|
21
18
|
import 'assert';
|
|
22
19
|
import 'util';
|
|
23
20
|
import 'debug';
|
|
21
|
+
import 'tty';
|
|
22
|
+
import './chunk-mock-date.304e29b1.mjs';
|
|
23
|
+
import 'local-pkg';
|
|
24
24
|
|
|
25
25
|
/*! (c) 2020 Andrea Giammarchi */
|
|
26
26
|
|
|
@@ -2514,7 +2514,7 @@ const http$1 = require$$2$1;
|
|
|
2514
2514
|
const net = require$$3;
|
|
2515
2515
|
const tls = require$$4;
|
|
2516
2516
|
const { randomBytes, createHash: createHash$1 } = require$$5;
|
|
2517
|
-
const { URL: URL$1 } =
|
|
2517
|
+
const { URL: URL$1 } = url;
|
|
2518
2518
|
|
|
2519
2519
|
const PerMessageDeflate$1 = permessageDeflate;
|
|
2520
2520
|
const Receiver = receiver;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import require$$0 from 'tty';
|
|
2
|
+
import url from 'url';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
var picocolors = {exports: {}};
|
|
6
|
+
|
|
7
|
+
let tty = require$$0;
|
|
8
|
+
|
|
9
|
+
let isColorSupported =
|
|
10
|
+
!("NO_COLOR" in process.env || process.argv.includes("--no-color")) &&
|
|
11
|
+
("FORCE_COLOR" in process.env ||
|
|
12
|
+
process.argv.includes("--color") ||
|
|
13
|
+
process.platform === "win32" ||
|
|
14
|
+
(tty.isatty(1) && process.env.TERM !== "dumb") ||
|
|
15
|
+
"CI" in process.env);
|
|
16
|
+
|
|
17
|
+
let formatter =
|
|
18
|
+
(open, close, replace = open) =>
|
|
19
|
+
input => {
|
|
20
|
+
let string = "" + input;
|
|
21
|
+
let index = string.indexOf(close, open.length);
|
|
22
|
+
return ~index
|
|
23
|
+
? open + replaceClose(string, close, replace, index) + close
|
|
24
|
+
: open + string + close
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
let replaceClose = (string, close, replace, index) => {
|
|
28
|
+
let start = string.substring(0, index) + replace;
|
|
29
|
+
let end = string.substring(index + close.length);
|
|
30
|
+
let nextIndex = end.indexOf(close);
|
|
31
|
+
return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
let createColors = (enabled = isColorSupported) => ({
|
|
35
|
+
isColorSupported: enabled,
|
|
36
|
+
reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String,
|
|
37
|
+
bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
|
|
38
|
+
dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
|
|
39
|
+
italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
|
|
40
|
+
underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
|
|
41
|
+
inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
|
|
42
|
+
hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
|
|
43
|
+
strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
|
|
44
|
+
black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
|
|
45
|
+
red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
|
|
46
|
+
green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
|
|
47
|
+
yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
|
|
48
|
+
blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
|
|
49
|
+
magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
|
|
50
|
+
cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
|
|
51
|
+
white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
|
|
52
|
+
gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
|
|
53
|
+
bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
|
|
54
|
+
bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
|
|
55
|
+
bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
|
|
56
|
+
bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
|
|
57
|
+
bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
|
|
58
|
+
bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
|
|
59
|
+
bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
|
|
60
|
+
bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
picocolors.exports = createColors();
|
|
64
|
+
picocolors.exports.createColors = createColors;
|
|
65
|
+
|
|
66
|
+
function normalizeWindowsPath(input = "") {
|
|
67
|
+
if (!input.includes("\\")) {
|
|
68
|
+
return input;
|
|
69
|
+
}
|
|
70
|
+
return input.replace(/\\/g, "/");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const _UNC_REGEX = /^[/][/]/;
|
|
74
|
+
const _UNC_DRIVE_REGEX = /^[/][/]([.]{1,2}[/])?([a-zA-Z]):[/]/;
|
|
75
|
+
const _IS_ABSOLUTE_RE = /^\/|^\\|^[a-zA-Z]:[/\\]/;
|
|
76
|
+
const sep = "/";
|
|
77
|
+
const delimiter = ":";
|
|
78
|
+
const normalize = function(path2) {
|
|
79
|
+
if (path2.length === 0) {
|
|
80
|
+
return ".";
|
|
81
|
+
}
|
|
82
|
+
path2 = normalizeWindowsPath(path2);
|
|
83
|
+
const isUNCPath = path2.match(_UNC_REGEX);
|
|
84
|
+
const hasUNCDrive = isUNCPath && path2.match(_UNC_DRIVE_REGEX);
|
|
85
|
+
const isPathAbsolute = isAbsolute(path2);
|
|
86
|
+
const trailingSeparator = path2[path2.length - 1] === "/";
|
|
87
|
+
path2 = normalizeString(path2, !isPathAbsolute);
|
|
88
|
+
if (path2.length === 0) {
|
|
89
|
+
if (isPathAbsolute) {
|
|
90
|
+
return "/";
|
|
91
|
+
}
|
|
92
|
+
return trailingSeparator ? "./" : ".";
|
|
93
|
+
}
|
|
94
|
+
if (trailingSeparator) {
|
|
95
|
+
path2 += "/";
|
|
96
|
+
}
|
|
97
|
+
if (isUNCPath) {
|
|
98
|
+
if (hasUNCDrive) {
|
|
99
|
+
return `//./${path2}`;
|
|
100
|
+
}
|
|
101
|
+
return `//${path2}`;
|
|
102
|
+
}
|
|
103
|
+
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
104
|
+
};
|
|
105
|
+
const join = function(...args) {
|
|
106
|
+
if (args.length === 0) {
|
|
107
|
+
return ".";
|
|
108
|
+
}
|
|
109
|
+
let joined;
|
|
110
|
+
for (let i = 0; i < args.length; ++i) {
|
|
111
|
+
const arg = args[i];
|
|
112
|
+
if (arg.length > 0) {
|
|
113
|
+
if (joined === void 0) {
|
|
114
|
+
joined = arg;
|
|
115
|
+
} else {
|
|
116
|
+
joined += `/${arg}`;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (joined === void 0) {
|
|
121
|
+
return ".";
|
|
122
|
+
}
|
|
123
|
+
return normalize(joined);
|
|
124
|
+
};
|
|
125
|
+
const resolve = function(...args) {
|
|
126
|
+
args = args.map((arg) => normalizeWindowsPath(arg));
|
|
127
|
+
let resolvedPath = "";
|
|
128
|
+
let resolvedAbsolute = false;
|
|
129
|
+
for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
130
|
+
const path2 = i >= 0 ? args[i] : process.cwd();
|
|
131
|
+
if (path2.length === 0) {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
resolvedPath = `${path2}/${resolvedPath}`;
|
|
135
|
+
resolvedAbsolute = isAbsolute(path2);
|
|
136
|
+
}
|
|
137
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
138
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
139
|
+
return `/${resolvedPath}`;
|
|
140
|
+
}
|
|
141
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
142
|
+
};
|
|
143
|
+
function normalizeString(path2, allowAboveRoot) {
|
|
144
|
+
let res = "";
|
|
145
|
+
let lastSegmentLength = 0;
|
|
146
|
+
let lastSlash = -1;
|
|
147
|
+
let dots = 0;
|
|
148
|
+
let char = null;
|
|
149
|
+
for (let i = 0; i <= path2.length; ++i) {
|
|
150
|
+
if (i < path2.length) {
|
|
151
|
+
char = path2[i];
|
|
152
|
+
} else if (char === "/") {
|
|
153
|
+
break;
|
|
154
|
+
} else {
|
|
155
|
+
char = "/";
|
|
156
|
+
}
|
|
157
|
+
if (char === "/") {
|
|
158
|
+
if (lastSlash === i - 1 || dots === 1) ; else if (dots === 2) {
|
|
159
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
160
|
+
if (res.length > 2) {
|
|
161
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
162
|
+
if (lastSlashIndex === -1) {
|
|
163
|
+
res = "";
|
|
164
|
+
lastSegmentLength = 0;
|
|
165
|
+
} else {
|
|
166
|
+
res = res.slice(0, lastSlashIndex);
|
|
167
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
168
|
+
}
|
|
169
|
+
lastSlash = i;
|
|
170
|
+
dots = 0;
|
|
171
|
+
continue;
|
|
172
|
+
} else if (res.length !== 0) {
|
|
173
|
+
res = "";
|
|
174
|
+
lastSegmentLength = 0;
|
|
175
|
+
lastSlash = i;
|
|
176
|
+
dots = 0;
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (allowAboveRoot) {
|
|
181
|
+
res += res.length > 0 ? "/.." : "..";
|
|
182
|
+
lastSegmentLength = 2;
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
if (res.length > 0) {
|
|
186
|
+
res += `/${path2.slice(lastSlash + 1, i)}`;
|
|
187
|
+
} else {
|
|
188
|
+
res = path2.slice(lastSlash + 1, i);
|
|
189
|
+
}
|
|
190
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
191
|
+
}
|
|
192
|
+
lastSlash = i;
|
|
193
|
+
dots = 0;
|
|
194
|
+
} else if (char === "." && dots !== -1) {
|
|
195
|
+
++dots;
|
|
196
|
+
} else {
|
|
197
|
+
dots = -1;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return res;
|
|
201
|
+
}
|
|
202
|
+
const isAbsolute = function(p) {
|
|
203
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
204
|
+
};
|
|
205
|
+
const toNamespacedPath = function(p) {
|
|
206
|
+
return normalizeWindowsPath(p);
|
|
207
|
+
};
|
|
208
|
+
const extname = function(p) {
|
|
209
|
+
return path.posix.extname(normalizeWindowsPath(p));
|
|
210
|
+
};
|
|
211
|
+
const relative = function(from, to) {
|
|
212
|
+
return path.posix.relative(normalizeWindowsPath(from), normalizeWindowsPath(to));
|
|
213
|
+
};
|
|
214
|
+
const dirname = function(p) {
|
|
215
|
+
return path.posix.dirname(normalizeWindowsPath(p));
|
|
216
|
+
};
|
|
217
|
+
const format = function(p) {
|
|
218
|
+
return normalizeWindowsPath(path.posix.format(p));
|
|
219
|
+
};
|
|
220
|
+
const basename = function(p, ext) {
|
|
221
|
+
return path.posix.basename(normalizeWindowsPath(p), ext);
|
|
222
|
+
};
|
|
223
|
+
const parse = function(p) {
|
|
224
|
+
return path.posix.parse(normalizeWindowsPath(p));
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const _path = /*#__PURE__*/Object.freeze({
|
|
228
|
+
__proto__: null,
|
|
229
|
+
sep: sep,
|
|
230
|
+
delimiter: delimiter,
|
|
231
|
+
normalize: normalize,
|
|
232
|
+
join: join,
|
|
233
|
+
resolve: resolve,
|
|
234
|
+
normalizeString: normalizeString,
|
|
235
|
+
isAbsolute: isAbsolute,
|
|
236
|
+
toNamespacedPath: toNamespacedPath,
|
|
237
|
+
extname: extname,
|
|
238
|
+
relative: relative,
|
|
239
|
+
dirname: dirname,
|
|
240
|
+
format: format,
|
|
241
|
+
basename: basename,
|
|
242
|
+
parse: parse
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
({
|
|
246
|
+
..._path
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
const rootDir = resolve(url.fileURLToPath(import.meta.url), "../../");
|
|
250
|
+
const distDir = resolve(url.fileURLToPath(import.meta.url), "../../dist");
|
|
251
|
+
const defaultPort = 51204;
|
|
252
|
+
const EXIT_CODE_RESTART = 43;
|
|
253
|
+
const API_PATH = "/__vitest_api__";
|
|
254
|
+
const configFiles = [
|
|
255
|
+
"vitest.config.ts",
|
|
256
|
+
"vitest.config.mts",
|
|
257
|
+
"vitest.config.cts",
|
|
258
|
+
"vitest.config.js",
|
|
259
|
+
"vitest.config.mjs",
|
|
260
|
+
"vitest.config.cjs",
|
|
261
|
+
"vite.config.ts",
|
|
262
|
+
"vite.config.mts",
|
|
263
|
+
"vite.config.cts",
|
|
264
|
+
"vite.config.js",
|
|
265
|
+
"vite.config.mjs",
|
|
266
|
+
"vite.config.cjs"
|
|
267
|
+
];
|
|
268
|
+
const globalApis = [
|
|
269
|
+
"suite",
|
|
270
|
+
"test",
|
|
271
|
+
"describe",
|
|
272
|
+
"it",
|
|
273
|
+
"chai",
|
|
274
|
+
"expect",
|
|
275
|
+
"assert",
|
|
276
|
+
"vitest",
|
|
277
|
+
"vi",
|
|
278
|
+
"beforeAll",
|
|
279
|
+
"afterAll",
|
|
280
|
+
"beforeEach",
|
|
281
|
+
"afterEach"
|
|
282
|
+
];
|
|
283
|
+
|
|
284
|
+
export { API_PATH as A, EXIT_CODE_RESTART as E, resolve as a, basename as b, distDir as c, dirname as d, rootDir as e, configFiles as f, defaultPort as g, extname as h, isAbsolute as i, join as j, globalApis as k, normalize as n, picocolors as p, relative as r, toNamespacedPath as t };
|
|
@@ -2,9 +2,10 @@ import path$2 from 'path';
|
|
|
2
2
|
import fs$2 from 'fs';
|
|
3
3
|
import util from 'util';
|
|
4
4
|
import childProcess$1 from 'child_process';
|
|
5
|
-
import { p as pathKey, m as mergeStream$1, g as getStream$1, c as crossSpawn$1 } from './vendor-index.
|
|
6
|
-
import {
|
|
5
|
+
import { p as pathKey, m as mergeStream$1, g as getStream$1, c as crossSpawn$1 } from './vendor-index.2ae8040a.mjs';
|
|
6
|
+
import { o as onetime$1 } from './vendor-index.9d9196cc.mjs';
|
|
7
7
|
import require$$0 from 'os';
|
|
8
|
+
import { s as signalExit } from './vendor-index.29636037.mjs';
|
|
8
9
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
9
10
|
import 'buffer';
|
|
10
11
|
import 'stream';
|