react-bsonschema-form
Advanced tools
Comparing version 0.43.6 to 0.43.7
@@ -43,2 +43,4 @@ "use strict"; | ||
var _bson = require("bson"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -235,3 +237,15 @@ | ||
// For enum with no defined default, select the first entry. | ||
defaults = schema.enum[0]; | ||
switch (schema.type) { | ||
case 'int': | ||
defaults = new _bson.Int32(schema.enum[0]); | ||
break; | ||
case 'long': | ||
defaults = new _bson.Long(schema.enum[0]); | ||
break; | ||
case 'double': | ||
defaults = new _bson.Double(schema.enum[0]); | ||
break; | ||
default: | ||
defaults = schema.enum[0]; | ||
} | ||
} else if ("$ref" in schema) { | ||
@@ -314,8 +328,8 @@ // Use referenced schema defaults for this node. | ||
// NOTE: do not merge bson object types | ||
if (shouldSkip(obj2)) { | ||
return obj2; | ||
} | ||
if (shouldSkip(obj1)) { | ||
return obj1; | ||
} | ||
if (shouldSkip(obj2)) { | ||
return obj2; | ||
} | ||
// Recursively merge deeply nested objects. | ||
@@ -322,0 +336,0 @@ var acc = Object.assign({}, obj1); // Prevent mutation of source object. |
{ | ||
"name": "react-bsonschema-form", | ||
"version": "0.43.6", | ||
"version": "0.43.7", | ||
"description": "A simple React component capable of building HTML forms out of a JSON schema.", | ||
@@ -33,3 +33,3 @@ "scripts": { | ||
"bson": "^0.5.5", | ||
"bsonschema": "1.1.4", | ||
"bsonschema": "1.1.5", | ||
"moment": "^2.15.0", | ||
@@ -36,0 +36,0 @@ "react-datetime": "^2.8.8", |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
0
185633
43
3631
+ Addedbsonschema@1.1.5(transitive)
- Removedbsonschema@1.1.4(transitive)
Updatedbsonschema@1.1.5