vscode-json-languageservice 5.6.0 → 5.6.1
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.
|
@@ -24,7 +24,7 @@ export interface LanguageService {
|
|
|
24
24
|
getSelectionRanges(document: TextDocument, positions: Position[], doc: JSONDocument): SelectionRange[];
|
|
25
25
|
findDefinition(document: TextDocument, position: Position, doc: JSONDocument): PromiseLike<DefinitionLink[]>;
|
|
26
26
|
findLinks(document: TextDocument, doc: JSONDocument): PromiseLike<DocumentLink[]>;
|
|
27
|
-
format(document: TextDocument, range: Range, options: FormattingOptions): TextEdit[];
|
|
27
|
+
format(document: TextDocument, range: Range | undefined, options: FormattingOptions): TextEdit[];
|
|
28
28
|
sort(document: TextDocument, options: SortOptions): TextEdit[];
|
|
29
29
|
}
|
|
30
30
|
export declare function getLanguageService(params: LanguageServiceParams): LanguageService;
|
|
@@ -586,7 +586,7 @@ function validate(n, schema, validationResult, matchingSchemas, context) {
|
|
|
586
586
|
}
|
|
587
587
|
if (isString(schema.pattern)) {
|
|
588
588
|
const regex = extendedRegExp(schema.pattern);
|
|
589
|
-
if (!(regex
|
|
589
|
+
if (regex && !(regex.test(node.value))) {
|
|
590
590
|
validationResult.problems.push({
|
|
591
591
|
location: { offset: node.offset, length: node.length },
|
|
592
592
|
message: schema.patternErrorMessage || schema.errorMessage || l10n.t('String does not match the pattern of "{0}".', schema.pattern)
|
|
@@ -24,7 +24,7 @@ export interface LanguageService {
|
|
|
24
24
|
getSelectionRanges(document: TextDocument, positions: Position[], doc: JSONDocument): SelectionRange[];
|
|
25
25
|
findDefinition(document: TextDocument, position: Position, doc: JSONDocument): PromiseLike<DefinitionLink[]>;
|
|
26
26
|
findLinks(document: TextDocument, doc: JSONDocument): PromiseLike<DocumentLink[]>;
|
|
27
|
-
format(document: TextDocument, range: Range, options: FormattingOptions): TextEdit[];
|
|
27
|
+
format(document: TextDocument, range: Range | undefined, options: FormattingOptions): TextEdit[];
|
|
28
28
|
sort(document: TextDocument, options: SortOptions): TextEdit[];
|
|
29
29
|
}
|
|
30
30
|
export declare function getLanguageService(params: LanguageServiceParams): LanguageService;
|
|
@@ -616,7 +616,7 @@
|
|
|
616
616
|
}
|
|
617
617
|
if ((0, objects_1.isString)(schema.pattern)) {
|
|
618
618
|
const regex = (0, strings_1.extendedRegExp)(schema.pattern);
|
|
619
|
-
if (!(regex
|
|
619
|
+
if (regex && !(regex.test(node.value))) {
|
|
620
620
|
validationResult.problems.push({
|
|
621
621
|
location: { offset: node.offset, length: node.length },
|
|
622
622
|
message: schema.patternErrorMessage || schema.errorMessage || l10n.t('String does not match the pattern of "{0}".', schema.pattern)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-json-languageservice",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.1",
|
|
4
4
|
"description": "Language service for JSON",
|
|
5
5
|
"main": "./lib/umd/jsonLanguageService.js",
|
|
6
6
|
"typings": "./lib/umd/jsonLanguageService",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/mocha": "^10.0.10",
|
|
19
19
|
"@types/node": "18.x",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^8.35.1",
|
|
21
21
|
"@typescript-eslint/parser": "^8.33.0",
|
|
22
|
-
"eslint": "^9.
|
|
22
|
+
"eslint": "^9.30.0",
|
|
23
23
|
"json-schema-test-suite": "https://github.com/json-schema-org/JSON-Schema-Test-Suite.git#69acf52990b004240839ae19b4bec8fb01d50876",
|
|
24
|
-
"mocha": "^11.1
|
|
24
|
+
"mocha": "^11.7.1",
|
|
25
25
|
"rimraf": "^6.0.1",
|
|
26
26
|
"typescript": "^5.8.3"
|
|
27
27
|
},
|