Don't attempt to get ObjectId from bson embedded in mongodb package #2

Merged
merged 1 commit into from Apr 12, 2012

Conversation

Projects
None yet
2 participants
Contributor

evdb commented Apr 11, 2012

Make bson a dep of this project and access it directly - leads to all tests passing.

Owner

powmedia commented Apr 11, 2012

Thanks evdb, what are the advantages of using the bson requirement over the one in mongodb?

Contributor

evdb commented Apr 11, 2012

The code will work with more recent mongodb packages, and test suite will pass :)

If I make sure that the version of mongodb specified as the minimum in package.json is used it all passes fine:

cd pow-mongodb-fixtures
npm install mongodb@0.9.7-1.4
npm install .
nodeunit test/
# all tests pass

But if you use the latest mongodb (currently 0.9.9-7) then the tests don't pass:

npm install mongodb@latest
nodeunit test/

module.js:311
    throw err;
      ^
Error: Cannot find module 'mongodb/lib/mongodb/bson/bson'
....snip....

I'm guessing that the internal layout of mongodb changed somehow, but have not investigated it. Adding bson as a dep sidesteps the issue.

@powmedia powmedia merged commit 1dff0bd into powmedia:master Apr 12, 2012

luislobo pushed a commit to luislobo/lobo-mongodb-fixtures that referenced this pull request May 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment