The MongoDB Node.js team is pleased to announce version 3.6.7 of the driver
Release Highlights
This patch addresses a number of bug fixes. Notably, there was an interesting javascript related issue with sorting documents. It only impacts users using numerical keys in their documents.
> { a: 'asc', [23]: 'asc' }
{ [23]: 'asc', a: 'asc' } // numbers come first
In javascript, numerical keys are always iterated first when looping over the keys of an object followed by the chronological specification of each string key. This effectively changes the ordering of a sort document sent to mongodb. However our driver does accept sort specification in a variety of ways and one way to avoid this problem is passing an array of tuples:
[['a', 'asc'], ['23', 'asc']]
This ensures that mongodb is sent the 'a'
key as the first sort key and '23'
as the second.
Bug Fixes
- NODE-3159: removing incorrect apm docs (#2793) (971259a)
- NODE-3173: Preserve sort key order for numeric string keys (#2790) (730f43a)
- NODE-3176: handle errors from MessageStream (#2774) (f1afcc4)
- NODE-3192: check clusterTime is defined before access (#2806) (6ceace6)
- NODE-3252: state transistion from DISCONNECTED (#2807) (5d8f649)
- NODE-3219: topology no longer causes close event (#2791) (16e7064)
- invalid case on writeconcern makes skip check fail (#2773) (b1363c2)
Documentation
- Reference: http://mongodb.github.io/node-mongodb-native/3.6
- API: http://mongodb.github.io/node-mongodb-native/3.6/api
- Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md
We invite you to try the driver immediately, and report any issues to the NODE project.
Thanks very much to all the community members who contributed to this release!