Commit Graph

2465 Commits

Author SHA1 Message Date
David Glasser
4c2bc76c7e EJSON: Remove serializeForEval method, no longer needed with new selector
compiler.
2013-02-04 17:47:06 -08:00
David Glasser
eaff6f3b00 Merge branch 'devel' into ddp-pre1-selector-compiler-rewrite
Note: some tests fail. Will be resolved before merging to ddp-pre1.

Conflicts:
	packages/minimongo/selector.js
2013-02-04 17:46:22 -08:00
Naomi Seyfer
1ca1f565d1 Partially change observe API to new one
Code now calls addedAt, etc. on ordered observes.
Not yet changed to autodetect observe orderedness by method names.

Tests pass.  Have not changed examples yet, nor docs.
2013-02-04 17:03:29 -08:00
David Glasser
baceda9d65 Merge branch 'selector-compiler-rewrite' into devel
This is a complete rewrite of the Minimongo selector and sort compiler to no
longer use eval, started by @Ed-von-Schleck and finished by @glasser. It makes
the code more readable and no longer requires all queryable types to be
serializable in an eval-able way; the latter will be useful once the in-process
EJSON work on the ddp-pre1 branch is ready.

(It also makes selector compilation faster, though selector evaluation appears
to be very slightly slower.)
2013-02-04 16:42:47 -08:00
David Glasser
3bdf41add1 Rewrite sort compiler to avoid eval, too! 2013-02-04 16:42:18 -08:00
Naomi Seyfer
a866689c6a Escaping in EJSON only goes one level 2013-02-04 16:12:49 -08:00
Naomi Seyfer
d92628020f Refactor Spark to use observeChanges instead of observe
It uses an orderedDict instead of an array, and also this new version happens to
not do a ton of splices, which might help with performance in cases for really
large numbers of items.  Anyway, introduced a dependency on LocalCollection;
will break that soon.
2013-02-04 14:42:45 -08:00
David Glasser
0567a730b1 Rewrite selector compiler against with a "compile to specific function"
approach.
2013-02-04 14:32:12 -08:00
David Glasser
2692192547 Some modifications to Ed-von-Schleck's selector compiler patch:
- Improve regex match against array.
- Improve matching of explicit deep nulls.
- Instead of doing a high-level "catch TypeError", do more explicit
  type checks.
- Clone the selector (since we're going to save a reference in our
  closure).
2013-02-04 14:32:12 -08:00
Christian Schramm
012e1947be Replaced _compileSelector logic with non-eval'd code.
Implement $elemMatch.

(Commits squashed together by glasser, and some now-dead code removed.)
2013-02-04 14:32:12 -08:00
David Glasser
90afe9e9d5 New onError callback to Meteor.subscribe.
This callback receives any terminating error from a subscription. Currently this
can only be because the subscription is unknown, but soon subscriptions will be
able to send other errors.

Also, adjust the semantics of ready callbacks in a reactive context to only call
the latest instance of the callback rather than all callbacks.
2013-02-04 13:20:21 -08:00
Nick Martin
420e50996b Merge pull request #659 from timhaines/update-twitter-api-to-v.1.1
Use Twitter API v1.1 to verify_credentials
2013-02-02 16:46:55 -08:00
Tim Haines
6b8ca56a41 Use Twitter API v1.1 to verify_credentials 2013-02-02 15:57:28 -08:00
Kevin Miller
8faeb1e303 Fixed link to stack overflow in docs. 2013-02-01 23:53:32 -08:00
David Glasser
78b5ee5e7d When a stream is force-disconnected, don't restart its heartbeat timer.
Accomplish this in two ways:
  - Explicitly making sure not to restart the timer on disconnected streams.
  - Run the "restart heartbeat" code before processing incoming messages,
    not after, since even the "failed" message that caused a disconnect
    was running the "restart heartbeat" code.
2013-02-01 17:43:44 -08:00
Naomi Seyfer
39fa69e90c Fixed infinite recursion due to missing _suppress_inital 2013-02-01 16:44:05 -08:00
Naomi Seyfer
e1aa360b98 Merge branch 'devel' into ddp-pre1
Now don't require _id to be unset on insert anymore.

Some error handling around duplicate _id

Conflicts:
	packages/minimongo/minimongo.js
	packages/mongo-livedata/collection.js
	packages/mongo-livedata/mongo_livedata_tests.js
2013-02-01 16:10:18 -08:00
Naomi Seyfer
d76562f0fb Docuentation for allowing _id to be spec by the user 2013-02-01 15:24:45 -08:00
Naomi Seyfer
031d4dc103 Stop requiring _id to be specified by the insert() code.
Now users can put _id into their documents prior to insert, and insert() will
respect that.  This is useful if you want to write any Meteor Method that inserts
documents -- it allows you to have the same ID on both client and server, so you
don't get flicker when the server document wins
2013-02-01 15:24:45 -08:00
Nick Martin
6c849f72a2 Merge branch 'pr-615' into devel 2013-02-01 15:22:33 -08:00
Nick Martin
fb3aafc794 Rework text a bit. 2013-02-01 15:22:01 -08:00
Miles Matthias
b013c573ea Adding documentation explaining Collections in the introductory Data section, fixes #149. 2013-02-01 15:07:51 -08:00
Nick Martin
514bf73807 Move serverId to __meteor_runtime_config__. This prevents a race condition where the server restarts between when the client loads app.html and when it makes a DDP connection. Fixes #653. Thanks @awwx! 2013-02-01 12:21:08 -08:00
Naomi Seyfer
4599e03133 observeChanges for invalidating instead of observe 2013-02-01 11:45:53 -08:00
Nick Martin
df93f65bb3 Merge branch 'pr-628' into devel 2013-02-01 11:21:17 -08:00
Nick Martin
48010de100 Comment on app.manifest exclusion. 2013-02-01 11:20:22 -08:00
Andrew Wilcox
0fcb503fa4 also exclude app.manifest from returning app_html 2013-02-01 11:15:59 -08:00
Naomi Seyfer
3d2573ecab Glasser comments on ordered_dict 2013-01-31 14:21:40 -08:00
Naomi Seyfer
5b4cf240f0 This time actually changing the right ordered_dict 2013-01-31 14:10:54 -08:00
Naomi Seyfer
dc33617804 Writing prose about code; mostly ordereddict 2013-01-31 14:08:22 -08:00
Naomi Seyfer
39f4b5edc2 Fixing the giant comment in diff.js to be descriptive again 2013-01-31 13:54:14 -08:00
Naomi Seyfer
455fcaa14d clean up the diffing code to be simpler logic 2013-01-31 13:48:39 -08:00
David Glasser
d2f1744c87 Merge branch 'devel' into ddp-pre1 2013-01-31 13:34:10 -08:00
Naomi Seyfer
4b9d41e1a1 Stage one in removing the code for old-style observes
Mostly things are now based in observeChanges.  There are still probably
a few places to remove old observe from.
2013-01-31 13:26:35 -08:00
Nick Martin
d71e31b5b5 Make inFiber help pass arguments through. This fixes with_password in meteor deploy/logs/mongo. 2013-01-31 12:24:42 -08:00
David Glasser
0e8e2ff95a Merge branch 'devel' into ddp-pre1 2013-01-31 11:59:20 -08:00
David Glasser
6616d9aac6 Make new less test less sensitive to browser zoom.
Apparently a 1px border may not have a 1px computed value if your browser is
zoomed (it may be fractional).
2013-01-31 11:59:01 -08:00
Naomi Seyfer
42a4d8537b Use observeChanges based observe for ordered observes on the server too 2013-01-31 10:22:12 -08:00
Naomi Seyfer
d8b137df76 Moved around files to better naming scheme for ordered-dict 2013-01-30 18:25:01 -08:00
Naomi Seyfer
99ad7d41d4 Putting spaces in front of keys in ordered dict 2013-01-30 18:22:15 -08:00
Naomi Seyfer
1c08c06d67 Locall collections observe is now based in observeChanges 2013-01-30 17:07:09 -08:00
David Glasser
91db907af3 Don't calculate removed messages to send to disconnected clients. 2013-01-30 16:52:16 -08:00
David Glasser
be8f12bad1 Process nosub messages on the client.
The visible effect of this is that attempts to subscribe to non-existent
subscriptions will be noticed by the client and they will not attempt to re-sub
on reconnect.
2013-01-30 16:22:31 -08:00
David Glasser
3f2aad7c0e Rename subscription "complete" to "ready" everywhere (including in the
protocol and the publisher API).

Also update examples/other/quiescence for ddp-pre1.
2013-01-30 13:34:58 -08:00
Naomi Seyfer
d74ec8cc12 Merge branch 'ddp-pre1' of github.com:meteor/meteor into ddp-pre1 2013-01-30 12:07:35 -08:00
Naomi Seyfer
f8bfb06001 Unordered observe based on observeChanges now. 2013-01-30 12:07:04 -08:00
David Glasser
d7f07b318e Merge branch 'devel' into ddp-pre1 2013-01-30 11:10:23 -08:00
David Glasser
cc6d08b94f Merge branch 'dev-bundle-node-0.8.18' into devel 2013-01-30 11:08:36 -08:00
David Glasser
5a54a5c79f Update Node to 0.8.18.
We now used TypedArrays (Uint8Arrays), and versions of Node prior to 0.8.17 have
a security vulnerability related to TypedArrays.
2013-01-30 09:55:47 -08:00
David Glasser
7f59b4e798 Merge branch 'ddp-pre1-binary-refresh' into ddp-pre1
Uses Meteor-specific Binary and ObjectID types in Meteor, converting to Mongo's
types on the boundary with Mongo. Rolls back creation of dev bundle 0.2.15.
2013-01-30 09:49:39 -08:00