@vitest/utils 3.0.8 → 3.0.9
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/chunk-_commonjsHelpers.js +3 -0
- package/dist/diff.d.ts +60 -67
- package/dist/diff.js +8 -8
- package/dist/error.d.ts +1 -1
- package/dist/helpers.d.ts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/source-map.d.ts +4 -4
- package/dist/types.d-Cr0z4Cnu.d.ts +51 -0
- package/dist/types.d.ts +38 -41
- package/package.json +2 -2
- package/dist/types-6R1G1gkS.d.ts +0 -51
@@ -69,6 +69,9 @@ function format(...args) {
|
|
69
69
|
return "-0";
|
70
70
|
}
|
71
71
|
if (typeof value === "object" && value !== null) {
|
72
|
+
if (typeof value.toString === "function" && value.toString !== Object.prototype.toString) {
|
73
|
+
return value.toString();
|
74
|
+
}
|
72
75
|
return inspect(value, { depth: 0, colors: false });
|
73
76
|
}
|
74
77
|
return String(value);
|
package/dist/diff.d.ts
CHANGED
@@ -1,98 +1,91 @@
|
|
1
|
-
import { D as DiffOptions } from './types-
|
2
|
-
export { a as DiffOptionsColor, S as SerializedDiffOptions } from './types-
|
1
|
+
import { D as DiffOptions } from './types.d-Cr0z4Cnu.js';
|
2
|
+
export { a as DiffOptionsColor, S as SerializedDiffOptions } from './types.d-Cr0z4Cnu.js';
|
3
3
|
import '@vitest/pretty-format';
|
4
4
|
|
5
5
|
/**
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
6
|
+
* Diff Match and Patch
|
7
|
+
* Copyright 2018 The diff-match-patch Authors.
|
8
|
+
* https://github.com/google/diff-match-patch
|
9
|
+
*
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
* you may not use this file except in compliance with the License.
|
12
|
+
* You may obtain a copy of the License at
|
13
|
+
*
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
*
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
* See the License for the specific language governing permissions and
|
20
|
+
* limitations under the License.
|
21
|
+
*/
|
22
22
|
/**
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
* @fileoverview Computes the difference between two texts to create a patch.
|
24
|
+
* Applies the patch onto another text, allowing for errors.
|
25
|
+
* @author fraser@google.com (Neil Fraser)
|
26
|
+
*/
|
27
27
|
/**
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
* CHANGES by pedrottimark to diff_match_patch_uncompressed.ts file:
|
29
|
+
*
|
30
|
+
* 1. Delete anything not needed to use diff_cleanupSemantic method
|
31
|
+
* 2. Convert from prototype properties to var declarations
|
32
|
+
* 3. Convert Diff to class from constructor and prototype
|
33
|
+
* 4. Add type annotations for arguments and return values
|
34
|
+
* 5. Add exports
|
35
|
+
*/
|
36
36
|
/**
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
* The data structure representing a diff is an array of tuples:
|
38
|
+
* [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
|
39
|
+
* which means: delete 'Hello', add 'Goodbye' and keep ' world.'
|
40
|
+
*/
|
41
41
|
declare const DIFF_DELETE = -1;
|
42
42
|
declare const DIFF_INSERT = 1;
|
43
43
|
declare const DIFF_EQUAL = 0;
|
44
44
|
/**
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
* Class representing one diff tuple.
|
46
|
+
* Attempts to look like a two-element array (which is what this used to be).
|
47
|
+
* @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.
|
48
|
+
* @param {string} text Text to be deleted, inserted, or retained.
|
49
|
+
* @constructor
|
50
|
+
*/
|
51
51
|
declare class Diff {
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
0: number;
|
53
|
+
1: string;
|
54
|
+
constructor(op: number, text: string);
|
55
55
|
}
|
56
56
|
|
57
57
|
/**
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
59
|
+
*
|
60
|
+
* This source code is licensed under the MIT license found in the
|
61
|
+
* LICENSE file in the root directory of this source tree.
|
62
|
+
*/
|
63
63
|
|
64
64
|
declare function diffLinesUnified(aLines: Array<string>, bLines: Array<string>, options?: DiffOptions): string;
|
65
65
|
declare function diffLinesUnified2(aLinesDisplay: Array<string>, bLinesDisplay: Array<string>, aLinesCompare: Array<string>, bLinesCompare: Array<string>, options?: DiffOptions): string;
|
66
66
|
declare function diffLinesRaw(aLines: Array<string>, bLines: Array<string>, options?: DiffOptions): [Array<Diff>, boolean];
|
67
67
|
|
68
68
|
/**
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
70
|
+
*
|
71
|
+
* This source code is licensed under the MIT license found in the
|
72
|
+
* LICENSE file in the root directory of this source tree.
|
73
|
+
*/
|
74
74
|
|
75
75
|
declare function diffStringsUnified(a: string, b: string, options?: DiffOptions): string;
|
76
76
|
declare function diffStringsRaw(a: string, b: string, cleanup: boolean, options?: DiffOptions): [Array<Diff>, boolean];
|
77
77
|
|
78
78
|
/**
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
/**
|
86
|
-
* @param a Expected value
|
87
|
-
* @param b Received value
|
88
|
-
* @param options Diff options
|
89
|
-
* @returns {string | null} a string diff
|
90
|
-
*/
|
79
|
+
* @param a Expected value
|
80
|
+
* @param b Received value
|
81
|
+
* @param options Diff options
|
82
|
+
* @returns {string | null} a string diff
|
83
|
+
*/
|
91
84
|
declare function diff(a: any, b: any, options?: DiffOptions): string | undefined;
|
92
85
|
declare function printDiffOrStringify(received: unknown, expected: unknown, options?: DiffOptions): string | undefined;
|
93
86
|
declare function replaceAsymmetricMatcher(actual: any, expected: any, actualReplaced?: WeakSet<WeakKey>, expectedReplaced?: WeakSet<WeakKey>): {
|
94
|
-
|
95
|
-
|
87
|
+
replacedActual: any
|
88
|
+
replacedExpected: any
|
96
89
|
};
|
97
90
|
type PrintLabel = (string: string) => string;
|
98
91
|
declare function getLabelPrinter(...strings: Array<string>): PrintLabel;
|
package/dist/diff.js
CHANGED
@@ -15,7 +15,7 @@ class Diff {
|
|
15
15
|
this[1] = text;
|
16
16
|
}
|
17
17
|
}
|
18
|
-
|
18
|
+
function diff_commonPrefix(text1, text2) {
|
19
19
|
if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {
|
20
20
|
return 0;
|
21
21
|
}
|
@@ -33,8 +33,8 @@ const diff_commonPrefix = function(text1, text2) {
|
|
33
33
|
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
34
34
|
}
|
35
35
|
return pointermid;
|
36
|
-
}
|
37
|
-
|
36
|
+
}
|
37
|
+
function diff_commonSuffix(text1, text2) {
|
38
38
|
if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) {
|
39
39
|
return 0;
|
40
40
|
}
|
@@ -52,8 +52,8 @@ const diff_commonSuffix = function(text1, text2) {
|
|
52
52
|
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
53
53
|
}
|
54
54
|
return pointermid;
|
55
|
-
}
|
56
|
-
|
55
|
+
}
|
56
|
+
function diff_commonOverlap_(text1, text2) {
|
57
57
|
const text1_length = text1.length;
|
58
58
|
const text2_length = text2.length;
|
59
59
|
if (text1_length === 0 || text2_length === 0) {
|
@@ -82,8 +82,8 @@ const diff_commonOverlap_ = function(text1, text2) {
|
|
82
82
|
length++;
|
83
83
|
}
|
84
84
|
}
|
85
|
-
}
|
86
|
-
|
85
|
+
}
|
86
|
+
function diff_cleanupSemantic(diffs) {
|
87
87
|
let changes = false;
|
88
88
|
const equalities = [];
|
89
89
|
let equalitiesLength = 0;
|
@@ -173,7 +173,7 @@ const diff_cleanupSemantic = function(diffs) {
|
|
173
173
|
}
|
174
174
|
pointer++;
|
175
175
|
}
|
176
|
-
}
|
176
|
+
}
|
177
177
|
const nonAlphaNumericRegex_ = /[^a-z0-9]/i;
|
178
178
|
const whitespaceRegex_ = /\s/;
|
179
179
|
const linebreakRegex_ = /[\r\n]/;
|
package/dist/error.d.ts
CHANGED
package/dist/helpers.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
import { Nullable, Arrayable } from './types.js';
|
2
2
|
|
3
3
|
interface CloneOptions {
|
4
|
-
|
4
|
+
forceWritable?: boolean;
|
5
5
|
}
|
6
6
|
interface ErrorOptions {
|
7
|
-
|
8
|
-
|
7
|
+
message?: string;
|
8
|
+
stackTraceLimit?: number;
|
9
9
|
}
|
10
10
|
/**
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
* Get original stacktrace without source map support the most performant way.
|
12
|
+
* - Create only 1 stack frame.
|
13
|
+
* - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
|
14
|
+
*/
|
15
15
|
declare function createSimpleStackTrace(options?: ErrorOptions): string;
|
16
16
|
declare function notNullish<T>(v: T | null | undefined): v is NonNullable<T>;
|
17
17
|
declare function assertTypes(value: unknown, name: string, types: string[]): void;
|
@@ -27,28 +27,28 @@ declare function clone<T>(val: T, seen: WeakMap<any, any>, options?: CloneOption
|
|
27
27
|
declare function noop(): void;
|
28
28
|
declare function objectAttr(source: any, path: string, defaultValue?: undefined): any;
|
29
29
|
type DeferPromise<T> = Promise<T> & {
|
30
|
-
|
31
|
-
|
30
|
+
resolve: (value: T | PromiseLike<T>) => void
|
31
|
+
reject: (reason?: any) => void
|
32
32
|
};
|
33
33
|
declare function createDefer<T>(): DeferPromise<T>;
|
34
34
|
/**
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
35
|
+
* If code starts with a function call, will return its last index, respecting arguments.
|
36
|
+
* This will return 25 - last ending character of toMatch ")"
|
37
|
+
* Also works with callbacks
|
38
|
+
* ```
|
39
|
+
* toMatch({ test: '123' });
|
40
|
+
* toBeAliased('123')
|
41
|
+
* ```
|
42
|
+
*/
|
43
43
|
declare function getCallLastIndex(code: string): number | null;
|
44
44
|
declare function isNegativeNaN(val: number): boolean;
|
45
45
|
/**
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
* Deep merge :P
|
47
|
+
*
|
48
|
+
* Will merge objects only if they are plain
|
49
|
+
*
|
50
|
+
* Do not merge types - it is very expensive and usually it's better to case a type here
|
51
|
+
*/
|
52
52
|
declare function deepMerge<T extends object = object>(target: T, ...sources: any[]): T;
|
53
53
|
|
54
54
|
export { type DeferPromise, assertTypes, clone, createDefer, createSimpleStackTrace, deepClone, deepMerge, getCallLastIndex, getOwnProperties, getType, isNegativeNaN, isObject, isPrimitive, noop, notNullish, objectAttr, parseRegexp, slash, toArray };
|
package/dist/index.d.ts
CHANGED
@@ -5,30 +5,30 @@ export { ArgumentsType, Arrayable, Awaitable, Constructable, DeepMerge, ErrorWit
|
|
5
5
|
|
6
6
|
type Inspect = (value: unknown, options: Options) => string;
|
7
7
|
interface Options {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
8
|
+
showHidden: boolean;
|
9
|
+
depth: number;
|
10
|
+
colors: boolean;
|
11
|
+
customInspect: boolean;
|
12
|
+
showProxy: boolean;
|
13
|
+
maxArrayLength: number;
|
14
|
+
breakLength: number;
|
15
|
+
truncate: number;
|
16
|
+
seen: unknown[];
|
17
|
+
inspect: Inspect;
|
18
|
+
stylize: (value: string, styleType: string) => string;
|
19
19
|
}
|
20
20
|
type LoupeOptions = Partial<Options>;
|
21
21
|
interface StringifyOptions extends PrettyFormatOptions {
|
22
|
-
|
22
|
+
maxLength?: number;
|
23
23
|
}
|
24
|
-
declare function stringify(object: unknown, maxDepth?: number, { maxLength
|
24
|
+
declare function stringify(object: unknown, maxDepth?: number, { maxLength,...options }?: StringifyOptions): string;
|
25
25
|
declare function format(...args: unknown[]): string;
|
26
26
|
declare function inspect(obj: unknown, options?: LoupeOptions): string;
|
27
27
|
declare function objDisplay(obj: unknown, options?: LoupeOptions): string;
|
28
28
|
|
29
29
|
interface HighlightOptions {
|
30
|
-
|
31
|
-
|
30
|
+
jsx?: boolean;
|
31
|
+
colors?: Colors;
|
32
32
|
}
|
33
33
|
declare function highlight(code: string, options?: HighlightOptions): string;
|
34
34
|
|
@@ -41,14 +41,14 @@ declare function offsetToLineNumber(source: string, offset: number): number;
|
|
41
41
|
declare function shuffle<T>(array: T[], seed?: number): T[];
|
42
42
|
|
43
43
|
interface SafeTimers {
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
nextTick: (cb: () => void) => void;
|
45
|
+
setTimeout: typeof setTimeout;
|
46
|
+
setInterval: typeof setInterval;
|
47
|
+
clearInterval: typeof clearInterval;
|
48
|
+
clearTimeout: typeof clearTimeout;
|
49
|
+
setImmediate: typeof setImmediate;
|
50
|
+
clearImmediate: typeof clearImmediate;
|
51
|
+
queueMicrotask: typeof queueMicrotask;
|
52
52
|
}
|
53
53
|
declare function getSafeTimers(): SafeTimers;
|
54
54
|
declare function setSafeTimers(): void;
|
package/dist/source-map.d.ts
CHANGED
@@ -121,10 +121,10 @@ declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): Gene
|
|
121
121
|
declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void;
|
122
122
|
|
123
123
|
interface StackTraceParserOptions {
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
124
|
+
ignoreStackEntries?: (RegExp | string)[];
|
125
|
+
getSourceMap?: (file: string) => unknown;
|
126
|
+
getUrlId?: (id: string) => string;
|
127
|
+
frameFilter?: (error: ErrorWithDiff, frame: ParsedStack) => boolean | void;
|
128
128
|
}
|
129
129
|
declare function parseSingleFFOrSafariStack(raw: string): ParsedStack | null;
|
130
130
|
declare function parseSingleStack(raw: string): ParsedStack | null;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { CompareKeys } from '@vitest/pretty-format';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
|
+
*
|
6
|
+
* This source code is licensed under the MIT license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
9
|
+
|
10
|
+
type DiffOptionsColor = (arg: string) => string;
|
11
|
+
interface DiffOptions {
|
12
|
+
aAnnotation?: string;
|
13
|
+
aColor?: DiffOptionsColor;
|
14
|
+
aIndicator?: string;
|
15
|
+
bAnnotation?: string;
|
16
|
+
bColor?: DiffOptionsColor;
|
17
|
+
bIndicator?: string;
|
18
|
+
changeColor?: DiffOptionsColor;
|
19
|
+
changeLineTrailingSpaceColor?: DiffOptionsColor;
|
20
|
+
commonColor?: DiffOptionsColor;
|
21
|
+
commonIndicator?: string;
|
22
|
+
commonLineTrailingSpaceColor?: DiffOptionsColor;
|
23
|
+
contextLines?: number;
|
24
|
+
emptyFirstOrLastLinePlaceholder?: string;
|
25
|
+
expand?: boolean;
|
26
|
+
includeChangeCounts?: boolean;
|
27
|
+
omitAnnotationLines?: boolean;
|
28
|
+
patchColor?: DiffOptionsColor;
|
29
|
+
printBasicPrototype?: boolean;
|
30
|
+
compareKeys?: CompareKeys;
|
31
|
+
truncateThreshold?: number;
|
32
|
+
truncateAnnotation?: string;
|
33
|
+
truncateAnnotationColor?: DiffOptionsColor;
|
34
|
+
}
|
35
|
+
interface SerializedDiffOptions {
|
36
|
+
aAnnotation?: string;
|
37
|
+
aIndicator?: string;
|
38
|
+
bAnnotation?: string;
|
39
|
+
bIndicator?: string;
|
40
|
+
commonIndicator?: string;
|
41
|
+
contextLines?: number;
|
42
|
+
emptyFirstOrLastLinePlaceholder?: string;
|
43
|
+
expand?: boolean;
|
44
|
+
includeChangeCounts?: boolean;
|
45
|
+
omitAnnotationLines?: boolean;
|
46
|
+
printBasicPrototype?: boolean;
|
47
|
+
truncateThreshold?: number;
|
48
|
+
truncateAnnotation?: string;
|
49
|
+
}
|
50
|
+
|
51
|
+
export type { DiffOptions as D, SerializedDiffOptions as S, DiffOptionsColor as a };
|
package/dist/types.d.ts
CHANGED
@@ -2,57 +2,54 @@ type Awaitable<T> = T | PromiseLike<T>;
|
|
2
2
|
type Nullable<T> = T | null | undefined;
|
3
3
|
type Arrayable<T> = T | Array<T>;
|
4
4
|
type ArgumentsType<T> = T extends (...args: infer U) => any ? U : never;
|
5
|
-
type MergeInsertions<T> = T extends object ? {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
type MutableArray<T extends readonly any[]> = {
|
12
|
-
-readonly [k in keyof T]: T[k];
|
13
|
-
};
|
5
|
+
type MergeInsertions<T> = T extends object ? { [K in keyof T] : MergeInsertions<T[K]> } : T;
|
6
|
+
type DeepMerge<
|
7
|
+
F,
|
8
|
+
S
|
9
|
+
> = MergeInsertions<{ [K in keyof F | keyof S] : K extends keyof S & keyof F ? DeepMerge<F[K], S[K]> : K extends keyof S ? S[K] : K extends keyof F ? F[K] : never }>;
|
10
|
+
type MutableArray<T extends readonly any[]> = { -readonly [k in keyof T] : T[k] };
|
14
11
|
interface Constructable {
|
15
|
-
|
12
|
+
new (...args: any[]): any;
|
16
13
|
}
|
17
14
|
interface ParsedStack {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
method: string;
|
16
|
+
file: string;
|
17
|
+
line: number;
|
18
|
+
column: number;
|
22
19
|
}
|
23
20
|
interface SerializedError {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
message: string;
|
22
|
+
stack?: string;
|
23
|
+
name?: string;
|
24
|
+
stacks?: ParsedStack[];
|
25
|
+
cause?: SerializedError;
|
26
|
+
[key: string]: unknown;
|
30
27
|
}
|
31
28
|
interface TestError extends SerializedError {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
cause?: TestError;
|
30
|
+
diff?: string;
|
31
|
+
actual?: string;
|
32
|
+
expected?: string;
|
36
33
|
}
|
37
34
|
/**
|
38
|
-
|
39
|
-
|
35
|
+
* @deprecated Use `TestError` instead
|
36
|
+
*/
|
40
37
|
interface ErrorWithDiff {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
38
|
+
message: string;
|
39
|
+
name?: string;
|
40
|
+
cause?: unknown;
|
41
|
+
nameStr?: string;
|
42
|
+
stack?: string;
|
43
|
+
stackStr?: string;
|
44
|
+
stacks?: ParsedStack[];
|
45
|
+
showDiff?: boolean;
|
46
|
+
actual?: any;
|
47
|
+
expected?: any;
|
48
|
+
operator?: string;
|
49
|
+
type?: string;
|
50
|
+
frame?: string;
|
51
|
+
diff?: string;
|
52
|
+
codeFrame?: string;
|
56
53
|
}
|
57
54
|
|
58
55
|
export type { ArgumentsType, Arrayable, Awaitable, Constructable, DeepMerge, ErrorWithDiff, MergeInsertions, MutableArray, Nullable, ParsedStack, SerializedError, TestError };
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/utils",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.0.
|
4
|
+
"version": "3.0.9",
|
5
5
|
"description": "Shared Vitest utility functions",
|
6
6
|
"license": "MIT",
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
@@ -62,7 +62,7 @@
|
|
62
62
|
"dependencies": {
|
63
63
|
"loupe": "^3.1.3",
|
64
64
|
"tinyrainbow": "^2.0.0",
|
65
|
-
"@vitest/pretty-format": "3.0.
|
65
|
+
"@vitest/pretty-format": "3.0.9"
|
66
66
|
},
|
67
67
|
"devDependencies": {
|
68
68
|
"@jridgewell/trace-mapping": "^0.3.25",
|
package/dist/types-6R1G1gkS.d.ts
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
import { CompareKeys } from '@vitest/pretty-format';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
|
-
*
|
6
|
-
* This source code is licensed under the MIT license found in the
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
8
|
-
*/
|
9
|
-
|
10
|
-
type DiffOptionsColor = (arg: string) => string;
|
11
|
-
interface DiffOptions {
|
12
|
-
aAnnotation?: string;
|
13
|
-
aColor?: DiffOptionsColor;
|
14
|
-
aIndicator?: string;
|
15
|
-
bAnnotation?: string;
|
16
|
-
bColor?: DiffOptionsColor;
|
17
|
-
bIndicator?: string;
|
18
|
-
changeColor?: DiffOptionsColor;
|
19
|
-
changeLineTrailingSpaceColor?: DiffOptionsColor;
|
20
|
-
commonColor?: DiffOptionsColor;
|
21
|
-
commonIndicator?: string;
|
22
|
-
commonLineTrailingSpaceColor?: DiffOptionsColor;
|
23
|
-
contextLines?: number;
|
24
|
-
emptyFirstOrLastLinePlaceholder?: string;
|
25
|
-
expand?: boolean;
|
26
|
-
includeChangeCounts?: boolean;
|
27
|
-
omitAnnotationLines?: boolean;
|
28
|
-
patchColor?: DiffOptionsColor;
|
29
|
-
printBasicPrototype?: boolean;
|
30
|
-
compareKeys?: CompareKeys;
|
31
|
-
truncateThreshold?: number;
|
32
|
-
truncateAnnotation?: string;
|
33
|
-
truncateAnnotationColor?: DiffOptionsColor;
|
34
|
-
}
|
35
|
-
interface SerializedDiffOptions {
|
36
|
-
aAnnotation?: string;
|
37
|
-
aIndicator?: string;
|
38
|
-
bAnnotation?: string;
|
39
|
-
bIndicator?: string;
|
40
|
-
commonIndicator?: string;
|
41
|
-
contextLines?: number;
|
42
|
-
emptyFirstOrLastLinePlaceholder?: string;
|
43
|
-
expand?: boolean;
|
44
|
-
includeChangeCounts?: boolean;
|
45
|
-
omitAnnotationLines?: boolean;
|
46
|
-
printBasicPrototype?: boolean;
|
47
|
-
truncateThreshold?: number;
|
48
|
-
truncateAnnotation?: string;
|
49
|
-
}
|
50
|
-
|
51
|
-
export type { DiffOptions as D, SerializedDiffOptions as S, DiffOptionsColor as a };
|