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

vscode-json-languageservice

Package Overview
Dependencies
Maintainers
5
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 4.1.9 to 4.1.10

4

lib/esm/parser/jsonParser.js

@@ -620,3 +620,3 @@ /*---------------------------------------------------------------------------------------------

var regex = extendedRegExp(schema.pattern);
if (!regex.test(node.value)) {
if (!(regex === null || regex === void 0 ? void 0 : regex.test(node.value))) {
validationResult.problems.push({

@@ -815,3 +815,3 @@ location: { offset: node.offset, length: node.length },

var propertyName = _j[_h];
if (regex.test(propertyName)) {
if (regex === null || regex === void 0 ? void 0 : regex.test(propertyName)) {
propertyProcessed(propertyName);

@@ -818,0 +818,0 @@ var child = seenKeys[propertyName];

@@ -443,3 +443,3 @@ /*---------------------------------------------------------------------------------------------

var regex = extendedRegExp(pattern);
if (regex.test(parentKey)) {
if (regex === null || regex === void 0 ? void 0 : regex.test(parentKey)) {
propertyMatched = true;

@@ -446,0 +446,0 @@ var propertySchema = s.schema.patternProperties[pattern];

@@ -122,3 +122,3 @@ /*---------------------------------------------------------------------------------------------

var regex = Strings.extendedRegExp(pattern);
if (regex.test(next)) {
if (regex === null || regex === void 0 ? void 0 : regex.test(next)) {
return this.getSectionRecursive(path, schema.patternProperties[pattern]);

@@ -125,0 +125,0 @@ }

@@ -46,8 +46,20 @@ /*---------------------------------------------------------------------------------------------

export function extendedRegExp(pattern) {
var flags = '';
if (startsWith(pattern, '(?i)')) {
return new RegExp(pattern.substring(4), 'iu');
pattern = pattern.substring(4);
flags = 'i';
}
else {
return new RegExp(pattern, 'u');
try {
return new RegExp(pattern, flags + 'u');
}
catch (e) {
// could be an exception due to the 'u ' flag
try {
return new RegExp(pattern, flags);
}
catch (e) {
// invalid pattern
return undefined;
}
}
}

@@ -455,3 +455,3 @@ /*---------------------------------------------------------------------------------------------

var regex = strings_1.extendedRegExp(pattern);
if (regex.test(parentKey)) {
if (regex === null || regex === void 0 ? void 0 : regex.test(parentKey)) {
propertyMatched = true;

@@ -458,0 +458,0 @@ var propertySchema = s.schema.patternProperties[pattern];

@@ -134,3 +134,3 @@ /*---------------------------------------------------------------------------------------------

var regex = Strings.extendedRegExp(pattern);
if (regex.test(next)) {
if (regex === null || regex === void 0 ? void 0 : regex.test(next)) {
return this.getSectionRecursive(path, schema.patternProperties[pattern]);

@@ -137,0 +137,0 @@ }

@@ -62,10 +62,22 @@ /*---------------------------------------------------------------------------------------------

function extendedRegExp(pattern) {
var flags = '';
if (startsWith(pattern, '(?i)')) {
return new RegExp(pattern.substring(4), 'iu');
pattern = pattern.substring(4);
flags = 'i';
}
else {
return new RegExp(pattern, 'u');
try {
return new RegExp(pattern, flags + 'u');
}
catch (e) {
// could be an exception due to the 'u ' flag
try {
return new RegExp(pattern, flags);
}
catch (e) {
// invalid pattern
return undefined;
}
}
}
exports.extendedRegExp = extendedRegExp;
});
{
"name": "vscode-json-languageservice",
"version": "4.1.9",
"version": "4.1.10",
"description": "Language service for JSON",

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

},
"engines": {
"npm": ">=7.0.0"
},
"devDependencies": {

@@ -22,0 +19,0 @@ "@types/mocha": "^9.0.0",

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