vscode-json-languageservice 5.4.4 → 5.5.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.
- package/CHANGELOG.md +12 -8
- package/lib/esm/jsonLanguageService.d.ts +1 -1
- package/lib/esm/jsonLanguageService.js +1 -1
- package/lib/esm/parser/jsonParser.js +2 -2
- package/lib/umd/jsonLanguageService.d.ts +1 -1
- package/lib/umd/jsonLanguageService.js +1 -1
- package/lib/umd/parser/jsonParser.js +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
5.5.0 / 2025-03-25
|
|
2
|
+
================
|
|
3
|
+
* `newJSONDocument` API now also accepts undefined as ASTRoots an optionally comment ranges.
|
|
4
|
+
|
|
1
5
|
5.3.1 / 2023-02-24
|
|
2
6
|
================
|
|
3
7
|
* Fixing bugs in the sort feature
|
|
@@ -18,12 +22,12 @@
|
|
|
18
22
|
|
|
19
23
|
5.1.0 / 2022-07-11
|
|
20
24
|
================
|
|
21
|
-
* new API option `FormattingOptions.keepLines` to indicate the formatter should keep the initial line positions
|
|
25
|
+
* new API option `FormattingOptions.keepLines` to indicate the formatter should keep the initial line positions
|
|
22
26
|
|
|
23
27
|
5.0.0 / 2022-05-17
|
|
24
28
|
================
|
|
25
29
|
* Update to `vscode-languageserver-types@3.17`
|
|
26
|
-
* Add more schema support
|
|
30
|
+
* Add more schema support
|
|
27
31
|
* Schema 2019-09: unevaluatedProperties, unevaluatedItems, minContains, maxContains, deprecated, dependentRequired, dependentSchemas, $defs, $anchor
|
|
28
32
|
* Schema 2020-12: prefixItem
|
|
29
33
|
|
|
@@ -35,7 +39,7 @@
|
|
|
35
39
|
4.1.6 / 2021-07-16
|
|
36
40
|
================
|
|
37
41
|
* Replace minimatch with glob-to-regexp
|
|
38
|
-
|
|
42
|
+
|
|
39
43
|
4.1.0 / 2021-04-24
|
|
40
44
|
================
|
|
41
45
|
* `SchemaConfiguration.fileMatch` now supports glob patterns (e.g. /foo/**/bar.json')
|
|
@@ -56,11 +60,11 @@
|
|
|
56
60
|
3.9.0 / 2020-09-28
|
|
57
61
|
=================
|
|
58
62
|
* new API `DocumentLanguageSettings.schemaValidation`. The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used.
|
|
59
|
-
* new API `DocumentLanguageSettings.schemaRequest`. The severity of problems that occurred while resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
|
|
63
|
+
* new API `DocumentLanguageSettings.schemaRequest`. The severity of problems that occurred while resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
|
|
60
64
|
|
|
61
65
|
3.8.0 / 2020-08-02
|
|
62
66
|
=================
|
|
63
|
-
* new API `LanguageService.getMatchingSchemas`. Matches a document against its schema and list all AST nodes along with the matching sub schemas.
|
|
67
|
+
* new API `LanguageService.getMatchingSchemas`. Matches a document against its schema and list all AST nodes along with the matching sub schemas.
|
|
64
68
|
|
|
65
69
|
3.7.0 / 2020-06-04
|
|
66
70
|
==================
|
|
@@ -136,12 +140,12 @@
|
|
|
136
140
|
.
|
|
137
141
|
2.0.19 / 2017-09-21
|
|
138
142
|
===================
|
|
139
|
-
* New API `LanguageService.getColorPresentations` returning presentations for a given color.
|
|
143
|
+
* New API `LanguageService.getColorPresentations` returning presentations for a given color.
|
|
140
144
|
* New API type `ColorPresentation` added.
|
|
141
|
-
|
|
145
|
+
|
|
142
146
|
2.0.15 / 2017-08-28
|
|
143
147
|
===================
|
|
144
|
-
* New API `LanguageService.findDocumentColors` returning the location and value of all colors in a document.
|
|
148
|
+
* New API `LanguageService.findDocumentColors` returning the location and value of all colors in a document.
|
|
145
149
|
* New API types `ColorInformation` and `Color` added.
|
|
146
150
|
* Deprecated `LanguageService.findColorSymbols`. Use `LanguageService.findDocumentColors` instead.
|
|
147
151
|
|
|
@@ -9,7 +9,7 @@ export interface LanguageService {
|
|
|
9
9
|
configure(settings: LanguageSettings): void;
|
|
10
10
|
doValidation(document: TextDocument, jsonDocument: JSONDocument, documentSettings?: DocumentLanguageSettings, schema?: JSONSchema): PromiseLike<Diagnostic[]>;
|
|
11
11
|
parseJSONDocument(document: TextDocument): JSONDocument;
|
|
12
|
-
newJSONDocument(rootNode: ASTNode, syntaxDiagnostics?: Diagnostic[]): JSONDocument;
|
|
12
|
+
newJSONDocument(rootNode: ASTNode | undefined, syntaxDiagnostics?: Diagnostic[], comments?: Range[]): JSONDocument;
|
|
13
13
|
resetSchema(uri: string): boolean;
|
|
14
14
|
getMatchingSchemas(document: TextDocument, jsonDocument: JSONDocument, schema?: JSONSchema): PromiseLike<MatchingSchema[]>;
|
|
15
15
|
getLanguageStatus(document: TextDocument, jsonDocument: JSONDocument): JSONLanguageStatus;
|
|
@@ -33,7 +33,7 @@ export function getLanguageService(params) {
|
|
|
33
33
|
doValidation: jsonValidation.doValidation.bind(jsonValidation),
|
|
34
34
|
getLanguageStatus: jsonValidation.getLanguageStatus.bind(jsonValidation),
|
|
35
35
|
parseJSONDocument: (document) => parseJSON(document, { collectComments: true }),
|
|
36
|
-
newJSONDocument: (root, diagnostics) => newJSONDocument(root, diagnostics),
|
|
36
|
+
newJSONDocument: (root, diagnostics, comments) => newJSONDocument(root, diagnostics, comments),
|
|
37
37
|
getMatchingSchemas: jsonSchemaService.getMatchingSchemas.bind(jsonSchemaService),
|
|
38
38
|
doResolve: jsonCompletion.doResolve.bind(jsonCompletion),
|
|
39
39
|
doComplete: jsonCompletion.doComplete.bind(jsonCompletion),
|
|
@@ -205,8 +205,8 @@ export class ValidationResult {
|
|
|
205
205
|
return this.propertiesMatches - other.propertiesMatches;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
export function newJSONDocument(root, diagnostics = []) {
|
|
209
|
-
return new JSONDocument(root, diagnostics,
|
|
208
|
+
export function newJSONDocument(root, diagnostics = [], comments = []) {
|
|
209
|
+
return new JSONDocument(root, diagnostics, comments);
|
|
210
210
|
}
|
|
211
211
|
export function getNodeValue(node) {
|
|
212
212
|
return Json.getNodeValue(node);
|
|
@@ -9,7 +9,7 @@ export interface LanguageService {
|
|
|
9
9
|
configure(settings: LanguageSettings): void;
|
|
10
10
|
doValidation(document: TextDocument, jsonDocument: JSONDocument, documentSettings?: DocumentLanguageSettings, schema?: JSONSchema): PromiseLike<Diagnostic[]>;
|
|
11
11
|
parseJSONDocument(document: TextDocument): JSONDocument;
|
|
12
|
-
newJSONDocument(rootNode: ASTNode, syntaxDiagnostics?: Diagnostic[]): JSONDocument;
|
|
12
|
+
newJSONDocument(rootNode: ASTNode | undefined, syntaxDiagnostics?: Diagnostic[], comments?: Range[]): JSONDocument;
|
|
13
13
|
resetSchema(uri: string): boolean;
|
|
14
14
|
getMatchingSchemas(document: TextDocument, jsonDocument: JSONDocument, schema?: JSONSchema): PromiseLike<MatchingSchema[]>;
|
|
15
15
|
getLanguageStatus(document: TextDocument, jsonDocument: JSONDocument): JSONLanguageStatus;
|
|
@@ -59,7 +59,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
59
59
|
doValidation: jsonValidation.doValidation.bind(jsonValidation),
|
|
60
60
|
getLanguageStatus: jsonValidation.getLanguageStatus.bind(jsonValidation),
|
|
61
61
|
parseJSONDocument: (document) => (0, jsonParser_1.parse)(document, { collectComments: true }),
|
|
62
|
-
newJSONDocument: (root, diagnostics) => (0, jsonParser_1.newJSONDocument)(root, diagnostics),
|
|
62
|
+
newJSONDocument: (root, diagnostics, comments) => (0, jsonParser_1.newJSONDocument)(root, diagnostics, comments),
|
|
63
63
|
getMatchingSchemas: jsonSchemaService.getMatchingSchemas.bind(jsonSchemaService),
|
|
64
64
|
doResolve: jsonCompletion.doResolve.bind(jsonCompletion),
|
|
65
65
|
doComplete: jsonCompletion.doComplete.bind(jsonCompletion),
|
|
@@ -232,8 +232,8 @@
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
exports.ValidationResult = ValidationResult;
|
|
235
|
-
function newJSONDocument(root, diagnostics = []) {
|
|
236
|
-
return new JSONDocument(root, diagnostics,
|
|
235
|
+
function newJSONDocument(root, diagnostics = [], comments = []) {
|
|
236
|
+
return new JSONDocument(root, diagnostics, comments);
|
|
237
237
|
}
|
|
238
238
|
function getNodeValue(node) {
|
|
239
239
|
return Json.getNodeValue(node);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-json-languageservice",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Language service for JSON",
|
|
5
5
|
"main": "./lib/umd/jsonLanguageService.js",
|
|
6
6
|
"typings": "./lib/umd/jsonLanguageService",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/mocha": "^10.0.10",
|
|
19
19
|
"@types/node": "18.x",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
21
|
-
"@typescript-eslint/parser": "^8.
|
|
22
|
-
"eslint": "^9.
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^8.31.0",
|
|
21
|
+
"@typescript-eslint/parser": "^8.31.0",
|
|
22
|
+
"eslint": "^9.25.1",
|
|
23
23
|
"json-schema-test-suite": "https://github.com/json-schema-org/JSON-Schema-Test-Suite.git#69acf52990b004240839ae19b4bec8fb01d50876",
|
|
24
24
|
"mocha": "^11.1.0",
|
|
25
25
|
"rimraf": "^6.0.1",
|
|
26
|
-
"typescript": "^5.8.
|
|
26
|
+
"typescript": "^5.8.3"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"jsonc-parser": "^3.3.1",
|