This is an automated email from the ASF dual-hosted git repository.
alxndrsn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pouchdb.git
The following commit(s) were added to refs/heads/master by this push:
new c337978cc checkpointer: fix indentation (#9179)
c337978cc is described below
commit c337978cc7fb151ac4c103f9588e1d179536a0b8
Author: Alex Anderson <[email protected]>
AuthorDate: Mon Feb 23 13:38:10 2026 +0300
checkpointer: fix indentation (#9179)
---
.../node_modules/pouchdb-checkpointer/src/index.js | 66 +++++++++++-----------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/packages/node_modules/pouchdb-checkpointer/src/index.js
b/packages/node_modules/pouchdb-checkpointer/src/index.js
index 68e7fa9eb..e4a361415 100644
--- a/packages/node_modules/pouchdb-checkpointer/src/index.js
+++ b/packages/node_modules/pouchdb-checkpointer/src/index.js
@@ -69,41 +69,41 @@ class CheckpointerInternal {
if (returnValue.cancelled) {
return;
- }
- // if the checkpoint has not changed, do not update
- if (doc.last_seq === checkpoint) {
- return;
- }
+ }
+ // if the checkpoint has not changed, do not update
+ if (doc.last_seq === checkpoint) {
+ return;
+ }
- // Filter out current entry for this replication
- doc.history = (doc.history || []).filter(item => item.session_id !==
session);
+ // Filter out current entry for this replication
+ doc.history = (doc.history || []).filter(item => item.session_id !==
session);
- // Add the latest checkpoint to history
- doc.history.unshift({
- last_seq: checkpoint,
- session_id: session
- });
+ // Add the latest checkpoint to history
+ doc.history.unshift({
+ last_seq: checkpoint,
+ session_id: session
+ });
- // Just take the last pieces in history, to
- // avoid really big checkpoint docs.
- // see comment on history size above
- doc.history = doc.history.slice(0, CHECKPOINT_HISTORY_SIZE);
+ // Just take the last pieces in history, to
+ // avoid really big checkpoint docs.
+ // see comment on history size above
+ doc.history = doc.history.slice(0, CHECKPOINT_HISTORY_SIZE);
- doc.version = CHECKPOINT_VERSION;
- doc.replicator = REPLICATOR;
+ doc.version = CHECKPOINT_VERSION;
+ doc.replicator = REPLICATOR;
- doc.session_id = session;
- doc.last_seq = checkpoint;
+ doc.session_id = session;
+ doc.last_seq = checkpoint;
- try {
- return await db.put(doc);
- } catch (err) {
- if (err.status === 409) {
- // retry; someone is trying to write a checkpoint simultaneously
- return this._updateCheckpoint(db, id, checkpoint, session,
returnValue);
- }
- throw err;
+ try {
+ return await db.put(doc);
+ } catch (err) {
+ if (err.status === 409) {
+ // retry; someone is trying to write a checkpoint simultaneously
+ return this._updateCheckpoint(db, id, checkpoint, session,
returnValue);
}
+ throw err;
+ }
}
async _initCheckpointDoc(db, id, session) {
@@ -152,9 +152,9 @@ class CheckpointerInternal {
targetDoc = await this.target.get(this.id);
} catch (err) {
if (err.status !== 404) {
- throw err;
- }
- return LOWEST_SEQ;
+ throw err;
+ }
+ return LOWEST_SEQ;
}
if (this.opts && this.opts.writeTargetCheckpoint &&
!this.opts.writeSourceCheckpoint) {
@@ -164,8 +164,8 @@ class CheckpointerInternal {
try {
const sourceDoc = await this.src.get(this.id);
// Since we can't migrate an old version doc to a new one
- // (no session id), we just go with the lowest seq in this case
- /* istanbul ignore if */
+ // (no session id), we just go with the lowest seq in this case
+ /* istanbul ignore if */
if (targetDoc.version !== sourceDoc.version) {
return LOWEST_SEQ;
}