@vitest/utils 1.2.0 → 1.2.2
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/source-map.d.ts +17 -17
- package/package.json +2 -2
package/dist/source-map.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { ParsedStack, ErrorWithDiff } from './types.js';
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
type GeneratedColumn = number;
|
4
|
+
type SourcesIndex = number;
|
5
|
+
type SourceLine = number;
|
6
|
+
type SourceColumn = number;
|
7
|
+
type NamesIndex = number;
|
8
|
+
type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
|
9
9
|
|
10
10
|
interface SourceMapV3 {
|
11
11
|
file?: string | null;
|
@@ -21,34 +21,34 @@ interface EncodedSourceMap extends SourceMapV3 {
|
|
21
21
|
interface DecodedSourceMap extends SourceMapV3 {
|
22
22
|
mappings: SourceMapSegment[][];
|
23
23
|
}
|
24
|
-
|
24
|
+
type OriginalMapping = {
|
25
25
|
source: string | null;
|
26
26
|
line: number;
|
27
27
|
column: number;
|
28
28
|
name: string | null;
|
29
29
|
};
|
30
|
-
|
30
|
+
type InvalidOriginalMapping = {
|
31
31
|
source: null;
|
32
32
|
line: null;
|
33
33
|
column: null;
|
34
34
|
name: null;
|
35
35
|
};
|
36
|
-
|
36
|
+
type GeneratedMapping = {
|
37
37
|
line: number;
|
38
38
|
column: number;
|
39
39
|
};
|
40
|
-
|
40
|
+
type InvalidGeneratedMapping = {
|
41
41
|
line: null;
|
42
42
|
column: null;
|
43
43
|
};
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
|
45
|
+
type SourceMapInput = string | Ro<EncodedSourceMap> | Ro<DecodedSourceMap> | TraceMap;
|
46
|
+
type Needle = {
|
47
47
|
line: number;
|
48
48
|
column: number;
|
49
49
|
bias?: Bias;
|
50
50
|
};
|
51
|
-
|
51
|
+
type SourceNeedle = {
|
52
52
|
source: string;
|
53
53
|
line: number;
|
54
54
|
column: number;
|
@@ -63,9 +63,9 @@ declare abstract class SourceMap {
|
|
63
63
|
sourcesContent: SourceMapV3['sourcesContent'];
|
64
64
|
resolvedSources: SourceMapV3['sources'];
|
65
65
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
|
67
|
+
type RoArray<T> = Ro<T>[];
|
68
|
+
type RoObject<T> = {
|
69
69
|
[K in keyof T]: T[K] | Ro<T[K]>;
|
70
70
|
};
|
71
71
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/utils",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.2.
|
4
|
+
"version": "1.2.2",
|
5
5
|
"description": "Shared Vitest utility functions",
|
6
6
|
"license": "MIT",
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
@@ -63,7 +63,7 @@
|
|
63
63
|
"pretty-format": "^29.7.0"
|
64
64
|
},
|
65
65
|
"devDependencies": {
|
66
|
-
"@jridgewell/trace-mapping": "^0.3.
|
66
|
+
"@jridgewell/trace-mapping": "^0.3.22",
|
67
67
|
"@types/estree": "^1.0.5",
|
68
68
|
"tinyhighlight": "^0.3.2"
|
69
69
|
},
|