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

mongoose

Package Overview
Dependencies
Maintainers
0
Versions
892
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

7

History.md
1.0.6 / 2011-02-03
==================
* Fixed `post` middleware
* Fixed; it's now possible to instantiate a model even when one of the paths maps
to an undefined value [brian]
1.0.5 / 2011-02-02

@@ -3,0 +10,0 @@ ==================

3

lib/mongoose/document.js

@@ -136,2 +136,4 @@

this.emit('init');
return this;

@@ -186,2 +188,3 @@ };

if (!(this.schema.path(prefix + i) instanceof MixedSchema)
&& 'undefined' !== typeof path[i]
&& path[i] !== null

@@ -188,0 +191,0 @@ && path[i].constructor == Object) {

2

lib/mongoose/index.js

@@ -256,3 +256,3 @@

exports.version = '1.0.5';
exports.version = '1.0.6';

@@ -259,0 +259,0 @@ /**

@@ -65,4 +65,18 @@

Model.prototype.save = function (fn) {
var options = {};
var promise = new Promise()
, options = {}
, self = this;
// add callback+errback
promise.addBack(function (err) {
if (err) return fn(err);
fn(null);
self.emit('save');
});
function complete (err) {
if (err) return promise.error(err);
promise.complete();
};
// support for safe mode

@@ -74,3 +88,3 @@ if (this.options.safe)

// send entire doc
this.collection.insert(this.toObject(), options, fn);
this.collection.insert(this.toObject(), options, complete);
this.isNew = false;

@@ -162,5 +176,5 @@ } else {

if (Object.keys(delta).length)
this.collection.update({ _id: this.doc._id }, delta, options, fn);
this.collection.update({ _id: this.doc._id }, delta, options, complete);
else
fn(null);
complete(null);
// TODO Clear 'modify'('dirty') cache

@@ -167,0 +181,0 @@ }

{
"name": "mongoose"
, "description": "Mongoose MongoDB ORM"
, "version": "1.0.5"
, "version": "1.0.6"
, "author": "Guillermo Rauch <guillermo@learnboost.com>"

@@ -6,0 +6,0 @@ , "keywords": ["mongodb", "mongoose", "orm", "data", "datastore", "nosql"]

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

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