mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Upgrade settings-sharelatex to 1.3.0 (#4065)
GitOrigin-RevId: bd24ba44203cf559758f2ff7291723af98b489aa
This commit is contained in:
parent
b777e958d4
commit
3a45d270ec
6 changed files with 24 additions and 17 deletions
6
services/web/package-lock.json
generated
6
services/web/package-lock.json
generated
|
@ -30719,9 +30719,9 @@
|
|||
"integrity": "sha512-9jphSf3UbIgpOX/RKvX02iw/rN2TKdusnsPpGfO/rkcsrd+IRqgHZb4VGnmL0Cynps8Nj2hN45wsi30BzrHDIw=="
|
||||
},
|
||||
"settings-sharelatex": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/settings-sharelatex/-/settings-sharelatex-1.2.0.tgz",
|
||||
"integrity": "sha512-uqVRPHeL/jsHrAqzUX3Ie9hfId6DrEKnpX2ggepPl5x4LojkF+52TgwK7ephdS4EFwmK88VysTI1lrHGb2zqJg==",
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/settings-sharelatex/-/settings-sharelatex-1.3.0.tgz",
|
||||
"integrity": "sha512-AWSeCiY1eHi+z6DF4bmTyC3tusOc6EF5zDkC28aAOhEAbgVEIuY034kx1X7a4j9HE0iVs0sVOlZrQMWJBVk3oQ==",
|
||||
"requires": {
|
||||
"coffee-script": "1.6.0"
|
||||
},
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
"sanitize-html": "^1.27.1",
|
||||
"sanitizer": "0.1.1",
|
||||
"scroll-into-view-if-needed": "^2.2.25",
|
||||
"settings-sharelatex": "^1.2.0",
|
||||
"settings-sharelatex": "^1.3.0",
|
||||
"underscore": "^1.13.1",
|
||||
"url-parse": "^1.4.7",
|
||||
"utf-8-validate": "^5.0.2",
|
||||
|
|
|
@ -2,6 +2,7 @@ const { exec } = require('child_process')
|
|||
const { promisify } = require('util')
|
||||
const { expect } = require('chai')
|
||||
const logger = require('logger-sharelatex')
|
||||
const { filterOutput } = require('./helpers/settings')
|
||||
const { db, ObjectId } = require('../../../app/src/infrastructure/mongodb')
|
||||
|
||||
const DUMMY_NAME = 'unknown.tex'
|
||||
|
@ -134,9 +135,7 @@ describe('BackFillDummyDocMeta', function () {
|
|||
}
|
||||
let { stderr: stdErr, stdout: stdOut } = result
|
||||
stdErr = stdErr.split('\n')
|
||||
stdOut = stdOut
|
||||
.split('\n')
|
||||
.filter(line => !line.includes('Using settings from'))
|
||||
stdOut = stdOut.split('\n').filter(filterOutput)
|
||||
|
||||
const oneDayFromProjectId9InSeconds =
|
||||
getSecondsFromObjectId(projectIds[9]) + ONE_DAY_IN_S
|
||||
|
@ -166,7 +165,7 @@ describe('BackFillDummyDocMeta', function () {
|
|||
]
|
||||
}
|
||||
|
||||
expect(stdOut).to.deep.equal([
|
||||
expect(stdOut.filter(filterOutput)).to.deep.equal([
|
||||
`Back filling dummy meta data for ["${docIds[0]}"]`,
|
||||
`Orphaned deleted doc ${docIds[0]} (no deletedProjects entry)`,
|
||||
`Back filling dummy meta data for ["${docIds[1]}"]`,
|
||||
|
@ -188,7 +187,7 @@ describe('BackFillDummyDocMeta', function () {
|
|||
...overlappingPartStdOut,
|
||||
'',
|
||||
])
|
||||
expect(stdErr).to.deep.equal([
|
||||
expect(stdErr.filter(filterOutput)).to.deep.equal([
|
||||
...`Options: ${JSON.stringify(options, null, 2)}`.split('\n'),
|
||||
'Waiting for you to double check inputs for 1 ms',
|
||||
`Processed 1 until ${getObjectIdFromDate('2021-04-02T00:00:00.000Z')}`,
|
||||
|
|
|
@ -2,6 +2,7 @@ const { exec } = require('child_process')
|
|||
const { promisify } = require('util')
|
||||
const { expect } = require('chai')
|
||||
const logger = require('logger-sharelatex')
|
||||
const { filterOutput } = require('./helpers/settings')
|
||||
const { db, ObjectId } = require('../../../app/src/infrastructure/mongodb')
|
||||
|
||||
const ONE_DAY_IN_S = 60 * 60 * 24
|
||||
|
@ -129,10 +130,8 @@ describe('DeleteOrphanedDocsOnlineCheck', function () {
|
|||
throw error
|
||||
}
|
||||
let { stderr: stdErr, stdout: stdOut } = result
|
||||
stdErr = stdErr.split('\n')
|
||||
stdOut = stdOut
|
||||
.split('\n')
|
||||
.filter(line => !line.includes('Using settings from'))
|
||||
stdErr = stdErr.split('\n').filter(filterOutput)
|
||||
stdOut = stdOut.split('\n').filter(filterOutput)
|
||||
|
||||
const oneDayFromProjectId9InSeconds =
|
||||
getSecondsFromObjectId(projectIds[9]) + ONE_DAY_IN_S
|
||||
|
|
|
@ -2,6 +2,7 @@ const { exec } = require('child_process')
|
|||
const { promisify } = require('util')
|
||||
const { expect } = require('chai')
|
||||
const logger = require('logger-sharelatex')
|
||||
const { filterOutput } = require('./helpers/settings')
|
||||
const { db } = require('../../../app/src/infrastructure/mongodb')
|
||||
|
||||
const BATCH_SIZE = 100
|
||||
|
@ -110,9 +111,8 @@ describe('RegenerateDuplicateReferralIds', function () {
|
|||
stdErr = stdErr
|
||||
.split('\n')
|
||||
.filter(line => !line.includes('DeprecationWarning'))
|
||||
stdOut = stdOut
|
||||
.split('\n')
|
||||
.filter(line => !line.includes('Using settings from'))
|
||||
.filter(filterOutput)
|
||||
stdOut = stdOut.split('\n').filter(filterOutput)
|
||||
expect(stdErr).to.deep.equal([
|
||||
`Completed batch ending ${firstBatch[BATCH_SIZE - 1]}`,
|
||||
`Completed batch ending ${secondBatch[BATCH_SIZE - 1]}`,
|
||||
|
@ -121,7 +121,7 @@ describe('RegenerateDuplicateReferralIds', function () {
|
|||
'Done.',
|
||||
'',
|
||||
])
|
||||
expect(stdOut).to.deep.equal([
|
||||
expect(stdOut.filter(filterOutput)).to.deep.equal([
|
||||
// only duplicates
|
||||
`Running update on batch with ids ${JSON.stringify(firstBatch)}`,
|
||||
'Got duplicates from looking at batch.',
|
||||
|
|
9
services/web/test/acceptance/src/helpers/settings.js
Normal file
9
services/web/test/acceptance/src/helpers/settings.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
function filterOutput(line) {
|
||||
return (
|
||||
!line.startsWith('Using settings from ') &&
|
||||
!line.startsWith('Using default settings from ') &&
|
||||
!line.startsWith('CoffeeScript settings file')
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = { filterOutput }
|
Loading…
Reference in a new issue