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.
- package/lib/esm/jsonLanguageTypes.d.ts +4 -4
- package/lib/esm/services/jsonSchemaService.js +2 -2
- package/lib/esm/services/jsonValidation.js +2 -2
- package/lib/umd/jsonLanguageTypes.d.ts +4 -4
- package/lib/umd/services/jsonSchemaService.js +2 -2
- package/lib/umd/services/jsonValidation.js +2 -2
- package/package.json +1 -1
|
@@ -114,10 +114,10 @@ export interface SchemaConfiguration {
|
|
|
114
114
|
*/
|
|
115
115
|
uri: string;
|
|
116
116
|
/**
|
|
117
|
-
* A list of
|
|
118
|
-
* Exclusion patterns
|
|
119
|
-
* For example
|
|
120
|
-
* A match succeeds when there is at least one pattern matching and last matching
|
|
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 &&
|
|
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
|
|
118
|
-
* Exclusion patterns
|
|
119
|
-
* For example
|
|
120
|
-
* A match succeeds when there is at least one pattern matching and last matching
|
|
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 &&
|
|
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) {
|