From 3f36763f2925d368af7f93ed15e73437c64af89d Mon Sep 17 00:00:00 2001 From: Naomi Seyfer Date: Sun, 12 May 2013 01:31:39 -0700 Subject: [PATCH 0001/2352] Our version of underscore doesn't have 'partial' anymore since we downgraded. Missed one instance of this because I missed arrays in the EJSON support in mongo testing. --- packages/mongo-livedata/mongo_driver.js | 2 +- packages/mongo-livedata/mongo_livedata_tests.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/mongo-livedata/mongo_driver.js b/packages/mongo-livedata/mongo_driver.js index 22556dbee0c..1922570c4ef 100644 --- a/packages/mongo-livedata/mongo_driver.js +++ b/packages/mongo-livedata/mongo_driver.js @@ -15,7 +15,7 @@ var Future = Npm.require(path.join('fibers', 'future')); var replaceNames = function (filter, thing) { if (typeof thing === "object") { if (_.isArray(thing)) { - return _.map(thing, _.partial(replaceNames, filter)); + return _.map(thing, _.bind(replaceNames, null, filter)); } var ret = {}; _.each(thing, function (value, key) { diff --git a/packages/mongo-livedata/mongo_livedata_tests.js b/packages/mongo-livedata/mongo_livedata_tests.js index 84efed85f1c..948a7962bd4 100644 --- a/packages/mongo-livedata/mongo_livedata_tests.js +++ b/packages/mongo-livedata/mongo_livedata_tests.js @@ -27,22 +27,24 @@ Meteor._FailureTestCollection = new Meteor.Collection("___meteor_failure_test_collection"); // For test "document with a custom type" -var Dog = function (name, color) { +var Dog = function (name, color, actions) { var self = this; self.color = color; self.name = name; + self.actions = actions || [{name: "wag"}, {name: "swim"}]; }; _.extend(Dog.prototype, { getName: function () { return this.name;}, getColor: function () { return this.name;}, equals: function (other) { return other.name === this.name && - other.color === this.color; }, - toJSONValue: function () { return {color: this.color, name: this.name};}, + other.color === this.color && + EJSON.equals(other.actions, this.actions);}, + toJSONValue: function () { return {color: this.color, name: this.name, actions: this.actions};}, typeName: function () { return "dog"; }, clone: function () { return new Dog(this.name, this.color); }, speak: function () { return "woof"; } }); -EJSON.addType("dog", function (o) { return new Dog(o.name, o.color);}); +EJSON.addType("dog", function (o) { return new Dog(o.name, o.color, o.actions);}); // Parameterize tests. From 8dbee56e77d9069a43672e4f6b7f94aa1daee90b Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 13 May 2013 10:36:47 -0700 Subject: [PATCH 0002/2352] Add .gitignore to package directories to match linker branch. This way switching between linker and devel doesn't leave you with lots of junk in git status. --- packages/absolute-url/.gitignore | 1 + packages/accounts-base/.gitignore | 1 + packages/accounts-facebook/.gitignore | 1 + packages/accounts-github/.gitignore | 1 + packages/accounts-google/.gitignore | 1 + packages/accounts-meetup/.gitignore | 1 + packages/accounts-oauth-helper/.gitignore | 1 + packages/accounts-oauth1-helper/.gitignore | 1 + packages/accounts-oauth2-helper/.gitignore | 1 + packages/accounts-password/.gitignore | 1 + packages/accounts-twitter/.gitignore | 1 + packages/accounts-ui-unstyled/.gitignore | 1 + packages/accounts-ui/.gitignore | 1 + packages/accounts-urls/.gitignore | 1 + packages/accounts-weibo/.gitignore | 1 + packages/amplify/.gitignore | 1 + packages/appcache/.gitignore | 1 + packages/autopublish/.gitignore | 1 + packages/backbone/.gitignore | 1 + packages/bootstrap/.gitignore | 1 + packages/check/.gitignore | 1 + packages/code-prettify/.gitignore | 1 + packages/d3/.gitignore | 1 + packages/deps/.gitignore | 1 + packages/domutils/.gitignore | 1 + packages/ejson/.gitignore | 1 + packages/email/.gitignore | 1 + packages/force-ssl/.gitignore | 1 + packages/handlebars/.gitignore | 1 + packages/htmljs/.gitignore | 1 + packages/http/.gitignore | 1 + packages/insecure/.gitignore | 1 + packages/jquery-history/.gitignore | 1 + packages/jquery-layout/.gitignore | 1 + packages/jquery-waypoints/.gitignore | 1 + packages/jquery/.gitignore | 1 + packages/json/.gitignore | 1 + packages/jsparse/.gitignore | 1 + packages/livedata/.gitignore | 1 + packages/liverange/.gitignore | 1 + packages/localstorage-polyfill/.gitignore | 1 + packages/logging/.gitignore | 1 + packages/madewith/.gitignore | 1 + packages/meteor/.gitignore | 1 + packages/meyerweb-reset/.gitignore | 1 + packages/minimongo/.gitignore | 1 + packages/mongo-livedata/.gitignore | 1 + packages/ordered-dict/.gitignore | 1 + packages/past/.gitignore | 1 + packages/preserve-inputs/.gitignore | 1 + packages/random/.gitignore | 1 + packages/reactive-dict/.gitignore | 1 + packages/reload/.gitignore | 1 + packages/routepolicy/.gitignore | 1 + packages/session/.gitignore | 1 + packages/showdown/.gitignore | 1 + packages/spark/.gitignore | 1 + packages/spiderable/.gitignore | 1 + packages/srp/.gitignore | 1 + packages/startup/.gitignore | 1 + packages/stream/.gitignore | 1 + packages/templating/.gitignore | 1 + packages/test-helpers/.gitignore | 1 + packages/test-in-browser/.gitignore | 1 + packages/test-in-console/.gitignore | 1 + packages/tinytest/.gitignore | 1 + packages/underscore/.gitignore | 1 + packages/universal-events/.gitignore | 1 + 68 files changed, 68 insertions(+) create mode 100644 packages/absolute-url/.gitignore create mode 100644 packages/accounts-base/.gitignore create mode 100644 packages/accounts-facebook/.gitignore create mode 100644 packages/accounts-github/.gitignore create mode 100644 packages/accounts-google/.gitignore create mode 100644 packages/accounts-meetup/.gitignore create mode 100644 packages/accounts-oauth-helper/.gitignore create mode 100644 packages/accounts-oauth1-helper/.gitignore create mode 100644 packages/accounts-oauth2-helper/.gitignore create mode 100644 packages/accounts-password/.gitignore create mode 100644 packages/accounts-twitter/.gitignore create mode 100644 packages/accounts-ui-unstyled/.gitignore create mode 100644 packages/accounts-ui/.gitignore create mode 100644 packages/accounts-urls/.gitignore create mode 100644 packages/accounts-weibo/.gitignore create mode 100644 packages/amplify/.gitignore create mode 100644 packages/appcache/.gitignore create mode 100644 packages/autopublish/.gitignore create mode 100644 packages/backbone/.gitignore create mode 100644 packages/bootstrap/.gitignore create mode 100644 packages/check/.gitignore create mode 100644 packages/code-prettify/.gitignore create mode 100644 packages/d3/.gitignore create mode 100644 packages/deps/.gitignore create mode 100644 packages/domutils/.gitignore create mode 100644 packages/ejson/.gitignore create mode 100644 packages/email/.gitignore create mode 100644 packages/force-ssl/.gitignore create mode 100644 packages/handlebars/.gitignore create mode 100644 packages/htmljs/.gitignore create mode 100644 packages/http/.gitignore create mode 100644 packages/insecure/.gitignore create mode 100644 packages/jquery-history/.gitignore create mode 100644 packages/jquery-layout/.gitignore create mode 100644 packages/jquery-waypoints/.gitignore create mode 100644 packages/jquery/.gitignore create mode 100644 packages/json/.gitignore create mode 100644 packages/jsparse/.gitignore create mode 100644 packages/livedata/.gitignore create mode 100644 packages/liverange/.gitignore create mode 100644 packages/localstorage-polyfill/.gitignore create mode 100644 packages/logging/.gitignore create mode 100644 packages/madewith/.gitignore create mode 100644 packages/meteor/.gitignore create mode 100644 packages/meyerweb-reset/.gitignore create mode 100644 packages/minimongo/.gitignore create mode 100644 packages/mongo-livedata/.gitignore create mode 100644 packages/ordered-dict/.gitignore create mode 100644 packages/past/.gitignore create mode 100644 packages/preserve-inputs/.gitignore create mode 100644 packages/random/.gitignore create mode 100644 packages/reactive-dict/.gitignore create mode 100644 packages/reload/.gitignore create mode 100644 packages/routepolicy/.gitignore create mode 100644 packages/session/.gitignore create mode 100644 packages/showdown/.gitignore create mode 100644 packages/spark/.gitignore create mode 100644 packages/spiderable/.gitignore create mode 100644 packages/srp/.gitignore create mode 100644 packages/startup/.gitignore create mode 100644 packages/stream/.gitignore create mode 100644 packages/templating/.gitignore create mode 100644 packages/test-helpers/.gitignore create mode 100644 packages/test-in-browser/.gitignore create mode 100644 packages/test-in-console/.gitignore create mode 100644 packages/tinytest/.gitignore create mode 100644 packages/underscore/.gitignore create mode 100644 packages/universal-events/.gitignore diff --git a/packages/absolute-url/.gitignore b/packages/absolute-url/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/absolute-url/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-base/.gitignore b/packages/accounts-base/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-base/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-facebook/.gitignore b/packages/accounts-facebook/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-facebook/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-github/.gitignore b/packages/accounts-github/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-github/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-google/.gitignore b/packages/accounts-google/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-google/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-meetup/.gitignore b/packages/accounts-meetup/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-meetup/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-oauth-helper/.gitignore b/packages/accounts-oauth-helper/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-oauth-helper/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-oauth1-helper/.gitignore b/packages/accounts-oauth1-helper/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-oauth1-helper/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-oauth2-helper/.gitignore b/packages/accounts-oauth2-helper/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-oauth2-helper/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-password/.gitignore b/packages/accounts-password/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-password/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-twitter/.gitignore b/packages/accounts-twitter/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-twitter/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-ui-unstyled/.gitignore b/packages/accounts-ui-unstyled/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-ui-unstyled/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-ui/.gitignore b/packages/accounts-ui/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-ui/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-urls/.gitignore b/packages/accounts-urls/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-urls/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/accounts-weibo/.gitignore b/packages/accounts-weibo/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/accounts-weibo/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/amplify/.gitignore b/packages/amplify/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/amplify/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/appcache/.gitignore b/packages/appcache/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/appcache/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/autopublish/.gitignore b/packages/autopublish/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/autopublish/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/backbone/.gitignore b/packages/backbone/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/backbone/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/bootstrap/.gitignore b/packages/bootstrap/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/bootstrap/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/check/.gitignore b/packages/check/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/check/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/code-prettify/.gitignore b/packages/code-prettify/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/code-prettify/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/d3/.gitignore b/packages/d3/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/d3/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/deps/.gitignore b/packages/deps/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/deps/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/domutils/.gitignore b/packages/domutils/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/domutils/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/ejson/.gitignore b/packages/ejson/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/ejson/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/email/.gitignore b/packages/email/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/email/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/force-ssl/.gitignore b/packages/force-ssl/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/force-ssl/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/handlebars/.gitignore b/packages/handlebars/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/handlebars/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/htmljs/.gitignore b/packages/htmljs/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/htmljs/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/http/.gitignore b/packages/http/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/http/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/insecure/.gitignore b/packages/insecure/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/insecure/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/jquery-history/.gitignore b/packages/jquery-history/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/jquery-history/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/jquery-layout/.gitignore b/packages/jquery-layout/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/jquery-layout/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/jquery-waypoints/.gitignore b/packages/jquery-waypoints/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/jquery-waypoints/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/jquery/.gitignore b/packages/jquery/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/jquery/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/json/.gitignore b/packages/json/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/json/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/jsparse/.gitignore b/packages/jsparse/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/jsparse/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/livedata/.gitignore b/packages/livedata/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/livedata/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/liverange/.gitignore b/packages/liverange/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/liverange/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/localstorage-polyfill/.gitignore b/packages/localstorage-polyfill/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/localstorage-polyfill/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/logging/.gitignore b/packages/logging/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/logging/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/madewith/.gitignore b/packages/madewith/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/madewith/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/meteor/.gitignore b/packages/meteor/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/meteor/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/meyerweb-reset/.gitignore b/packages/meyerweb-reset/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/meyerweb-reset/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/minimongo/.gitignore b/packages/minimongo/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/minimongo/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/mongo-livedata/.gitignore b/packages/mongo-livedata/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/mongo-livedata/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/ordered-dict/.gitignore b/packages/ordered-dict/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/ordered-dict/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/past/.gitignore b/packages/past/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/past/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/preserve-inputs/.gitignore b/packages/preserve-inputs/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/preserve-inputs/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/random/.gitignore b/packages/random/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/random/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/reactive-dict/.gitignore b/packages/reactive-dict/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/reactive-dict/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/reload/.gitignore b/packages/reload/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/reload/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/routepolicy/.gitignore b/packages/routepolicy/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/routepolicy/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/session/.gitignore b/packages/session/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/session/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/showdown/.gitignore b/packages/showdown/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/showdown/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/spark/.gitignore b/packages/spark/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/spark/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/spiderable/.gitignore b/packages/spiderable/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/spiderable/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/srp/.gitignore b/packages/srp/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/srp/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/startup/.gitignore b/packages/startup/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/startup/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/stream/.gitignore b/packages/stream/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/stream/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/templating/.gitignore b/packages/templating/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/templating/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/test-helpers/.gitignore b/packages/test-helpers/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/test-helpers/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/test-in-browser/.gitignore b/packages/test-in-browser/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/test-in-browser/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/test-in-console/.gitignore b/packages/test-in-console/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/test-in-console/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/tinytest/.gitignore b/packages/tinytest/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/tinytest/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/underscore/.gitignore b/packages/underscore/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/underscore/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/universal-events/.gitignore b/packages/universal-events/.gitignore new file mode 100644 index 00000000000..677a6fc2637 --- /dev/null +++ b/packages/universal-events/.gitignore @@ -0,0 +1 @@ +.build* From 6f05a29f0b791d7e0c4a0493d8f17754e329e393 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 26 Apr 2013 10:40:40 -0700 Subject: [PATCH 0003/2352] Revert the contents of the avital-client-compatibility branch. We will rebase linker on top of this commit, and then re-apply. --- docs/client/concepts.html | 6 ------ packages/meteor/package.js | 5 ++--- tools/bundler.js | 26 ++++++-------------------- tools/packages.js | 8 +------- 4 files changed, 9 insertions(+), 36 deletions(-) diff --git a/docs/client/concepts.html b/docs/client/concepts.html index 49c02bcfed5..cd26c5ef26d 100644 --- a/docs/client/concepts.html +++ b/docs/client/concepts.html @@ -43,12 +43,6 @@

Structuring your application

You're free to use a single JavaScript file for your entire application, or create a nested tree of separate files, or anything in between. -Some JavaScript libraries only work when placed in the -`client/compatibility` subdirectory. Files in this directory are -executed without being wrapped in a new variable scope. This means -that each top-level `var` defines a global variable. In addition, -these files are executed before other client-side JavaScript files. - Files outside the `client`, `server` and `tests` subdirectories are loaded on both the client and the server! That's the place for model definitions and other functions. Meteor provides the variables [`isClient`](#meteor_isclient) and diff --git a/packages/meteor/package.js b/packages/meteor/package.js index 805adff618f..dafe07c0901 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -6,13 +6,12 @@ Package.describe({ }); Package.register_extension( - "js", function (bundle, source_path, serve_path, where, opt) { + "js", function (bundle, source_path, serve_path, where) { bundle.add_resource({ type: "js", path: serve_path, source_file: source_path, - where: where, - raw: opt.raw + where: where }); } ); diff --git a/tools/bundler.js b/tools/bundler.js index ae2de8d43be..5dbab04c249 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -115,7 +115,7 @@ var PackageBundlingInfo = function (pkg, bundle) { }); }, - add_files: function (paths, where, opt) { + add_files: function (paths, where) { if (!(paths instanceof Array)) paths = paths ? [paths] : []; if (!(where instanceof Array)) @@ -123,7 +123,7 @@ var PackageBundlingInfo = function (pkg, bundle) { _.each(where, function (w) { _.each(paths, function (rel_path) { - self.add_file(rel_path, w, opt); + self.add_file(rel_path, w); }); }); }, @@ -188,11 +188,8 @@ _.extend(PackageBundlingInfo.prototype, { return candidates[0]; }, - // opt {Object} - // - raw {Boolean} In case this is a JS file, don't wrap in a closure. - add_file: function (rel_path, where, opt) { + add_file: function (rel_path, where) { var self = this; - opt = opt || {}; if (self.files[where][rel_path]) return; @@ -213,8 +210,7 @@ _.extend(PackageBundlingInfo.prototype, { handler(self.bundle.api, sourcePath, path.join(self.pkg.serve_root, rel_path), - where, - opt); + where); } else { // If we don't have an extension handler, serve this file // as a static resource. @@ -306,10 +302,6 @@ var Bundle = function () { * * data: the data to send. overrides source_file if present. you * must still set path (except for "head" and "body".) - * - * raw: (only for js files) when set, don't wrap code in - * a closure. used for client-side javascript libraries that use - * the `function foo()` or `var foo =` syntax to define globals. */ add_resource: function (options) { var source_file = options.source_file || options.path; @@ -345,17 +337,11 @@ var Bundle = function () { // scope (eg, file-level vars are file-scoped). On the server, this // is done in server/server.js to inject the Npm symbol. // - // Some client-side Javascript libraries define globals - // with `var foo =` or `function bar()` which only work if - // loaded directly from a script tag. If - // `options.raw` is set, don't wrap in a closure - // to enable using such libraries. - // // The ".call(this)" allows you to do a top-level "this.foo = " // to define global variables when using "use strict" // (http://es5.github.io/#x15.3.4.4); this is the only way to do // it in CoffeeScript. - if (w === "client" && !options.raw) { + if (w === "client") { wrapped = Buffer.concat([ new Buffer("(function(){ "), data, @@ -687,7 +673,7 @@ _.extend(Bundle.prototype, { contents = self.files.client[file]; delete self.files.client[file]; self.files.client_cacheable[file] = contents; - url = file + '?' + sha1(contents); + url = file + '?' + sha1(contents) } else throw new Error('unable to find file: ' + file); diff --git a/tools/packages.js b/tools/packages.js index 8678652c882..8e98150976c 100644 --- a/tools/packages.js +++ b/tools/packages.js @@ -238,13 +238,7 @@ _.extend(Package.prototype, { api.use(project.get_packages(app_dir)); // -- Source files -- - var shouldLoadRaw = function (filename) { - return filename.indexOf(path.sep + 'client' + path.sep + 'compatibility' + path.sep) !== -1; - }; - var clientFiles = sources_except(api, "server"); - api.add_files(_.filter(clientFiles, shouldLoadRaw), "client", {raw: true}); - api.add_files(_.reject(clientFiles, shouldLoadRaw), "client"); - + api.add_files(sources_except(api, "server"), "client"); api.add_files(sources_except(api, "client"), "server"); }); From 6b48e8bd8ab6f728101a0f0defad91caf3eccf64 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 2 Apr 2013 13:20:38 -0700 Subject: [PATCH 0004/2352] stuff that doesn't have conflicts --- packages/accounts-base/accounts_common.js | 1 + packages/accounts-base/package.js | 7 +- .../accounts-oauth1-helper/oauth1_binding.js | 1 + packages/accounts-oauth1-helper/package.js | 5 +- packages/accounts-oauth2-helper/package.js | 5 +- packages/accounts-password/package.js | 5 +- packages/accounts-ui-unstyled/package.js | 3 +- packages/accounts-urls/url_client.js | 1 + packages/accounts-urls/url_server.js | 1 + packages/appcache/appcache-client.js | 5 +- packages/coffeescript/package.js | 1 + packages/deps/deps.js | 1 + packages/domutils/domutils.js | 2 + packages/domutils/package.js | 4 +- packages/ejson/ejson.js | 4 +- packages/ejson/package.js | 3 +- packages/email/email.js | 1 + packages/handlebars/package.js | 29 +- packages/htmljs/html.js | 7 + packages/http/package.js | 3 + packages/jsparse/lexer.js | 1 + packages/jsparse/package.js | 2 +- packages/jsparse/parser.js | 1 + packages/jsparse/parserlib.js | 1 + packages/less/package.js | 2 +- packages/livedata/package.js | 2 +- packages/liverange/liverange.js | 2 + packages/liverange/package.js | 2 +- packages/logging/package.js | 1 + packages/meteor/client_environment.js | 1 + packages/meteor/package.js | 2 +- packages/meteor/server_environment.js | 1 + packages/minimongo/minimongo.js | 1 + packages/minimongo/package.js | 6 +- packages/mongo-livedata/package.js | 6 +- packages/ordered-dict/ordered_dict.js | 1 + packages/random/random.js | 1 + packages/routepolicy/package.js | 2 + packages/session/package.js | 3 +- packages/session/session.js | 2 + packages/spark/package.js | 5 +- packages/spark/spark.js | 1 + packages/srp/package.js | 3 + packages/stylus/package.js | 1 + packages/templating/deftemplate.js | 3 + .../evaluate-handlebars.js} | 6 +- packages/templating/html_scanner.js | 6 +- packages/templating/package.js | 31 +- .../parse-handlebars.js} | 1 + packages/templating/scanner_tests.js | 24 +- packages/test-helpers/async_multi.js | 3 +- packages/test-helpers/callback_logger.js | 3 +- packages/test-helpers/canonicalize_html.js | 1 + packages/test-helpers/current_style.js | 3 +- packages/test-helpers/event_simulation.js | 4 + packages/test-helpers/onscreendiv.js | 1 + packages/test-helpers/package.js | 11 +- packages/test-helpers/reactivevar.js | 2 +- packages/test-helpers/seeded_random.js | 5 +- packages/test-helpers/stub_stream.js | 4 + packages/test-helpers/try_all_permutations.js | 1 + packages/test-helpers/wrappedfrag.js | 1 + packages/test-in-browser/package.js | 3 +- packages/tinytest/package.js | 3 +- packages/tinytest/tinytest.js | 4 +- packages/underscore/package.js | 11 + packages/universal-events/listener.js | 2 + packages/universal-events/package.js | 2 +- tools/linker.js | 822 ++++++++++++++++++ 69 files changed, 1006 insertions(+), 90 deletions(-) rename packages/{handlebars/evaluate.js => templating/evaluate-handlebars.js} (98%) rename packages/{handlebars/parse.js => templating/parse-handlebars.js} (99%) create mode 100644 tools/linker.js diff --git a/packages/accounts-base/accounts_common.js b/packages/accounts-base/accounts_common.js index bf2f2328f20..e155b0c49cd 100644 --- a/packages/accounts-base/accounts_common.js +++ b/packages/accounts-base/accounts_common.js @@ -1,3 +1,4 @@ +// @export Accounts if (typeof Accounts === 'undefined') Accounts = {}; diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index ce80b187d58..f486abc798d 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -3,9 +3,11 @@ Package.describe({ }); Package.on_use(function (api) { - api.use('underscore', 'server'); + api.use('underscore', ['client', 'server']); api.use('localstorage', 'client'); - api.use('accounts-urls', 'client'); + api.use('accounts-urls', ['client', 'server']); + api.use('deps', 'client'); + api.use('random', ['client', 'server']); // need this because of the Meteor.users collection but in the future // we'd probably want to abstract this away @@ -24,5 +26,6 @@ Package.on_use(function (api) { Package.on_test(function (api) { api.use('accounts-base'); api.use('tinytest'); + api.use('random'); api.add_files('accounts_tests.js', 'server'); }); diff --git a/packages/accounts-oauth1-helper/oauth1_binding.js b/packages/accounts-oauth1-helper/oauth1_binding.js index 59c0f2b211b..699e52a9b24 100644 --- a/packages/accounts-oauth1-helper/oauth1_binding.js +++ b/packages/accounts-oauth1-helper/oauth1_binding.js @@ -1,6 +1,7 @@ var crypto = Npm.require("crypto"); var querystring = Npm.require("querystring"); +// @export OAuth1Binding // An OAuth1 wrapper around http calls which helps get tokens and // takes care of HTTP headers // diff --git a/packages/accounts-oauth1-helper/package.js b/packages/accounts-oauth1-helper/package.js index 0e15ba5f4f3..c88c07c0f3f 100644 --- a/packages/accounts-oauth1-helper/package.js +++ b/packages/accounts-oauth1-helper/package.js @@ -4,7 +4,7 @@ Package.describe({ }); Package.on_use(function (api) { - api.use('accounts-oauth-helper', 'client'); + api.use('accounts-oauth-helper', ['client', 'server']); api.use('accounts-base', ['client', 'server']); api.add_files('oauth1_binding.js', 'server'); @@ -13,6 +13,9 @@ Package.on_use(function (api) { }); Package.on_test(function (api) { + api.use('tinytest'); + api.use('random'); + api.use('accounts-base'); api.use('accounts-oauth1-helper', 'server'); api.add_files("oauth1_tests.js", 'server'); }); diff --git a/packages/accounts-oauth2-helper/package.js b/packages/accounts-oauth2-helper/package.js index 8acf29c0be7..d9204362c28 100644 --- a/packages/accounts-oauth2-helper/package.js +++ b/packages/accounts-oauth2-helper/package.js @@ -4,7 +4,7 @@ Package.describe({ }); Package.on_use(function (api) { - api.use('accounts-oauth-helper', 'client'); + api.use('accounts-oauth-helper', ['client', 'server']); api.use('accounts-base', ['client', 'server']); api.add_files('oauth2_common.js', ['client', 'server']); @@ -12,6 +12,9 @@ Package.on_use(function (api) { }); Package.on_test(function (api) { + api.use('tinytest'); + api.use('random'); + api.use('accounts-base'); api.use('accounts-oauth2-helper', 'server'); api.add_files("oauth2_tests.js", 'server'); }); diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index 3c9bf018246..a3724a99fbb 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -6,6 +6,8 @@ Package.on_use(function(api) { api.use('accounts-base', ['client', 'server']); api.use('srp', ['client', 'server']); api.use('email', ['server']); + api.use('random', ['server']); + api.use('underscore'); api.add_files('email_templates.js', 'server'); api.add_files('password_server.js', 'server'); @@ -14,7 +16,8 @@ Package.on_use(function(api) { }); Package.on_test(function(api) { - api.use(['accounts-password', 'tinytest', 'test-helpers', 'deps']); + api.use(['accounts-password', 'tinytest', 'test-helpers', 'deps', + 'accounts-base', 'random', 'email', 'underscore']); api.add_files('password_tests_setup.js', 'server'); api.add_files('password_tests.js', ['client', 'server']); api.add_files('email_tests_setup.js', 'server'); diff --git a/packages/accounts-ui-unstyled/package.js b/packages/accounts-ui-unstyled/package.js index 66c3997f801..d5090b86c71 100644 --- a/packages/accounts-ui-unstyled/package.js +++ b/packages/accounts-ui-unstyled/package.js @@ -3,7 +3,8 @@ Package.describe({ }); Package.on_use(function (api) { - api.use(['accounts-urls', 'accounts-base', 'underscore', 'templating'], 'client'); + api.use(['accounts-urls', 'accounts-base', 'underscore', 'templating', + 'handlebars', 'spark', 'session'], 'client'); api.add_files([ 'accounts_ui.js', diff --git a/packages/accounts-urls/url_client.js b/packages/accounts-urls/url_client.js index cb0fb714b2d..0130250ce2e 100644 --- a/packages/accounts-urls/url_client.js +++ b/packages/accounts-urls/url_client.js @@ -1,3 +1,4 @@ +// @export Accounts if (typeof Accounts === 'undefined') Accounts = {}; diff --git a/packages/accounts-urls/url_server.js b/packages/accounts-urls/url_server.js index 898b8f3cd94..6cb4e85fb26 100644 --- a/packages/accounts-urls/url_server.js +++ b/packages/accounts-urls/url_server.js @@ -1,3 +1,4 @@ +// @export Accounts if (typeof Accounts === 'undefined') Accounts = {}; diff --git a/packages/appcache/appcache-client.js b/packages/appcache/appcache-client.js index 02b2c6c5582..3c5afd527c5 100644 --- a/packages/appcache/appcache-client.js +++ b/packages/appcache/appcache-client.js @@ -1,5 +1,4 @@ -if (! window.applicationCache) - return; +if (window.applicationCache) { var appCacheStatuses = [ 'uncached', @@ -65,3 +64,5 @@ window.applicationCache.addEventListener('obsolete', (function() { Meteor._reload.reload(); } }), false); + +} // if window.applicationCache \ No newline at end of file diff --git a/packages/coffeescript/package.js b/packages/coffeescript/package.js index e8884d59597..ae2dea45ebf 100644 --- a/packages/coffeescript/package.js +++ b/packages/coffeescript/package.js @@ -31,6 +31,7 @@ Package.register_extension("coffee", coffeescript_handler); Package.register_extension("litcoffee", coffeescript_handler); Package.on_test(function (api) { + api.use(['coffeescript', 'tinytest']); api.add_files([ 'coffeescript_tests.coffee', 'coffeescript_strict_tests.coffee', diff --git a/packages/deps/deps.js b/packages/deps/deps.js index 21f4afc32bf..fd41fe323bb 100644 --- a/packages/deps/deps.js +++ b/packages/deps/deps.js @@ -1,3 +1,4 @@ +// @export Deps Deps = {}; Deps.active = false; Deps.currentComputation = null; diff --git a/packages/domutils/domutils.js b/packages/domutils/domutils.js index ae4b560032e..33d1b134157 100644 --- a/packages/domutils/domutils.js +++ b/packages/domutils/domutils.js @@ -1,4 +1,6 @@ +// @export DomUtils DomUtils = {}; + var qsaFindAllBySelector = function (selector, contextNode) { // If IE7 users report the following error message, you // can fix it with "meteor add jquery". diff --git a/packages/domutils/package.js b/packages/domutils/package.js index b50751a5d75..f23c6253e77 100644 --- a/packages/domutils/package.js +++ b/packages/domutils/package.js @@ -12,12 +12,14 @@ Package.on_use(function (api) { // cut this dependency. api.use('jquery', 'client'); + api.use('underscore', 'client'); + api.add_files('domutils.js', 'client'); }); Package.on_test(function (api) { api.use(['tinytest']); - api.use(['domutils', 'test-helpers'], 'client'); + api.use(['domutils', 'test-helpers', 'underscore'], 'client'); api.add_files([ 'domutils_tests.js' diff --git a/packages/ejson/ejson.js b/packages/ejson/ejson.js index 02c7a8f6039..06d557c9530 100644 --- a/packages/ejson/ejson.js +++ b/packages/ejson/ejson.js @@ -1,4 +1,6 @@ -EJSON = {}; // Global! +// @export EJSON +EJSON = {}; + var customTypes = {}; // Add a custom type, using a method of your choice to get to and // from a basic JSON-able representation. The factory argument diff --git a/packages/ejson/package.js b/packages/ejson/package.js index d436824efb6..37ec473acc7 100644 --- a/packages/ejson/package.js +++ b/packages/ejson/package.js @@ -4,13 +4,14 @@ Package.describe({ }); Package.on_use(function (api) { - api.use('json'); + api.use(['json', 'underscore']); api.add_files('ejson.js', ['client', 'server']); api.add_files('base64.js', ['client', 'server']); }); Package.on_test(function (api) { api.use('ejson', ['client', 'server']); + api.use(['tinytest', 'underscore']); api.add_files('base64_test.js', ['client', 'server']); api.add_files('ejson_test.js', ['client', 'server']); diff --git a/packages/email/email.js b/packages/email/email.js index 497ba517010..ecba64c9b10 100644 --- a/packages/email/email.js +++ b/packages/email/email.js @@ -1,3 +1,4 @@ +// @export Email Email = {}; var Future = Npm.require('fibers/future'); diff --git a/packages/handlebars/package.js b/packages/handlebars/package.js index 958682a14f5..06f061ae156 100644 --- a/packages/handlebars/package.js +++ b/packages/handlebars/package.js @@ -1,23 +1,16 @@ -// XXX this is hella confusing. this package really only has the -// handlebars *runtime*, for precompiled templates. so really it is an -// internal package that should get shipped down to the client iff you -// have a precompiled handlebars template in your project. - Package.describe({ - summary: "Simple semantic templating language" + summary: "Simple semantic templating language", + internal: true }); -Package._require('parse.js'); // needed at bundle time - Package.on_use(function (api) { - // XXX should only be sent if we have handlebars templates in the app.. - api.add_files('evaluate.js', 'client'); - api.add_files('parse.js', 'server'); // needed on server for tests - - api.use('underscore', 'client'); + // XXX This package has been folded into the 'templating' package + // for now. Historically, you could see it in your package list + // (because it didn't have internal: true, which it probably should + // have), but adding it didn't do anything (because it just + // contained the handlebars precompiler and runtime, not any + // functions you could call yourself.) So leave it around as an + // empty package for the moment so as to not break the projects of + // anyone that happened to type 'meteor add handlebars' because they + // thought they had to. }); - -// XXX lots more to do here .. registering this a templating engine, -// making it the default default, providing the compiler code, -// depending on the node package (or packaging the compiler -// ourselves..) diff --git a/packages/htmljs/html.js b/packages/htmljs/html.js index 1325ed1503c..231f2953154 100644 --- a/packages/htmljs/html.js +++ b/packages/htmljs/html.js @@ -69,6 +69,13 @@ var tag_names = 'P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG SUB SUP ' + 'TABLE TBODY TD TEXTAREA TFOOT TH THEAD TR TT U UL VAR').split(' '); +// @export A, ABBR, ACRONYM, B, BDO, BIG, BLOCKQUOTE, BR, BUTTON, CAPTION +// @export CITE, CODE, COL, COLGROUP, DD, DEL, DFN, DIV, DL, DT, EM, FIELDSET +// @export FORM, H1, H2, H3, H4, H5, H6, HR, I, IFRAME, IMG, INPUT, INS, KBD +// @export LABEL, LEGEND, LI, OBJECT, OL, OPTGROUP, OPTION, P, PARAM, PRE, Q +// @export S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP +// @export TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR + for (var i = 0; i < tag_names.length; i++) { var tag = tag_names[i]; diff --git a/packages/http/package.js b/packages/http/package.js index 5bd116f04aa..ef198a5ddaa 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -3,12 +3,15 @@ Package.describe({ }); Package.on_use(function (api) { + api.use('underscore'); api.add_files('httpcall_common.js', ['client', 'server']); api.add_files('httpcall_client.js', 'client'); api.add_files('httpcall_server.js', 'server'); }); Package.on_test(function (api) { + api.use('underscore'); + api.use('random'); api.use('jquery', 'client'); api.use('http', ['client', 'server']); api.use('test-helpers', ['client', 'server']); diff --git a/packages/jsparse/lexer.js b/packages/jsparse/lexer.js index 6a4fdb75b7e..db7e2e1676e 100644 --- a/packages/jsparse/lexer.js +++ b/packages/jsparse/lexer.js @@ -255,6 +255,7 @@ Lexeme.prototype.toString = function () { // Thie flag can be read and set manually to affect the // parsing of the next token. +// @export JSLexer JSLexer = function (code) { this.code = code; this.pos = 0; diff --git a/packages/jsparse/package.js b/packages/jsparse/package.js index 3cb8c685a75..3b09def1bea 100644 --- a/packages/jsparse/package.js +++ b/packages/jsparse/package.js @@ -9,7 +9,7 @@ Package.on_use(function (api) { }); Package.on_test(function (api) { - api.use('tinytest'); + api.use(['tinytest', 'underscore']); api.use('jsparse', 'client'); api.add_files('parser_tests.js', diff --git a/packages/jsparse/parser.js b/packages/jsparse/parser.js index 7fd4f0ed93b..a57c753ad51 100644 --- a/packages/jsparse/parser.js +++ b/packages/jsparse/parser.js @@ -26,6 +26,7 @@ var makeSet = function (array) { }; +// @export JSParser JSParser = function (code, options) { this.lexer = new JSLexer(code); this.oldToken = null; diff --git a/packages/jsparse/parserlib.js b/packages/jsparse/parserlib.js index e17a5d9c055..25e50c8f5e3 100644 --- a/packages/jsparse/parserlib.js +++ b/packages/jsparse/parserlib.js @@ -6,6 +6,7 @@ var isArray = function (obj) { return obj && (typeof obj === 'object') && (typeof obj.length === 'number'); }; +// @export ParseNode ParseNode = function (name, children) { this.name = name; this.children = children; diff --git a/packages/less/package.js b/packages/less/package.js index 3f6e53c268d..6c3039e9796 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -49,6 +49,6 @@ Package.register_extension( Package.register_extension("lessimport", function () {}); Package.on_test(function (api) { - api.use('test-helpers'); + api.use(['test-helpers', 'tinytest', 'less']); api.add_files(['less_tests.less', 'less_tests.js'], 'client'); }); diff --git a/packages/livedata/package.js b/packages/livedata/package.js index 4bc45aece7d..785d2728261 100644 --- a/packages/livedata/package.js +++ b/packages/livedata/package.js @@ -41,7 +41,7 @@ Package.on_test(function (api) { api.use('livedata', ['client', 'server']); api.use('mongo-livedata', ['client', 'server']); api.use('test-helpers', ['client', 'server']); - api.use('tinytest'); + api.use(['underscore', 'tinytest', 'random', 'deps']); api.add_files('livedata_connection_tests.js', ['client', 'server']); api.add_files('livedata_tests.js', ['client', 'server']); diff --git a/packages/liverange/liverange.js b/packages/liverange/liverange.js index cbedb0194f6..b68d7aaef6d 100644 --- a/packages/liverange/liverange.js +++ b/packages/liverange/liverange.js @@ -89,6 +89,8 @@ var wrapEndpoints = function (start, end) { // // XXX Should eventually support LiveRanges where start === end // and start.parentNode is null. +// +// @export LiveRange LiveRange = function (tag, start, end, inner) { if (start.nodeType === 11 /* DocumentFragment */) { end = start.lastChild; diff --git a/packages/liverange/package.js b/packages/liverange/package.js index 8c5445e0aa0..daead7b09b3 100644 --- a/packages/liverange/package.js +++ b/packages/liverange/package.js @@ -9,7 +9,7 @@ Package.on_use(function (api) { Package.on_test(function (api) { api.use(['tinytest']); - api.use(['liverange', 'test-helpers', 'domutils'], 'client'); + api.use(['liverange', 'test-helpers', 'domutils', 'underscore'], 'client'); api.add_files([ 'liverange_test_helpers.js', diff --git a/packages/logging/package.js b/packages/logging/package.js index e535df7cffa..988db7830a0 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -9,6 +9,7 @@ Package.on_use(function (api, where) { }); Package.on_test(function (api) { + api.use('tinytest'); api.use('logging', 'client'); api.add_files('logging_test.js', 'client'); }); diff --git a/packages/meteor/client_environment.js b/packages/meteor/client_environment.js index 6405709e300..0846ff203b5 100644 --- a/packages/meteor/client_environment.js +++ b/packages/meteor/client_environment.js @@ -1,3 +1,4 @@ +// @export Meteor Meteor = { isClient: true, isServer: false diff --git a/packages/meteor/package.js b/packages/meteor/package.js index dafe07c0901..b06975c9c1e 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -51,7 +51,7 @@ Package.on_use(function (api, where) { }); Package.on_test(function (api) { - api.use('tinytest'); + api.use(['underscore', 'tinytest']); api.add_files('client_environment_test.js', 'client'); api.add_files('server_environment_test.js', 'server'); diff --git a/packages/meteor/server_environment.js b/packages/meteor/server_environment.js index 254e60f7862..86a6c5a7279 100644 --- a/packages/meteor/server_environment.js +++ b/packages/meteor/server_environment.js @@ -1,3 +1,4 @@ +// @export Meteor Meteor = { isClient: false, isServer: true diff --git a/packages/minimongo/minimongo.js b/packages/minimongo/minimongo.js index ceac91e251a..95392946b30 100644 --- a/packages/minimongo/minimongo.js +++ b/packages/minimongo/minimongo.js @@ -7,6 +7,7 @@ // LiveResultsSet: the return value of a live query. +// @export LocalCollection LocalCollection = function () { this.docs = {}; // _id -> document (also containing id) diff --git a/packages/minimongo/package.js b/packages/minimongo/package.js index c7ee043b58a..afa3ba3f69a 100644 --- a/packages/minimongo/package.js +++ b/packages/minimongo/package.js @@ -8,7 +8,8 @@ Package.on_use(function (api, where) { // It would be sort of nice if minimongo didn't depend on // underscore, so we could ship it separately. - api.use(['underscore', 'json', 'ejson', 'ordered-dict', 'random'], where); + api.use(['underscore', 'json', 'ejson', 'ordered-dict', 'deps', + 'random', 'ordered-dict'], where); api.add_files([ 'minimongo.js', 'selector.js', @@ -21,6 +22,7 @@ Package.on_use(function (api, where) { Package.on_test(function (api) { api.use('minimongo', 'client'); api.use('test-helpers', 'client'); - api.use('tinytest'); + api.use(['tinytest', 'underscore', 'ejson', 'ordered-dict', + 'random', 'deps']); api.add_files('minimongo_tests.js', 'client'); }); diff --git a/packages/mongo-livedata/package.js b/packages/mongo-livedata/package.js index 8b0b21ac371..9178c1163ae 100644 --- a/packages/mongo-livedata/package.js +++ b/packages/mongo-livedata/package.js @@ -15,7 +15,8 @@ Package.describe({ Npm.depends({mongodb: "1.2.13"}); Package.on_use(function (api) { - api.use(['random', 'ejson', 'json', 'underscore', 'minimongo', 'logging', 'livedata'], + api.use(['random', 'ejson', 'json', 'underscore', 'minimongo', 'logging', + 'livedata', 'deps'], ['client', 'server']); api.add_files('mongo_driver.js', 'server'); @@ -26,8 +27,7 @@ Package.on_use(function (api) { Package.on_test(function (api) { api.use('mongo-livedata'); - api.use('tinytest'); - api.use('test-helpers'); + api.use(['tinytest', 'underscore', 'test-helpers', 'ejson', 'random']); // XXX test order dependency: the allow_tests "partial allow" test // fails if it is run before mongo_livedata_tests. api.add_files('mongo_livedata_tests.js', ['client', 'server']); diff --git a/packages/ordered-dict/ordered_dict.js b/packages/ordered-dict/ordered_dict.js index 9e422766c71..51bb71ae175 100644 --- a/packages/ordered-dict/ordered_dict.js +++ b/packages/ordered-dict/ordered_dict.js @@ -1,3 +1,4 @@ +// @export OrderedDict // This file defines an ordered dictionary abstraction that is useful for // maintaining a dataset backed by observeChanges. It supports ordering items // by specifying the item they now come before. diff --git a/packages/random/random.js b/packages/random/random.js index ace3331a007..7b8aecdafb0 100644 --- a/packages/random/random.js +++ b/packages/random/random.js @@ -1,3 +1,4 @@ +// @export Random Random = {}; // see http://baagoe.org/en/wiki/Better_random_numbers_for_javascript diff --git a/packages/routepolicy/package.js b/packages/routepolicy/package.js index 526aa130df0..3060100b4a4 100644 --- a/packages/routepolicy/package.js +++ b/packages/routepolicy/package.js @@ -4,9 +4,11 @@ Package.describe({ }); Package.on_use(function (api) { + api.use('underscore', 'server'); api.add_files('routepolicy.js', 'server'); }); Package.on_test(function (api) { + api.use(['routepolicy', 'tinytest']); api.add_files(['routepolicy_tests.js'], 'server'); }); diff --git a/packages/session/package.js b/packages/session/package.js index 338dcfbcdd8..66d393e2559 100644 --- a/packages/session/package.js +++ b/packages/session/package.js @@ -4,7 +4,7 @@ Package.describe({ }); Package.on_use(function (api) { - api.use(['underscore', 'reactive-dict'], 'client'); + api.use(['underscore', 'reactive-dict', 'ejson'], 'client'); // XXX what I really want to do is ensure that if 'reload' is going to // be loaded, it should be loaded before 'session'. Session can work @@ -17,5 +17,6 @@ Package.on_use(function (api) { Package.on_test(function (api) { api.use('tinytest'); api.use('session', 'client'); + api.use('deps'); api.add_files('session_tests.js', 'client'); }); diff --git a/packages/session/session.js b/packages/session/session.js index d215044f6e5..e1a37ba780e 100644 --- a/packages/session/session.js +++ b/packages/session/session.js @@ -5,6 +5,8 @@ if (Meteor._reload) { migratedKeys = migrationData.keys; } } + +// @export Session Session = new ReactiveDict(migratedKeys); if (Meteor._reload) { diff --git a/packages/spark/package.js b/packages/spark/package.js index cf72ce2ea26..bc89c750535 100644 --- a/packages/spark/package.js +++ b/packages/spark/package.js @@ -5,7 +5,7 @@ Package.describe({ Package.on_use(function (api) { api.use(['underscore', 'random', 'domutils', 'liverange', 'universal-events', - 'ordered-dict'], + 'ordered-dict', 'deps', 'ejson'], 'client'); api.add_files(['spark.js', 'patch.js', 'convenience.js', @@ -13,7 +13,8 @@ Package.on_use(function (api) { }); Package.on_test(function (api) { - api.use('tinytest'); + api.use(['tinytest', 'underscore', 'liverange', 'deps', 'domutils', + 'minimongo', 'random']); api.use(['spark', 'test-helpers'], 'client'); api.add_files('test_form_responder.js', 'server'); diff --git a/packages/spark/spark.js b/packages/spark/spark.js index b94a72092b2..3cfbcdaff88 100644 --- a/packages/spark/spark.js +++ b/packages/spark/spark.js @@ -25,6 +25,7 @@ // timer' button again. the problem is almost certainly in afterFlush // (not hard to see what it is.) +// @export Spark Spark = {}; Spark._currentRenderer = (function () { diff --git a/packages/srp/package.js b/packages/srp/package.js index 2c18d5a3ea4..6216f240193 100644 --- a/packages/srp/package.js +++ b/packages/srp/package.js @@ -5,11 +5,14 @@ Package.describe({ Package.on_use(function (api) { api.use(['random', 'check'], ['client', 'server']); + api.use('underscore'); api.add_files(['biginteger.js', 'sha256.js', 'srp.js'], ['client', 'server']); }); Package.on_test(function (api) { + api.use('tinytest'); api.use('srp', ['client', 'server']); + api.use('underscore'); api.add_files(['srp_tests.js'], ['client', 'server']); }); diff --git a/packages/stylus/package.js b/packages/stylus/package.js index 7dfffaf8f18..f140978025f 100644 --- a/packages/stylus/package.js +++ b/packages/stylus/package.js @@ -33,5 +33,6 @@ Package.register_extension( ); Package.on_test(function (api) { + api.use(['tinytest', 'stylus', 'test-helpers']) api.add_files(['stylus_tests.styl', 'stylus_tests.js'], 'client'); }); diff --git a/packages/templating/deftemplate.js b/packages/templating/deftemplate.js index 047878728e1..0ea4896f852 100644 --- a/packages/templating/deftemplate.js +++ b/packages/templating/deftemplate.js @@ -1,3 +1,6 @@ +// @export Template +Template = {}; + Meteor._partials = {}; // XXX Handlebars hooking is janky and gross diff --git a/packages/handlebars/evaluate.js b/packages/templating/evaluate-handlebars.js similarity index 98% rename from packages/handlebars/evaluate.js rename to packages/templating/evaluate-handlebars.js index 31403fd1a7a..0345d93d788 100644 --- a/packages/handlebars/evaluate.js +++ b/packages/templating/evaluate-handlebars.js @@ -1,3 +1,4 @@ +// @export Handlebars Handlebars = {}; // XXX we probably forgot to implement the #foo case where foo is not @@ -28,10 +29,7 @@ Handlebars.json_ast_to_func = function (ast) { // what is passed in via named arguments. Handlebars._default_helpers = { 'with': function (data, options) { - if (!data || (data instanceof Array && !data.length)) - return options.inverse(this); - else - return options.fn(data); + return options.fn(data); }, 'each': function (data, options) { var parentData = this; diff --git a/packages/templating/html_scanner.js b/packages/templating/html_scanner.js index 02563397636..96569bfe6b0 100644 --- a/packages/templating/html_scanner.js +++ b/packages/templating/html_scanner.js @@ -1,5 +1,5 @@ - -/*global*/ html_scanner = { +// @export html_scanner +html_scanner = { // Scan a template file for , , and