Skip to content

Commit 5038c63

Browse files
committed
Merge shark, including shark-isolate-helpers work
2 parents a3caf4a + b26f027 commit 5038c63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1916
-1329
lines changed

History.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
functions that are done when returning a cursor from a publish function or
88
using `{{#each}}`.
99

10+
* Patch Underscore to not treat plain objects (`x.constructor === Object`)
11+
with numeric `length` fields as arrays. Among other things, this allows you
12+
to use documents with numeric `length` fields with Mongo. #594 #1737
13+
14+
* Fix races when calling login and/or logoutOtherClients from multiple
15+
tabs. #1616
16+
17+
* Upgrade `jquery-waypoints` package from 1.1.7 to 2.0.3. (Contains
18+
backward-incompatible changes).
19+
20+
* Add `frame-src` to `browser-policy-content` and account for
21+
cross-browser CSP disparities.
22+
23+
1024
## v0.7.0.1
1125

1226
* Two fixes to `meteor run` Mongo startup bugs that could lead to hangs with the

LICENSE.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ optimist: https://github.com/substack/node-optimist
285285
mkdirp: https://github.com/substack/node-mkdirp
286286
wordwrap: https://github.com/substack/node-wordwrap
287287
archy: https://github.com/substack/node-archy
288-
shell-quote: https://github.com/substack/node-shell-quote
289288
deep-equal: https://github.com/substack/node-deep-equal
290289
editor: https://github.com/substack/node-editor
291290
minimist: https://github.com/substack/minimist

docs/client/api.html

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -586,23 +586,30 @@ <h2 id="collections"><span>Collections</span></h2>
586586

587587
Specifically, when you pass a `name`, here's what happens:
588588

589-
* On the server, a collection with that name is created on a backend
590-
Mongo server. When you call methods on that collection on the server,
591-
they translate directly into normal Mongo operations (after checking that
592-
they match your [access control rules](#allow)).
593-
594-
* On the client, a Minimongo instance is
595-
created. Minimongo is essentially an in-memory, non-persistent
596-
implementation of Mongo in pure JavaScript. It serves as a local cache
597-
that stores just the subset of the database that this client is working
598-
with. Queries on the client ([`find`](#find)) are served directly out of
599-
this cache, without talking to the server.
589+
* On the server (if you do not specify a `connection`), a collection with that
590+
name is created on a backend Mongo server. When you call methods on that
591+
collection on the server, they translate directly into normal Mongo operations
592+
(after checking that they match your [access control rules](#allow)).
593+
594+
* On the client (and on the server if you specify a `connection`), a Minimongo
595+
instance is created. Minimongo is essentially an in-memory, non-persistent
596+
implementation of Mongo in pure JavaScript. It serves as a local cache that
597+
stores just the subset of the database that this client is working with. Queries
598+
([`find`](#find)) on these collections are served directly out of this cache,
599+
without talking to the server.
600600

601601
* When you write to the database on the client ([`insert`](#insert),
602-
[`update`](#update), [`remove`](#remove)), the command is executed
603-
immediately on the client, and, simultaneously, it's shipped up to the
604-
server and executed there too. The `livedata` package is
605-
responsible for this.
602+
[`update`](#update), [`remove`](#remove)), the command is executed locally
603+
immediately, and, simultaneously, it's sent to the server and executed
604+
there too. This happens via [stubs](#meteor_methods), because writes are
605+
implemented as methods.
606+
607+
{{#note}}
608+
When, on the server, you write to a collection which has a specified
609+
`connection` to another server, it sends the corresponding method to the other
610+
server and receives the changed values back from it over DDP. Unlike on the
611+
client, it does not execute the write locally first.
612+
{{/note}}
606613

607614
If you pass `null` as the `name`, then you're creating a local
608615
collection. It's not synchronized anywhere; it's just a local scratchpad
@@ -678,8 +685,6 @@ <h2 id="collections"><span>Collections</span></h2>
678685

679686
* `$pull` in modifiers can only accept certain kinds
680687
of selectors.
681-
* `$` to denote the matched array position is not
682-
supported in modifier.
683688
* `findAndModify`, aggregate functions, and
684689
map/reduce aren't supported.
685690

@@ -1932,7 +1937,7 @@ <h2 id="templates_api"><span>Templates</span></h2>
19321937

19331938
{{> api_box template_events}}
19341939

1935-
Declare event handers for instances of this template. Multiple calls add
1940+
Declare event handlers for instances of this template. Multiple calls add
19361941
new event handlers in addition to the existing ones.
19371942

19381943
See [Event Maps](#eventmaps) for a detailed description of the event

docs/client/concepts.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,9 @@ <h2 id="templates">Templates</h2>
558558
machinery to efficiently add and move DOM nodes as new results enter
559559
the query.
560560

561-
Helpers can take arguments, and they receive the current template data
562-
in `this`:
561+
Helpers can take arguments, and they receive the current template context data
562+
in `this`. Note that some block helpers change the current context (notably
563+
`each` and `with`):
563564

564565
// in a JavaScript file
565566
Template.players.leagueIs = function (league) {
@@ -825,10 +826,11 @@ <h3 class="nosection">Running on your own infrastructure</h3>
825826
This command will generate a fully-contained Node.js application in the form of
826827
a tarball. To run this application, you need to provide Node.js 0.10 and a
827828
MongoDB server. (The current release of Meteor has been tested with Node
828-
0.10.22, and is recommended for use with 0.10.22 through 0.10.24 only.) You can
829-
then run the application by invoking node, specifying the HTTP port for the
830-
application to listen on, and the MongoDB endpoint. If you don't already have a
831-
MongoDB server, we can recommend our friends at [MongoHQ](http://mongohq.com).
829+
0.10.25; older versions contain a serious bug that can cause production servers
830+
to stall.) You can then run the application by invoking node, specifying the
831+
HTTP port for the application to listen on, and the MongoDB endpoint. If
832+
you don't already have a MongoDB server, we can recommend our friends at
833+
[MongoHQ](http://mongohq.com).
832834

833835
$ PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js
834836

docs/client/docs.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,17 @@ Meteor.startup(function () {
4646
}
4747

4848
var ignore_waypoints = false;
49-
$('body').delegate('h1, h2, h3', 'waypoint.reached', function (evt, dir) {
49+
var lastTimeout = null;
50+
$('h1, h2, h3').waypoint(function (evt, dir) {
5051
if (!ignore_waypoints) {
5152
var active = (dir === "up") ? this.prev : this;
52-
Session.set("section", active.id);
53+
if (active.id) {
54+
if (lastTimeout)
55+
Meteor.clearTimeout(lastTimeout);
56+
lastTimeout = Meteor.setTimeout(function () {
57+
Session.set("section", active.id);
58+
}, 200);
59+
}
5360
}
5461
});
5562

docs/client/packages/browser-policy.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,19 @@
111111

112112
Finally, you can configure a whitelist of allowed requests that various types of
113113
content can make. The following functions are defined for the content types
114-
script, object, image, media, font, and connect.
114+
script, object, image, media, font, frame, and connect.
115115

116116
<dl class="callbacks">
117117
{{#dtdd "BrowserPolicy.content.allow&lt;ContentType&gt;Origin(origin)"}}
118118
Allows this type of content to be loaded from the given origin. `origin` is a
119119
string and can include an optional scheme (such as `http` or `https`), an
120120
optional wildcard at the beginning, and an optional port which can be a
121121
wildcard. Examples include `example.com`, `https://*.example.com`, and
122-
`example.com:*`. You can call these functions multiple times with different
123-
origins to specify a whitelist of allowed origins.
122+
`example.com:*`. You can call these functions multiple times with
123+
different origins to specify a whitelist of allowed origins. Origins
124+
that don't specify a protocol will allow content over both HTTP and
125+
HTTPS: passing `example.com` will allow content from both
126+
`http://example.com` and `https://example.com`.
124127
{{/dtdd}}
125128

126129
{{#dtdd "BrowserPolicy.content.allow&lt;ContentType&gt;DataUrl()"}}
@@ -159,6 +162,12 @@
159162
`https://example.com`.
160163
* `BrowserPolicy.content.allowConnectOrigin("https://example.com")` allows XMLHttpRequest
161164
and WebSocket connections to `https://example.com`.
165+
* `BrowserPolicy.content.allowFrameOrigin("https://example.com")` allows
166+
your site to load the origin `https://example.com` in a frame or
167+
iframe. The `BrowserPolicy.framing` API allows you to control which
168+
sites can frame your site, while
169+
`BrowserPolicy.content.allowFrameOrigin` allows you to control which
170+
sites can be loaded inside frames on your site.
162171

163172

164173
{{/markdown}}

docs/client/packages/coffeescript.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
equivalent JS, and there is no interpretation at runtime.
99

1010
CoffeeScript is supported on both the client and the server. Files
11-
ending with `.coffee` or `.litcoffee` are automatically compiled to
12-
JavaScript.
11+
ending with `.coffee`, `.litcoffee`, or `.coffee.md` are automatically
12+
compiled to JavaScript.
1313

1414
### Namespacing and CoffeeScript
1515

docs/client/packages/underscore.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@
1818
package as we will remove the default underscore in the future.
1919
{{/warning}}
2020

21+
{{#warning}}
22+
We have slightly modified the way Underscore differentiates between
23+
objects and arrays in [collection functions](http://underscorejs.org/#each).
24+
The original Underscore logic is to treat any object with a numeric `length`
25+
property as an array (which helps it work properly on
26+
[`NodeList`s](https://developer.mozilla.org/en-US/docs/Web/API/NodeList)).
27+
In Meteor's version of Underscore, objects with a numeric `length` property
28+
are treated as objects if they have no prototype (specifically, if
29+
`x.constructor === Object`.
30+
{{/warning}}
31+
2132

2233
{{/markdown}}
2334
</template>

examples/unfinished/accounts-ui-viewer/accounts-ui-viewer.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
* { padding: 0; margin: 0; }
31
html, body { height: 100%; }
42

53
#controlpane {

meteor

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
BUNDLE_VERSION=0.3.26
3+
BUNDLE_VERSION=0.3.28
44

55
# OS Check. Put here because here is where we download the precompiled
66
# bundles that are arch specific.
@@ -51,15 +51,25 @@ function install_dev_bundle {
5151
rm -rf "$BUNDLE_TMPDIR"
5252
mkdir "$BUNDLE_TMPDIR"
5353

54+
# fyi: URL duplicated in packages/dev-bundle-fetcher/dev-bundle
55+
DEV_BUNDLE_URL_ROOT="https://d3sqy0vbqsdhku.cloudfront.net/"
56+
# If you set $USE_TEST_DEV_BUNDLE_SERVER then we will download
57+
# dev bundles copied by copy-dev-bundle-from-jenkins.sh without --prod.
58+
# It still only does this if the version number has changed
59+
# (setting it won't cause it to automatically delete a prod dev bundle).
60+
if [ -n "$USE_TEST_DEV_BUNDLE_SERVER" ] ; then
61+
DEV_BUNDLE_URL_ROOT="https://com.meteor.static.s3.amazonaws.com/test/"
62+
fi
63+
5464
if [ -f "$SCRIPT_DIR/$TARBALL" ] ; then
5565
echo "Skipping download and installing kit from $SCRIPT_DIR/$TARBALL" >&2
5666
tar -xzf "$SCRIPT_DIR/$TARBALL" -C "$BUNDLE_TMPDIR"
5767
elif [ -n "$SAVE_DEV_BUNDLE_TARBALL" ] ; then
5868
# URL duplicated in tools/server/target.sh.in
59-
curl -# "https://d3sqy0vbqsdhku.cloudfront.net/$TARBALL" >"$SCRIPT_DIR/$TARBALL"
69+
curl -# "$DEV_BUNDLE_URL_ROOT$TARBALL" >"$SCRIPT_DIR/$TARBALL"
6070
tar -xzf "$SCRIPT_DIR/$TARBALL" -C "$BUNDLE_TMPDIR"
6171
else
62-
curl -# "https://d3sqy0vbqsdhku.cloudfront.net/$TARBALL" | tar -xzf - -C "$BUNDLE_TMPDIR"
72+
curl -# "$DEV_BUNDLE_URL_ROOT$TARBALL" | tar -xzf - -C "$BUNDLE_TMPDIR"
6373
fi
6474

6575
test -x "${BUNDLE_TMPDIR}/bin/node" # bomb out if it didn't work, eg no net

0 commit comments

Comments
 (0)