Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a friendly and cooperative effort to get all packages that modify the
Mongo.Collection
constructor to use a centralized "monkey-patching" package to do away with the package issues that arise as a result of monkey-patching the constructor multiple times. For example, this issue that you're having is fixed when you depend on my package.dburles:mongo-collection-instances
has already jumped on board with this.I'm trying to pull request third-party packages like yours one by one to make sure there are no potential issues. Eventually I will also pull request collection-hooks as well. As a matter of fact, I was able to run
matb33:collection-hooks
's tests and have them all pass using my package (and also without using my package). Here's my fork (collection-extensions
branch) of collection-hooks that uses my package for you to test.Also, if you're not convinced, you can git clone my fork of your package (
collection-extensions
branch) in your localpackages
folder to test it out. I was hoping that you've written tests for your package so I wrote a few of my own (that I haven't published yet) and saw that your package works.