mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #33 from overleaf/jpa-bump-metrics-module
[misc] bump metrics module to 3.4.1
This commit is contained in:
commit
ec6e8c6ff4
7 changed files with 839 additions and 750 deletions
|
@ -5,7 +5,7 @@
|
|||
* DS207: Consider shorter variations of null checks
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
metrics.initialize('notifications')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
let Notifications
|
||||
const logger = require('logger-sharelatex')
|
||||
const { db, ObjectId } = require('./mongodb')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
|
||||
module.exports = Notifications = {
|
||||
getUserNotifications(user_id, callback) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
const Notifications = require('./Notifications')
|
||||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
|
||||
module.exports = {
|
||||
getUserNotifications(req, res) {
|
||||
|
|
1577
services/notifications/package-lock.json
generated
1577
services/notifications/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -17,6 +17,7 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@overleaf/metrics": "^3.4.1",
|
||||
"async": "^2.6.3",
|
||||
"body-parser": "^1.19.0",
|
||||
"coffee-script": "^1.12.7",
|
||||
|
@ -24,7 +25,6 @@
|
|||
"express": "4.17.1",
|
||||
"logger-sharelatex": "^2.2.0",
|
||||
"method-override": "^3.0.0",
|
||||
"metrics-sharelatex": "^2.6.2",
|
||||
"mongodb": "^3.6.0",
|
||||
"node-statsd": "0.1.1",
|
||||
"request": "^2.88.2",
|
||||
|
|
|
@ -29,7 +29,7 @@ describe('Notifications Controller', function () {
|
|||
requires: {
|
||||
'logger-sharelatex': { log() {} },
|
||||
'./Notifications': this.notifications,
|
||||
'metrics-sharelatex': {
|
||||
'@overleaf/metrics': {
|
||||
inc: sinon.stub()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ describe('Notifications Tests', function () {
|
|||
},
|
||||
'settings-sharelatex': {},
|
||||
'./mongodb': { db: this.db, ObjectId },
|
||||
'metrics-sharelatex': { timeAsyncMethod: sinon.stub() }
|
||||
'@overleaf/metrics': { timeAsyncMethod: sinon.stub() }
|
||||
},
|
||||
globals: {
|
||||
console
|
||||
|
|
Loading…
Reference in a new issue