mongodb 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HISTORY.md +15 -0
- package/lib/aggregation_cursor.js +2 -1
- package/lib/command_cursor.js +2 -1
- package/lib/cursor.js +2 -1
- package/lib/utils.js +11 -1
- package/package.json +2 -2
package/HISTORY.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
<a name="3.2.2"></a>
|
|
6
|
+
## [3.2.2](https://github.com/mongodb/node-mongodb-native/compare/v3.2.1...v3.2.2) (2019-03-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **asyncIterator:** stronger guard against importing async generator ([e0826fb](https://github.com/mongodb/node-mongodb-native/commit/e0826fb))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* update to mongodb-core v3.2.2 ([868cfc3](https://github.com/mongodb/node-mongodb-native/commit/868cfc3))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
5
20
|
<a name="3.2.1"></a>
|
|
6
21
|
## [3.2.1](https://github.com/mongodb/node-mongodb-native/compare/v3.2.0...v3.2.1) (2019-03-21)
|
|
7
22
|
|
|
@@ -5,6 +5,7 @@ const MongoError = require('mongodb-core').MongoError;
|
|
|
5
5
|
const Readable = require('stream').Readable;
|
|
6
6
|
const CoreCursor = require('./cursor');
|
|
7
7
|
const deprecate = require('util').deprecate;
|
|
8
|
+
const SUPPORTS = require('./utils').SUPPORTS;
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @fileOverview The **AggregationCursor** class is an internal class that embodies an aggregation cursor on MongoDB
|
|
@@ -130,7 +131,7 @@ inherits(AggregationCursor, Readable);
|
|
|
130
131
|
for (var name in CoreCursor.prototype) {
|
|
131
132
|
AggregationCursor.prototype[name] = CoreCursor.prototype[name];
|
|
132
133
|
}
|
|
133
|
-
if (
|
|
134
|
+
if (SUPPORTS.ASYNC_ITERATOR) {
|
|
134
135
|
AggregationCursor.prototype[
|
|
135
136
|
Symbol.asyncIterator
|
|
136
137
|
] = require('./async/async_iterator').asyncIterator;
|
package/lib/command_cursor.js
CHANGED
|
@@ -5,6 +5,7 @@ const ReadPreference = require('mongodb-core').ReadPreference;
|
|
|
5
5
|
const MongoError = require('mongodb-core').MongoError;
|
|
6
6
|
const Readable = require('stream').Readable;
|
|
7
7
|
const CoreCursor = require('./cursor');
|
|
8
|
+
const SUPPORTS = require('./utils').SUPPORTS;
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @fileOverview The **CommandCursor** class is an internal class that embodies a
|
|
@@ -156,7 +157,7 @@ for (var i = 0; i < methodsToInherit.length; i++) {
|
|
|
156
157
|
CommandCursor.prototype[methodsToInherit[i]] = CoreCursor.prototype[methodsToInherit[i]];
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
if (
|
|
160
|
+
if (SUPPORTS.ASYNC_ITERATOR) {
|
|
160
161
|
CommandCursor.prototype[Symbol.asyncIterator] = require('./async/async_iterator').asyncIterator;
|
|
161
162
|
}
|
|
162
163
|
|
package/lib/cursor.js
CHANGED
|
@@ -5,6 +5,7 @@ const PassThrough = require('stream').PassThrough;
|
|
|
5
5
|
const inherits = require('util').inherits;
|
|
6
6
|
const deprecate = require('util').deprecate;
|
|
7
7
|
const handleCallback = require('./utils').handleCallback;
|
|
8
|
+
const SUPPORTS = require('./utils').SUPPORTS;
|
|
8
9
|
const ReadPreference = require('mongodb-core').ReadPreference;
|
|
9
10
|
const MongoError = require('mongodb-core').MongoError;
|
|
10
11
|
const Readable = require('stream').Readable;
|
|
@@ -203,7 +204,7 @@ function Cursor(bson, ns, cmd, options, topology, topologyOptions) {
|
|
|
203
204
|
// Inherit from Readable
|
|
204
205
|
inherits(Cursor, Readable);
|
|
205
206
|
|
|
206
|
-
if (
|
|
207
|
+
if (SUPPORTS.ASYNC_ITERATOR) {
|
|
207
208
|
Cursor.prototype[Symbol.asyncIterator] = require('./async/async_iterator').asyncIterator;
|
|
208
209
|
}
|
|
209
210
|
|
package/lib/utils.js
CHANGED
|
@@ -690,6 +690,15 @@ function deprecateOptions(config, fn) {
|
|
|
690
690
|
return deprecated;
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
+
const SUPPORTS = {};
|
|
694
|
+
// Test asyncIterator support
|
|
695
|
+
try {
|
|
696
|
+
require('./async/async_iterator');
|
|
697
|
+
SUPPORTS.ASYNC_ITERATOR = true;
|
|
698
|
+
} catch (e) {
|
|
699
|
+
SUPPORTS.ASYNC_ITERATOR = false;
|
|
700
|
+
}
|
|
701
|
+
|
|
693
702
|
module.exports = {
|
|
694
703
|
filterOptions,
|
|
695
704
|
mergeOptions,
|
|
@@ -715,5 +724,6 @@ module.exports = {
|
|
|
715
724
|
isPromiseLike,
|
|
716
725
|
decorateWithCollation,
|
|
717
726
|
decorateWithReadConcern,
|
|
718
|
-
deprecateOptions
|
|
727
|
+
deprecateOptions,
|
|
728
|
+
SUPPORTS
|
|
719
729
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "The official MongoDB driver for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"official"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"mongodb-core": "3.2.
|
|
20
|
+
"mongodb-core": "3.2.2",
|
|
21
21
|
"safe-buffer": "^5.1.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|