Commit Graph

22356 Commits

Author SHA1 Message Date
David Greenspan
f1a932c1df Error if no jQuery and no querySelectorAll (IE 7) 2012-09-17 14:42:27 -07:00
David Greenspan
efd5560b0f Remove Meteor dependency on jQuery/Sizzle
Meteor will use jQuery for selector matching if it's present on the
client (which at the moment is always), but it now will use bare
querySelectorAll on modern browsers and IE 8+ if there is no jQuery.
There is no other dependence on jQuery in Meteor.
2012-09-17 14:42:27 -07:00
David Glasser
2fedd2adfc Merge branch 'devel' into auth
Conflicts:
	packages/livedata/livedata_common.js
	packages/livedata/livedata_connection.js
	packages/livedata/livedata_server.js
	packages/mongo-livedata/collection.js
2012-09-17 14:42:10 -07:00
David Glasser
42033a03aa Merge branch 'devel' (early part) into auth
Conflicts:
	packages/email/email.js
	packages/email/email_tests.js
	packages/livedata/livedata_tests.js
2012-09-17 14:31:54 -07:00
David Glasser
5e622215ba Change all publicly documented APIs to use camelCase.
For now, the old names still work as well.

This includes:
  - Meteor.isServer/isClient
  - this.isSimulation in methods
  - Context.onInvalidate
  - Meteor.status().retryCount/retryTime

Remove old backwards-compatibility "Sky" alias for "Meteor".

Update all examples in the docs to use camelCase.

Delete unused docs/client/projects.html file.
2012-09-17 14:26:45 -07:00
David Greenspan
afc7e90d20 Merge branch 'devel' into jsparse 2012-09-17 11:54:52 -07:00
David Greenspan
3364cb7b64 Clean up Spark efficient events hack with DomUtils
To test whether an element in the event bubbling chain matches a
selector, we now modify the selector to include an ID for the
element in question (which we assign if it doesn't have one),
so we search for one node rather than listing and checking all
nodes that match the selector!  This makes a huge speed difference in
the jsparse demo, which binds a global handler over a big DOM tree.

The new domutils are matchesSelector(element, contextNode, selector)
and matchesSelectorClipped(element, contextNode, selector, clipStart,
clipEnd).

Note: Eventually make the args more like this W3C working draft:
http://www.w3.org/TR/selectors-api2/#matches
2012-09-17 11:47:46 -07:00
David Greenspan
e80066a9ef DomUtils.elementOrder rename and flip
=> compareElementIndex and returns -1,0,1 in the
tradition of comparators rather than the opposite
2012-09-17 11:47:46 -07:00
David Greenspan
6df0e5b88f spark efficiency hack 2012-09-17 11:47:46 -07:00
David Greenspan
dcb399533f fix Session 2012-09-16 14:19:06 -07:00
fivethirty
2c62b1df93 bump bootstrap from 2.0.4 to 2.1.1 2012-09-16 12:10:21 -07:00
David Greenspan
dcf87f1ffb Clean up annotate in Spark
Annotations that need clean-up were all using
the `what` and `unusedFunc` arguments to
`annotate` and relying on the fact that one of
them is called.  Combine them into one callback
that's always called if given.
2012-09-16 05:27:48 -07:00
David Greenspan
d8de162bbc use atFlush in UI test helpers 2012-09-16 04:44:37 -07:00
David Greenspan
bb9f1fe94a extract Meteor.atFlush from spark 2012-09-16 04:44:37 -07:00
David Greenspan
c96ee60132 Catch errors in Meteor.flush() 2012-09-16 04:44:37 -07:00
David Greenspan
b11ec664e8 Spark.isolate in terms of Meteor.autorun :) 2012-09-16 04:44:21 -07:00
David Greenspan
fb765dd5f3 Meteor.autorun 2012-09-16 04:07:49 -07:00
David Greenspan
d07c760a0d docs improvements 2012-09-16 03:09:44 -07:00
David Greenspan
efce49331b include deps-utils in spark.js 2012-09-16 02:55:48 -07:00
David Greenspan
26acda1e4f use ContextSet in ReactiveVar 2012-09-16 02:54:02 -07:00
David Greenspan
9d89feb9ab use ContextSet in test driver 2012-09-16 02:51:22 -07:00
David Greenspan
3094db17ff replace connection status logic with three LoCs 2012-09-16 02:48:23 -07:00
David Greenspan
b070f5cf49 provide contextSet.addCurrentContext() 2012-09-16 02:48:23 -07:00
David Greenspan
16777fc5e6 tweaks for style 2012-09-16 02:48:23 -07:00
David Greenspan
d78481c1ce introduce Meteor.deps.ContextSet, use in Session 2012-09-16 02:48:20 -07:00
David Greenspan
ffd6461e58 Simpler try/finally in deps 2012-09-16 01:30:16 -07:00
David Greenspan
e8256ef866 Spark._currentRenderer not an EnvironmentVariable
This isn't the kind of dynamic var that should
persist into timer callbacks, it should just be
on the stack.  Also cuts dependence of spark
on dynamics.
2012-09-16 01:22:21 -07:00
David Greenspan
10fdc9b261 Unit test for fix to #323 2012-09-16 01:09:36 -07:00
David Greenspan
8e5e0b623a Script in admin/ to build spark.js 2012-09-16 00:49:09 -07:00
David Greenspan
5d9ff80461 Remove special Tinytest timer functions 2012-09-16 00:34:54 -07:00
David Greenspan
dcd26415fe Allow timer callbacks to participate in WriteFences.
This is a carefully considered change motivated by Tinytest, which
fires timers from a method and then waits for them before returning.
Because the timer callbacks didn't have a WriteFence, we had a race
condition a while back where the test client would quiesce before all
the results came in, which I fixed by giving Tinytest its own timer
functions that kept the environment, including the WriteFence.
I want to tear these special timer functions out now, since they are
necessary (before this commit) for very obscure reasons.  The race
condition is hard to reproduce and is affected by Mongo latency, the
order of the unit tests, etc.  (I reproduced it semi-stably to test
this commit, and it was tricky.)

The change is to give timer callbacks the WriteFence and allow them
to add writes before or after the fence fires.  Writes that they get
in before the fence is armed are included in the fence, and writes
made after the fence fires still succeed (the fence is "retired" and
doesn't complain that it has already fired).  In practice, this means
that methods that care about the writes happening as part of the
method, like Tinytest's run method, can wait for them, and methods
that don't care to wait will just return and let the writes trickle
down the pipe later (as they could before).

In a discussion with Geoff a few weeks ago, he said fences in general
should still complain about late writes unless they are put in a
special mode, so there is now a retire() method.
2012-09-16 00:34:37 -07:00
Tom Coleman
6a4f20ae55 Better error reporting for coffescript.
Use CS's inbuilt filename reporting, and use `bundle.error` rather than throwing.
Fixes #331
2012-09-16 12:10:09 +10:00
David Greenspan
8bd77fab4b add missing semicolon 2012-09-15 18:32:06 -07:00
David Greenspan
755b1bcfa2 fix Spark constant patching by improving elementContains (fix #323) 2012-09-15 13:34:04 -07:00
David Glasser
f46dfc2717 Follow-up to 0ed8555 (no-op, different structure). 2012-09-14 22:43:35 -07:00
David Glasser
f340c35c02 Basic email support. 2012-09-14 18:38:29 -07:00
David Glasser
0ed8555690 Fix {{#dtdd}} handler in docs for 0.3.8 changes. 2012-09-14 17:09:37 -07:00
David Glasser
216b3f312e generate-dev-bundle.sh: add reminder to update LICENSE.txt. 2012-09-14 11:32:28 -07:00
Tom Coleman
123f17833e A package directory MUST contain a package.js
So we know for sure after calling `get_package_dir` that we can then read the `package.js` file without things exploding.
2012-09-13 19:24:39 -07:00
Tom Coleman
e05e938d70 Throw a helpful error if we can't find a package. 2012-09-13 10:09:31 +10:00
David Greenspan
90e516d7c9 make methods out of lexeme.next()/prev() 2012-09-12 16:59:24 -07:00
David Glasser
9cbd1fc888 Spark no-op fix: If we're going to annotate list items with a typed range, we
should be consistent and do that for non-initial items as well. (Nothing ever
looks for this type currently, though.)
2012-09-12 16:58:28 -07:00
David Greenspan
c3477ec91c Make use of Parsers.lazy 2012-09-12 16:34:41 -07:00
David Greenspan
128392ccea real Parser for unstringify, Parsers.lazy 2012-09-12 16:26:10 -07:00
David Greenspan
7c3815fa27 parseRequired 2012-09-12 15:41:52 -07:00
David Greenspan
4ee4e2451c ParseNode.stringify and unstringify 2012-09-12 15:15:05 -07:00
David Greenspan
f9dba29b2d namespace parsers 2012-09-12 14:54:58 -07:00
David Greenspan
f9cfe9701f JSLexer, reduce namespace pollution 2012-09-12 14:48:32 -07:00
David Greenspan
25b564014a remove comment 2012-09-12 14:39:28 -07:00
David Greenspan
76cac26100 finish removing unnecessary seqs in node(…) 2012-09-12 14:34:50 -07:00