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

modelsafe

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modelsafe - npm Package Compare versions

Comparing version 1.0.0-alpha.11 to 1.0.0-alpha.12

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 1.0.0-alpha.12
* [FEATURE] interpret de/serialisation depth of null as infinite depth
# 1.0.0-alpha.11

@@ -2,0 +6,0 @@

4

dist/model.js

@@ -122,3 +122,3 @@ "use strict";

options = __assign({ validate: true, associations: true, depth: 1 }, options);
assocOptions = __assign({}, options, { depth: options.depth - 1 });
assocOptions = __assign({}, options, { depth: options.depth !== null ? options.depth - 1 : null });
// Force it to be a plain object in case it isn't already.

@@ -162,3 +162,3 @@ // This allows weird behaviour like passing in an existing model

}
if (!(assocOptions.depth >= 0)) return [3 /*break*/, 4];
if (!(assocOptions.depth === null || assocOptions.depth >= 0)) return [3 /*break*/, 4];
if (!(assoc.type === association_1.HAS_MANY || assoc.type === association_1.BELONGS_TO_MANY)) return [3 /*break*/, 2];

@@ -165,0 +165,0 @@ // Only deserialize these types if the value is array-like.

{
"name": "modelsafe",
"version": "1.0.0-alpha.11",
"version": "1.0.0-alpha.12",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "bugs": "https://github.com/creativecuriositystudio/modelsafe/issues",

@@ -122,3 +122,3 @@ /** Contains the model classes and decorators. */

depth: options.depth - 1
depth: options.depth !== null ? options.depth - 1 : null,
};

@@ -168,3 +168,3 @@

if (assocOptions.depth >= 0) {
if (assocOptions.depth === null || assocOptions.depth >= 0) {
// If it's an array like relationship and the value is an array, deserialize each element

@@ -171,0 +171,0 @@ if (assoc.type === HAS_MANY || assoc.type === BELONGS_TO_MANY) {

Sorry, the diff of this file is not supported yet

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