Skip to content

Commit 1ff9732

Browse files
committed
upgrade deps && docs [skip ci]
1 parent 39336b3 commit 1ff9732

16 files changed

+354
-206
lines changed

docs/cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nav_order: 2
1212

1313
> **findGitRoot**(): `string`
1414
15-
Defined in: [cli.ts:17](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/cli.ts#L17)
15+
Defined in: [cli.ts:17](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/cli.ts#L17)
1616

1717
Find Git root directory
1818

@@ -26,7 +26,7 @@ Find Git root directory
2626

2727
> **initConfig**(`targetDir`: `string`): `void`
2828
29-
Defined in: [cli.ts:47](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/cli.ts#L47)
29+
Defined in: [cli.ts:47](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/cli.ts#L47)
3030

3131
Write a starter config file
3232

@@ -46,7 +46,7 @@ Write a starter config file
4646

4747
> **loadConfigFile**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)\<[`Config`](types/README.md#config)\<[`AllStrategies`](types/README.md#allstrategies), `unknown`\>\>\>
4848
49-
Defined in: [cli.ts:28](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/cli.ts#L28)
49+
Defined in: [cli.ts:28](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/cli.ts#L28)
5050

5151
Load configuration file (js/ts) from current dir or Git root.
5252

@@ -60,7 +60,7 @@ Load configuration file (js/ts) from current dir or Git root.
6060

6161
> **parseArgs**(`argv`: `string`[]): \{ `gitMergeFiles?`: \[`string`, `string`, `string`\]; `init?`: `boolean`; `overrides`: [`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)\<[`Config`](types/README.md#config)\>; `restore?`: `string`; \}
6262
63-
Defined in: [cli.ts:68](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/cli.ts#L68)
63+
Defined in: [cli.ts:68](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/cli.ts#L68)
6464

6565
CLI argument parser (minimal, no external deps).
6666

docs/conflict-helper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nav_order: 4
1212

1313
> **reconstructConflict**(`merged`: `any`, `ours`: `any`, `theirs`: `any`, `format`: `string`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
1414
15-
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)
1616

1717
Build conflict markers into serialized string
1818

docs/file-parser.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ nav_order: 6
1010

1111
### ParseConflictOptions
1212

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)
1414

1515
Options for parsing conflicted content.
1616

@@ -20,13 +20,13 @@ Options for parsing conflicted content.
2020

2121
#### Properties
2222

23-
##### filename?
23+
##### filename
2424

25-
> `optional` **filename**: `string`
25+
> **filename**: `string`
2626
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)
2828

29-
Optional filename hint to prioritize parser choice.
29+
filename hint to prioritize parser choice as well as get base and ours from git.
3030
Example:
3131

3232
- `config.yaml` → try `yaml` first.
@@ -36,9 +36,9 @@ If extension is unknown, falls back to `parsers` or `"json"`.
3636

3737
##### parsers?
3838

39-
> `optional` **parsers**: [`SupportedParsers`](types/README.md#supportedparsers) \| `"auto"` \| [`SupportedParsers`](types/README.md#supportedparsers)[]
39+
> `optional` **parsers**: `"auto"` \| [`SupportedParsers`](types/README.md#supportedparsers) \| [`SupportedParsers`](types/README.md#supportedparsers)[]
4040
41-
Defined in: [types.ts:231](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/types.ts#L231)
41+
Defined in: [types.ts:245](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/types.ts#L245)
4242

4343
Parsers to attempt, in order:
4444

@@ -49,13 +49,13 @@ Defaults to `"json"`.
4949

5050
###### Inherited from
5151

52-
`Pick.parsers`
52+
[`Config`](types/README.md#config).[`parsers`](types/README.md#parsers)
5353

5454
---
5555

5656
### ParsedConflict\<T\>
5757

58-
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)
5959

6060
Represents a parsed conflict from a file with `ours` and `theirs` versions.
6161

@@ -69,27 +69,35 @@ The type of the parsed content.
6969

7070
#### Properties
7171

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+
7280
##### format
7381

7482
> **format**: `string`
7583
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)
7785

7886
Format used to parse the content (`json`, `yaml`, `toml`, `xml`, or `custom`).
7987

8088
##### ours
8189

8290
> **ours**: `T`
8391
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)
8593

8694
Parsed content from the "ours" side of the conflict.
8795

8896
##### theirs
8997

9098
> **theirs**: `T`
9199
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)
93101

94102
Parsed content from the "theirs" side of the conflict.
95103

@@ -99,7 +107,7 @@ Parsed content from the "theirs" side of the conflict.
99107

100108
> **normalizeParsers**(`options`: [`ParseConflictOptions`](#parseconflictoptions)): [`SupportedParsers`](types/README.md#supportedparsers)[]
101109
102-
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)
103111

104112
Normalize parsers based on filename + options.
105113

@@ -119,7 +127,7 @@ Normalize parsers based on filename + options.
119127

120128
> **parseConflictContent**\<`T`\>(`content`: `string`, `options`: [`ParseConflictOptions`](#parseconflictoptions)): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ParsedConflict`](#parsedconflict)\<`T`\>\>
121129
122-
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)
123131

124132
Parses a conflicted file's content into separate `ours` and `theirs` objects.
125133

@@ -149,7 +157,7 @@ Raw file content containing conflict markers.
149157

150158
##### options
151159

152-
[`ParseConflictOptions`](#parseconflictoptions) = `{}`
160+
[`ParseConflictOptions`](#parseconflictoptions)
153161

154162
Parsing options (parsers + filename hint).
155163

@@ -169,7 +177,7 @@ If parsing fails or conflict markers are invalid.
169177

170178
> **parseFormat**(`parser`: `"json"` \| `"json5"` \| `"yaml"` \| `"toml"` \| `"xml"`, `raw`: `string`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`unknown`\>
171179
172-
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)
173181

174182
Internal parser dispatcher for supported formats.
175183

@@ -193,7 +201,7 @@ Internal parser dispatcher for supported formats.
193201

194202
> **runParser**(`raw`: `string`, `parsers`: [`SupportedParsers`](types/README.md#supportedparsers)[]): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\[`unknown`, [`SupportedParsers`](types/README.md#supportedparsers)\]\>
195203
196-
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)
197205

198206
Internal helper to try parsers in order.
199207

docs/file-serializer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nav_order: 8
1212

1313
> **serialize**(`format`: `string`, `value`: `unknown`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
1414
15-
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)
1616

1717
#### Parameters
1818

docs/logger.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ nav_order: 11
1010

1111
### createLogger()
1212

13-
> **createLogger**(`config`: [`LoggerConfig`](types/README.md#loggerconfig-1)): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `debug`: (`fileId`: `string`, `msg`: `string`) => `void`; `error`: (`fileId`: `string`, `msg`: `string`) => `void`; `flush`: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>; `info`: (`fileId`: `string`, `msg`: `string`) => `void`; `warn`: (`fileId`: `string`, `msg`: `string`) => `void`; \}\>
13+
> **createLogger**(`config`: [`LoggerConfig`](types/README.md#loggerconfig-1), `debug?`: `boolean`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `debug`: (`fileId`: `string`, `msg`: `string`) => `void`; `error`: (`fileId`: `string`, `msg`: `string`) => `void`; `flush`: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>; `info`: (`fileId`: `string`, `msg`: `string`) => `void`; `warn`: (`fileId`: `string`, `msg`: `string`) => `void`; \}\>
1414
15-
Defined in: [logger.ts:12](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/logger.ts#L12)
15+
Defined in: [logger.ts:12](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/logger.ts#L12)
1616

1717
#### Parameters
1818

1919
##### config
2020

2121
[`LoggerConfig`](types/README.md#loggerconfig-1) = `{}`
2222

23+
##### debug?
24+
25+
`boolean`
26+
2327
#### Returns
2428

2529
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `debug`: (`fileId`: `string`, `msg`: `string`) => `void`; `error`: (`fileId`: `string`, `msg`: `string`) => `void`; `flush`: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>; `info`: (`fileId`: `string`, `msg`: `string`) => `void`; `warn`: (`fileId`: `string`, `msg`: `string`) => `void`; \}\>

docs/matcher.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ nav_order: 13
1010

1111
### Matcher
1212

13-
Defined in: [matcher.ts:13](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/matcher.ts#L13)
13+
Defined in: [matcher.ts:17](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/matcher.ts#L17)
1414

1515
Matcher abstraction + adapters for micromatch/picomatch (optional).
1616

@@ -29,7 +29,7 @@ Micromatch/Picomatch can be loaded at runtime as optional peers.
2929

3030
> **isMatch**: (`str`: `string`, `patterns`: `string`[]) => `boolean`
3131
32-
Defined in: [matcher.ts:17](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/matcher.ts#L17)
32+
Defined in: [matcher.ts:21](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/matcher.ts#L21)
3333

3434
Returns true if `str` matches at least one of the provided glob `patterns`.
3535

@@ -53,7 +53,7 @@ Returns true if `str` matches at least one of the provided glob `patterns`.
5353

5454
> `const` **basicMatcher**: [`Matcher`](#matcher)
5555
56-
Defined in: [matcher.ts:28](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/matcher.ts#L28)
56+
Defined in: [matcher.ts:32](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/matcher.ts#L32)
5757

5858
Minimal homegrown matcher (default).
5959
Supports:
@@ -63,13 +63,33 @@ Supports:
6363
- Literal prefix/suffix like `prefix-*`, `*-suffix`
6464
- Backslash escaping for `*` and `.`
6565

66+
---
67+
68+
### ESCAPED_DOT
69+
70+
> `const` **ESCAPED_DOT**: "\u0000" = `"\u0000"`
71+
72+
Defined in: [matcher.ts:2](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/matcher.ts#L2)
73+
74+
Escape sequence for literal dots in field names
75+
76+
---
77+
78+
### ESCAPED_SLASH
79+
80+
> `const` **ESCAPED_SLASH**: "\u0001" = `"\u0001"`
81+
82+
Defined in: [matcher.ts:4](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/matcher.ts#L4)
83+
84+
Escape sequence for literal slashes in field names
85+
6686
## Functions
6787

6888
### loadMatcher()
6989

7090
> **loadMatcher**(`name`: `"micromatch"` \| `"picomatch"`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Matcher`](#matcher)\>
7191
72-
Defined in: [matcher.ts:41](https://github.com/react18-tools/git-json-resolver/blob/d66fea6d97a1504766ed9007635bb4e3c057eb5c/lib/src/matcher.ts#L41)
92+
Defined in: [matcher.ts:45](https://github.com/react18-tools/git-json-resolver/blob/39336b33e116055265cb78e2e7ef769cc52bdba1/lib/src/matcher.ts#L45)
7393

7494
Attempts to load a named matcher adapter.
7595

docs/merge-processor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nav_order: 15
1212

1313
> **processMerge**\<`T`\>(`__namedParameters`: \{ `autoStage?`: `boolean`; `base?`: `unknown`; `config`: [`Config`](types/README.md#config)\<`T`\>; `filePath`: `string`; `format`: `string`; `logger`: \{ `debug`: (`fileId`: `string`, `msg`: `string`) => `void`; `error`: (`fileId`: `string`, `msg`: `string`) => `void`; `flush`: () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>; `info`: (`fileId`: `string`, `msg`: `string`) => `void`; `warn`: (`fileId`: `string`, `msg`: `string`) => `void`; \}; `normalizedConfig`: [`NormalizedConfig`](normalizer.md#normalizedconfig); `ours`: `unknown`; `theirs`: `unknown`; \}): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `conflicts`: [`Conflict`](merger/README.md#conflict)[]; `success`: `boolean`; \}\>
1414
15-
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)
1616

1717
Common merge logic for processing a single file with ours/theirs/base data
1818

@@ -92,7 +92,7 @@ Common merge logic for processing a single file with ours/theirs/base data
9292

9393
> **resolveGitMergeFiles**\<`T`\>(`oursPath`: `string`, `basePath`: `string`, `theirsPath`: `string`, `config`: [`Config`](types/README.md#config)\<`T`\>): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`never`\>
9494
95-
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)
9696

9797
Resolves Git merge conflicts for a single file using the three-way merge approach.
9898
This function is designed to work as a Git merge driver.

0 commit comments

Comments
 (0)