From b84a9e6e915c459bd45c124b0debc7d984eea818 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 17 Dec 2015 14:11:44 +0000 Subject: [PATCH] upgrade mongojs --- services/track-changes/app/coffee/PackManager.coffee | 3 +-- services/track-changes/app/coffee/PackWorker.coffee | 3 +-- services/track-changes/app/coffee/mongojs.coffee | 5 +++-- services/track-changes/package.json | 5 +++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/track-changes/app/coffee/PackManager.coffee b/services/track-changes/app/coffee/PackManager.coffee index 3311dbbb5a..14b1522d86 100644 --- a/services/track-changes/app/coffee/PackManager.coffee +++ b/services/track-changes/app/coffee/PackManager.coffee @@ -1,7 +1,6 @@ async = require "async" _ = require "underscore" -{db, ObjectId} = require "./mongojs" -BSON=db.bson.BSON +{db, ObjectId, BSON} = require "./mongojs" logger = require "logger-sharelatex" LockManager = require "./LockManager" diff --git a/services/track-changes/app/coffee/PackWorker.coffee b/services/track-changes/app/coffee/PackWorker.coffee index 5c23613e57..040fd56d7b 100644 --- a/services/track-changes/app/coffee/PackWorker.coffee +++ b/services/track-changes/app/coffee/PackWorker.coffee @@ -1,7 +1,6 @@ async = require "async" _ = require "underscore" -{db, ObjectId} = require "./mongojs" -BSON=db.bson.BSON +{db, ObjectId, BSON} = require "./mongojs" logger = require "logger-sharelatex" logger.initialize("track-changes-packworker") LockManager = require "./LockManager" diff --git a/services/track-changes/app/coffee/mongojs.coffee b/services/track-changes/app/coffee/mongojs.coffee index 32efbc9a1d..33c21639c5 100644 --- a/services/track-changes/app/coffee/mongojs.coffee +++ b/services/track-changes/app/coffee/mongojs.coffee @@ -1,8 +1,9 @@ Settings = require "settings-sharelatex" mongojs = require "mongojs" -db = mongojs.connect(Settings.mongo.url, ["docHistory", "projectHistoryMetaData", "docHistoryStats"]) +bson = require "bson" +db = mongojs(Settings.mongo.url, ["docHistory", "projectHistoryMetaData", "docHistoryStats"]) module.exports = db: db ObjectId: mongojs.ObjectId - + BSON: bson diff --git a/services/track-changes/package.json b/services/track-changes/package.json index 4eb749b6d7..fa4ea9501c 100644 --- a/services/track-changes/package.json +++ b/services/track-changes/package.json @@ -8,13 +8,14 @@ }, "dependencies": { "async": "~0.2.10", + "bson": "^0.4.20", "cli": "^0.6.6", "express": "3.3.5", "line-reader": "^0.2.4", - "mongojs": "^0.18.1", + "mongojs": "^1.4.1", "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0", "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.1.0", - "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.0.0", + "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.4.0", "request": "~2.33.0", "redis-sharelatex": "~0.0.9", "redis": "~0.10.1",