Commit Graph

6102 Commits

Author SHA1 Message Date
Avital Oliver
f728523599 Merge branch 'devel' into shark release/shark-1-29-2014-c 2014-01-28 15:00:19 -08:00
David Glasser
604cd853f3 Update http-proxy to 1.0.2 from our fork of 1.0.1
Only real change is changing a bad console.log into invoking our error
handler, which we need for not printing too much junk in the runner
  https://github.com/nodejitsu/node-http-proxy/commit/daad4703
2014-01-28 11:57:36 -08:00
Slava Kim
cb2f2adb1b Do less deep copies 2014-01-28 10:11:27 -08:00
David Glasser
297b97659b Merge branch 'oplog-localcollection' into devel 2014-01-27 22:34:59 -08:00
David Glasser
a65b978972 Refactor OplogObserveDriver to use LocalCollection
This should be a good starting point for implementing limit/sort/skip.
2014-01-27 21:57:00 -08:00
David Glasser
980b70596d More comments about our sort inconsistency 2014-01-27 21:56:17 -08:00
David Glasser
782ff1bcae Optionify the barely-used LocalCollection name arg 2014-01-27 21:40:24 -08:00
David Glasser
ed83f00fc1 Rename _SynchronousQueue to _UnyieldingQueue
Allow server uses of LocalCollection to prefer _UnyieldingQueue. This
will mean that, as long as their observeChanges callbacks do not yield,
calls to insert/update/remove will not yield either.
2014-01-27 21:19:32 -08:00
David Glasser
390dafea01 Move _SynchronousQueue into another file
This commit does not build but exists so that the next commit shows
diffs better.
2014-01-27 21:18:24 -08:00
David Glasser
f065ffd80f Merge branch 'devel' into shark
Conflicts:
	packages/minimongo/minimongo.js
	packages/minimongo/observe.js
	packages/minimongo/wrap_transform.js
	packages/mongo-livedata/collection.js
	packages/mongo-livedata/mongo_driver.js
	packages/mongo-livedata/mongo_livedata_tests.js
2014-01-27 16:34:15 -08:00
David Glasser
204959b509 Fix pronoun in docs 2014-01-27 16:30:43 -08:00
David Glasser
f53bf0ab82 Docs for wrapTransform 2014-01-27 16:29:59 -08:00
David Glasser
c18f7339bf Merge branch 'shark-backports' into devel 2014-01-27 16:24:12 -08:00
David Glasser
d577b05136 Review of wrapTransform with avital
- move _makeNonreactive into wrapTransform
- Use EJSON.equals for _id comparison
- Return null for nonexistent transforms
- Use isPlainObject for objectness check
- Add unit tests; remove some end-to-end tests

Also, add an EJSON.clone to the recently backported observeHandle._fetch
2014-01-27 16:22:30 -08:00
David Glasser
b5a14c5d30 Initial backport of wrapTransform from shark 2014-01-27 15:25:19 -08:00
David Glasser
20766ac05e Backport observeHandle._fetch from shark 2014-01-27 15:25:19 -08:00
David Glasser
c5e90053f2 Fix bug caused by d868325 2014-01-27 15:22:55 -08:00
David Greenspan
b26f0271a0 Rename HTML.evaluate{Dynamic,}Attributes 2014-01-27 14:44:19 -08:00
David Greenspan
599ac16632 Treat null/undefined/false attributes as absent
So, in HTML, the following are equivalent, and both mean that a checkbox is checked, because the `checked` attribute is present:

- `<input type="checkbox" checked>`
- `<input type="checkbox" checked="">`

We can't mess with that.  On the other hand, in Spacebars before this commit, the following would *also* result in the checkbox being checked, regardless of whether `foo` evaluates to null, undefined, false, or the empty string:

- `<input type="checkbox" checked={{foo}}>`
- `<input type="checkbox" checked="{{foo}}">`

With this commit, the checkbox will NOT be checked if `foo` evaluates to null, undefined, or false.

To achieve this:

- In HTMLjs, an attribute is considered absent if its value is "nully" after being fully evaluated (i.e. after expanding functions and components via HTML.evaluateDynamicAttributes / HTML.evaluate).  A nully value is one consisting of null, undefined, an empty array, or an array of those things.  `false` is not nully and renders as "false".  An empty string is not nully, and will "prop open" an attribute that would otherwise collapse into absence.

- Spacebars.mustache converts null, undefined, and false to null.  So if you use {{foo}} anywhere in a template and foo evaluates to "false", that gets to converted to a null in HTMLjs (which is ignored).  (true is rendered as "true".)

- When parsing HTML, an attribute that consists of *no tokens* becomes an empty string in the HTMLjs, which props open the attribute (unlike null or an empty array).  (Since comment tokens are stripped during tokenization, if there are only comments in an attribute value that counts as no tokens.)
2014-01-27 14:44:19 -08:00
David Greenspan
7c58b08f53 Fix an apparent typo 2014-01-27 14:44:19 -08:00
David Greenspan
54a2423acb Don't ignore falsy helpers
We were weirdly ignoring helpers that were falsy constants, so in `Template.main.foo = 0` / `{{foo}}` you'd get nothing, while if you did `Template.main.foo = function () { return 0; }` you would get "0".
2014-01-27 14:44:19 -08:00
David Greenspan
43cb4f8cc8 Rename tests in html-tools package to html-tools 2014-01-27 14:44:19 -08:00
David Glasser
3104ddb6e5 Style change to skel to match shark. 2014-01-27 14:17:31 -08:00
Avital Oliver
f8f94c7118 Try to fix inconsistent release manifest generation; Take 2 2014-01-27 14:15:53 -08:00
Avital Oliver
91c4d3d8a2 Try to fix inconsistent release manifest generation
Apparently on some platforms "a5" < "a-" and on others
"a-" < "a5"
2014-01-27 14:15:53 -08:00
David Glasser
b71d938f9d History update for jQuery backported from shark 2014-01-27 14:09:21 -08:00
David Greenspan
30374854f0 jquery -> v1.10.2 2014-01-27 14:08:22 -08:00
David Greenspan
6300a72381 add missing semicolon
just happened to notice it
2014-01-27 14:02:01 -08:00
David Glasser
6471dce8fa Merge branch 'devel' into shark 2014-01-27 13:58:11 -08:00
David Glasser
830aa7036c Merge branch 'new-kexec' into devel 2014-01-27 13:56:44 -08:00
David Glasser
8f4963ecd2 Use new exec 2014-01-27 13:52:54 -08:00
David Glasser
291c2ecad7 Upgrade kexec, drop shell-quote
We only used shell-quote to workaround kexec's lack of a feature added
in this version.
2014-01-27 09:52:50 -08:00
Avital Oliver
d46a5e11b1 Correctly check for reserved template names 2014-01-26 11:52:27 -08:00
Avital Oliver
70aa948634 Isolate attributes on <p {{attrs}}>
A helper can return an object with a set of element attributes via
`<p {{attrs}}>`. When it re-runs due to a dependency changing the
value for a given attribute might stay the same. Test that the
attribute is not set on the DOM element.
2014-01-26 11:52:26 -08:00
Avital Oliver
72a5d4282c Correct helper return value isolation
- When helpers return SafeStrings, compare their underlying
  strings.
- When helpers return objects (such as for dynamic attributes),
  never isolate. The objects may have been mutated directly.
  AttributeHandler ends up only affecting real changes.
2014-01-26 11:52:26 -08:00
Avital Oliver
1223783e14 Isolate return values from helpers
Do the appropriate equality check for three cases:
(1) helpers in text nodes
(2) helpers in element attributes
(3) helpers in dynamic template inclusion

Also, assert that helpers passed to template inclusion indeed
return components or null.
2014-01-26 11:52:26 -08:00
Avital Oliver
63319c8e6d Test that helper return values are isolated
More specifically, a helper re-runs and its return value hash't
changed, nothing should change in the DOM. Test this for:
(1) helpers in text nodes
(2) helpers in element attributes
(3) helpers in dynamic template inclusion
2014-01-26 11:52:26 -08:00
David Greenspan
0e0d8f218c Better error message for <circle r={{r}}/>
Now we tell you to put a space before the slash.  HTML allows slash as part of a bare attribute value.
2014-01-25 19:41:21 -08:00
David Glasser
d30bb79498 Ensure crossbar callbacks not called after stop
Hopefully fixes #1767.
2014-01-23 23:23:30 -08:00
David Glasser
fca2966676 Simplify crossbar by making it synchronous
All existing listener callbacks were already calling complete()
synchronously, so this should not be a functional change.

This allows us to also eliminate the callback from crossbar.fire().

This in turn allows us to eliminate the `proxy_write` in
Meteor.refresh. The only purpose of that write was to keep the current
write fence open until fire's async callback got called; now that fire
works synchronously, it's not necessary!  (This relies on the fact that
write fences never get armed while they are the current write fence,
which now has an assertion.)
2014-01-23 23:13:42 -08:00
David Glasser
d868325b83 Don't yield in oplog entry handler 2014-01-23 21:53:51 -08:00
David Glasser
8eca012c32 Minor optimizations to new _IdMaps 2014-01-23 21:28:21 -08:00
David Greenspan
fc955af5c0 Require template tag kw args to be at end 2014-01-23 20:45:09 -08:00
David Glasser
7645cb399e Merge branch 'dev-bundle-http-proxy-1' into devel 2014-01-23 15:37:58 -08:00
David Glasser
97ec2d3948 Update to newer http-proxy API
Take out workaround that's been incorporated into the branch we're using
2014-01-23 14:40:21 -08:00
David Glasser
90b7489e7f Add $USE_TEST_DEV_BUNDLE_SERVER 2014-01-23 13:40:02 -08:00
David Glasser
d4e0cff766 Use a fork of http-proxy with two PRs 2014-01-23 12:23:16 -08:00
David Glasser
a7d10d650d Update Node to 0.10.25. Remove bug workaround. 2014-01-23 12:15:29 -08:00
David Glasser
8354fe403b Bump dev bundle version. 2014-01-23 12:09:40 -08:00
David Glasser
4f34ac0d6e Various dev bundle upgrades
* http-proxy: 1.0.1 (from a pre-release fork of 1.0)
* Node: 0.10.24 (from 0.10.22)
* semver: 2.2.1 (from 2.1.0)
* request: 2.33.0 (from 2.27.0)
* fstream: 0.1.25 (from 0.1.24)
* tar: 0.1.19 (from 0.1.18)
* eachline: 2.4.0 (from 2.3.3)
* source-map: 0.1.31 (from 0.1.30)
* source-map-support: 0.2.5 (from 0.2.3)
* mongo: 2.4.9 (from 2.4.8)
* openssl in mongo: 1.0.1f (from 1.0.1e)

Have not yet updated the various minimum Node version requirements.
2014-01-23 12:09:40 -08:00