New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

backbone-mongo

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-mongo - npm Package Compare versions

Comparing version 0.6.7 to 0.6.8

2

lib/core.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
(function() {

@@ -3,0 +3,0 @@ module.exports = {};

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
/*
backbone-mongo.js 0.6.7
backbone-mongo.js 0.6.8
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo

@@ -12,4 +12,4 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;

@@ -147,2 +147,3 @@ _ref = require('backbone-orm'), _ = _ref._, sync = _ref.sync;

return _this.fetchIncludes(json, function(err) {
var count_cursor;
if (err) {

@@ -152,3 +153,4 @@ return callback(err);

if (_this.hasCursorQuery('$page')) {
return cursor.count(function(err, count) {
count_cursor = new MongoCursor(_this._find, _.pick(_this, ['model_type', 'connection', 'backbone_adapter']));
return count_cursor.count(function(err, count) {
if (err) {

@@ -155,0 +157,0 @@ return callback(err);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0

@@ -16,4 +16,4 @@ /*

module.exports = DatabaseTools = (function() {
function DatabaseTools(sync, options) {
this.sync = sync;
function DatabaseTools(_at_sync, options) {
this.sync = _at_sync;
if (options == null) {

@@ -163,3 +163,3 @@ options = {};

}
return collection.remove(function(err) {
return collection.remove({}, function(err) {
if (err) {

@@ -166,0 +166,0 @@ if (options.verbose) {

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
/*
backbone-mongo.js 0.6.7
backbone-mongo.js 0.6.8
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo

@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
(function() {

@@ -3,0 +3,0 @@ var BackboneMongo, BackboneORM, _;

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
/*
backbone-mongo.js 0.6.7
backbone-mongo.js 0.6.8
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo

@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
/*
backbone-mongo.js 0.6.7
backbone-mongo.js 0.6.8
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo

@@ -21,6 +21,6 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

module.exports = Connection = (function() {
function Connection(url, schema, options) {
function Connection(_at_url, _at_schema, options) {
var database_url, key, value, _i, _len, _ref1;
this.url = url;
this.schema = schema != null ? schema : {};
this.url = _at_url;
this.schema = _at_schema != null ? _at_schema : {};
if (options == null) {

@@ -109,6 +109,7 @@ options = {};

return _this.db.collection(_this.collection_name, function(err, collection) {
if (!err) {
_this._collection = collection;
if (err) {
return callback(err);
} else {
return callback(null, _this._collection = collection);
}
return callback(err);
});

@@ -115,0 +116,0 @@ };

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
/*
backbone-mongo.js 0.6.7
backbone-mongo.js 0.6.8
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo

@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
/*
backbone-mongo.js 0.6.7
backbone-mongo.js 0.6.8
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo

@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
/*
backbone-mongo.js 0.6.7
backbone-mongo.js 0.6.8
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo

@@ -35,5 +35,5 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

MongoSync = (function() {
function MongoSync(model_type, sync_options) {
this.model_type = model_type;
this.sync_options = sync_options != null ? sync_options : {};
function MongoSync(_at_model_type, _at_sync_options) {
this.model_type = _at_model_type;
this.sync_options = _at_sync_options != null ? _at_sync_options : {};
this.db = __bind(this.db, this);

@@ -99,6 +99,11 @@ this.deleteCB = __bind(this.deleteCB, this);

doc._rev = 1;
return collection.insert(doc, function(err, docs) {
if (err || !docs || docs.length !== 1) {
return options.error(new Error("Failed to create model. Error: " + (err || 'document not found')));
return collection.insert(doc, function(err, results) {
var docs;
if (err) {
return options.error(err);
}
docs = results.ops || results;
if (!docs || docs.length !== 1) {
return callback(new Error("Failed to create model. Error: document not found"));
}
return options.success(_this.backbone_adapter.nativeToAttributes(docs[0]));

@@ -144,6 +149,8 @@ });

"new": true
}, function(err, doc) {
}, function(err, result) {
var doc;
if (err) {
return options.error(new Error("Failed to update model (" + _this.model_type.model_name + "). Error: " + err));
}
doc = (result != null ? result.value : void 0) || result;
if (!doc) {

@@ -184,4 +191,5 @@ return options.error(new Error("Failed to update model (" + _this.model_type.model_name + "). Either the document has been deleted or the revision (_rev) was stale."));

return callback(err);
} else {
return Utils.patchRemove(_this.model_type, model, callback);
}
return Utils.patchRemove(_this.model_type, model, callback);
});

@@ -212,9 +220,10 @@ };

return callback(err);
} else {
return _this.model_type.each(_.extend({
$each: {
limit: DESTROY_BATCH_LIMIT,
json: true
}
}, query), _this.deleteCB, callback);
}
return _this.model_type.each(_.extend({
$each: {
limit: DESTROY_BATCH_LIMIT,
json: true
}
}, query), _this.deleteCB, callback);
};

@@ -221,0 +230,0 @@ })(this));

{
"name": "backbone-mongo",
"version": "0.6.7",
"version": "0.6.8",
"description": "MongoDB storage for BackboneORM",

@@ -27,3 +27,3 @@ "main": "./lib/index.js",

"test": "ulimit -n 1024; gulp test",
"prepublish": "npm run build"
"prepublish": "gulp build"
},

@@ -45,7 +45,7 @@ "devDependencies": {

"dependencies": {
"underscore": "1.7.x",
"backbone": "1.1.x",
"underscore": "1.x",
"backbone": "1.x",
"backbone-orm": "0.7.x",
"mongodb": "1.4.x"
"mongodb": "*"
}
}
Please refer to the following release notes when upgrading your version of BackboneORM.
### 0.6.8
* Bug fixes for mongo-native 2.x
### 0.6.7

@@ -4,0 +7,0 @@ * Fix issue with empty results from aggregation ($unique) and $count

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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