updated sandboxed-module, chai and metrics-sharelatex

This commit is contained in:
mserranom 2020-03-16 17:14:04 +01:00
parent d5bd1790a8
commit 8641d0ef0f
4 changed files with 52 additions and 43 deletions

View file

@ -1227,9 +1227,9 @@
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}, },
"assertion-error": { "assertion-error": {
"version": "1.0.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
"integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
"dev": true "dev": true
}, },
"ast-types-flow": { "ast-types-flow": {
@ -1487,13 +1487,17 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
}, },
"chai": { "chai": {
"version": "1.8.1", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/chai/-/chai-1.8.1.tgz", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
"integrity": "sha1-zHeGbV5+vKK9dRRLHtw3Coh4X3I=", "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
"dev": true, "dev": true,
"requires": { "requires": {
"assertion-error": "1.0.0", "assertion-error": "^1.1.0",
"deep-eql": "0.1.3" "check-error": "^1.0.2",
"deep-eql": "^3.0.1",
"get-func-name": "^2.0.0",
"pathval": "^1.1.0",
"type-detect": "^4.0.5"
} }
}, },
"chalk": { "chalk": {
@ -1530,6 +1534,12 @@
"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
"dev": true "dev": true
}, },
"check-error": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
"dev": true
},
"chokidar": { "chokidar": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
@ -1810,12 +1820,12 @@
"dev": true "dev": true
}, },
"deep-eql": { "deep-eql": {
"version": "0.1.3", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
"integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
"dev": true, "dev": true,
"requires": { "requires": {
"type-detect": "0.1.1" "type-detect": "^4.0.0"
} }
}, },
"deep-extend": { "deep-extend": {
@ -2944,6 +2954,12 @@
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true "dev": true
}, },
"get-func-name": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
"dev": true
},
"get-stdin": { "get-stdin": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
@ -4018,9 +4034,9 @@
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
}, },
"metrics-sharelatex": { "metrics-sharelatex": {
"version": "2.5.1", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/metrics-sharelatex/-/metrics-sharelatex-2.5.1.tgz", "resolved": "https://registry.npmjs.org/metrics-sharelatex/-/metrics-sharelatex-2.6.0.tgz",
"integrity": "sha512-C2gmkl/tUnq3IlSX/x3dixGhdvfD6H9FR9mBf9lnkeyy2arafxhCU6u+1IQj6byjBM7vGpYHyjwWnmoi3Vb+ZQ==", "integrity": "sha512-kPWCtgBrRZwLXCxqJVVn3c7g+GHQEBGYBpwCIt0Vqp0NaKvgKiPkJMkoPg9vkCsjsN2AgpGxXcOAdnHAjxfrzA==",
"requires": { "requires": {
"@google-cloud/debug-agent": "^3.0.0", "@google-cloud/debug-agent": "^3.0.0",
"@google-cloud/profiler": "^0.2.3", "@google-cloud/profiler": "^0.2.3",
@ -4314,9 +4330,9 @@
} }
}, },
"nan": { "nan": {
"version": "2.12.0", "version": "2.14.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.12.0.tgz", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
"integrity": "sha1-nUQ/214TogdwzF5gLu5ZdgpoWIU=" "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
}, },
"natural-compare": { "natural-compare": {
"version": "1.4.0", "version": "1.4.0",
@ -4743,6 +4759,12 @@
} }
} }
}, },
"pathval": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
"performance-now": { "performance-now": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
@ -5875,21 +5897,13 @@
"integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo="
}, },
"sandboxed-module": { "sandboxed-module": {
"version": "0.3.0", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/sandboxed-module/-/sandboxed-module-0.3.0.tgz", "resolved": "https://registry.npmjs.org/sandboxed-module/-/sandboxed-module-2.0.3.tgz",
"integrity": "sha1-8fvvvYCaT2kHO9B8rm/H2y6vX2o=", "integrity": "sha1-x+VFkzm7y6KMUwPusz9ug4e/upY=",
"dev": true, "dev": true,
"requires": { "requires": {
"require-like": "0.1.2", "require-like": "0.1.2",
"stack-trace": "0.0.6" "stack-trace": "0.0.9"
},
"dependencies": {
"stack-trace": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.6.tgz",
"integrity": "sha1-HnGb1qJin/CcGJ4Xqe+QKpT8XbA=",
"dev": true
}
} }
}, },
"sax": { "sax": {
@ -6238,13 +6252,6 @@
"nan": "^2.12.1", "nan": "^2.12.1",
"node-pre-gyp": "^0.11.0", "node-pre-gyp": "^0.11.0",
"request": "^2.87.0" "request": "^2.87.0"
},
"dependencies": {
"nan": {
"version": "2.14.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
"integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
}
} }
}, },
"sqlstring": { "sqlstring": {
@ -6694,9 +6701,9 @@
} }
}, },
"type-detect": { "type-detect": {
"version": "0.1.1", "version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
"integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
"dev": true "dev": true
}, },
"type-fest": { "type-fest": {

View file

@ -28,7 +28,7 @@
"lockfile": "^1.0.4", "lockfile": "^1.0.4",
"logger-sharelatex": "^1.9.0", "logger-sharelatex": "^1.9.0",
"lynx": "0.2.0", "lynx": "0.2.0",
"metrics-sharelatex": "^2.5.1", "metrics-sharelatex": "^2.6.0",
"mysql": "^2.18.1", "mysql": "^2.18.1",
"request": "^2.88.2", "request": "^2.88.2",
"sequelize": "^5.21.5", "sequelize": "^5.21.5",
@ -42,7 +42,7 @@
"devDependencies": { "devDependencies": {
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"bunyan": "^1.8.12", "bunyan": "^1.8.12",
"chai": "~1.8.1", "chai": "~4.2.0",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0", "eslint-config-prettier": "^6.10.0",
"eslint-config-standard": "^14.1.0", "eslint-config-standard": "^14.1.0",
@ -61,7 +61,7 @@
"mocha": "^7.1.0", "mocha": "^7.1.0",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"prettier-eslint-cli": "^5.0.0", "prettier-eslint-cli": "^5.0.0",
"sandboxed-module": "~0.3.0", "sandboxed-module": "^2.0.3",
"sinon": "~9.0.1", "sinon": "~9.0.1",
"timekeeper": "2.2.0" "timekeeper": "2.2.0"
} }

View file

@ -23,6 +23,7 @@ const Errors = require('../../../app/js/Errors')
describe('ResourceStateManager', function() { describe('ResourceStateManager', function() {
beforeEach(function() { beforeEach(function() {
this.ResourceStateManager = SandboxedModule.require(modulePath, { this.ResourceStateManager = SandboxedModule.require(modulePath, {
singleOnly: true,
requires: { requires: {
fs: (this.fs = {}), fs: (this.fs = {}),
'logger-sharelatex': { log: sinon.stub(), err: sinon.stub() }, 'logger-sharelatex': { log: sinon.stub(), err: sinon.stub() },

View file

@ -24,6 +24,7 @@ describe('ResourceWriter', function() {
beforeEach(function() { beforeEach(function() {
let Timer let Timer
this.ResourceWriter = SandboxedModule.require(modulePath, { this.ResourceWriter = SandboxedModule.require(modulePath, {
singleOnly: true,
requires: { requires: {
fs: (this.fs = { fs: (this.fs = {
mkdir: sinon.stub().callsArg(1), mkdir: sinon.stub().callsArg(1),