bson 1.0.9 → 1.1.0
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 +10 -0
- package/lib/bson/parser/serializer.js +3 -2
- package/package.json +1 -1
package/HISTORY.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
<a name="1.1.0"></a>
|
|
2
|
+
# [1.1.0](https://github.com/mongodb/js-bson/compare/v1.0.9...v1.1.0) (2018-08-13)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **serializer:** do not use checkKeys for $clusterTime ([573e141](https://github.com/mongodb/js-bson/commit/573e141))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
<a name="1.0.9"></a>
|
|
2
12
|
## [1.0.9](https://github.com/mongodb/js-bson/compare/v1.0.8...v1.0.9) (2018-06-07)
|
|
3
13
|
|
|
@@ -15,6 +15,7 @@ var normalizedFunctionString = require('./utils').normalizedFunctionString;
|
|
|
15
15
|
// }
|
|
16
16
|
|
|
17
17
|
var regexp = /\x00/; // eslint-disable-line no-control-regex
|
|
18
|
+
var ignoreKeys = ['$db', '$ref', '$id', '$clusterTime'];
|
|
18
19
|
|
|
19
20
|
// To ensure that 0.4 of node works correctly
|
|
20
21
|
var isDate = function isDate(d) {
|
|
@@ -798,7 +799,7 @@ var serializeInto = function serializeInto(
|
|
|
798
799
|
type = typeof value;
|
|
799
800
|
|
|
800
801
|
// Check the key and throw error if it's illegal
|
|
801
|
-
if (
|
|
802
|
+
if (typeof key === 'string' && ignoreKeys.indexOf(key) === -1) {
|
|
802
803
|
if (key.match(regexp) != null) {
|
|
803
804
|
// The BSON spec doesn't allow keys with null bytes because keys are
|
|
804
805
|
// null-terminated.
|
|
@@ -899,7 +900,7 @@ var serializeInto = function serializeInto(
|
|
|
899
900
|
type = typeof value;
|
|
900
901
|
|
|
901
902
|
// Check the key and throw error if it's illegal
|
|
902
|
-
if (
|
|
903
|
+
if (typeof key === 'string' && ignoreKeys.indexOf(key) === -1) {
|
|
903
904
|
if (key.match(regexp) != null) {
|
|
904
905
|
// The BSON spec doesn't allow keys with null bytes because keys are
|
|
905
906
|
// null-terminated.
|