Commit Graph

14270 Commits

Author SHA1 Message Date
Ben Newman
f95ecd18de Upgrade meteor-promise NPM dependency to v0.2.0.
This ensures that all Promise callback functions run in a Fiber, as if
Meteor.bindEnvironment were called when the Promise was created.

Not bumping the dev bundle version with this commit, because these changes
will get rolled into the dev bundle updates for the es6-tool branch.
2015-06-11 13:37:20 -04:00
Avital Oliver
d1aba25b8b Update eslint to Airbnb style guide
github.com/airbnb/javascript/tree/es6
2015-06-10 20:14:44 -07:00
David Glasser
6395521041 Document valid template names
Fixes #4417.

See also #1602.
2015-06-10 15:12:56 -07:00
zicai
13d3e6cf66 missing a dl close tag 2015-06-10 15:05:01 -07:00
Anubhav Jain
74dde90cda Fixed jsdoc.sh to start script from the meteor home directory.
Jsdoc.js relies on this or otherwise throws an error.
2015-06-10 14:42:32 -07:00
David Glasser
67e13306c6 Document rawCollection/rawDatabase
Fixes #4509.
2015-06-10 14:41:42 -07:00
Slava Kim
ec0608a36e Fix the spacebars compiler crash on unterminated string literal
Fixes #4529
2015-06-10 14:29:03 -07:00
Graham Hughes
e0aa235521 Find the first target with valid ABI.
Fixes #2848.
2015-06-10 14:23:08 -07:00
David Glasser
45455b3c40 Merge branch 'pr/4500' into devel
Fixes #4500. Fixes #3778.
2015-06-10 14:06:12 -07:00
David Glasser
ee7dac430c Improve _compileProjection failure tests
The old version didn't actually use some of the specified arguments (and
didn't test which exception was thrown).
2015-06-10 14:05:46 -07:00
Alex Hearn
2129a3fb21 Conform to how mongo handles inclusive _id in projections 2015-06-10 14:05:38 -07:00
Dan Dascalescu
9adcfd32dc Typo fix 2015-06-10 13:53:10 -07:00
Sashko Stubailo
dad1dc8968 Add dev bundle warning 2015-06-10 13:26:48 -07:00
Sashko Stubailo
5742f51f4c Add dev bundle version warning 2015-06-09 20:23:30 -07:00
Avital Oliver
4b3c5b930a Export clickIt utility from test-helpers package 2015-06-08 11:19:22 -07:00
David Glasser
0c25d5395c Fix soft refresh
Due to a type error, _checkUpToDatePreloaded always returned false, so
soft refresh never actually happened.  Oops.

This might be (partially?) responsible for #3373.
2015-06-04 01:03:22 -07:00
David Glasser
78ddff5a02 Improve linker's use of noLineNumbers
Follow-up to b556e62262.

Priori to b556e62262, preserveLineNumbers always meant "in an app, not
linking multiple files into a single file" and noLineNumbers always
meant "this is an isopacket, ignoring line numbers for performance (but
still wanting source maps)".

b556e62262 made "noLineNumbers and no source map (eg, JS)" imply
preserveLineNumbers and not creating a source map for the nested
file. But that meant that in the isopacket case, the source map for the
linkered files didn't get you back to the pre-linker case.

This commit reverts to the previous behavior, where noLineNumbers + no
source map + !preserveLineNumbers still generates source maps
representing the linker transform itself.
2015-06-03 17:05:45 -07:00
David Glasser
692f935240 Remove IE7-specific workaround
We no longer support IE7, and a user reported that this function threw
in some context.  Might as well just delete the code.  See #4485.
2015-06-02 15:29:26 -07:00
Adrian Lanning
9f2c35e253 Fix email verification token index
The original index, "emails.validationTokens.token" is never used in any meteor packages.  A search of "validationTokens" across all the packages in `meteor/packages` returns nothing.

The correct index should be, "services.email.verificationTokens.token".  This is used in the `verifyEmail` method to locate the correct user record.  Without a matching index, this causes a full table scan each time `verifyEmail` is called.

Fixes #4482.
2015-06-02 15:10:59 -07:00
David Glasser
4eb017a4ab History update 2015-06-02 15:07:58 -07:00
David Glasser
2f393a87c3 Improve error message for publish-for-arch
Addresses #4477.
2015-06-02 14:54:11 -07:00
David Glasser
3cdbf57170 Improve docs for Meteor.Error
Fixes #4475.
2015-06-02 14:40:44 -07:00
Mitar
2e7697391b Ignore node_modules directory. Fixes #4452
Fixes #4457.
2015-06-02 13:50:02 -07:00
David Glasser
d8944f1b4d Fix observe leak in accounts-base
Let's say you call accounts._setLoginToken twice in close succession,
with the same login token.  What happens?

- First execution of _setLoginToken:
  - Calls _removeTokenFromConnection (no-op since no token yet)
  - Actually sets the token on the connection
  - Sets self._userObservesForConnections[connection.id] to null and
    defers some work.
- Second execution of _setLoginToken:
  - Calls _removeTokenFromConnection. It sees the null in
    self._userObservesForConnections[connection.id] and deletes it,
    which is supposed to signal to the first deferred thing that
    it got overridden.
  - Actually sets the token on the connection (again)
  - Sets self._userObservesForConnections[connection.id] to null and
    defers some work.
    - Hold on a sec... doesn't that look exactly like what the first
      one was expecting to see before we deleted it to send a signal?
      Hmm...
- The Meteor.defer from the first call runs:
  - It starts an observe
  - Then it runs this check:
      if (self._getAccountData(connection.id, 'loginToken') !== newToken ||
          !_.has(self._userObservesForConnections, connection.id)) {
    Well, hmm.  The login token is the login token we're trying to set.
    And self._userObservesForConnections[connection.id] is still that
    null that we were expecting! I guess we weren't overridden by anything...
  - It saves the observe into self._userObservesForConnections[connection.id]
- The Meteor.defer from the second call runs:
  - It starts an observe
  - Then it runs that check again.  The token is still the token we want,
    and there is something in self._userObservesForConnections[connection.id],
    so no need to bail out... uhoh.
  - But!  The thing in self._userObservesForConnections[connection.id]
    is not null!  So we throw.

So two issues: first, we're throwing (from a defer, so a stack trace
prints).  But more importantly: the second observe never gets stopped!
Resource leak!

This commit fixes this by ensuring that the sentinel used by
_setLoginToken to mean "I'm trying to set up an observe here" looks
different between the two calls to _setLoginToken.  This is roughly what
the `self._getAccountData(connection.id, 'loginToken') !== newToken`
part was trying to accomplish, but it failed if both calls set the same
token.  Instead of using null as our only sentinel, just use a number
that differs between subsequent calls!

(We could probably work around this particular issue by making
_setLoginToken bail out immediately if the login token isn't changing,
but you could still hit this issue with three rapid calls of "set A, set
B, set A".)

(Why do we care about this edge case?  Turns out that
the (closed-source) meteor-accounts server does something a little
strange in its login handler where it actually calls
`Meteor.call('login')` again and tries to carefully massage its return
value into a login handler return value.  (This wasn't the best design!
We should have just added an API to accounts-password for it to run
directly instead, or some other hook.)  This means that each nested
version of the login method calls _setLoginToken with the same value in
rapid succession.)

Reviewed at https://rbcommons.com/s/meteor/r/45/
2015-05-29 16:27:11 -07:00
SEKE
869121c743 Remove windows illegal caracter in package server file 2015-05-29 14:26:34 -04:00
BraveKenny
f6f5020128 Prevent creation of non-function methods 2015-05-29 13:51:16 -04:00
Sashko Stubailo
5511298a13 Improve new template.subscribe example 2015-05-29 12:44:54 -04:00
Slava Kim
832e6fe44f Merge pull request #4462 from jperl/patch-6
Escape script tag in history.md
2015-05-27 11:22:52 -07:00
Jonathan Perl
0a327fe374 Escape script tag in history 2015-05-27 14:11:33 -04:00
David Greenspan
93e35d1922 Fix external <script> tags in templates
Fixes #4415

See comment https://github.com/meteor/meteor/issues/4415#issuecomment-105688451 for explanation.
2015-05-27 10:39:33 -07:00
David Glasser
b61d10618d Merge branch 'pr/4456' into devel
Fixes #4456.
2015-05-26 19:04:18 -07:00
David Glasser
fa9c8e3f74 Replace coffeescript reference with bare 2015-05-26 19:03:55 -07:00
Joseph Orbegoso Pea
a165a64249 Oops, typo. 2015-05-26 18:57:36 -07:00
Mitar
046de405da Also expose converters. 2015-05-26 14:16:15 -07:00
Mitar
c380bb3e21 Allow access to registered custom types. 2015-05-26 14:16:15 -07:00
Joseph Orbegoso Pea
d401ef9099 Added missing parameter documentation for api.addFiles.
I'm not sure if this is the complete description of the `fileOptions` parameter, but it would be helpful to see in the docs. Is `fileOptions` used by anything other than build plugins, so that I may update this PR?
2015-05-26 14:08:35 -07:00
David Glasser
c978753bb8 source maps have better paths 2015-05-22 19:17:33 -04:00
David Glasser
5218d0e46b don't let coffeescript break stack traces 2015-05-22 19:03:09 -04:00
Ben Newman
b556e62262 Always annotate line numbers when a source map is available.
When a source map is available, the line number annotations are now
computed from the source map. If no source map is available, but we are
planning to combine the file with other files in a package, we generate a
simple identity source map for the file and then annotate its line numbers
using that source map. This combination of techniques provides a tolerable
debugging experience in all browsers, even those that do not support
source maps.

The File.prototype._pathForSourceMap method was removed because it is no
longer used (self.servePath is better for source maps anyway, because it
includes parent directories, and the leading / character ensures that
source map paths will not be misinterpreted as relative paths).
2015-05-22 18:29:44 -04:00
Slava Kim
b5514d4e9f Add Cordova updates to History.md
Credit goes to: @copleykj, @wojtkowiak, and @srounce
2015-05-21 19:46:02 -07:00
Slava Kim
1dca61221e Merge branch 'cordova-dev-bundle' into devel 2015-05-21 19:28:06 -07:00
David Glasser
ce5c7b725b Fix copy-dev-bundle-from-jenkins.sh
awscli doesn't print full paths with slashes, so splitting on slashes is
wrong.  And I'm not sure what `>/dev/null | wc -l` was supposed to
detect, but it didn't work due to the spaces wc prints.

It's possible that there's an aws cli version skew here. We should
rewrite this as a node script just using some node s3 module.
2015-05-21 19:26:01 -07:00
Slava Kim
53c7886ee6 Bump the version of dev_bundle (cordova@5.0.0) 2015-05-21 18:50:44 -07:00
Slava Kim
9b401ace63 Merge branch 'cordova5-update' into devel
Updates Cordova to Cordova 5.0.
Also updates Android Cordova to 4.0.
Also includes a new feature: adding Cordova Plugins from a file:/// URI (they are hard to lock but this is a tradeoff we take for easier plugin development).
2015-05-21 18:08:01 -07:00
Slava Kim
77c341fea7 Fix the meteor build behavior since it was broken by Cordova 5.0 upgrade
The Cordova 5.0 is featuring Cordova Android 4.0, which now ships with a gradle project and not Ant.
2015-05-21 18:02:29 -07:00
Bartosz Wojtkowiak
1f2f584fe8 realtive path of cordova plugin should be relative to meteor project 2015-05-21 18:02:14 -07:00
Bartosz Wojtkowiak
d978ad4493 fixes according to comments from PR#4229 2015-05-21 18:02:06 -07:00
Bartosz Wojtkowiak
cd28950846 Cordova: support for local plugins 2015-05-21 18:01:48 -07:00
Slava Kim
3521fabb60 A "Fix" for a cordova build problem introduced in #4048 2015-05-21 18:01:18 -07:00
Kelly
e6978ee671 generate bundle with Android SDK 22 2015-05-21 18:01:18 -07:00