Socket
Socket
Sign inDemoInstall

simpl-schema

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simpl-schema - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

6

CHANGELOG.md

@@ -6,2 +6,4 @@ <!-- START doctoc generated TOC please keep comment here to allow auto update -->

- [simpl-schema CHANGELOG](#simpl-schema-changelog)
- [1.1.2](#112)
- [1.1.1](#111)
- [1.1.0](#110)

@@ -28,2 +30,6 @@ - [1.0.0](#100)

## 1.1.2
Passing a definition with no `type` to `extend` now works as expected, as long as the existing definition already has a `type`.
## 1.1.1

@@ -30,0 +36,0 @@

13

dist/SimpleSchema.js

@@ -519,4 +519,3 @@ 'use strict';

Object.keys(schemaObj).forEach(function (fieldName) {
var definition = (0, _clone2.default)(schemaObj[fieldName]);
standardizeDefinition(definition);
var definition = standardizeDefinition(schemaObj[fieldName]);

@@ -1035,4 +1034,8 @@ // Merge/extend with any existing definition

function standardizeDefinition(def) {
// Internally, all definition types are stored as groups for simplicity of access
if (def.type && !(def.type instanceof _SimpleSchemaGroup2.default)) {
def = (0, _clone2.default)(def);
// Internally, all definition types are stored as groups for simplicity of access.
// If we are extending, there may not actually be def.type, but it's okay because
// it will be added later when the two SimpleSchemaGroups are merged.
if (!def.type || !(def.type instanceof _SimpleSchemaGroup2.default)) {
def.type = new _SimpleSchemaGroup2.default((0, _lodash8.default)(def, oneOfProps));

@@ -1044,2 +1047,4 @@ }

});
return def;
}

@@ -1046,0 +1051,0 @@

{
"name": "simpl-schema",
"version": "1.1.1",
"version": "1.1.2",
"description": "A schema validation package that supports direct validation of MongoDB update modifier objects.",

@@ -5,0 +5,0 @@ "author": "Eric Dobbertin <aldeed@gmail.com>",

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