vscode-json-languageservice 5.1.2 → 5.1.4
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/lib/esm/jsonContributions.d.ts +2 -2
- package/lib/esm/jsonLanguageService.d.ts +1 -1
- package/lib/esm/jsonLanguageTypes.d.ts +2 -2
- package/lib/esm/jsonSchema.d.ts +1 -1
- package/lib/esm/parser/jsonParser.js +1 -1
- package/lib/umd/jsonContributions.d.ts +2 -2
- package/lib/umd/jsonLanguageService.d.ts +1 -1
- package/lib/umd/jsonLanguageTypes.d.ts +2 -2
- package/lib/umd/jsonSchema.d.ts +1 -1
- package/lib/umd/parser/jsonParser.js +1 -1
- package/package.json +11 -11
|
@@ -6,8 +6,8 @@ export interface JSONWorkerContribution {
|
|
|
6
6
|
collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable<any>;
|
|
7
7
|
resolveCompletion?(item: CompletionItem): Thenable<CompletionItem>;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type Segment = string | number;
|
|
10
|
+
export type JSONPath = Segment[];
|
|
11
11
|
export interface CompletionsCollector {
|
|
12
12
|
add(suggestion: CompletionItem): void;
|
|
13
13
|
error(message: string): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Thenable, ASTNode, Color, ColorInformation, ColorPresentation, LanguageServiceParams, LanguageSettings, DocumentLanguageSettings, FoldingRange, JSONSchema, SelectionRange, FoldingRangesContext, DocumentSymbolsContext, ColorInformationContext as DocumentColorsContext, TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, DocumentSymbol, DefinitionLink, MatchingSchema, JSONLanguageStatus } from './jsonLanguageTypes';
|
|
2
2
|
import { DocumentLink } from 'vscode-languageserver-types';
|
|
3
|
-
export
|
|
3
|
+
export type JSONDocument = {
|
|
4
4
|
root: ASTNode | undefined;
|
|
5
5
|
getNodeFromOffset(offset: number, includeRightBound?: boolean): ASTNode | undefined;
|
|
6
6
|
};
|
|
@@ -28,7 +28,7 @@ export declare enum ErrorCode {
|
|
|
28
28
|
SchemaResolveError = 768,
|
|
29
29
|
SchemaUnsupportedFeature = 769
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ASTNode = ObjectASTNode | PropertyASTNode | ArrayASTNode | StringASTNode | NumberASTNode | BooleanASTNode | NullASTNode;
|
|
32
32
|
export interface BaseASTNode {
|
|
33
33
|
readonly type: 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null';
|
|
34
34
|
readonly parent?: ASTNode;
|
|
@@ -93,7 +93,7 @@ export interface LanguageSettings {
|
|
|
93
93
|
*/
|
|
94
94
|
schemas?: SchemaConfiguration[];
|
|
95
95
|
}
|
|
96
|
-
export
|
|
96
|
+
export type SeverityLevel = 'error' | 'warning' | 'ignore';
|
|
97
97
|
export declare enum SchemaDraft {
|
|
98
98
|
v3 = 3,
|
|
99
99
|
v4 = 4,
|
package/lib/esm/jsonSchema.d.ts
CHANGED
|
@@ -330,7 +330,7 @@ function validate(n, schema, validationResult, matchingSchemas, context) {
|
|
|
330
330
|
if (!subValidationResult.hasProblems()) {
|
|
331
331
|
validationResult.problems.push({
|
|
332
332
|
location: { offset: node.offset, length: node.length },
|
|
333
|
-
message: l10n.t("Matches a schema that is not allowed.")
|
|
333
|
+
message: schema.errorMessage || l10n.t("Matches a schema that is not allowed.")
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
for (const ms of subMatchingSchemas.schemas) {
|
|
@@ -6,8 +6,8 @@ export interface JSONWorkerContribution {
|
|
|
6
6
|
collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable<any>;
|
|
7
7
|
resolveCompletion?(item: CompletionItem): Thenable<CompletionItem>;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type Segment = string | number;
|
|
10
|
+
export type JSONPath = Segment[];
|
|
11
11
|
export interface CompletionsCollector {
|
|
12
12
|
add(suggestion: CompletionItem): void;
|
|
13
13
|
error(message: string): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Thenable, ASTNode, Color, ColorInformation, ColorPresentation, LanguageServiceParams, LanguageSettings, DocumentLanguageSettings, FoldingRange, JSONSchema, SelectionRange, FoldingRangesContext, DocumentSymbolsContext, ColorInformationContext as DocumentColorsContext, TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, DocumentSymbol, DefinitionLink, MatchingSchema, JSONLanguageStatus } from './jsonLanguageTypes';
|
|
2
2
|
import { DocumentLink } from 'vscode-languageserver-types';
|
|
3
|
-
export
|
|
3
|
+
export type JSONDocument = {
|
|
4
4
|
root: ASTNode | undefined;
|
|
5
5
|
getNodeFromOffset(offset: number, includeRightBound?: boolean): ASTNode | undefined;
|
|
6
6
|
};
|
|
@@ -28,7 +28,7 @@ export declare enum ErrorCode {
|
|
|
28
28
|
SchemaResolveError = 768,
|
|
29
29
|
SchemaUnsupportedFeature = 769
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ASTNode = ObjectASTNode | PropertyASTNode | ArrayASTNode | StringASTNode | NumberASTNode | BooleanASTNode | NullASTNode;
|
|
32
32
|
export interface BaseASTNode {
|
|
33
33
|
readonly type: 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null';
|
|
34
34
|
readonly parent?: ASTNode;
|
|
@@ -93,7 +93,7 @@ export interface LanguageSettings {
|
|
|
93
93
|
*/
|
|
94
94
|
schemas?: SchemaConfiguration[];
|
|
95
95
|
}
|
|
96
|
-
export
|
|
96
|
+
export type SeverityLevel = 'error' | 'warning' | 'ignore';
|
|
97
97
|
export declare enum SchemaDraft {
|
|
98
98
|
v3 = 3,
|
|
99
99
|
v4 = 4,
|
package/lib/umd/jsonSchema.d.ts
CHANGED
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
if (!subValidationResult.hasProblems()) {
|
|
358
358
|
validationResult.problems.push({
|
|
359
359
|
location: { offset: node.offset, length: node.length },
|
|
360
|
-
message: l10n.t("Matches a schema that is not allowed.")
|
|
360
|
+
message: schema.errorMessage || l10n.t("Matches a schema that is not allowed.")
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
363
|
for (const ms of subMatchingSchemas.schemas) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-json-languageservice",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "Language service for JSON",
|
|
5
5
|
"main": "./lib/umd/jsonLanguageService.js",
|
|
6
6
|
"typings": "./lib/umd/jsonLanguageService",
|
|
@@ -15,22 +15,22 @@
|
|
|
15
15
|
"url": "https://github.com/Microsoft/vscode-json-languageservice"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/mocha": "^10.0.
|
|
18
|
+
"@types/mocha": "^10.0.1",
|
|
19
19
|
"@types/node": "16.x",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
21
|
-
"@typescript-eslint/parser": "^5.
|
|
22
|
-
"eslint": "^8.
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
|
21
|
+
"@typescript-eslint/parser": "^5.48.2",
|
|
22
|
+
"eslint": "^8.32.0",
|
|
23
23
|
"json-schema-test-suite": "https://github.com/json-schema-org/JSON-Schema-Test-Suite.git#69acf52990b004240839ae19b4bec8fb01d50876",
|
|
24
|
-
"mocha": "^10.
|
|
25
|
-
"rimraf": "^
|
|
26
|
-
"typescript": "^4.
|
|
24
|
+
"mocha": "^10.2.0",
|
|
25
|
+
"rimraf": "^4.1.1",
|
|
26
|
+
"typescript": "^4.9.4"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"jsonc-parser": "^3.2.0",
|
|
30
|
-
"vscode-languageserver-textdocument": "^1.0.
|
|
30
|
+
"vscode-languageserver-textdocument": "^1.0.8",
|
|
31
31
|
"vscode-languageserver-types": "^3.17.2",
|
|
32
|
-
"vscode-uri": "^3.0.
|
|
33
|
-
"@vscode/l10n": "^0.0.
|
|
32
|
+
"vscode-uri": "^3.0.7",
|
|
33
|
+
"@vscode/l10n": "^0.0.11"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs",
|