This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pouchdb.git

commit 904c5630d251562367f32c6de9e57d6c7d64d6c0
Author: Steven <[email protected]>
AuthorDate: Thu Jan 22 15:39:46 2026 +0100

    refactor: change methods to private by adding '#' prefix
    
    Using "real" private methods
---
 .../node_modules/pouchdb-checkpointer/src/index.js   | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/packages/node_modules/pouchdb-checkpointer/src/index.js 
b/packages/node_modules/pouchdb-checkpointer/src/index.js
index 74253c731..830638f41 100644
--- a/packages/node_modules/pouchdb-checkpointer/src/index.js
+++ b/packages/node_modules/pouchdb-checkpointer/src/index.js
@@ -37,21 +37,21 @@ class CheckpointerInternal {
     // update target before source every time
     // because otherwise, compareHistory will pick a too new seq from source
     // after an error writing a checkpoint to the target
-    await this._updateTarget(checkpoint, session);
-    return this._updateSource(checkpoint, session);
+    await this.#updateTarget(checkpoint, session);
+    return this.#updateSource(checkpoint, session);
   }
 
-  async _updateTarget(checkpoint, session) {
+  async #updateTarget(checkpoint, session) {
     if (this.opts.writeTargetCheckpoint) {
-      return await this._updateCheckpoint(this.target, this.id, checkpoint,
+      return await this.#updateCheckpoint(this.target, this.id, checkpoint,
         session, this.returnValue);
     } return true;
   }
 
-  async _updateSource(checkpoint, session) {
+  async #updateSource(checkpoint, session) {
     if (this.opts.writeSourceCheckpoint) {
       try {
-        return await this._updateCheckpoint(this.src, this.id, checkpoint,
+        return await this.#updateCheckpoint(this.src, this.id, checkpoint,
           session, this.returnValue);
       } catch (err) {
         if (isForbiddenError(err)) {
@@ -63,9 +63,9 @@ class CheckpointerInternal {
     }
   }
 
-  async _updateCheckpoint(db, id, checkpoint, session, returnValue) {
+  async #updateCheckpoint(db, id, checkpoint, session, returnValue) {
     //retrieve checkpoint doc from db or create a new one
-    const doc = await this._initCheckpointDoc(db, id, session);
+    const doc = await this.#initCheckpointDoc(db, id, session);
 
     if (returnValue.cancelled) {
         return;
@@ -100,13 +100,13 @@ class CheckpointerInternal {
       } catch (err) {
         if (err.status === 409) {
           // retry; someone is trying to write a checkpoint simultaneously
-          return this._updateCheckpoint(db, id, checkpoint, session, 
returnValue);
+          return this.#updateCheckpoint(db, id, checkpoint, session, 
returnValue);
         }
           throw err;
       }
   }
 
-  async _initCheckpointDoc(db, id, session) {
+  async #initCheckpointDoc(db, id, session) {
     try {
       return await db.get(id);
     } catch (err) {

Reply via email to