Commit Graph

22356 Commits

Author SHA1 Message Date
Naomi Seyfer
5d93d60aa6 All tests now pass after switching the defualt Collection to ObjectID
**Caveats:**
 - I have not written any more tests; I perhaps should
 - I have not yet written any code to keep current Collections from mixing
   strings and ObjectIDs
 - I don't actually know if the default should be ObjectID.  I should discuss
    with people about this.
2013-01-17 15:41:18 -05:00
Naomi Seyfer
f8fefe7aae Force all keys inside minimongo to be strings
... but preserve other types on the outside of minimongo.
So far passing all current regression tests, but moment of truth
when we switch over to ObjectID yet to come.
2013-01-17 15:39:57 -05:00
Naomi Seyfer
432e8ccd98 ObjectID as a value in DDP 2013-01-17 15:30:25 -05:00
Naomi Seyfer
33e0a52c5c ObjectId conversion to/from DDP ids 2013-01-17 15:30:24 -05:00
Naomi Seyfer
1de0a87b84 Client-side ObjectId object 2013-01-17 15:29:51 -05:00
Naomi Seyfer
3b16ca8aa6 Various tests for new data types in DDP:
Test for a document with a date; full stack

Test and fix for method invocation with a Date

Tests for literal
2013-01-17 15:29:51 -05:00
Naomi Seyfer
5454ccbd9f Extended types for DDP
This is a first pass for now; it doesn't support all the types
we will eventually support, and it may be in flux in terms of the exact
format for a little while yet.  Also I need to write tests.

But the outline is there.
2013-01-17 15:29:49 -05:00
Naomi Seyfer
933fe4c6fc Fix new test to work with ddp-pre1 2013-01-17 15:29:07 -05:00
Naomi Seyfer
2f57c23321 Changed new test to deal with new ddp format 2013-01-17 15:29:07 -05:00
Naomi Seyfer
48203263e3 In the client, now all internal "abstract ddp" uses fieldName: undefined
Instead of a cleared list.  The wire format still has a cleared list.
2013-01-17 15:29:05 -05:00
Naomi Seyfer
f2209076e1 In the server, all internal changed messages now have fieldName: undefined
to mean that the field was cleared, instead of a separate clear list.

Wire format will still have separate clear list
Next step is making a similar change on the client.
2013-01-17 15:25:52 -05:00
David Glasser
a709cfb4ec Version negotiation: feedback from review. 2013-01-17 15:25:01 -05:00
David Glasser
a93567eed1 Change removed messages to just take a single ID. 2013-01-17 15:25:01 -05:00
Naomi Seyfer
91b1f3b15c Workshopping words on the publish docs 2013-01-17 15:25:01 -05:00
David Glasser
5bf45d1ec6 Version negotiation. 2013-01-17 15:25:01 -05:00
Naomi Seyfer
daa559366c Modified docs to reflect ddp-pre1 and new publish handler api 2013-01-17 15:24:28 -05:00
Naomi Seyfer
677a43fe19 Updated python DDP client to ddp-pre1 2013-01-17 15:23:24 -05:00
Naomi Seyfer
c2e80dbdac Simplify added code, fix a bug where we were doubling sending _id on the wire 2013-01-17 15:23:24 -05:00
Naomi Seyfer
e2129a8559 added test for empty docs 2013-01-17 15:23:24 -05:00
David Glasser
c5659b6b5a Because we now can have empty objects client-side, we don't need to fake one in
Meteor.user.

(Note that if the user object is deleted from the DB after login, you can get
Meteor.userId non-null with Meteor.user null, but arguably this is a feature.)
2013-01-17 15:23:24 -05:00
David Glasser
001cbcb337 Fix concurrency issue with yielding runHandler.
All tests now pass.
2013-01-17 15:23:24 -05:00
David Glasser
8f64942dac Should not be in loop. 2013-01-17 15:23:24 -05:00
David Glasser
4a1db97dc8 Clear fields properly. 2013-01-17 15:23:24 -05:00
David Glasser
0e786a41c8 More fixes for DDP rewrite. 'livedata' tests pass. 2013-01-17 15:23:24 -05:00
David Glasser
8b44dc1757 Fix order of arguments. 2013-01-17 15:23:24 -05:00
Naomi Seyfer
e4395720f3 Most of livedata_connection_tests adjusted 2013-01-17 15:23:24 -05:00
Naomi Seyfer
a9104afe5b Attempting to get set userid working 2013-01-17 15:23:24 -05:00
Naomi Seyfer
052e393203 tinytest support for ddp-pre1 2013-01-17 15:23:23 -05:00
Naomi Seyfer
6873f4acc1 Some self=this adjustments and now basic apps work 2013-01-17 15:23:23 -05:00
Naomi Seyfer
cc2a5d3ffb Client-side changes so ddp-pre1 affects minimongo 2013-01-17 15:23:23 -05:00
David Glasser
070bfc72ba DDP-pre1 sends "method updated" messages as msg=updated, not msg=data. 2013-01-17 15:23:23 -05:00
Naomi Seyfer
ec8b46033a mongo_driver.js modified to use added-changed-removed. Tests do not pass yet 2013-01-17 15:23:23 -05:00
David Glasser
36fe3033cb Fix bug in _SessionDocumentView where objects are not maps.
Generally clean up use of 'in'.
2013-01-17 15:23:23 -05:00
Naomi Seyfer
c915c375c7 First stage of ddp-pre1 plumbing: livedata-server.js 2013-01-17 15:23:23 -05:00
Naomi Seyfer
9c96cf6718 Change added api to have id separately 2013-01-17 15:23:23 -05:00
David Glasser
1f122da21e Fix use of incorrect variable name. 2013-01-17 15:23:23 -05:00
David Glasser
6cc809b956 Avoid unnecessary equality comparison in clearField.
Minor test changes.
2013-01-17 15:23:23 -05:00
Naomi Seyfer
81940c9859 Lots of tests for the merge box 2013-01-17 15:23:23 -05:00
Naomi Seyfer
fbc787cd1d Finished reimplementation of merge box. Needs more tests 2013-01-17 15:23:22 -05:00
Naomi Seyfer
bbb127c3ca Beginning a system for merging subscriptions in the session.
So far just one v. small test, and enough of a shim to get it to pass.
2013-01-17 15:23:19 -05:00
David Glasser
c054d16589 Merge branch 'fibers-uglify-upgrade' into devel
This branch:

 - Updates fibers to 1.0.0, which hopefully fixes crash/stack overflow
   issues. This version stops exporting a global 'Fiber' object which
   means some server code needs to do some more requires.

 - Updates uglify-js to (a Meteor bugfix fork) off of 2.2.3. This is a complete
   rewrite of Uglify and appears to fix infinite recursion bugs that were
   discovered on the engine branch and while investigating lodash. We also now
   are able to minify all code in one pass instead of as separate pieces.

 - Stops using a Meteor bugfix fork of fstream, because they have taken our
   fork. This also affects the nested copy used by tar.
2013-01-16 15:45:00 -05:00
David Glasser
24d652af3e Stop using our fork of fstream. 2013-01-16 15:12:42 -05:00
David Glasser
21db9164d4 Use our fork of uglify-js2. 2013-01-16 15:12:28 -05:00
David Glasser
2aa92b2ed3 Update to use APIs from new versions of fibers and uglify-js.
Combine files before minimizing.

minimongo - subkey sort fails when minized, so clearly there is some sort of
uglify bug.
2013-01-16 11:34:30 -05:00
David Glasser
f80a20cecf Bump bundle version again, since we'd already put a 0.2.13 with websocket in s3
and runner machines.
2013-01-16 10:54:15 -05:00
David Glasser
56412f259f Also include websocket while we're at it, since we know we'll be using that soon
for server-to-server DDP.
2013-01-16 10:52:18 -05:00
David Glasser
6785ac2d87 Bump bundle version. 2013-01-16 10:48:39 -05:00
David Glasser
3a99938dff Upgrade Fibers to 1.0.0 and UglifyJS to 2.2.3.
This definitely won't "work" because both have API changes.

UglifyJS 1 was having issues minifying certain code (eg lodash).  But UglifyJS 2
was occasionally segfaulting (as was other code using large regexps).  See the
bottom of https://github.com/laverdet/node-fibers/issues/89

Hopefully this will fix it.
2013-01-16 10:47:57 -05:00
David Glasser
27d3073660 Make Meteor.autosubscribe a deprecated alias for Meteor.autorun.
Instead of a general client-side sub de-duping mechanism (which mostly existed
for the sake of autosubscribe, and causes issues with server-driven
unsubscribes), make Meteor.subscribe explicitly aware of reactivity.

Expose an "invalidated" flag on Meteor.deps.Context.

Guarantee that invalidation callbacks from different contexts will not be
interleaved at flush time. This has the implication that if you do

   context1.onInvalidate(function () {
     context2.invalidate();
   });

and this is the only way to invalidate context2, then context2's invalidation
callbacks will not be called until after *ALL* of context1's callbacks are
called. This allows us to be sure that the "unsubscribe, unless autorun tried to
re-create an identical sub" logic runs after the autorun function is rerun.
2013-01-15 17:07:03 -05:00
Andrew Brampton
435c664c8b Ignore example directories that begin with a period. This avoids 'meteor create --list' displaying .gitignore. 2013-01-12 14:32:27 -08:00