@@ -16447,11 +16447,10 @@ return /******/ (function(modules) { // webpackBootstrap
1644716447
1644816448 var writeIEEE754 = __webpack_require__(353).writeIEEE754,
1644916449 Long = __webpack_require__(334).Long,
16450- MinKey = __webpack_require__(347).MinKey,
1645116450 Map = __webpack_require__(333),
1645216451 Binary = __webpack_require__(350).Binary;
1645316452
16454- const normalizedFunctionString = __webpack_require__(354).normalizedFunctionString;
16453+ var normalizedFunctionString = __webpack_require__(354).normalizedFunctionString;
1645516454
1645616455 // try {
1645716456 // var _Buffer = Uint8Array;
@@ -16460,6 +16459,7 @@ return /******/ (function(modules) { // webpackBootstrap
1646016459 // }
1646116460
1646216461 var regexp = /\x00/; // eslint-disable-line no-control-regex
16462+ var ignoreKeys = ['$db', '$ref', '$id', '$clusterTime'];
1646316463
1646416464 // To ensure that 0.4 of node works correctly
1646516465 var isDate = function isDate(d) {
@@ -16666,7 +16666,7 @@ return /******/ (function(modules) { // webpackBootstrap
1666616666 // Write the type of either min or max key
1666716667 if (value === null) {
1666816668 buffer[index++] = BSON.BSON_DATA_NULL;
16669- } else if (value instanceof MinKey) {
16669+ } else if (value._bsontype === ' MinKey' ) {
1667016670 buffer[index++] = BSON.BSON_DATA_MIN_KEY;
1667116671 } else {
1667216672 buffer[index++] = BSON.BSON_DATA_MAX_KEY;
@@ -17044,7 +17044,7 @@ return /******/ (function(modules) { // webpackBootstrap
1704417044 index = serializeNull(buffer, key, value, index, true);
1704517045 } else if (value === null) {
1704617046 index = serializeNull(buffer, key, value, index, true);
17047- } else if (value['_bsontype'] === 'ObjectID') {
17047+ } else if (value['_bsontype'] === 'ObjectID' || value['_bsontype'] === 'ObjectId' ) {
1704817048 index = serializeObjectId(buffer, key, value, index, true);
1704917049 } else if (Buffer.isBuffer(value)) {
1705017050 index = serializeBuffer(buffer, key, value, index, true);
@@ -17095,7 +17095,7 @@ return /******/ (function(modules) { // webpackBootstrap
1709517095 type = typeof value;
1709617096
1709717097 // Check the key and throw error if it's illegal
17098- if (key !== '$db' && key !== '$ref ' && key !== '$id' ) {
17098+ if (typeof key === 'string ' && ignoreKeys.indexOf( key) === -1 ) {
1709917099 if (key.match(regexp) != null) {
1710017100 // The BSON spec doesn't allow keys with null bytes because keys are
1710117101 // null-terminated.
@@ -17122,7 +17122,7 @@ return /******/ (function(modules) { // webpackBootstrap
1712217122 // } else if (value === undefined && ignoreUndefined === true) {
1712317123 } else if (value === null || value === undefined && ignoreUndefined === false) {
1712417124 index = serializeNull(buffer, key, value, index);
17125- } else if (value['_bsontype'] === 'ObjectID') {
17125+ } else if (value['_bsontype'] === 'ObjectID' || value['_bsontype'] === 'ObjectId' ) {
1712617126 index = serializeObjectId(buffer, key, value, index);
1712717127 } else if (Buffer.isBuffer(value)) {
1712817128 index = serializeBuffer(buffer, key, value, index);
@@ -17175,7 +17175,7 @@ return /******/ (function(modules) { // webpackBootstrap
1717517175 type = typeof value;
1717617176
1717717177 // Check the key and throw error if it's illegal
17178- if (key !== '$db' && key !== '$ref ' && key !== '$id' ) {
17178+ if (typeof key === 'string ' && ignoreKeys.indexOf( key) === -1 ) {
1717917179 if (key.match(regexp) != null) {
1718017180 // The BSON spec doesn't allow keys with null bytes because keys are
1718117181 // null-terminated.
@@ -17203,7 +17203,7 @@ return /******/ (function(modules) { // webpackBootstrap
1720317203 if (ignoreUndefined === false) index = serializeNull(buffer, key, value, index);
1720417204 } else if (value === null) {
1720517205 index = serializeNull(buffer, key, value, index);
17206- } else if (value['_bsontype'] === 'ObjectID') {
17206+ } else if (value['_bsontype'] === 'ObjectID' || value['_bsontype'] === 'ObjectId' ) {
1720717207 index = serializeObjectId(buffer, key, value, index);
1720817208 } else if (Buffer.isBuffer(value)) {
1720917209 index = serializeBuffer(buffer, key, value, index);
@@ -17667,7 +17667,7 @@ return /******/ (function(modules) { // webpackBootstrap
1766717667 case 'object':
1766817668 if (value == null || value instanceof MinKey || value instanceof MaxKey || value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
1766917669 return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1;
17670- } else if (value instanceof ObjectID || value['_bsontype'] === 'ObjectID') {
17670+ } else if (value instanceof ObjectID || value['_bsontype'] === 'ObjectID' || value['_bsontype'] === 'ObjectId' ) {
1767117671 return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (12 + 1);
1767217672 } else if (value instanceof Date || isDate(value)) {
1767317673 return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (8 + 1);
0 commit comments