New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vscode-json-languageservice

Package Overview
Dependencies
Maintainers
7
Versions
163
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 3.8.1 to 3.8.2

29

lib/esm/parser/jsonParser.js

@@ -526,4 +526,31 @@ /*---------------------------------------------------------------------------------------------

var val = node.value;
function normalizeFloats(float) {
var _a;
var parts = /^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(float.toString());
return parts && {
value: Number(parts[1] + (parts[2] || '')),
multiplier: (((_a = parts[2]) === null || _a === void 0 ? void 0 : _a.length) || 0) - (parseInt(parts[3]) || 0)
};
}
;
if (isNumber(schema.multipleOf)) {
if (val % schema.multipleOf !== 0) {
var remainder = -1;
if (Number.isInteger(schema.multipleOf)) {
remainder = val % schema.multipleOf;
}
else {
var normMultipleOf = normalizeFloats(schema.multipleOf);
var normValue = normalizeFloats(val);
if (normMultipleOf && normValue) {
var multiplier = Math.pow(10, Math.abs(normValue.multiplier - normMultipleOf.multiplier));
if (normValue.multiplier < normMultipleOf.multiplier) {
normValue.value *= multiplier;
}
else {
normMultipleOf.value *= multiplier;
}
remainder = normValue.value % normMultipleOf.value;
}
}
if (remainder !== 0) {
validationResult.problems.push({

@@ -530,0 +557,0 @@ location: { offset: node.offset, length: node.length },

2

lib/esm/services/jsonSchemaService.js

@@ -290,3 +290,3 @@ /*---------------------------------------------------------------------------------------------

else if (id === 'https://json-schema.org/draft/2019-09/schema') {
schemaToResolve.errors.push(localize('json.schema.draft201909.notsupported', "Draft 2019-09 schemas are not yet fully supported."));
resolveErrors.push(localize('json.schema.draft201909.notsupported', "Draft 2019-09 schemas are not yet fully supported."));
}

@@ -293,0 +293,0 @@ }

@@ -302,3 +302,3 @@ /*---------------------------------------------------------------------------------------------

else if (id === 'https://json-schema.org/draft/2019-09/schema') {
schemaToResolve.errors.push(localize('json.schema.draft201909.notsupported', "Draft 2019-09 schemas are not yet fully supported."));
resolveErrors.push(localize('json.schema.draft201909.notsupported', "Draft 2019-09 schemas are not yet fully supported."));
}

@@ -305,0 +305,0 @@ }

{
"name": "vscode-json-languageservice",
"version": "3.8.1",
"version": "3.8.2",
"description": "Language service for JSON",

@@ -5,0 +5,0 @@ "main": "./lib/umd/jsonLanguageService.js",

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