Skip to content

Improve MongoDB type check #148

@emmanuelbuah

Description

@emmanuelbuah

We can not reasonably use an instanceof comparison to confirm that a given object is of type MongoDB since we may be using a different version of MongoDB than what a caller might be using. In this scenario, the check would fail.

We patched the checks using a required field in the IDbProperties object is set in #112. This required field is not a known field in MongoDB instance, thus it is arguably sane to check it
in this manner.

An ideal/better solution would be to make MongoDB a devDependency making it so the logic uses the consumer's own MongoDB package. This ticket tracks putting in place a better solution if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions