🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

joi

Package Overview
Dependencies
Maintainers
6
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joi - npm Package Compare versions

Comparing version
18.2.2
to
18.2.3
+8
-1
lib/types/keys.js

@@ -678,4 +678,11 @@ 'use strict';

const clone = Object.create(Object.getPrototypeOf(value));
const proto = Object.getPrototypeOf(value);
const clone = Object.create(proto);
Object.assign(clone, value);
// Restore the prototype in case of pre-existing prototype pollution
if (Object.getPrototypeOf(clone) !== proto) {
Object.setPrototypeOf(clone, proto);
}
return clone;

@@ -682,0 +689,0 @@ }

@@ -696,3 +696,15 @@ 'use strict';

res.pattern = rule.args.regex.source;
const pattern = rule.args.regex.source;
if (res.allOf) {
res.allOf.push({ pattern });
}
else if (res.pattern !== undefined) {
res.allOf = [{ pattern: res.pattern }, { pattern }];
delete res.pattern;
}
else {
res.pattern = pattern;
}
return res;

@@ -699,0 +711,0 @@ },

+1
-1
{
"name": "joi",
"description": "Object schema validation",
"version": "18.2.2",
"version": "18.2.3",
"repository": {

@@ -6,0 +6,0 @@ "url": "git://github.com/hapijs/joi.git",

Sorry, the diff of this file is too big to display