🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

migrate-mongo

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

migrate-mongo - npm Package Compare versions

Comparing version

to
3.0.5

2

lib/actions/up.js

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

collection.insert({ fileName, appliedAt }, (err) => {
collection.insertOne({ fileName, appliedAt }, (err) => {
if (err) return nextItem(new Error('Could not update changelog: ' + err.message));

@@ -33,0 +33,0 @@ upgraded.push(item.fileName);

{
"name": "migrate-mongo",
"version": "3.0.4",
"version": "3.0.5",
"description": "A database migration tool for MongoDB in Node",

@@ -27,7 +27,7 @@ "main": "lib/migrate-mongo.js",

"cli-table": "0.3.1",
"commander": "2.17.1",
"commander": "2.18.0",
"fs-extra": "7.0.0",
"lodash": "4.17.10",
"lodash": "4.17.11",
"moment": "2.22.2",
"mongodb": "3.1.4",
"mongodb": "3.1.6",
"shifting": "1.2.5"

@@ -38,3 +38,3 @@ },

"coveralls": "3.0.2",
"eslint": "5.4.0",
"eslint": "5.6.0",
"eslint-plugin-mocha": "5.2.0",

@@ -44,4 +44,4 @@ "istanbul": "0.4.5",

"proxyquire": "2.1.0",
"sinon": "6.1.5"
"sinon": "6.3.4"
}
}

@@ -83,5 +83,5 @@ 'use strict';

up(db, () => {
expect(changelogCollection.insert.called).to.equal(true);
expect(changelogCollection.insert.callCount).to.equal(2);
expect(changelogCollection.insert.getCall(0).args[0]).to.deep.equal({
expect(changelogCollection.insertOne.called).to.equal(true);
expect(changelogCollection.insertOne.callCount).to.equal(2);
expect(changelogCollection.insertOne.getCall(0).args[0]).to.deep.equal({
appliedAt: new Date('2016-06-09T08:07:00.077Z'),

@@ -115,3 +115,3 @@ fileName: '20160607173840-first_pending_migration.js'

it('should yield an error + items already migrated when unable to update the changelog', function (done) {
changelogCollection.insert.onSecondCall().yields(new Error('Kernel panic'));
changelogCollection.insertOne.onSecondCall().yields(new Error('Kernel panic'));
up(db, (err, upgradedFileNames) => {

@@ -169,3 +169,3 @@ expect(err.message).to.deep.equal('Could not update changelog: Kernel panic');

return {
insert: sinon.stub().yields()
insertOne: sinon.stub().yields()
};

@@ -172,0 +172,0 @@ }

Sorry, the diff of this file is not supported yet