Skip to content

Overriding default implementations with plugin not working #8737

@louwers

Description

@louwers

Issue

It doesn't seem to be possible to override default PouchDB implementations anymore.

Maybe related #8450

This example in the docs doesn't work because of this: https://pouchdb.com/api.html#plugins:~:text=Example%20Plugin%3A%20Intercept%20Updates (also there is a typo, doc is undefined).

Info

  • Environment: (Node.js/browser/hybrid app/etc.) Browser
  • Platform: (Chrome/FF/Safari/Edge/iOS/Android/etc.) Firefox
  • Adapter: (idb/indexeddb/memory/leveldb/etc.) N/A
  • Server: (CouchDB/Cloudant/PouchDB Server/etc.) N/A

Reproduce

  PouchDB.plugin({
    bulkDocs : function () {
      console.log("Hello!");
    }
  });


const localDb = new PouchDB('db')
localDb.bulkDocs() // does not call above method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions