Upgrade to Node 8

This commit is contained in:
Shane Kilkelly 2018-04-12 16:16:37 +01:00
parent 274616780a
commit 95516b25af
5 changed files with 2578 additions and 5 deletions

View file

@ -1 +1 @@
4.2.1
8.11.1

View file

@ -1,6 +1,6 @@
Settings = require "settings-sharelatex"
mongojs = require "mongojs"
db = mongojs.connect(Settings.mongo.url, ["contacts"])
db = mongojs(Settings.mongo.url, ["contacts"])
module.exports =
db: db
ObjectId: mongojs.ObjectId

2573
services/contacts/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@
"express": "~4.1.1",
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.1.0",
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.7.1",
"mongojs": "0.18.2",
"mongojs": "2.4.0",
"request": "~2.34.0",
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
"underscore": "~1.6.0"

View file

@ -35,7 +35,7 @@ describe "ContactManager", ->
it "should increment the contact count and timestamp", ->
@db.contacts.update
.calledWith({
user_id: ObjectId(@user_id)
user_id: sinon.match((o) => o.toString() == @user_id.toString())
}, {
$inc:
"contacts.mock_contact.n": 1
@ -70,7 +70,7 @@ describe "ContactManager", ->
it "should find the user's contacts", ->
@db.contacts.findOne
.calledWith({
user_id: ObjectId(@user_id)
user_id: sinon.match((o) => o.toString() == @user_id.toString())
})
.should.equal true