Skip to content

Commit ae85bbf

Browse files
committed
upgrade deps && docs [skip ci]
1 parent 983ecea commit ae85bbf

37 files changed

+2190
-222
lines changed

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- [ ] 🌟 Enable [private vulnerability reporting](https://github.com/react18-tools/git-json-resolver/security)
1818
- [ ] Set up `CodeCov`
1919
- Visit Codecov and set up your repo
20-
- Create [repository secret]((https://github.com/react18-tools/git-json-resolver/settings/secrets/actions)) for `CODECOV_TOKEN`
20+
- Create [repository secret](<(https://github.com/react18-tools/git-json-resolver/settings/secrets/actions)>) for `CODECOV_TOKEN`
2121
- [ ] Set up `CodeClimate`
2222
- Visit CodeClimate and set up your repo
2323
- Create [repository secret] for `CC_TEST_REPORTER_ID`

docs/_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
remote_theme: just-the-docs/just-the-docs
2+
title: React18 Loaders
3+
search_enabled: true
4+
nav_sort: case_insensitive
5+
footer_content: <p align="center" style="text-align:center">with 💖 by <a href="https://mayank-chaudhari.vercel.app" target="_blank">Mayank Kumar Chaudhari</a></p>

docs/cli.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
title: Cli
4+
nav_order: 2
5+
---
6+
7+
# cli

docs/conflict-helper.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: default
3+
title: Conflict Helper
4+
nav_order: 3
5+
---
6+
7+
# conflict-helper
8+
9+
## Functions
10+
11+
### reconstructConflict()
12+
13+
> **reconstructConflict**(`merged`: `any`, `ours`: `any`, `theirs`: `any`, `format`: `string`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
14+
15+
Defined in: [conflict-helper.ts:31](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/conflict-helper.ts#L31)
16+
17+
Build conflict markers into serialized string
18+
19+
#### Parameters
20+
21+
##### merged
22+
23+
`any`
24+
25+
##### ours
26+
27+
`any`
28+
29+
##### theirs
30+
31+
`any`
32+
33+
##### format
34+
35+
`string`
36+
37+
#### Returns
38+
39+
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>

docs/conflict-helper.test.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
title: Conflict Helper.Test
4+
nav_order: 4
5+
---
6+
7+
# conflict-helper.test

docs/file-parser.md

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
---
2+
layout: default
3+
title: File Parser
4+
nav_order: 5
5+
---
6+
7+
# file-parser
8+
9+
## Interfaces
10+
11+
### ParseConflictOptions
12+
13+
Defined in: [file-parser.ts:24](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L24)
14+
15+
Options for parsing conflicted content.
16+
17+
#### Properties
18+
19+
##### filename?
20+
21+
> `optional` **filename**: `string`
22+
23+
Defined in: [file-parser.ts:42](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L42)
24+
25+
Optional filename hint to prioritize parser choice.
26+
Example:
27+
28+
- `config.yaml` → try `yaml` first.
29+
- `data.toml` → try `toml` first.
30+
31+
If extension is unknown, falls back to `parsers` or `"json"`.
32+
33+
##### parsers?
34+
35+
> `optional` **parsers**: [`SupportedParsers`](#supportedparsers) \| `"auto"` \| [`SupportedParsers`](#supportedparsers)[]
36+
37+
Defined in: [file-parser.ts:32](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L32)
38+
39+
Parsers to attempt, in order:
40+
41+
- A single parser (`"json"`, `"yaml"`, custom function, etc.).
42+
- An array of parsers (e.g. `["yaml", "json5"]`).
43+
44+
Defaults to `"json"`.
45+
46+
---
47+
48+
### ParsedConflict\<T\>
49+
50+
Defined in: [file-parser.ts:6](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L6)
51+
52+
Represents a parsed conflict from a file with `ours` and `theirs` versions.
53+
54+
#### Type Parameters
55+
56+
##### T
57+
58+
`T` = `unknown`
59+
60+
The type of the parsed content.
61+
62+
#### Properties
63+
64+
##### format
65+
66+
> **format**: `string`
67+
68+
Defined in: [file-parser.ts:12](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L12)
69+
70+
Format used to parse the content (`json`, `yaml`, `toml`, `xml`, or `custom`).
71+
72+
##### ours
73+
74+
> **ours**: `T`
75+
76+
Defined in: [file-parser.ts:8](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L8)
77+
78+
Parsed content from the "ours" side of the conflict.
79+
80+
##### theirs
81+
82+
> **theirs**: `T`
83+
84+
Defined in: [file-parser.ts:10](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L10)
85+
86+
Parsed content from the "theirs" side of the conflict.
87+
88+
## Type Aliases
89+
90+
### Parser
91+
92+
> **Parser** = \{ `name`: `string`; `parser`: (`input`: `string`) => `unknown`; \}
93+
94+
Defined in: [file-parser.ts:16](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L16)
95+
96+
A parser function that takes a raw string and returns parsed content.
97+
98+
#### Properties
99+
100+
##### name
101+
102+
> **name**: `string`
103+
104+
Defined in: [file-parser.ts:16](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L16)
105+
106+
##### parser()
107+
108+
> **parser**: (`input`: `string`) => `unknown`
109+
110+
Defined in: [file-parser.ts:16](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L16)
111+
112+
###### Parameters
113+
114+
###### input
115+
116+
`string`
117+
118+
###### Returns
119+
120+
`unknown`
121+
122+
---
123+
124+
### SupportedParsers
125+
126+
> **SupportedParsers** = `"json"` \| `"json5"` \| `"yaml"` \| `"toml"` \| `"xml"` \| [`Parser`](#parser)
127+
128+
Defined in: [file-parser.ts:19](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L19)
129+
130+
Built-in parser identifiers or a custom parser function.
131+
132+
## Functions
133+
134+
### parseConflictContent()
135+
136+
> **parseConflictContent**\<`T`\>(`content`: `string`, `options`: [`ParseConflictOptions`](#parseconflictoptions)): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ParsedConflict`](#parsedconflict)\<`T`\>\>
137+
138+
Defined in: [file-parser.ts:62](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-parser.ts#L62)
139+
140+
Parses a conflicted file's content into separate `ours` and `theirs` objects.
141+
142+
- Preserves non-conflicted lines in both versions.
143+
- Supports JSON, JSON5, YAML, TOML, and XML.
144+
- Lazy-loads optional peer dependencies (`json5`, `yaml`, `toml`, `fast-xml-parser`).
145+
- Parser order is determined by:
146+
1. `filename` extension hint (if provided).
147+
2. Explicit `parsers` option.
148+
3. Default `"json"`.
149+
150+
#### Type Parameters
151+
152+
##### T
153+
154+
`T` = `unknown`
155+
156+
Expected type of parsed content.
157+
158+
#### Parameters
159+
160+
##### content
161+
162+
`string`
163+
164+
Raw file content containing conflict markers.
165+
166+
##### options
167+
168+
[`ParseConflictOptions`](#parseconflictoptions) = `{}`
169+
170+
Parsing options (parsers + filename hint).
171+
172+
#### Returns
173+
174+
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ParsedConflict`](#parsedconflict)\<`T`\>\>
175+
176+
Parsed conflict with both sides and detected format.
177+
178+
#### Throws
179+
180+
If parsing fails or conflict markers are invalid.

docs/file-parser.test.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
title: File Parser.Test
4+
nav_order: 6
5+
---
6+
7+
# file-parser.test

docs/file-serializer.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: default
3+
title: File Serializer
4+
nav_order: 7
5+
---
6+
7+
# file-serializer
8+
9+
## Functions
10+
11+
### serialize()
12+
13+
> **serialize**(`format`: `string`, `value`: `unknown`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
14+
15+
Defined in: [file-serializer.ts:1](https://github.com/react18-tools/git-json-resolver/blob/983ecea05a6699ed0124b500e82e9f563b676c3f/lib/src/file-serializer.ts#L1)
16+
17+
#### Parameters
18+
19+
##### format
20+
21+
`string`
22+
23+
##### value
24+
25+
`unknown`
26+
27+
#### Returns
28+
29+
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>

docs/file-serializer.test.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
title: File Serializer.Test
4+
nav_order: 8
5+
---
6+
7+
# file-serializer.test

0 commit comments

Comments
 (0)