diff --git a/admin/generate-dev-bundle.sh b/admin/generate-dev-bundle.sh index 8c120caff5..33e797711c 100755 --- a/admin/generate-dev-bundle.sh +++ b/admin/generate-dev-bundle.sh @@ -3,7 +3,7 @@ set -e set -u -BUNDLE_VERSION=0.2.15 +BUNDLE_VERSION=0.2.14 UNAME=$(uname) ARCH=$(uname -m) @@ -131,13 +131,6 @@ mv ../$FIBERS_ARCH . cd ../.. -# We want to ship a custom BSON module to replace one of the Node Mongo driver's -# dependencies. This allows us to return a Uint8Array as a form of binary data -# instead of the Mongo driver's proprietary Binary object on the server. - -cd $DIR/lib/node_modules/mongodb -npm install https://github.com/meteor/js-bson/tarball/9b8958a039 - # Download and install mongodb. # To see the mongo changelog, go to http://www.mongodb.org/downloads, # click 'changelog' under the current version, then 'release notes' in diff --git a/meteor b/meteor index b42d3ad7f6..3955ed5447 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/bin/bash -BUNDLE_VERSION=0.2.15 +BUNDLE_VERSION=0.2.14 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. diff --git a/packages/ejson/ejson.js b/packages/ejson/ejson.js index 168fe9b2b0..3396d8c9a8 100644 --- a/packages/ejson/ejson.js +++ b/packages/ejson/ejson.js @@ -297,35 +297,6 @@ EJSON.clone = function (v) { }; - -EJSON._recognizeAndReplace = function (document, recognize, transformer) { - if (typeof document == 'object') { - if (recognize(document)) - return transformer(document); - if (document === null - || document instanceof Date - || typeof document.typeName === 'function') - return document; - if (document instanceof Array) { - var newArr = []; - _.each(document, function (val) { - newArr.push(EJSON._recognizeAndReplace(val, recognize, transformer)); - }); - return newArr; - } else { - // plain object - var newObj = {}; - _.each(document, function (val, key) { - newObj[key] = EJSON._recognizeAndReplace(val, recognize, transformer); - }); - return newObj; - } - } else { - return document; - } -}; - - EJSON._each2 = function (iterable, iterator) { var lastVal = null; var lastKey = null; @@ -336,6 +307,4 @@ EJSON._each2 = function (iterable, iterator) { }); iterator(lastVal, lastKey, null, null); }; - - })(); diff --git a/packages/mongo-livedata/mongo_driver.js b/packages/mongo-livedata/mongo_driver.js index 0c13e0a9c6..ac5418d840 100644 --- a/packages/mongo-livedata/mongo_driver.js +++ b/packages/mongo-livedata/mongo_driver.js @@ -13,13 +13,6 @@ var MongoDB = __meteor_bootstrap__.require('mongodb'); var Fiber = __meteor_bootstrap__.require('fibers'); var Future = __meteor_bootstrap__.require(path.join('fibers', 'future')); -MongoDB.BSON.installUserDefinedBinaryHandler({ - toBuffer: function (arr) { return new Buffer(arr); }, - fromBuffer: function (buf) { return new Uint8Array(buf); }, - isBinary: function (obj) { return obj instanceof Uint8Array; }, - length: function (buf) { return buf.length; } -}); - _Mongo = function (url) { var self = this; @@ -76,33 +69,6 @@ _Mongo.prototype._maybeBeginWrite = function () { return {committed: function () {}}; }; -var replaceUint8WithBinary = function (document) { - if (typeof document == 'object') { - if (EJSON.isBinary(document)) - return new MongoDB.Binary(document); - if (document === null - || document instanceof Date - || typeof document.typeName === 'function') - return document; - if (document instanceof Array) { - var newArr = []; - _.each(document, function (val) { - newArr.push(replaceUint8WithBinary(val)); - }); - return newArr; - } else { - // plain object - var newObj = {}; - _.each(docment, function (val, key) { - newObj[key] = replaceUint8WithBinary(val); - }); - return newObj; - } - } else { - return document; - } -}; - //////////// Public API ////////// // The write methods block until the database has confirmed the write