vscode-json-languageservice 5.3.10 → 5.4.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.
|
@@ -684,13 +684,13 @@ function validate(n, schema, validationResult, matchingSchemas, context) {
|
|
|
684
684
|
if (isNumber(schema.minContains) && containsCount < schema.minContains) {
|
|
685
685
|
validationResult.problems.push({
|
|
686
686
|
location: { offset: node.offset, length: node.length },
|
|
687
|
-
message: l10n.t('Array has too few items that match the contains contraint. Expected {0} or more.', schema.minContains)
|
|
687
|
+
message: schema.errorMessage || l10n.t('Array has too few items that match the contains contraint. Expected {0} or more.', schema.minContains)
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
if (isNumber(schema.maxContains) && containsCount > schema.maxContains) {
|
|
691
691
|
validationResult.problems.push({
|
|
692
692
|
location: { offset: node.offset, length: node.length },
|
|
693
|
-
message: l10n.t('Array has too many items that match the contains contraint. Expected {0} or less.', schema.maxContains)
|
|
693
|
+
message: schema.errorMessage || l10n.t('Array has too many items that match the contains contraint. Expected {0} or less.', schema.maxContains)
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
}
|
|
@@ -711,13 +711,13 @@
|
|
|
711
711
|
if ((0, objects_1.isNumber)(schema.minContains) && containsCount < schema.minContains) {
|
|
712
712
|
validationResult.problems.push({
|
|
713
713
|
location: { offset: node.offset, length: node.length },
|
|
714
|
-
message: l10n.t('Array has too few items that match the contains contraint. Expected {0} or more.', schema.minContains)
|
|
714
|
+
message: schema.errorMessage || l10n.t('Array has too few items that match the contains contraint. Expected {0} or more.', schema.minContains)
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
if ((0, objects_1.isNumber)(schema.maxContains) && containsCount > schema.maxContains) {
|
|
718
718
|
validationResult.problems.push({
|
|
719
719
|
location: { offset: node.offset, length: node.length },
|
|
720
|
-
message: l10n.t('Array has too many items that match the contains contraint. Expected {0} or less.', schema.maxContains)
|
|
720
|
+
message: schema.errorMessage || l10n.t('Array has too many items that match the contains contraint. Expected {0} or less.', schema.maxContains)
|
|
721
721
|
});
|
|
722
722
|
}
|
|
723
723
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-json-languageservice",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "Language service for JSON",
|
|
5
5
|
"main": "./lib/umd/jsonLanguageService.js",
|
|
6
6
|
"typings": "./lib/umd/jsonLanguageService",
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"url": "https://github.com/Microsoft/vscode-json-languageservice"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/mocha": "^10.0.
|
|
19
|
-
"@types/node": "
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
21
|
-
"@typescript-eslint/parser": "^
|
|
22
|
-
|
|
18
|
+
"@types/mocha": "^10.0.7",
|
|
19
|
+
"@types/node": "18.x",
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
21
|
+
"@typescript-eslint/parser": "^7.13.1",
|
|
22
|
+
"eslint": "^8.57.0",
|
|
23
23
|
"json-schema-test-suite": "https://github.com/json-schema-org/JSON-Schema-Test-Suite.git#69acf52990b004240839ae19b4bec8fb01d50876",
|
|
24
|
-
"mocha": "^10.
|
|
25
|
-
"rimraf": "^5.0.
|
|
26
|
-
"typescript": "^5.
|
|
24
|
+
"mocha": "^10.4.0",
|
|
25
|
+
"rimraf": "^5.0.7",
|
|
26
|
+
"typescript": "^5.4.5"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"jsonc-parser": "^3.
|
|
29
|
+
"jsonc-parser": "^3.3.0",
|
|
30
30
|
"vscode-languageserver-textdocument": "^1.0.11",
|
|
31
31
|
"vscode-languageserver-types": "^3.17.5",
|
|
32
32
|
"vscode-uri": "^3.0.8",
|