vitest 0.0.88 → 0.0.92

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.
@@ -1,71 +1,7 @@
1
1
  import { existsSync, promises } from 'fs';
2
2
  import { relative } from 'path';
3
- import require$$0 from 'tty';
3
+ import { n as notNullish, c } from './utils-860e5f7e.js';
4
4
  import { SourceMapConsumer } from 'source-map';
5
- import { n as notNullish } from './utils-9dcc4050.js';
6
-
7
- var picocolors = {exports: {}};
8
-
9
- let tty = require$$0;
10
-
11
- let isColorSupported =
12
- !("NO_COLOR" in process.env || process.argv.includes("--no-color")) &&
13
- ("FORCE_COLOR" in process.env ||
14
- process.argv.includes("--color") ||
15
- process.platform === "win32" ||
16
- (tty.isatty(1) && process.env.TERM !== "dumb") ||
17
- "CI" in process.env);
18
-
19
- let formatter =
20
- (open, close, replace = open) =>
21
- input => {
22
- let string = "" + input;
23
- let index = string.indexOf(close, open.length);
24
- return ~index
25
- ? open + replaceClose(string, close, replace, index) + close
26
- : open + string + close
27
- };
28
-
29
- let replaceClose = (string, close, replace, index) => {
30
- let start = string.substring(0, index) + replace;
31
- let end = string.substring(index + close.length);
32
- let nextIndex = end.indexOf(close);
33
- return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end
34
- };
35
-
36
- let createColors = (enabled = isColorSupported) => ({
37
- isColorSupported: enabled,
38
- reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String,
39
- bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
40
- dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
41
- italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
42
- underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
43
- inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
44
- hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
45
- strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
46
- black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
47
- red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
48
- green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
49
- yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
50
- blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
51
- magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
52
- cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
53
- white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
54
- gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
55
- bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
56
- bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
57
- bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
58
- bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
59
- bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
60
- bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
61
- bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
62
- bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String,
63
- });
64
-
65
- picocolors.exports = createColors();
66
- picocolors.exports.createColors = createColors;
67
-
68
- var c = picocolors.exports;
69
5
 
70
6
  function Diff() {}
71
7
  Diff.prototype = {
@@ -1254,8 +1190,7 @@ const F_CHECK = "\u221A";
1254
1190
  const F_CROSS = "\xD7";
1255
1191
  const F_LONG_DASH = "\u23AF";
1256
1192
 
1257
- async function printError(error) {
1258
- const ctx = process.__vitest__;
1193
+ async function printError(error, ctx) {
1259
1194
  let e = error;
1260
1195
  if (typeof error === "string") {
1261
1196
  e = {
@@ -1476,4 +1411,4 @@ function notBlank(line) {
1476
1411
  return typeof line !== "undefined" && line !== null;
1477
1412
  }
1478
1413
 
1479
- export { F_POINTER as F, ansiStyles as a, stripAnsi as b, c, sliceAnsi as d, F_DOWN as e, F_LONG_DASH as f, F_DOWN_RIGHT as g, F_DOT as h, F_CHECK as i, F_CROSS as j, cliTruncate as k, F_RIGHT as l, printError as p, stringWidth as s, unifiedDiff as u };
1414
+ export { F_POINTER as F, ansiStyles as a, stripAnsi as b, sliceAnsi as c, F_DOWN as d, F_LONG_DASH as e, F_DOWN_RIGHT as f, F_DOT as g, F_CHECK as h, F_CROSS as i, cliTruncate as j, F_RIGHT as k, printError as p, stringWidth as s, unifiedDiff as u };
@@ -1,8 +1,8 @@
1
- import { g as globalApis } from './constants-adef7ffb.js';
2
- import { i as index } from './index-906ac3f9.js';
1
+ import { g as globalApis } from './constants-9cfa4d7b.js';
2
+ import { i as index } from './index-708135df.js';
3
3
  import 'path';
4
4
  import 'url';
5
- import './suite-0e21bf9b.js';
5
+ import './suite-b8c6cb53.js';
6
6
  import './index-9e71c815.js';
7
7
  import 'chai';
8
8
  import 'tinyspy';