Commit Graph

6405 Commits

Author SHA1 Message Date
Mitar
11b7397857 Moved binding of template helpers to the function. 2015-04-24 04:16:18 -07:00
Mitar
8b723b26f9 Updated methods to move more checks into methods. 2015-04-03 19:55:48 -07:00
Mitar
28fee7e46c Allow also a function for reactivity. 2015-03-31 00:23:58 -07:00
Mitar
93eb5c3f4d Allow extending lookup for templates as well. 2015-03-28 04:28:31 -07:00
Mitar
c8212d0553 templateInstance is needed as well. 2015-03-26 15:18:12 -07:00
Mitar
ba99e6f3d8 Use Blaze._getTemplateHelper directly.
This allows one to override Blaze._getTemplateHelper with a custom implementation.
2015-03-26 14:30:33 -07:00
David Greenspan
28c760e05c Avoid recursion when materializing DOM (Fix #3028)
This way we don't get a stack overflow when materializing nested
Views.  Certain browser/OS combinations seem to have particularly
low budgets (especially Firefox/Windows apparently).

Verified by running https://github.com/mxab/meteor-call-stack-exceed
on Chrome/Mac.  Nesting limit used to be about 160, but now you get
unlimited nesting (tried up to 10,000, which renders in about 7-8
seconds).

Tested for correctness by running all package tests.
2015-03-25 17:39:36 -07:00
David Greenspan
9872572a4e Replace DOMMaterializer visitor with a function
This already reduces stack usage, allowing deeper recursion,
but we'll see if we can reduce it even more.
2015-03-25 17:39:35 -07:00
Sashko Stubailo
39b11ca456 Merge branch 'master' into devel
Conflicts:
	History.md
2015-03-25 14:58:21 -07:00
Sashko Stubailo
c3bded9928 Un-rc version numbers for 1.0.5 2015-03-25 13:56:03 -07:00
David Glasser
7219c1eb53 bump for 1.0.5-rc.0
Note: we are doing a minor bump facebook rather than a major bump, even
though this is arguably backward-incompatible. But it's only reflecting
a backwards-incompatible change to reality, and we expect the upgrader
text to do a better job of expressing compatibility concerns than the
version number. There's no reason to make Atmosphere packages that
depend on facebook republish, as they are unlikely to need any changes
anyway (mostly, apps may).
2015-03-23 18:00:03 -07:00
David Glasser
bedebc1987 Use the Facebook 2.2 Graph API instead of 1.0.
Facebook is making a change on April 30th: all users of the previous
unversioned Facebook API will automatically start using the 2.0 API, and
the 1.0 API will be unavailable.  By upgrading your Meteor to include
this commit, you will be able to start adapting your app to the post-1.0
world now rather than next month.

Full information about the changes to Facebook's APIs can be found at
https://developers.facebook.com/docs/apps/upgrading

If you only use Facebook integration for login via accounts-facebook,
and don't use users' access tokens to access the Facebook API on their
behalf, then the only changes you are likely to observe are:

- The `id` returned by Facebook for users who had not previously used
  your app will be an "app-scoped ID". You cannot use these to directly
  correlate users between multiple apps (without using the Business
  Mapping API).  This does not affect users who have already logged in
  to your app, so they will continue to be able to access your app.

- Meteor asks for the `email` permission by default, and copies the
  `email` field from the `/me` object into the `serviceData.facebook`
  field on `Meteor.user()`, along with other fields which only require
  the `public_profile` permission. With 2.0, users can decline to grant
  all permissions other than `public_profile`, which means that you
  might not get their `email` address. You can use the `/me/permissions`
  API to tell if permissions were declined.

Additionally, if you are accessing other Facebook APIs using the
`access_token` returned via login, you should be aware that some
permissions have changed in Facebook Graph API 2.0 and newer. Most
notably, many operations involving friends need permissions such as
`user_friends` to be explicitly requested now.  Users can decline any
permission (other than `public_profile`).  Apps which need permissions
other than `public_profile`, `email`, and `user_friends` may need to
pass through a review stage before being fully activated.

To change your app to request new permissions such as `user_friends`,
specify the `requestPermissions` option to
`Meteor.loginWithFacebook` (if you implemented your own login UI) or to
`Accounts.ui.config` (if you are using the `accounts-ui` package).

Note that while Meteor will now always use the v2.2 API to fetch the
access token, it does appear that the access token can still be used to
access pre-v2.2 APIs.  For example, you can still use the access token
to run FQL queries, even though FQL was removed in API v2.1.

Fixes #3123.
2015-03-23 14:57:53 -07:00
David Glasser
9c742c861f Use the Facebook 2.2 Graph API instead of 1.0.
Facebook is making a change on April 30th: all users of the previous
unversioned Facebook API will automatically start using the 2.0 API, and
the 1.0 API will be unavailable.  By upgrading your Meteor to include
this commit, you will be able to start adapting your app to the post-1.0
world now rather than next month.

Full information about the changes to Facebook's APIs can be found at
https://developers.facebook.com/docs/apps/upgrading

If you only use Facebook integration for login via accounts-facebook,
and don't use users' access tokens to access the Facebook API on their
behalf, then the only changes you are likely to observe are:

- The `id` returned by Facebook for users who had not previously used
  your app will be an "app-scoped ID". You cannot use these to directly
  correlate users between multiple apps (without using the Business
  Mapping API).  This does not affect users who have already logged in
  to your app, so they will continue to be able to access your app.

- Meteor asks for the `email` permission by default, and copies the
  `email` field from the `/me` object into the `serviceData.facebook`
  field on `Meteor.user()`, along with other fields which only require
  the `public_profile` permission. With 2.0, users can decline to grant
  all permissions other than `public_profile`, which means that you
  might not get their `email` address. You can use the `/me/permissions`
  API to tell if permissions were declined.

Additionally, if you are accessing other Facebook APIs using the
`access_token` returned via login, you should be aware that some
permissions have changed in Facebook Graph API 2.0 and newer. Most
notably, many operations involving friends need permissions such as
`user_friends` to be explicitly requested now.  Users can decline any
permission (other than `public_profile`).  Apps which need permissions
other than `public_profile`, `email`, and `user_friends` may need to
pass through a review stage before being fully activated.

To change your app to request new permissions such as `user_friends`,
specify the `requestPermissions` option to
`Meteor.loginWithFacebook` (if you implemented your own login UI) or to
`Accounts.ui.config` (if you are using the `accounts-ui` package).

Note that while Meteor will now always use the v2.2 API to fetch the
access token, it does appear that the access token can still be used to
access pre-v2.2 APIs.  For example, you can still use the access token
to run FQL queries, even though FQL was removed in API v2.1.

Fixes #3123.
2015-03-20 14:27:07 -07:00
David Glasser
87a0366352 Merge branch 'master' into devel for 1.0.4.2 2015-03-20 11:34:44 -07:00
David Glasser
9e2539bcd1 1.0.4.2 2015-03-20 11:13:06 -07:00
David Glasser
601f007922 Merge branch 'master' into devel 2015-03-18 00:56:51 -07:00
David Glasser
92ba69e860 1.0.4.1 2015-03-18 00:29:35 -07:00
David Greenspan
8ac310b9db Fix #3942
I don't know how to repro this for a test, but this pretty clearly
should fix the issue!  This is how the code should have been written
the first time.
2015-03-17 15:20:16 -07:00
David Glasser
44a4604c8d Document Meteor.loginWithX callback only for popup
Fixes #3917.
2015-03-17 14:45:22 -07:00
hwillson
cca2ef2354 Minor adjustments to add blaze and spacebars package references.
[stubailo: Some improvements before merging]
2015-03-17 13:55:44 -07:00
David Glasser
21bdac8734 Merge branch 'master' into devel
Conflicts:
	History.md
	packages/accounts-password/package.js
	packages/accounts-password/password_server.js
	packages/constraint-solver/package.js
	packages/meteor-tool/package.js
	packages/non-core/npm-bcrypt/package.js
	packages/package-version-parser/package-version-parser-tests.js
	packages/package-version-parser/package-version-parser.js
	packages/package-version-parser/package.js
	tools/selftest.js
2015-03-17 13:41:14 -07:00
David Glasser
4daaa76b12 METEOR@1.0.4 2015-03-17 13:06:07 -07:00
David Glasser
616649d492 1.0.4-rc.6 2015-03-17 12:22:32 -07:00
Sashko Stubailo
efdfe62331 Validate number of colons in package name on create
Instead of in the general package version parser
2015-03-17 10:56:33 -07:00
Slava Kim
9a29988016 Merge pull request #3937 from meteor/callbacks-docs
Better documentation for callbacks taking arguments
2015-03-17 07:21:11 +00:00
Slava Kim
b3e1c4d89a Docs: Put TrackerComputationFunction typedef to Tracker namespace 2015-03-17 00:20:32 -07:00
Rahul
55b8441df9 Correct typo 2015-03-16 16:16:04 -07:00
David Glasser
1d8e5f7a4e 1.0.4-rc.5 2015-03-16 12:31:50 -07:00
Slava Kim
dab2782434 Document a whole bunch of missing arguments/returns 2015-03-14 23:04:09 -07:00
David Greenspan
1b85b8205e Enable detailed profiling of the constraint solver
See the report using METEOR_PROFILE=1
2015-03-13 10:47:52 -07:00
David Greenspan
9f15f41482 Solve the "unknown var" problem more elegantly
The constraint-solver now uses the logic-solver in such a way that
accessing variables that weren't part of the problem statement will
never throw an error.  That way, we don't have to worry about
present and future cases where we don't generate any logical formulas
involving a package "foo" and then we say to minimize some weighted
sum over packages including "foo".
2015-03-13 06:37:06 -07:00
Sashko Stubailo
8bff269206 Bump version of npm-bcrypt to publish on all platforms
Conflicts:
	packages/accounts-password/package.js
	packages/non-core/npm-bcrypt/package.js
2015-03-12 20:18:02 -07:00
David Greenspan
6b40a2e2bb Avoid solver error when package mentioned weakly
Unloaded packages mentioned in weak dependencies could trigger a
situation where the logic solver is asked for the value of a variable
that doesn't exist.  This issue is worth looking into in more detail,
but this is a strict improvement that addresses the basic case.
2015-03-12 18:12:01 -07:00
David Glasser
d770d81399 1.0.4-rc.4 2015-03-12 18:03:11 -07:00
Sashko Stubailo
c6ea68f9b3 Make meteor create --package not use prefix
It used to create a directory with an underscore instead of a colon
Now, it just removes the prefix.

In cases where the name of the package has more than one colon or starts or ends
witha colon, we report an error.
2015-03-12 17:57:27 -07:00
David Greenspan
e8e7ec43bf Add METEOR_PRINT_CONSTRAINT_SOLVER_INPUT env var
Very useful for us or users to run!  If there's a bug anywhere in the
constraint-solver or logic-solver package that comes up when using
the tool, we can probably reproduce it just by feeding the JSON that's
printed out into the constraint-solver in a test.
2015-03-12 17:44:46 -07:00
David Greenspan
7c245285fe meteor update with no args patches indirect deps
With this change, `meteor update` with no arguments, in addition to
updating direct dependencies, updates patch versions of indirect
dependencies, so you will get your version 1.4.2 in the above example.

Background: As of the new solver, we already prefer patched versions 
when selecting a version for a new indirect dependency.  For example,
if 1.4.0 is the oldest version we could choose, we will take 1.4.1
instead if available.  However, if 1.4.2 came out, there would never
be an occasion to take it, unless you explicitly typed
`meteor update the-indirect-dependency`.  `meteor update` with no
args expands to `meteor update <all direct deps>`.

Also improve comments, tests, and code around CS.Input.
2015-03-12 16:24:05 -07:00
David Greenspan
d566d92b22 Better-organize constraint-solver test data 2015-03-12 16:24:05 -07:00
Sashko Stubailo
050dd10ae7 Merge pull request #3923 from rjakobsson/use-new-mongo-everywhere
Issue #3906 fix
2015-03-12 12:05:59 -07:00
David Glasser
14887d8c9c Avoid infinite loops in the Tracker flush cycle
Tracker.flush() will still guarantee that all computations and
afterFlush callbacks have been fully flushed, but the implicit flush
cycle started by an invalidation or afterFlush call will yield to the
event loop for 10ms every thousand computations.

Fixes #3901.

Reviewed at https://rbcommons.com/s/meteor/r/25/
2015-03-12 11:02:09 -07:00
Robin Jakobsson
dd79aeabbc change deprecated 'new Meteor.Collection' to 'new Mongo.Collection' to address #3906 2015-03-12 11:22:29 +01:00
David Glasser
51b38a5a45 Test for Accounts.setPassword(u, p, {logout: false}) 2015-03-11 00:00:08 -07:00
David Glasser
1b779a7545 Style improvements to Accounts.setPassword(u, p, {logout: false}) 2015-03-10 23:55:13 -07:00
David Glasser
7ffc3a44b0 1.0.4-rc.3 2015-03-10 22:00:24 -07:00
David Glasser
7c16b916e4 Make logging test pass with --production 2015-03-10 15:48:06 -07:00
David Glasser
a2f724fd47 Upgrade uglify-js to 2.4.17 from 2.4.13
Fixes #2877.  Fixes #3360.
2015-03-10 15:48:06 -07:00
Slava Kim
26ae0874e7 Merge pull request #3907 from meteor/fix-2845
Fix the broken logic of moving elements forward in a sequence (Blaze)
2015-03-10 22:36:15 +00:00
Slava Kim
49deaf1c5b Explain, how observe-sequence's movedTo works. 2015-03-10 15:34:59 -07:00
David Greenspan
070ca69f9a Validate package names more strictly
In particular, ban leading `-`, trailing `.`, and `..` anywhere.

This backport commit drops the changes to constraint-solver and adds a
History.md note.
2015-03-10 15:20:36 -07:00
Slava Kim
7a61abdaed Fix the logic for calculating the final location for a moved item in observe-sequence 2015-03-10 15:13:10 -07:00