vscode-json-languageservice
Advanced tools
Comparing version 5.3.9 to 5.3.10
@@ -458,6 +458,7 @@ /*--------------------------------------------------------------------------------------------- | ||
let deprecationMessage = schema.deprecationMessage; | ||
if ((deprecationMessage || schema.deprecated) && node.parent) { | ||
if (deprecationMessage || schema.deprecated) { | ||
deprecationMessage = deprecationMessage || l10n.t('Value is deprecated'); | ||
let targetNode = node.parent?.type === 'property' ? node.parent : node; | ||
validationResult.problems.push({ | ||
location: { offset: node.parent.offset, length: node.parent.length }, | ||
location: { offset: targetNode.offset, length: targetNode.length }, | ||
severity: DiagnosticSeverity.Warning, | ||
@@ -464,0 +465,0 @@ message: deprecationMessage, |
@@ -193,11 +193,13 @@ /*--------------------------------------------------------------------------------------------- | ||
currentContainerStack.pop(); | ||
// If we are not inside of an empty object and current property end line number has not yet been defined, define it | ||
if (lastNonTriviaNonCommentToken !== 1 /* SyntaxKind.OpenBraceToken */ | ||
&& currentProperty.endLineNumber === undefined) { | ||
currentProperty.endLineNumber = endLineNumber - 1; | ||
// The current property is also the last property | ||
currentProperty.lastProperty = true; | ||
// The last property of an object is associated with the line and index of where to add the comma, in case after sorting, it is no longer the last property | ||
currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; | ||
currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; | ||
// If we are not inside of an empty object | ||
if (lastNonTriviaNonCommentToken !== 1 /* SyntaxKind.OpenBraceToken */) { | ||
// If current property end line number has not yet been defined, define it | ||
if (currentProperty.endLineNumber === undefined) { | ||
currentProperty.endLineNumber = endLineNumber - 1; | ||
// The current property is also the last property | ||
currentProperty.lastProperty = true; | ||
// The last property of an object is associated with the line and index of where to add the comma, in case after sorting, it is no longer the last property | ||
currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; | ||
currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; | ||
} | ||
lastProperty = currentProperty; | ||
@@ -204,0 +206,0 @@ currentProperty = currentProperty ? currentProperty.parent : undefined; |
@@ -206,11 +206,13 @@ /*--------------------------------------------------------------------------------------------- | ||
currentContainerStack.pop(); | ||
// If we are not inside of an empty object and current property end line number has not yet been defined, define it | ||
if (lastNonTriviaNonCommentToken !== 1 /* SyntaxKind.OpenBraceToken */ | ||
&& currentProperty.endLineNumber === undefined) { | ||
currentProperty.endLineNumber = endLineNumber - 1; | ||
// The current property is also the last property | ||
currentProperty.lastProperty = true; | ||
// The last property of an object is associated with the line and index of where to add the comma, in case after sorting, it is no longer the last property | ||
currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; | ||
currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; | ||
// If we are not inside of an empty object | ||
if (lastNonTriviaNonCommentToken !== 1 /* SyntaxKind.OpenBraceToken */) { | ||
// If current property end line number has not yet been defined, define it | ||
if (currentProperty.endLineNumber === undefined) { | ||
currentProperty.endLineNumber = endLineNumber - 1; | ||
// The current property is also the last property | ||
currentProperty.lastProperty = true; | ||
// The last property of an object is associated with the line and index of where to add the comma, in case after sorting, it is no longer the last property | ||
currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; | ||
currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; | ||
} | ||
lastProperty = currentProperty; | ||
@@ -217,0 +219,0 @@ currentProperty = currentProperty ? currentProperty.parent : undefined; |
{ | ||
"name": "vscode-json-languageservice", | ||
"version": "5.3.9", | ||
"version": "5.3.10", | ||
"description": "Language service for JSON", | ||
@@ -20,7 +20,7 @@ "main": "./lib/umd/jsonLanguageService.js", | ||
"@types/node": "16.x", | ||
"@typescript-eslint/eslint-plugin": "^6.19.1", | ||
"@typescript-eslint/parser": "^6.19.1", | ||
"eslint": "^8.56.0", | ||
"@typescript-eslint/eslint-plugin": "^6.21.0", | ||
"@typescript-eslint/parser": "^6.21.0", | ||
"eslint": "^8.57.0", | ||
"json-schema-test-suite": "https://github.com/json-schema-org/JSON-Schema-Test-Suite.git#69acf52990b004240839ae19b4bec8fb01d50876", | ||
"mocha": "^10.2.0", | ||
"mocha": "^10.3.0", | ||
"rimraf": "^5.0.5", | ||
@@ -27,0 +27,0 @@ "typescript": "^5.3.3" |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
564233
11433