You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defined in: [conflict-helper.ts:31](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/conflict-helper.ts#L31)
15
+
Defined in: [conflict-helper.ts:31](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/conflict-helper.ts#L31)
Copy file name to clipboardExpand all lines: docs/file-parser.md
+25-17Lines changed: 25 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ nav_order: 6
10
10
11
11
### ParseConflictOptions
12
12
13
-
Defined in: [file-parser.ts:20](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L20)
13
+
Defined in: [file-parser.ts:26](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L26)
14
14
15
15
Options for parsing conflicted content.
16
16
@@ -20,13 +20,13 @@ Options for parsing conflicted content.
20
20
21
21
#### Properties
22
22
23
-
##### filename?
23
+
##### filename
24
24
25
-
> `optional`**filename**: `string`
25
+
> **filename**: `string`
26
26
27
-
Defined in: [file-parser.ts:29](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L29)
27
+
Defined in: [file-parser.ts:35](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L35)
28
28
29
-
Optional filename hint to prioritize parser choice.
29
+
filename hint to prioritize parser choice as well as get base and ours from git.
30
30
Example:
31
31
32
32
-`config.yaml` → try `yaml` first.
@@ -36,9 +36,9 @@ If extension is unknown, falls back to `parsers` or `"json"`.
Defined in: [file-parser.ts:8](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L8)
58
+
Defined in: [file-parser.ts:12](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L12)
59
59
60
60
Represents a parsed conflict from a file with `ours` and `theirs` versions.
61
61
@@ -69,27 +69,35 @@ The type of the parsed content.
69
69
70
70
#### Properties
71
71
72
+
##### base?
73
+
74
+
> `optional`**base**: `T`
75
+
76
+
Defined in: [file-parser.ts:18](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L18)
77
+
78
+
Parsed content from the "base" side of the conflict (optional).
79
+
72
80
##### format
73
81
74
82
> **format**: `string`
75
83
76
-
Defined in: [file-parser.ts:14](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L14)
84
+
Defined in: [file-parser.ts:20](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L20)
77
85
78
86
Format used to parse the content (`json`, `yaml`, `toml`, `xml`, or `custom`).
79
87
80
88
##### ours
81
89
82
90
> **ours**: `T`
83
91
84
-
Defined in: [file-parser.ts:10](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L10)
92
+
Defined in: [file-parser.ts:14](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L14)
85
93
86
94
Parsed content from the "ours" side of the conflict.
87
95
88
96
##### theirs
89
97
90
98
> **theirs**: `T`
91
99
92
-
Defined in: [file-parser.ts:12](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L12)
100
+
Defined in: [file-parser.ts:16](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L16)
93
101
94
102
Parsed content from the "theirs" side of the conflict.
95
103
@@ -99,7 +107,7 @@ Parsed content from the "theirs" side of the conflict.
Defined in: [file-parser.ts:120](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L120)
110
+
Defined in: [file-parser.ts:144](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L144)
103
111
104
112
Normalize parsers based on filename + options.
105
113
@@ -119,7 +127,7 @@ Normalize parsers based on filename + options.
Defined in: [file-parser.ts:49](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L49)
130
+
Defined in: [file-parser.ts:55](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L55)
123
131
124
132
Parses a conflicted file's content into separate `ours` and `theirs` objects.
125
133
@@ -149,7 +157,7 @@ Raw file content containing conflict markers.
Defined in: [file-parser.ts:159](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L159)
180
+
Defined in: [file-parser.ts:183](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L183)
173
181
174
182
Internal parser dispatcher for supported formats.
175
183
@@ -193,7 +201,7 @@ Internal parser dispatcher for supported formats.
Defined in: [file-parser.ts:141](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-parser.ts#L141)
204
+
Defined in: [file-parser.ts:165](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-parser.ts#L165)
Defined in: [file-serializer.ts:1](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/file-serializer.ts#L1)
15
+
Defined in: [file-serializer.ts:1](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/file-serializer.ts#L1)
Defined in: [merge-processor.ts:17](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/merge-processor.ts#L17)
15
+
Defined in: [merge-processor.ts:17](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/merge-processor.ts#L17)
16
16
17
17
Common merge logic for processing a single file with ours/theirs/base data
18
18
@@ -92,7 +92,7 @@ Common merge logic for processing a single file with ours/theirs/base data
Defined in: [merge-processor.ts:93](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/merge-processor.ts#L93)
95
+
Defined in: [merge-processor.ts:92](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/merge-processor.ts#L92)
96
96
97
97
Resolves Git merge conflicts for a single file using the three-way merge approach.
98
98
This function is designed to work as a Git merge driver.
0 commit comments