Commit Graph

5977 Commits

Author SHA1 Message Date
ekatek
38e0e344c4 prepare for 1.0.3.1
- increment the release number in banners.json
- increment version number for meteor-tool
- increment release number in the release configuration
2015-01-20 13:50:34 -08:00
ekatek
99124d881a increment package versions 2015-01-20 10:25:22 -08:00
ekatek
fbfd5c4664 increment version numbers 2015-01-15 10:50:09 -08:00
David Glasser
a1f8394750 Fix double execution of Session.close
In Session.close, `self.socket.close` could trigger this event handler:

    socket.on('close', function () {
      if (socket._meteorSession) {
        Fiber(function () {
          socket._meteorSession.close();
        }).run();
      }
    });

which could trigger a reentrant call to Session.close.  The self.inQueue
guard was not sufficient to stop multiple execution, because it was too
low.

Symptoms included:

- The "sessions" server fact would be decremented twice and become
  inaccurate (and even negative!)
- Connection.onClose callbacks could be called twice

Fixes #3331.
2015-01-14 18:37:24 -08:00
David Glasser
4ba315d2f6 Semi-expose password hashing
See #3410.
2015-01-14 12:05:05 -08:00
ekatek
4c42a87721 increment versions 2015-01-13 19:32:42 -08:00
ekatek
40fa95830f increment version numbers 2015-01-13 19:30:27 -08:00
ekatek
60883bc4d8 release script and bump tool version 2015-01-13 19:20:33 -08:00
Avital Oliver
547e8f6111 Add spacebars->tracker package dependency
Fixes #3395
2015-01-13 18:00:06 -08:00
Avital Oliver
cb4f69a4df Use Spacebars comment instead of HTML comment in accounts-ui
Fixes #3384
2015-01-13 17:40:46 -08:00
Rodrigo Estebanez
87e3c6499d add tokenId to google response
Signed-off-by: Rodrigo Estebanez <restebanez@mdsol.com>
2015-01-13 16:57:24 -08:00
Small Helm LLC
97d4dc54df using Meteor._relativeToSiteRootUrl for CSS reload 2015-01-13 16:07:38 -08:00
ekatek
035e95d154 remove the packages from the README
After some consideration, we decided that the extra package list in the README
is not up to date, will never be kept up to date and as such, is actively
unhelpful.
2015-01-13 13:53:22 -08:00
ekatek
2d98e1e195 move list of packages out of the top section of the meteor-platform README.md
Move the list of packages out of the top section of the `meteor-platform` README.md,
because it doesn't play well with `meteor show`. Leave it in the section below for
people that run into the README in some other context (for example, Atmosphere).
2015-01-13 13:53:22 -08:00
David Greenspan
7f87518477 Unit test for upgrading indirect dependencies
This test is a more representative example of the new type of
PackagesResolver tests we can have now using CS.Input.
2015-01-13 13:42:45 -08:00
David Greenspan
bb573f9119 Reproduce slow version solving in a test
This unit test demonstrates 20-second solving time.  Thanks to the
CatalogCache abstraction, the data provided to the solver in the test
is exactly the data it gets when running the “meteor” command in a test
app with a bunch of packages in .meteor/packages and no .meteor/versions
file.

The test is hidden behind an environment variable:
CONSTRAINT_SOLVER_SLOW_TESTS
2015-01-13 11:03:51 -08:00
David Greenspan
4f473ff2d2 “meteor update” can update non-root dependencies
Previously, “meteor update foo” meant “ignore .meteor/versions for foo”,
which would upgrade if “foo” was a root dependency, and downgrade if foo
was only a transitive dependency.

Now, we make sure to try to upgrade foo even if it is not a root
dependency.

See #3282.
2015-01-13 09:34:50 -08:00
David Glasser
8cddf2db41 don't assume defined, shorten lines 2015-01-12 14:36:37 -08:00
Daniel Dornhardt
3372e660d0 Fix Css autoupdate for pages with ROOT_URL_PATH_PREFIX set
For pages using a ROOT_URL="" setting with a path component (eg.
"myproject.com/beta"), the CSS autoupdate would break the page, because
it would set the autoupdate CSS files' URL to /<longidstring>.css, while it
should have been /beta/<longidstring>.css. Added the required
ROOT_URL_PATH_PREFIX.
2015-01-12 14:31:20 -08:00
David Glasser
106337311e use upsert method, fix indentation 2015-01-12 14:06:29 -08:00
Daniel Dent
f12b08947a Avoids a race condition when multiple server instances are backed by the MongoDB database. MongoDB does not have transactions, atomic upserts are used instead. 2015-01-12 14:05:00 -08:00
Dan Dascalescu
6bc6abee85 Direct link to templating doc 2015-01-12 11:16:06 -08:00
Avital Oliver
becc877b6b Fix link in accounts-ui-unstyled README 2015-01-12 11:03:33 -08:00
David Greenspan
16e74a8fe0 Constraint[List].isSatisfied doesn’t need resolver
More code simplification
2015-01-09 19:07:05 -08:00
David Greenspan
7bdc6ccdeb Create CS.Input and clean up resolver options
CS.Input is a serializable representation of the “problem.”  It includes
the arguments to PackagesResolver#resolve, and also the catalog data
loaded into the CatalogCache.  It’s independent of the solver, and
doesn’t even know about PackagesResolver or Resolver.

Along the way, get rid of the _testing and _debug flags.  “_testing”
came about to avoid running the real cost function on some of the unit
tests, but it doesn’t actually seem to matter anymore for correctness
or performance of the tests.  “_debug” was just used to enable some
console.logs, and possibly shouldn’t have been committed in the first
place.
2015-01-09 18:55:10 -08:00
David Greenspan
3447f85326 PackagesResolver: Delete line that does nothing 2015-01-09 16:42:41 -08:00
David Glasser
1f9648cd23 Upgrade jquery to 1.11.2 from 1.11.0
Closes #2386.
2015-01-09 16:36:58 -08:00
David Glasser
9023cccc28 Clean up PR 2015-01-09 15:53:49 -08:00
Tarang Patel
056e0acbd0 Update routepolicy.js 2015-01-09 15:49:04 -08:00
Tarang Patel
f319109634 Update webapp_server.js 2015-01-09 15:49:04 -08:00
Tarang Patel
5aba891199 Update webapp_server.js 2015-01-09 15:49:04 -08:00
Peter Curtis
1f3741cba2 Fix a failure to detect flush-in-autorun
Fixes #3037.
2015-01-09 15:31:30 -08:00
David Greenspan
4e3a8d9506 Clarify options to resolve(…) and Resolver
Don’t mutate the “options” object in PackageResolver#resolve, and don’t
pass it on to _getResolverOptions.

At this point, this is rearranging deck chairs on the Titanic, but
making this code more understandable helps me replace it.
2015-01-09 12:24:35 -08:00
David Greenspan
9e7a79074f Merge branch 'dgreensp-constraint-solver-2' into devel 2015-01-09 10:58:16 -08:00
David Greenspan
9d9dec602f Use the CatalogLoader in PackageResolver
PackageResolver no longer loads data from the Catalog.  Instead, it
tells CatalogLoader what to load, and it sets up the Resolver based
on what it finds in the CatalogCache.

PackageResolver now creates the Resolver inside resolve(…).  If the tool
were to invoke resolve(…) multiple times on the same PackageResolver
(which it doesn’t at the moment), the CatalogCache would persist, but
not the Resolver.  (Note that PackageResolver#resolve makes multiple
calls to the same Resolver#resolve internally.)

The purpose of this change is to stop using Resolver to store the
dependency graph.  Resolver will be replaced with a logic-solver-based
implementation that will not represent the graph as is, but instead
encode the graph as a satisfiability problem.  Meanwhile, CatalogCache
is better at storing the graph than Resolver was, because it is easy
to populate, query, and serialize.

This change brings us back to a functional “devel”.
2015-01-09 10:26:06 -08:00
David Greenspan
329227db53 CS.CatalogLoader 2015-01-08 16:25:42 -08:00
David Greenspan
2fbb1b9cb5 CS.CatalogCache and tests 2015-01-08 15:34:04 -08:00
David Greenspan
68e3cbe07f Dependency can take a String argument 2015-01-08 15:33:55 -08:00
David Glasser
60ba1f403b Revert "Use per-message websocket compression"
This reverts commit 67bea9c102.

See https://github.com/faye/permessage-deflate-node/issues/1

This can be consistently replicated by running test-packages ddp (note
that the tests pass but then the server crashes). "livedata server -
connection in publish function" specifically is enough
2015-01-08 14:26:28 -08:00
David Greenspan
f8d2622235 Introduce CS.Dependency and CS.PackageAndVersion 2015-01-08 14:08:37 -08:00
David Greenspan
10698d5940 PackageConstraint has a toString() 2015-01-08 13:46:59 -08:00
David Greenspan
fe8a661e2f PackageConstraint can take a VersionConstraint
also, versionConstraint.raw is always a String
2015-01-08 13:38:17 -08:00
David Greenspan
eb084ae60f Fix comment 2015-01-08 13:38:17 -08:00
David Glasser
67bea9c102 Use per-message websocket compression
By default, we attempt to use this for every websocket message on both
client and server.

On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment
variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is
set, then it must be valid JSON. If it represents a falsey value, then
we do not use permessage-deflate at all; otherwise, the JSON value is
used as an argument to deflate's configure method; see
https://github.com/faye/permessage-deflate-node/blob/master/README.md

We do not provide a way to use it only on some messages. The underlying
spec allows this but permessage-deflate does not; see
https://github.com/faye/permessage-deflate-node/issues/2

We do not provide a mechanism to control compression parameters on the
client side.  The assumption is that the common reason to care about
compression parameters is to control server per-connection memory
usage. (The noContextTakeover configuration parameter should save some
memory and still allow for some compression, for example.)

Addresses #3007 (which will not be fixed until this change is deployed
on the package server as well).
2015-01-08 12:08:13 -08:00
David Greenspan
c99bad804b Document PackageConstraint form
…and commit a line I forgot
2015-01-07 20:14:42 -08:00
David Greenspan
e885e78348 Change the format returned by PVP.parseConstraint
This is a breaking change to package-version-parser.

A PackageConstraint used to look like this:

```
{ name: String,
  constraintString: String,
  constraints: [{version: String|null,
                 type: String}]}
```

Now it looks like this:
```
{ name: String,
  constraintString: String,
  vConstraint: {
    raw: String,
    alternatives: [{versionString: String|null,
                    type: String}]}}
```

Where (vConstraint instanceof VersionConstraint) and
(vConstraint.raw === constraintString).

This achieves several desirable changes at once.

* `constraint.constraints` for the disjuncts in “1.0.0||2.0.0”
  was confusing.  `alternatives` is better.
* Having a class for VersionConstraint will come in handy because
  we can add methods to it, and we can use it in the constraint
  solver to represent the problem statement.
* The names “vConstraint” and “versionString” are a little verbose,
  but there really shouldn’t be a lot of code that dives into this
  structure, and I really wanted to avoid anyone ever writing:
  `constraint.constraint.alternatives[0].version`, and then wondering
  what sort of object that was (not a parsed PackageVersion! we could
  parse eagerly but that might be slow).
2015-01-07 20:10:44 -08:00
David Greenspan
f51afe18f0 Ban constraints like foo@||
Clean up parseSimpleConstraint
2015-01-07 19:27:09 -08:00
David Greenspan
184ab3bde1 PV.parseConstraint returns a PackageConstraint
Mostly I just made parseConstraint clearer and gave the return value a
prototype.

There are new unit tests, and the existing ones have been given much
better names.

PV.parseConstraint also now optionally takes two arguments, a package name and a version constraint.  We can eventually propagate this feature to the tool and stop concatenating with “@” so much.

I’m referring to “foo@=1.0.0” as a PackageConstraint and “=1.0.0” as a version constraint.  I’ll probably add a VersionConstraint class too.
2015-01-07 19:04:55 -08:00
David Greenspan
08e1b78e58 Add a match unit test for “not a plain object” 2015-01-07 19:04:55 -08:00
David Greenspan
b1995fce13 Improve a “match” error message 2015-01-07 19:04:54 -08:00