Commit Graph

14285 Commits

Author SHA1 Message Date
Slava Kim
27c0843bfc Add docs about meteor lint to docs 2015-06-04 01:19:11 -07:00
Slava Kim
56ad641f1b Move docs to the new Less batch plugin 2015-06-04 01:19:11 -07:00
Slava Kim
1eb95a92db Add a '--no-lint' option to meteor run 2015-06-04 01:19:11 -07:00
Slava Kim
ece1add41b Create a new meteor lint command 2015-06-04 01:19:11 -07:00
Slava Kim
ee473f0b76 Extract linting into a separate part of app runner 2015-06-04 01:19:11 -07:00
Slava Kim
7446df0c33 WIP separate lint function 2015-06-04 01:19:10 -07:00
David Glasser
836a3fab7e comments 2015-06-04 01:19:10 -07:00
David Glasser
78bd7e3101 fix accounts-ui 2015-06-04 01:19:10 -07:00
David Glasser
8629cebb0b fix os -> os.foo dependencies
also optimize for no linters
2015-06-04 01:19:10 -07:00
David Glasser
478e1f00f9 new less package (accounts-ui not yet working) 2015-06-04 01:19:10 -07:00
Slava Kim
aaa9e606d4 Fix bugs with running linters and passing imports 2015-06-04 01:19:10 -07:00
David Glasser
bf04ffa169 CSS source maps for compiler plugins 2015-06-04 01:19:10 -07:00
Slava Kim
ed22b3420a WIP Linting with global imports passed in 2015-06-04 01:19:10 -07:00
Slava Kim
dca05e25fb Fix bugs in the jshint package 2015-06-04 01:19:10 -07:00
Slava Kim
e136327069 Wrap linting into a separate job 2015-06-04 01:19:09 -07:00
Slava Kim
40a2c40ff5 Some internal docs on buildmessage 2015-06-04 01:19:09 -07:00
Slava Kim
0ba51af564 An attempt in displaying errors from linters
Doesn't work that well yet
2015-06-04 01:19:09 -07:00
Slava Kim
986b7a62ee Run appropriate linters 2015-06-04 01:19:09 -07:00
David Glasser
7d7a64e921 support errors from compiler plugins 2015-06-04 01:19:09 -07:00
Slava Kim
ee4bd65fa7 Reduce the amount of shared code between CompilerPlugin's and LinterPlugin's 2015-06-04 01:19:09 -07:00
Slava Kim
e7811a67fa Add a JSHint linter plugin to core
Later should be moved to the non-core folder
2015-06-04 01:19:09 -07:00
Slava Kim
9c49368eb0 Make LintPluginDefinition a working class 2015-06-04 01:19:09 -07:00
Slava Kim
66c1f6d621 Base for Linting plugins 2015-06-04 01:19:09 -07:00
Slava Kim
1f16e8a594 Fix a typo 2015-06-04 01:19:08 -07:00
Slava Kim
fceacf9ed2 Extract big part of the compiler-plugin.js into build-plugin.js 2015-06-04 01:19:08 -07:00
David Glasser
b96ef046c3 Let new-style plugins work in the app 2015-06-04 01:19:08 -07:00
David Glasser
3d9a23834f re-work with no phases, and fix other things 2015-06-04 01:19:08 -07:00
David Glasser
1db92d27b6 Very basic hacky CSS support works 2015-06-04 01:19:08 -07:00
David Glasser
6a090e7e34 Figure out what batch handlers need to be run 2015-06-04 01:19:08 -07:00
David Glasser
632aee392d Implement Plugin.registerBatchHandler
Files with extensions requested by registerBatchHandler get saved
directly to the Isopack without being processed.

They will be processed later at bundle time, but that is not yet
implemented.
2015-06-04 01:19:08 -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