Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-json-languageservice

Package Overview
Dependencies
Maintainers
7
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-json-languageservice - npm Package Compare versions

Comparing version 5.3.9 to 5.3.10

5

lib/esm/parser/jsonParser.js

@@ -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,

20

lib/esm/utils/sort.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc