[SafeExec] replace _.once with lodash.once

This commit is contained in:
Jakob Ackermann 2020-01-10 10:18:55 +00:00
parent 0db4a17a14
commit 32557ab1d7
3 changed files with 9 additions and 9 deletions

View file

@ -1,4 +1,4 @@
const _ = require('underscore')
const lodashOnce = require('lodash.once')
const childProcess = require('child_process')
const Settings = require('settings-sharelatex')
const { ConversionsDisabledError, FailedCommandError } = require('./Errors')
@ -28,7 +28,7 @@ function safeExec(command, options, callback) {
let killTimer
const cleanup = _.once(function(err) {
const cleanup = lodashOnce(function(err) {
if (killTimer) {
clearTimeout(killTimer)
}

View file

@ -3177,6 +3177,11 @@
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true
},
"lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
},
"lodash.pickby": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz",
@ -5478,11 +5483,6 @@
"integrity": "sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==",
"dev": true
},
"underscore": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.5.2.tgz",
"integrity": "sha512-yejOFsRnTJs0N9CK5Apzf6maDO2djxGoLLrlZlvGs2o9ZQuhIhDL18rtFyy4FBIbOkzA6+4hDgXbgz5EvDQCXQ=="
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",

View file

@ -27,6 +27,7 @@
"express": "^4.2.0",
"glob": "^7.1.6",
"heapdump": "^0.3.2",
"lodash.once": "^4.1.1",
"logger-sharelatex": "^1.7.0",
"metrics-sharelatex": "^2.2.0",
"mocha": "5.2.0",
@ -38,8 +39,7 @@
"rimraf": "2.2.8",
"settings-sharelatex": "^1.1.0",
"stream-buffers": "~0.2.5",
"stream-meter": "^1.0.4",
"underscore": "~1.5.2"
"stream-meter": "^1.0.4"
},
"devDependencies": {
"babel-eslint": "^10.0.3",