Skip to content

Commit ea3318d

Browse files
github-actions[bot]acao
authored andcommitted
chore(release): changesets versioning & publication
1 parent 14a26f8 commit ea3318d

File tree

5 files changed

+74
-36
lines changed

5 files changed

+74
-36
lines changed

.changeset/fast-steaks-thank.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# codemirror-json-schema
22

3+
## 0.4.2
4+
5+
### Patch Changes
6+
7+
- [`14a26f8`](https://github.com/acao/codemirror-json-schema/commit/14a26f829f04972080eed822bd14e2e29d907be4) Thanks [@acao](https://github.com/acao)! - fix nested json4 completion bug (#55)
8+
9+
- fix #54, expand properties inside nested objects as expected in json4
10+
- always advance cursor after property completions
11+
- add more test coverage
12+
313
## 0.4.1
414

515
### Patch Changes

docs/modules/index.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,22 @@ Full featured cm6 extension for json, including `@codemirror/lang-json`
5656

5757
#### Defined in
5858

59-
[bundled.ts:14](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/bundled.ts#L14)
59+
[bundled.ts:14](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/bundled.ts#L14)
6060

6161
## Codemirror Extensions
6262

6363
### jsonCompletion
6464

65-
**jsonCompletion**(`schema`): (`ctx`: `CompletionContext`) => `CompletionResult`
65+
**jsonCompletion**(`schema`, `opts?`): (`ctx`: `CompletionContext`) => `CompletionResult`
6666

6767
provides a JSON schema enabled autocomplete extension for codemirror
6868

6969
#### Parameters
7070

71-
| Name | Type |
72-
| :------- | :------------ |
73-
| `schema` | `JSONSchema7` |
71+
| Name | Type |
72+
| :------- | :---------------------- |
73+
| `schema` | `JSONSchema7` |
74+
| `opts` | `JSONCompletionOptions` |
7475

7576
#### Returns
7677

@@ -90,7 +91,7 @@ provides a JSON schema enabled autocomplete extension for codemirror
9091

9192
#### Defined in
9293

93-
[json-completion.ts:762](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json-completion.ts#L762)
94+
[json-completion.ts:806](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-completion.ts#L806)
9495

9596
---
9697

@@ -127,7 +128,7 @@ provides a JSON schema enabled tooltip extension for codemirror
127128

128129
#### Defined in
129130

130-
[json-hover.ts:38](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json-hover.ts#L38)
131+
[json-hover.ts:38](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-hover.ts#L38)
131132

132133
---
133134

@@ -162,7 +163,7 @@ Helper for simpler class instantiaton
162163

163164
#### Defined in
164165

165-
[json-validation.ts:35](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json-validation.ts#L35)
166+
[json-validation.ts:35](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-validation.ts#L35)
166167

167168
## Utilities
168169

@@ -185,7 +186,7 @@ retrieve a Map of all the json pointers in a document
185186

186187
#### Defined in
187188

188-
[utils/jsonPointers.ts:56](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/jsonPointers.ts#L56)
189+
[utils/jsonPointers.ts:56](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/jsonPointers.ts#L56)
189190

190191
---
191192

@@ -209,7 +210,7 @@ retrieve a JSON pointer for a given position in the editor
209210

210211
#### Defined in
211212

212-
[utils/jsonPointers.ts:44](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/jsonPointers.ts#L44)
213+
[utils/jsonPointers.ts:44](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/jsonPointers.ts#L44)
213214

214215
---
215216

@@ -236,7 +237,7 @@ Mimics the behavior of `json-source-map`'s `parseJSONDocument` function using co
236237

237238
#### Defined in
238239

239-
[utils/parseJSONDocument.ts:23](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/parseJSONDocument.ts#L23)
240+
[utils/parseJSONDocument.ts:23](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/parseJSONDocument.ts#L23)
240241

241242
---
242243

@@ -263,7 +264,7 @@ Return parsed data and json pointers for a given codemirror EditorState
263264

264265
#### Defined in
265266

266-
[utils/parseJSONDocument.ts:9](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/parseJSONDocument.ts#L9)
267+
[utils/parseJSONDocument.ts:9](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/parseJSONDocument.ts#L9)
267268

268269
## Functions
269270

@@ -284,7 +285,7 @@ Return parsed data and json pointers for a given codemirror EditorState
284285

285286
#### Defined in
286287

287-
[utils/jsonPointers.ts:12](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/jsonPointers.ts#L12)
288+
[utils/jsonPointers.ts:12](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/jsonPointers.ts#L12)
288289

289290
## Type Aliases
290291

@@ -301,7 +302,7 @@ Return parsed data and json pointers for a given codemirror EditorState
301302

302303
#### Defined in
303304

304-
[json-hover.ts:12](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json-hover.ts#L12)
305+
[json-hover.ts:12](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-hover.ts#L12)
305306

306307
---
307308

@@ -311,7 +312,7 @@ Return parsed data and json pointers for a given codemirror EditorState
311312

312313
#### Defined in
313314

314-
[json-hover.ts:14](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json-hover.ts#L14)
315+
[json-hover.ts:14](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-hover.ts#L14)
315316

316317
---
317318

@@ -329,7 +330,7 @@ Return parsed data and json pointers for a given codemirror EditorState
329330

330331
#### Defined in
331332

332-
[json-hover.ts:18](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json-hover.ts#L18)
333+
[json-hover.ts:18](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-hover.ts#L18)
333334

334335
---
335336

@@ -339,7 +340,7 @@ Return parsed data and json pointers for a given codemirror EditorState
339340

340341
#### Defined in
341342

342-
[utils/jsonPointers.ts:8](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/jsonPointers.ts#L8)
343+
[utils/jsonPointers.ts:8](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/jsonPointers.ts#L8)
343344

344345
---
345346

@@ -356,7 +357,7 @@ Return parsed data and json pointers for a given codemirror EditorState
356357

357358
#### Defined in
358359

359-
[types.ts:4](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/types.ts#L4)
360+
[types.ts:4](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/types.ts#L4)
360361

361362
---
362363

@@ -375,7 +376,7 @@ Return parsed data and json pointers for a given codemirror EditorState
375376

376377
#### Defined in
377378

378-
[types.ts:9](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/types.ts#L9)
379+
[types.ts:9](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/types.ts#L9)
379380

380381
---
381382

@@ -385,7 +386,7 @@ Return parsed data and json pointers for a given codemirror EditorState
385386

386387
#### Defined in
387388

388-
[types.ts:18](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/types.ts#L18)
389+
[types.ts:18](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/types.ts#L18)
389390

390391
---
391392

@@ -402,4 +403,4 @@ Return parsed data and json pointers for a given codemirror EditorState
402403

403404
#### Defined in
404405

405-
[json-validation.ts:24](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json-validation.ts#L24)
406+
[json-validation.ts:24](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-validation.ts#L24)

docs/modules/json5.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
### Codemirror Extensions
1212

13+
- [json5Completion](json5.md#json5completion)
1314
- [json5SchemaHover](json5.md#json5schemahover)
1415
- [json5SchemaLinter](json5.md#json5schemalinter)
1516

@@ -38,10 +39,45 @@ Full featured cm6 extension for json5, including `codemirror-json5`
3839

3940
#### Defined in
4041

41-
[json5-bundled.ts:14](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json5-bundled.ts#L14)
42+
[json5-bundled.ts:14](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json5-bundled.ts#L14)
4243

4344
## Codemirror Extensions
4445

46+
### json5Completion
47+
48+
**json5Completion**(`schema`, `opts?`): (`ctx`: `CompletionContext`) => `CompletionResult`
49+
50+
provides a JSON schema enabled autocomplete extension for codemirror and json5
51+
52+
#### Parameters
53+
54+
| Name | Type |
55+
| :------- | :----------------------------------------- |
56+
| `schema` | `JSONSchema7` |
57+
| `opts` | `Omit`<`JSONCompletionOptions`, `"mode"`\> |
58+
59+
#### Returns
60+
61+
`fn`
62+
63+
▸ (`ctx`): `CompletionResult`
64+
65+
##### Parameters
66+
67+
| Name | Type |
68+
| :---- | :------------------ |
69+
| `ctx` | `CompletionContext` |
70+
71+
##### Returns
72+
73+
`CompletionResult`
74+
75+
#### Defined in
76+
77+
[json-completion.ts:820](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json-completion.ts#L820)
78+
79+
---
80+
4581
### json5SchemaHover
4682

4783
**json5SchemaHover**(`schema`, `options?`): (`view`: `EditorView`, `pos`: `number`, `side`: `Side`) => `Promise`<`null` \| `Tooltip`\>
@@ -75,7 +111,7 @@ Instantiates a JSONHover instance with the JSON5 mode
75111

76112
#### Defined in
77113

78-
[json5-hover.ts:13](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json5-hover.ts#L13)
114+
[json5-hover.ts:13](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json5-hover.ts#L13)
79115

80116
---
81117

@@ -110,7 +146,7 @@ Instantiates a JSONValidation instance with the JSON5 mode
110146

111147
#### Defined in
112148

113-
[json5-validation.ts:10](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/json5-validation.ts#L10)
149+
[json5-validation.ts:10](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/json5-validation.ts#L10)
114150

115151
## Utilities
116152

@@ -137,7 +173,7 @@ Mimics the behavior of `json-source-map`'s `parseJSONDocument` function, for jso
137173

138174
#### Defined in
139175

140-
[utils/parseJSON5Document.ts:28](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/parseJSON5Document.ts#L28)
176+
[utils/parseJSON5Document.ts:28](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/parseJSON5Document.ts#L28)
141177

142178
---
143179

@@ -164,4 +200,4 @@ Return parsed data and json5 pointers for a given codemirror EditorState
164200

165201
#### Defined in
166202

167-
[utils/parseJSON5Document.ts:14](https://github.com/acao/codemirror-json-schema/blob/8d7fa57/src/utils/parseJSON5Document.ts#L14)
203+
[utils/parseJSON5Document.ts:14](https://github.com/acao/codemirror-json-schema/blob/14a26f8/src/utils/parseJSON5Document.ts#L14)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "codemirror-json-schema",
33
"license": "MIT",
4-
"version": "0.4.1",
4+
"version": "0.4.2",
55
"description": "Codemirror 6 extensions that provide full JSONSchema support for `@codemirror/lang-json` and `codemirror-json5`",
66
"contributors": [
77
{

0 commit comments

Comments
 (0)