Set $NODE_ENV appropriately (to 'development' in 'meteor run' and 'production'
otherwise) so that connect doesn't send stack traces over the network in
production.
Upgrading Underscore to 1.4.4 fixes a bug where _.throttle would sometimes take
double its timeout to deliver calls. So with this bugfix, our test suite
performs worse because reactivity happens more often. Reduce the throttling to
one update of the big table per second instead of twice a second. (Also, there's
no need to defer and call flush; the changed call does that!)
When I refactored meteor/timers.js I extracted a method I called
"withCurrentInvocation", but what the code is actually doing is
ensuring that timer callbacks run *without* the current method
invocation (if any).
Rename to "withoutInvocation".
Fixes#1050.
With the upgrade to CoffeeScript 1.6.2 the source file name and line
number of a parse error is no longer present in the `message` field of
the exception.
In iOS Safari, `setTimeout` and `setInterval` events are not delivered
to inactive tabs (unless and until they become active again). This
means that using `setTimeout(fn, 0)` to run `fn` in the next event
loop can in fact delay `fn` indefinitely.
This implementation uses the native `setImmediate` (when available) or
`postMessage` (all other modern browsers); falling back to
`setTimeout` if the first two aren't available.
The `qa` subdirectory includes a manual test to check that `defer` is
working in inactive tabs. (Sadly the test can't run automatically
because scripts aren't allowed to open child windows except in
response to user events).
Factors out some common code in `timers.js`.
For repeatable unit test failures with "random" data it's useful to be
able to create deterministic random number sequences.
Introduce `Random.create(seed...)` which returns a object with the
`Random` API (`id()`, `choice()`, etc.) initialized with the passed
seed(s).
Opera seems to have some consistent but difficult to diagnose bugs related to
using _.map in this context. (As in, minifying the test was difficult because
there seemed to be some odd action at a distance, but a given test failure was
fully reproducible.) This appears to work while still preserving the feature
added in 583508e.
Also fix a missing var (which does not appear to be the original problem).