Merge pull request #5 from sharelatex/sk-upgrade-node-8

Upgrade to Node 8
This commit is contained in:
Shane Kilkelly
2018-04-24 14:01:24 +01:00
committed by GitHub
6 changed files with 2579 additions and 6 deletions

View File

@@ -1 +1 @@
4.2.1
8.11.1

View File

@@ -2,7 +2,7 @@ pipeline {
agent {
docker {
image 'node:4.2.1'
image 'node:8.11.1'
args "-v /var/lib/jenkins/.npm:/tmp/.npm"
}
}

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