path-serializer 0.0.6 → 0.1.0

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.
@@ -0,0 +1,46 @@
1
+ import { SnapshotSerializer } from '@vitest/snapshot';
2
+
3
+ export declare function createSnapshotSerializer(options?: SnapshotSerializerOptions): SnapshotSerializer;
4
+
5
+ declare interface Features {
6
+ /**
7
+ * @default true
8
+ */
9
+ replaceRoot?: boolean;
10
+ /**
11
+ * @default true
12
+ */
13
+ replaceWorkspace?: boolean;
14
+ /**
15
+ * @default true
16
+ */
17
+ replacePnpmInner?: boolean;
18
+ /**
19
+ * @default true
20
+ */
21
+ replaceTmpDir?: boolean;
22
+ /**
23
+ * @default true
24
+ */
25
+ ansiDoubleQuotes?: boolean;
26
+ /**
27
+ * @default true
28
+ */
29
+ addDoubleQuotes?: boolean;
30
+ }
31
+
32
+ declare interface PathMatcher {
33
+ match: PathMatchExpression;
34
+ mark: string | ((substring: string, ...args: any[]) => string);
35
+ }
36
+
37
+ declare type PathMatchExpression = string | RegExp;
38
+
39
+ declare interface SnapshotSerializerOptions {
40
+ cwd?: string;
41
+ workspace?: string;
42
+ replace?: PathMatcher[];
43
+ features?: Features;
44
+ }
45
+
46
+ export { }
@@ -0,0 +1,46 @@
1
+ import { SnapshotSerializer } from '@vitest/snapshot';
2
+
3
+ export declare function createSnapshotSerializer(options?: SnapshotSerializerOptions): SnapshotSerializer;
4
+
5
+ declare interface Features {
6
+ /**
7
+ * @default true
8
+ */
9
+ replaceRoot?: boolean;
10
+ /**
11
+ * @default true
12
+ */
13
+ replaceWorkspace?: boolean;
14
+ /**
15
+ * @default true
16
+ */
17
+ replacePnpmInner?: boolean;
18
+ /**
19
+ * @default true
20
+ */
21
+ replaceTmpDir?: boolean;
22
+ /**
23
+ * @default true
24
+ */
25
+ ansiDoubleQuotes?: boolean;
26
+ /**
27
+ * @default true
28
+ */
29
+ addDoubleQuotes?: boolean;
30
+ }
31
+
32
+ declare interface PathMatcher {
33
+ match: PathMatchExpression;
34
+ mark: string | ((substring: string, ...args: any[]) => string);
35
+ }
36
+
37
+ declare type PathMatchExpression = string | RegExp;
38
+
39
+ declare interface SnapshotSerializerOptions {
40
+ cwd?: string;
41
+ workspace?: string;
42
+ replace?: PathMatcher[];
43
+ features?: Features;
44
+ }
45
+
46
+ export { }