Socket
Socket
Sign inDemoInstall

jetstream

Package Overview
Dependencies
157
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.1 to 0.11.2

4

lib/model_object.js

@@ -770,2 +770,6 @@ // Copyright (c) 2015 Uber Technologies, Inc.

ModelObject.prototype.hasParents = function() {
return this._parentRelationships.length > 0;
};
ModelObject.prototype.getParentRelationships = function() {

@@ -772,0 +776,0 @@ // Return a shallow copy to preserve integrity

@@ -442,9 +442,19 @@ // Copyright (c) 2015 Uber Technologies, Inc.

orphanedModelObjects.forEach(function(modelObject) {
orphanedModelObjects.forEach(function unparentFromChildren(modelObject) {
modelObject.getProperties().forEach(function(property) {
if (property.isModelObjectType) {
if (property.isCollectionType) {
var children = modelObject[property.name].slice(0);
modelObject[property.name] = [];
children.forEach(function(child) {
if (!child.hasParents()) {
return unparentFromChildren(child);
}
});
} else {
var child = modelObject[property.name];
modelObject[property.name] = null;
if (child && !child.hasParents()) {
return unparentFromChildren(child);
}
}

@@ -451,0 +461,0 @@ }

2

package.json
{
"name": "jetstream",
"version": "0.11.1",
"version": "0.11.2",
"description": "Jetstream Sync server framework to sync local and remote models",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc