mongodb 3.2.6 → 3.2.7
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 +11 -0
- package/lib/collection.js +7 -0
- package/package.json +2 -2
package/HISTORY.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.7"></a>
|
|
6
|
+
## [3.2.7](https://github.com/mongodb/node-mongodb-native/compare/v3.2.6...v3.2.7) (2019-06-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** updating core to version 3.2.7 ([2f91466](https://github.com/mongodb/node-mongodb-native/commit/2f91466))
|
|
12
|
+
* **findOneAndReplace:** throw error if atomic operators provided for findOneAndReplace ([6a860a3](https://github.com/mongodb/node-mongodb-native/commit/6a860a3))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
5
16
|
<a name="3.2.6"></a>
|
|
6
17
|
## [3.2.6](https://github.com/mongodb/node-mongodb-native/compare/v3.2.5...v3.2.6) (2019-05-24)
|
|
7
18
|
|
package/lib/collection.js
CHANGED
|
@@ -1515,6 +1515,13 @@ Collection.prototype.findOneAndReplace = function(filter, replacement, options,
|
|
|
1515
1515
|
if (replacement == null || typeof replacement !== 'object')
|
|
1516
1516
|
throw toError('replacement parameter must be an object');
|
|
1517
1517
|
|
|
1518
|
+
// Check that there are no atomic operators
|
|
1519
|
+
const keys = Object.keys(replacement);
|
|
1520
|
+
|
|
1521
|
+
if (keys[0] && keys[0][0] === '$') {
|
|
1522
|
+
throw toError('The replacement document must not contain atomic operators.');
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1518
1525
|
return executeOperation(this.s.topology, findOneAndReplace, [
|
|
1519
1526
|
this,
|
|
1520
1527
|
filter,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
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.7",
|
|
21
21
|
"safe-buffer": "^5.1.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|