mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-15 06:07:03 +00:00
Merge pull request #178 from overleaf/bg-use-lodash
migrate from underscore to lodash
This commit is contained in:
commit
8b4869a00c
9 changed files with 10 additions and 18 deletions
|
@ -25,7 +25,7 @@ const async = require('async')
|
|||
const LockManager = require('./DockerLockManager')
|
||||
const fs = require('fs')
|
||||
const Path = require('path')
|
||||
const _ = require('underscore')
|
||||
const _ = require('lodash')
|
||||
|
||||
logger.info('using docker runner')
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ const fs = require('fs')
|
|||
const fse = require('fs-extra')
|
||||
const Path = require('path')
|
||||
const logger = require('logger-sharelatex')
|
||||
const _ = require('underscore')
|
||||
const _ = require('lodash')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const crypto = require('crypto')
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ const Path = require('path')
|
|||
const { spawn } = require('child_process')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Metrics = require('./Metrics')
|
||||
const _ = require('underscore')
|
||||
const _ = require('lodash')
|
||||
|
||||
module.exports = OutputFileOptimiser = {
|
||||
optimiseFile(src, dst, callback) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
const Sequelize = require('sequelize')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const _ = require('underscore')
|
||||
const _ = require('lodash')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
||||
const options = _.extend({ logging: false }, Settings.mysql.clsi)
|
||||
|
|
10
services/clsi/package-lock.json
generated
10
services/clsi/package-lock.json
generated
|
@ -6640,11 +6640,6 @@
|
|||
"integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==",
|
||||
"dev": true
|
||||
},
|
||||
"underscore": {
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz",
|
||||
"integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ=="
|
||||
},
|
||||
"universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
|
@ -6834,11 +6829,6 @@
|
|||
"resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz",
|
||||
"integrity": "sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ=="
|
||||
},
|
||||
"when": {
|
||||
"version": "3.7.8",
|
||||
"resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
|
||||
"integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I="
|
||||
},
|
||||
"which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"fs-extra": "^8.1.0",
|
||||
"heapdump": "^0.3.15",
|
||||
"lockfile": "^1.0.4",
|
||||
"lodash": "^4.17.15",
|
||||
"logger-sharelatex": "^1.9.1",
|
||||
"lynx": "0.2.0",
|
||||
"metrics-sharelatex": "^2.6.0",
|
||||
|
@ -35,7 +36,6 @@
|
|||
"sequelize": "^5.21.5",
|
||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.1.0",
|
||||
"sqlite3": "^4.1.1",
|
||||
"underscore": "^1.9.2",
|
||||
"v8-profiler-node8": "^6.1.1",
|
||||
"wrench": "~1.5.9"
|
||||
},
|
||||
|
|
|
@ -13,7 +13,7 @@ const request = require('request')
|
|||
const Settings = require('settings-sharelatex')
|
||||
const async = require('async')
|
||||
const fs = require('fs')
|
||||
const _ = require('underscore')
|
||||
const _ = require('lodash')
|
||||
const concurentCompiles = 5
|
||||
const totalCompiles = 50
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ describe('DockerRunner', function() {
|
|||
return runner(callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
globals: { Math } // used by lodash
|
||||
})
|
||||
this.Docker = Docker
|
||||
this.getContainer = Docker.prototype.getContainer
|
||||
|
|
|
@ -30,7 +30,8 @@ describe('OutputFileOptimiser', function() {
|
|||
child_process: { spawn: (this.spawn = sinon.stub()) },
|
||||
'logger-sharelatex': { log: sinon.stub(), warn: sinon.stub() },
|
||||
'./Metrics': {}
|
||||
}
|
||||
},
|
||||
globals: { Math } // used by lodash
|
||||
})
|
||||
this.directory = '/test/dir'
|
||||
return (this.callback = sinon.stub())
|
||||
|
|
Loading…
Add table
Reference in a new issue