Browse Source

Refs #3173: Merge branch 'release/v0.5.6+2013.09.09'

* release/v0.5.6+2013.09.09:
  Refs #3066: update package.json to use release branch for version v0.5.6+2013.09.09.
  refs #3131 removed setImmediate calls which break in the browser
  refs #3074: Removed call to process.nextTick
  refs #3074: Removed call to process.nextTick
  Refs #2965: update package.json to new version 0.5.6+2013.09.09.

Conflicts:
	package.json
Chris Sexton 12 years ago
parent
commit
5366f9e250

+ 1 - 1
lib/pipeline/documentSources/CursorDocumentSource.js

@@ -167,7 +167,7 @@ proto.getCurrent = function getCurrent() {
  **/
 proto.setSource = function setSource(theSource, callback) {
 	if (theSource) throw new Error("CursorDocumentSource doesn't take a source"); //TODO: This needs to put back without the if once async is fully and properly supported
-	if (callback) return process.nextTick(callback);
+	if (callback) return setTimeout(callback, 0);
 };
 
 /**

+ 1 - 1
lib/pipeline/documentSources/DocumentSource.js

@@ -139,7 +139,7 @@ proto.getSourceName = function getSourceName() {
 proto.setSource = function setSource(theSource, callback) {
 	if (this.source) throw new Error("It is an error to set the source more than once");
 	this.source = theSource;
-	if (callback) return process.nextTick(callback);
+	if (callback) return setTimeout(callback, 0);
 };
 
 /**

+ 2 - 2
lib/pipeline/expressions/Expression.js

@@ -156,9 +156,9 @@ var FieldPathExpression = require("./FieldPathExpression"),
  * @static
  * @property opMap
  **/
-process.nextTick(function(){ // Even though `opMap` is deferred, force it to load early rather than later to prevent even *more* potential silliness
+setTimeout(function(){ // Even though `opMap` is deferred, force it to load early rather than later to prevent even *more* potential silliness
 	Object.defineProperty(klass, "opMap", {value:klass.opMap});
-});
+}, 0);
 Object.defineProperty(klass, "opMap", {	//NOTE: deferred requires using a getter to allow circular requires (to maintain the ported API)
 	configurable: true,
 	get: function getOpMapOnce() {

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "mungedb-aggregate",
-  "version": "0.5.5+2013.08.26",
+  "version": "0.5.6+2013.09.09",
   "description": "A JavaScript data aggregation pipeline based on the MongoDB aggregation framework.",
   "author": "Rivera Group <support@riverainc.com>",
   "contributors": [
@@ -15,7 +15,7 @@
     "test": "npm_scripts/test/test.sh"
   },
   "repository": {
-    "url": "git+https://source.rd.rcg.local/git/private/mungedb-aggregate.git#master"
+    "url": "git+https://source.rd.rcg.local/git/private/mungedb-aggregate.git#release/v0.5.6+2013.09.09"
   },
   "keywords": [
     "manipulation",