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

bookshelf

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bookshelf - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

6

bookshelf.js

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

// Bookshelf.js 0.7.1
// Bookshelf.js 0.7.2
// ---------------

@@ -18,3 +18,3 @@

var bookshelf = {
VERSION: '0.7.1'
VERSION: '0.7.2'
};

@@ -42,3 +42,3 @@

console.warn('Initializing Bookshelf with a config object is deprecated, please pass an initialized knex.js instance.');
knex = new require('knex')(knex);
knex = require('knex')(knex);
}

@@ -45,0 +45,0 @@

@@ -139,3 +139,3 @@ // Model

.then(function() {
return [this.format(this.attributes)];
return [this.format(_.extend(Object.create(null), this.attributes))];
})

@@ -142,0 +142,0 @@ .then(function(response) {

@@ -268,3 +268,3 @@ // Relation

} else {
var formatted = model.format(model.attributes);
var formatted = model.format(_.extend(Object.create(null), model.attributes));
groupedKey = this.isThrough() ? formatted[this.key('throughForeignKey')] : formatted[this.key('foreignKey')];

@@ -271,0 +271,0 @@ }

{
"name": "bookshelf",
"version": "0.7.1",
"version": "0.7.2",
"description": "A lightweight ORM for PostgreSQL, MySQL, and SQLite3",

@@ -5,0 +5,0 @@ "main": "bookshelf.js",

@@ -225,3 +225,3 @@ var _ = require('lodash');

var M = Backbone.Model.extend({
var M = bookshelf.Model.extend({
tableName: 'test',

@@ -247,2 +247,15 @@ format: function(attrs) {

it('does not mutate attributes on format', function() {
var M = bookshelf.Model.extend({
tableName: 'sites',
format: function(attrs) {
assert.ok(attrs !== this.attributes);
return attrs;
}
});
return M.forge({id: 1}).fetch().call('load');
});
});

@@ -249,0 +262,0 @@

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