Commit Graph

5981 Commits

Author SHA1 Message Date
David Greenspan
cd6387cc02 Clean up DomRange, phase 1
- Get rid of DomRange "host objects" (too confusing)
- start to use `r instanceof DomRange` instead of `'dom' in r`

Ported domrange tests; all tests pass
2014-01-09 20:23:35 -08:00
David Greenspan
7e7f29c550 Perform template optimization in <body> too 2014-01-08 13:09:57 -08:00
David Greenspan
45494d22a0 mark old README 2014-01-08 11:28:38 -08:00
David Greenspan
d6583a14e6 mv README 2014-01-08 11:28:05 -08:00
David Greenspan
b9455835c3 add example to html-tools README 2014-01-08 11:24:11 -08:00
David Greenspan
4b9230b075 Give Spacebars its own JS token parsers
Fixes `{{foo '"'}}`.

Breaks dependency on `jsparse`.
2014-01-07 10:15:07 -08:00
Avital Oliver
5dbeb2b911 Simplify a line of code 2014-01-07 04:40:53 -08:00
Avital Oliver
32849891ba Allow {{#each}} over array with undefined items 2014-01-07 04:40:34 -08:00
Avital Oliver
4e8d858923 Rethrow contextualized error in {{#each}}
...in case the argument is a cursor with {fields: {_id: 0}}
2014-01-07 04:37:14 -08:00
Avital Oliver
e3578c6c30 Merge branch 'devel' into shark
Conflicts:
	packages/minimongo/minimongo.js
	packages/minimongo/package.js
2014-01-07 04:08:06 -08:00
Avital Oliver
2e88f7a758 Improve observe-sequence item matching heuristic
- If the items in an array are strings or numbers, use those as
  the id.

- If the items in an array are objects with no '_id' field, use
  the index in the array.

- In any case, if the id to be used is already present in this array,
  generate a random replacement value and print a warning.
2014-01-07 03:00:10 -08:00
David Greenspan
5ed450921d More wordsmithing 2014-01-06 21:38:39 -08:00
David Greenspan
f50e0a4973 prose edits 2014-01-06 21:29:10 -08:00
David Greenspan
40d4d9cd84 document html-tools 2014-01-06 21:25:40 -08:00
David Glasser
add4f6e015 Disallow {fields:{_id:0}} in observeChanges
This implies it is not allowed in `observe` either, or in cursors
returned from publish functions, or in cursors used in {{#each}}

Why? observeChanges and DDP publication use the ID as part of the
callback/message, and eliding it completely breaks them. Meteor UI uses
the ID with {{#each}} to properly move nodes around instead of
re-rendering. We could try to allow it for `observe` outside of
{{#each}}, but it would feel somewhat inconsistent.
2014-01-06 21:16:23 -08:00
David Greenspan
32b60177a1 Remove source files from readme 2014-01-06 17:34:42 -08:00
David Greenspan
b9877c7a53 List source files in htmljs readme 2014-01-06 17:26:31 -08:00
David Glasser
8800564e80 Use OplogObserveDriver for most selectors.
Previously OplogObserveDriver was only used for selectors which
performed equality checks against scalars. Now that we believe minimongo
to be more robust in the face of more MongoDB edge cases, we use
OplogObserveDriver (if configured) for any selector that minimongo can
compile except those containing $near or $where.

(We still do not use OplogObserveDriver for cursors with skip or limit.)
release/release/oplog-with-operators
2014-01-06 17:02:04 -08:00
Avital Oliver
95130ad760 observe-sequence: simplify and optimize by not fetching cursors that change 2014-01-06 16:05:27 -08:00
David Greenspan
fe08fa7471 Fix ellipsis in error display; test errors 2014-01-06 15:54:23 -08:00
David Greenspan
27118d4b5a Improve error message for <input></input>
...and other cases where we see an unexpected HTML end tag.  We'd previously say "Expected EOF", among other things.
2014-01-06 15:41:51 -08:00
Emily Stark
c74dd9aa62 Add missing 'random' dependency to retry 2014-01-06 15:14:39 -08:00
David Greenspan
1f25f2a824 fix more Spacebars errors 2014-01-06 15:01:15 -08:00
David Greenspan
b42112e3e6 tweaks 2014-01-06 14:37:13 -08:00
David Greenspan
df0e414193 Route Spacebars errors properly
Now Spacebars syntax errors (as well as html_scanner errors) go through proper error reporting channels rather than throwing exceptions.  For simple cases, we are back to showing nice errors like Handlebars did on devel, with context.

Next:  Comb the spacebars compiler for errors that are thrown or lack good line numbers.  Go through our own list of bad error messages.
2014-01-06 13:48:31 -08:00
David Greenspan
2577b87cb1 Fix typo (spotted by cscott) 2014-01-06 11:39:42 -08:00
David Greenspan
e04edf1ca0 Finish documenting htmljs package 2014-01-05 17:29:01 -08:00
David Greenspan
47596a28ad minor edits 2014-01-05 10:30:44 -08:00
David Greenspan
a6b3a431b2 further internal docs and cleanup 2014-01-03 17:27:17 -08:00
David Glasser
4f7d14c1f2 Upgrade websocket-driver to 0.3.2
This lowers the max websocket frame length from 1GB to 64MB.

Note that due to #1648, this may not immediately affect existing
checkouts of meteor (but will get into all release builds).
2014-01-03 17:19:59 -08:00
David Glasser
feac6f03e3 Merge branch 'minimongo-array-updates' into devel
Actually implement updating field 'x.$.y'! Also some related cleanups.
release/mongo-refactor
2014-01-02 23:51:23 -08:00
David Glasser
82739804b8 Implement '$' update for $elemMatch 2014-01-02 23:49:51 -08:00
David Glasser
2063999ce0 Implement '$' update for $near 2014-01-02 23:36:26 -08:00
David Glasser
e3e9cca12a Implement 'a.$.b' modifier
Does not yet work with $near or $elemMatch
2014-01-02 23:00:18 -08:00
David Glasser
5c9e58f2af clean up findModTarget
convert arguments to options
2014-01-02 22:38:50 -08:00
David Glasser
b2e3b08248 Cleanup/modernization of modify.js 2014-01-02 22:07:37 -08:00
David Glasser
0f7e0b54ca Refactor: optionify LocalCollection._modify arg 2014-01-02 21:47:24 -08:00
David Glasser
a8d1798e88 JSON -> EJSON in test 2014-01-02 21:45:13 -08:00
David Glasser
02aad697d7 remove random type tag in test 2014-01-02 21:42:51 -08:00
David Glasser
31d89599a7 rename args in andSomeMatchers 2014-01-02 21:41:49 -08:00
David Glasser
a1627071a7 set arrayIndex in most places
(not $near or $elemMatch yet)
2014-01-02 21:41:49 -08:00
David Glasser
7d448eb0d8 Throw on missing distance 2014-01-02 17:58:07 -08:00
David Glasser
cf78cefc8b Refactor selector-vs-modifier/projection code
Now they are methods on a compiled Matcher rather than doing their own
operator parsing from scratch. This means less work is happening for
each oplog entry, and it also localizes knowledge about selector
parsing.
2014-01-02 17:34:04 -08:00
David Greenspan
7710a77270 start of htmljs README 2014-01-02 16:56:31 -08:00
David Glasser
e48f08cefc NOTES update. 2014-01-02 16:46:23 -08:00
David Glasser
b383f2cd6a Use $near distances as lowest-priority sort key
Previously, $near was only used in the absence of a sort specifier; now,
it's also used as a tie-breaker when there is a sort specifier. (Tested:
this matches MongoDB.)
2014-01-02 15:37:49 -08:00
David Glasser
63b13ff665 Clear distances passed into _getRawObjects
Add comment suggested by Naomi
2014-01-02 15:37:19 -08:00
David Glasser
cc7249985d Merge branch 'minimongo-array-updates' into devel
Big minimongo refactoring. Lays the groundwork for trusting more
selectors in oplog and implementing the '$' option to updates, though
neither are yet implemented.
2013-12-31 13:58:27 -08:00
David Glasser
a5cd5eb435 add comment about sort vs query 2013-12-31 13:55:20 -08:00
David Glasser
e762fbc045 Finish reorganizing/renaming in selector.js 2013-12-31 13:51:36 -08:00