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

mongolass

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongolass - npm Package Compare versions

Comparing version 2.3.4 to 2.4.0

5

changelog.md

@@ -0,1 +1,6 @@

## 2.4.0/2016-12-20
- update error stack
- fix tests
## 2.3.4/2016-12-18

@@ -2,0 +7,0 @@

10

lib/query.js

@@ -191,5 +191,9 @@ 'use strict';

function addMongoErrorDetail(e) {
// overwrite error stack
e.stack = this.stack;
//only for mongoError
// concat extra error stack
e.stack = `
${e.stack}
----- Mongolass error stack -----
${this.stack}
`;
// only for mongoError
if (!e.model) {

@@ -196,0 +200,0 @@ e.op = this._op;

{
"name": "mongolass",
"version": "2.3.4",
"version": "2.4.0",
"description": "Elegant MongoDB driver for Node.js.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -40,2 +40,20 @@ 'use strict';

it('connect failed', function* () {
let error;
const mongolass2 = new Mongolass('mongodb://localhost:27018/test');
try {
yield mongolass2.model('User').find();
} catch (e) {
error = e;
}
assert.deepEqual(error, {
name: 'MongoError',
message: 'failed to connect to server [localhost:27018] on first connect',
op: 'find',
args: [],
model: 'User',
schema: null
});
});
it('disconnect', function* () {

@@ -42,0 +60,0 @@ let mongolass2 = new Mongolass();

@@ -11,3 +11,3 @@ 'use strict';

describe('index.js', function () {
describe('model.js', function () {
before(function* () {

@@ -14,0 +14,0 @@ yield mongolass.model('User').insertOne({ name: 'aaa', age: 2 });

@@ -12,3 +12,3 @@ 'use strict';

describe('index.js', function () {
describe('plugins.js', function () {
before(function* () {

@@ -15,0 +15,0 @@ yield mongolass.model('User').insertOne({ name: 'aaa', age: 2 });

@@ -37,3 +37,3 @@ 'use strict';

it('ObjectId', function* () {
let user = yield User.findOne();
let user = yield User.findOne({ uid: '5721bb5abec50ab84b8eb109' });
assert.ok('object' === typeof user._id);

@@ -40,0 +40,0 @@ assert.deepEqual(user.uid.toString(), '5721bb5abec50ab84b8eb109');

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