vscode-json-languageservice 4.2.0 → 5.1.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/SECURITY.md +41 -0
  3. package/lib/esm/jsonLanguageService.js +22 -22
  4. package/lib/esm/jsonLanguageTypes.d.ts +3 -1
  5. package/lib/esm/jsonLanguageTypes.js +3 -2
  6. package/lib/esm/jsonSchema.d.ts +21 -2
  7. package/lib/esm/parser/jsonParser.js +488 -488
  8. package/lib/esm/services/configuration.js +9 -9
  9. package/lib/esm/services/jsonCompletion.js +280 -290
  10. package/lib/esm/services/jsonDocumentSymbols.js +88 -99
  11. package/lib/esm/services/jsonFolding.js +38 -39
  12. package/lib/esm/services/jsonHover.js +40 -43
  13. package/lib/esm/services/jsonLinks.js +12 -13
  14. package/lib/esm/services/jsonSchemaService.js +234 -253
  15. package/lib/esm/services/jsonSelectionRanges.js +9 -9
  16. package/lib/esm/services/jsonValidation.js +53 -51
  17. package/lib/esm/utils/colors.js +7 -8
  18. package/lib/esm/utils/glob.js +12 -12
  19. package/lib/esm/utils/json.js +7 -7
  20. package/lib/esm/utils/objects.js +3 -0
  21. package/lib/esm/utils/strings.js +3 -3
  22. package/lib/umd/jsonLanguageService.js +36 -32
  23. package/lib/umd/jsonLanguageTypes.d.ts +3 -1
  24. package/lib/umd/jsonLanguageTypes.js +5 -3
  25. package/lib/umd/jsonSchema.d.ts +21 -2
  26. package/lib/umd/parser/jsonParser.js +492 -482
  27. package/lib/umd/services/configuration.js +9 -9
  28. package/lib/umd/services/jsonCompletion.js +287 -296
  29. package/lib/umd/services/jsonDocumentSymbols.js +92 -102
  30. package/lib/umd/services/jsonFolding.js +40 -41
  31. package/lib/umd/services/jsonHover.js +42 -44
  32. package/lib/umd/services/jsonLinks.js +13 -14
  33. package/lib/umd/services/jsonSchemaService.js +241 -257
  34. package/lib/umd/services/jsonSelectionRanges.js +11 -11
  35. package/lib/umd/services/jsonValidation.js +56 -53
  36. package/lib/umd/utils/colors.js +7 -8
  37. package/lib/umd/utils/glob.js +12 -12
  38. package/lib/umd/utils/json.js +7 -7
  39. package/lib/umd/utils/objects.js +5 -1
  40. package/lib/umd/utils/strings.js +3 -3
  41. package/package.json +12 -12
@@ -14,8 +14,8 @@
14
14
  "use strict";
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.schemaContributions = void 0;
17
- var nls = require("vscode-nls");
18
- var localize = nls.loadMessageBundle();
17
+ const nls = require("vscode-nls");
18
+ const localize = nls.loadMessageBundle();
19
19
  exports.schemaContributions = {
20
20
  schemaAssociations: [],
21
21
  schemas: {
@@ -474,7 +474,7 @@
474
474
  }
475
475
  }
476
476
  };
477
- var descriptions = {
477
+ const descriptions = {
478
478
  id: localize('schema.json.id', "A unique identifier for the schema."),
479
479
  $schema: localize('schema.json.$schema', "The schema to verify this document against."),
480
480
  title: localize('schema.json.title', "A descriptive title of the element."),
@@ -522,19 +522,19 @@
522
522
  then: localize('schema.json.then', "The \"if\" subschema is used for validation when the \"if\" subschema succeeds."),
523
523
  else: localize('schema.json.else', "The \"else\" subschema is used for validation when the \"if\" subschema fails.")
524
524
  };
525
- for (var schemaName in exports.schemaContributions.schemas) {
526
- var schema = exports.schemaContributions.schemas[schemaName];
527
- for (var property in schema.properties) {
528
- var propertyObject = schema.properties[property];
525
+ for (const schemaName in exports.schemaContributions.schemas) {
526
+ const schema = exports.schemaContributions.schemas[schemaName];
527
+ for (const property in schema.properties) {
528
+ let propertyObject = schema.properties[property];
529
529
  if (typeof propertyObject === 'boolean') {
530
530
  propertyObject = schema.properties[property] = {};
531
531
  }
532
- var description = descriptions[property];
532
+ const description = descriptions[property];
533
533
  if (description) {
534
534
  propertyObject['description'] = description;
535
535
  }
536
536
  else {
537
- console.log("".concat(property, ": localize('schema.json.").concat(property, "', \"\")"));
537
+ console.log(`${property}: localize('schema.json.${property}', "")`);
538
538
  }
539
539
  }
540
540
  }