Merge pull request #17525 from overleaf/ae-upgrade-prettier

Upgrade Prettier to v3

GitOrigin-RevId: 6f1338f196408f3edb4892d5220ad3665ff1a5bc
This commit is contained in:
Alf Eaton
2024-03-25 10:51:40 +00:00
committed by Copybot
parent 6d55f2e09d
commit 6cc2db3cdd
106 changed files with 1033 additions and 982 deletions

View File

@@ -74,9 +74,8 @@ const UpdateManager = {
doc_id: docId,
})
const updates = await RealTimeRedisManager.promises.getPendingUpdatesForDoc(
docId
)
const updates =
await RealTimeRedisManager.promises.getPendingUpdatesForDoc(docId)
logger.debug(
{ projectId, docId, count: updates.length },
'processing updates'

View File

@@ -129,8 +129,8 @@ type._takeDoc = takeDoc = function (
? part.slice(position.offset, position.offset + maxlength)
: part.slice(position.offset)
: maxlength === undefined || tombsIndivisible
? part - position.offset
: Math.min(maxlength, part - position.offset)
? part - position.offset
: Math.min(maxlength, part - position.offset)
const resultLen = result.length || result

View File

@@ -162,9 +162,12 @@ class StressTestClient {
continue() {
if (this.updateCount > 0) {
this.updateCount--
return setTimeout(() => {
return this.sendUpdate()
}, this.options.updateDelay * (0.5 + Math.random()))
return setTimeout(
() => {
return this.sendUpdate()
},
this.options.updateDelay * (0.5 + Math.random())
)
} else {
return this.updateCallback()
}