vscode-json-languageservice 4.1.0 → 4.1.5

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.
@@ -114,10 +114,10 @@ export interface SchemaConfiguration {
114
114
  */
115
115
  uri: string;
116
116
  /**
117
- * A list of file path glob patterns that are associated to the schema. The '*' and '**' wildcards can be used.
118
- * Exclusion patterns starting with '!'.
119
- * For example: '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
120
- * A match succeeds when there is at least one pattern matching and last matching patter`n does not start with '!'.
117
+ * A list of glob patterns that describe for which file URIs the JSON schema will be used.
118
+ * '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
119
+ * For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
120
+ * A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
121
121
  */
122
122
  fileMatch?: string[];
123
123
  /**
@@ -26,7 +26,7 @@ var FilePatternAssociation = /** @class */ (function () {
26
26
  patternString = patternString.substring(1);
27
27
  }
28
28
  this.minimatchWrappers.push({
29
- minimatch: new Minimatch("**/" + patternString),
29
+ minimatch: new Minimatch("**/" + patternString, { dot: true }),
30
30
  include: include,
31
31
  });
32
32
  }
@@ -329,7 +329,7 @@ var JSONSchemaService = /** @class */ (function () {
329
329
  }
330
330
  };
331
331
  var resolveExternalLink = function (node, uri, refSegment, parentSchemaURL, parentSchemaDependencies) {
332
- if (contextService && !/^\w+:\/\/.*/.test(uri)) {
332
+ if (contextService && !/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(uri)) {
333
333
  uri = contextService.resolveRelativePath(uri, parentSchemaURL);
334
334
  }
335
335
  uri = normalizeId(uri);
@@ -35,8 +35,8 @@ var JSONValidation = /** @class */ (function () {
35
35
  }
36
36
  };
37
37
  var getDiagnostics = function (schema) {
38
- var trailingCommaSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.trailingCommas) : DiagnosticSeverity.Error;
39
- var commentSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.comments) : _this.commentSeverity;
38
+ var trailingCommaSeverity = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.trailingCommas) ? toDiagnosticSeverity(documentSettings.trailingCommas) : DiagnosticSeverity.Error;
39
+ var commentSeverity = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.comments) ? toDiagnosticSeverity(documentSettings.comments) : _this.commentSeverity;
40
40
  var schemaValidation = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.schemaValidation) ? toDiagnosticSeverity(documentSettings.schemaValidation) : DiagnosticSeverity.Warning;
41
41
  var schemaRequest = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.schemaRequest) ? toDiagnosticSeverity(documentSettings.schemaRequest) : DiagnosticSeverity.Warning;
42
42
  if (schema) {
@@ -114,10 +114,10 @@ export interface SchemaConfiguration {
114
114
  */
115
115
  uri: string;
116
116
  /**
117
- * A list of file path glob patterns that are associated to the schema. The '*' and '**' wildcards can be used.
118
- * Exclusion patterns starting with '!'.
119
- * For example: '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
120
- * A match succeeds when there is at least one pattern matching and last matching patter`n does not start with '!'.
117
+ * A list of glob patterns that describe for which file URIs the JSON schema will be used.
118
+ * '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
119
+ * For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
120
+ * A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
121
121
  */
122
122
  fileMatch?: string[];
123
123
  /**
@@ -38,7 +38,7 @@
38
38
  patternString = patternString.substring(1);
39
39
  }
40
40
  this.minimatchWrappers.push({
41
- minimatch: new minimatch_1.Minimatch("**/" + patternString),
41
+ minimatch: new minimatch_1.Minimatch("**/" + patternString, { dot: true }),
42
42
  include: include,
43
43
  });
44
44
  }
@@ -341,7 +341,7 @@
341
341
  }
342
342
  };
343
343
  var resolveExternalLink = function (node, uri, refSegment, parentSchemaURL, parentSchemaDependencies) {
344
- if (contextService && !/^\w+:\/\/.*/.test(uri)) {
344
+ if (contextService && !/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(uri)) {
345
345
  uri = contextService.resolveRelativePath(uri, parentSchemaURL);
346
346
  }
347
347
  uri = normalizeId(uri);
@@ -47,8 +47,8 @@
47
47
  }
48
48
  };
49
49
  var getDiagnostics = function (schema) {
50
- var trailingCommaSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.trailingCommas) : jsonLanguageTypes_1.DiagnosticSeverity.Error;
51
- var commentSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.comments) : _this.commentSeverity;
50
+ var trailingCommaSeverity = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.trailingCommas) ? toDiagnosticSeverity(documentSettings.trailingCommas) : jsonLanguageTypes_1.DiagnosticSeverity.Error;
51
+ var commentSeverity = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.comments) ? toDiagnosticSeverity(documentSettings.comments) : _this.commentSeverity;
52
52
  var schemaValidation = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.schemaValidation) ? toDiagnosticSeverity(documentSettings.schemaValidation) : jsonLanguageTypes_1.DiagnosticSeverity.Warning;
53
53
  var schemaRequest = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.schemaRequest) ? toDiagnosticSeverity(documentSettings.schemaRequest) : jsonLanguageTypes_1.DiagnosticSeverity.Warning;
54
54
  if (schema) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vscode-json-languageservice",
3
- "version": "4.1.0",
3
+ "version": "4.1.5",
4
4
  "description": "Language service for JSON",
5
5
  "main": "./lib/umd/jsonLanguageService.js",
6
6
  "typings": "./lib/umd/jsonLanguageService",