diff --git a/History.md b/History.md index 466d52faaa..30672f3b61 100644 --- a/History.md +++ b/History.md @@ -1,6 +1,10 @@ ## vNEXT +* Upgraded dependencies: + * Node from 0.8.18 to 0.8.24 + * MongoDB from 2.4.3 to 2.4.4 + ## v0.6.4 * Separate OAuth flow logic from Accounts into separate packages. The @@ -28,7 +32,7 @@ * Underscore from 1.4.2 to 1.4.4 #776 * http-proxy from 0.8.5 to 0.10.1 #513 * connect from 1.9.2 to 2.7.10 - * mongodb from 1.2.13 to 1.3.7 #1060 + * Node mongodb client from 1.2.13 to 1.3.7 #1060 Patches contributed by GitHub users awwx, johnston, and timhaines. diff --git a/docs/client/concepts.html b/docs/client/concepts.html index 49c02bcfed..f6cb1c6e00 100644 --- a/docs/client/concepts.html +++ b/docs/client/concepts.html @@ -244,6 +244,13 @@ modify data, those modifications can run locally without waiting for the confirmation from the server, while still giving the server final say over the requested change. +{{#note}} +The current release of Meteor supports MongoDB, the popular document +database, and the examples in this section use the + [MongoDB API](http://www.mongodb.org/display/DOCS/Manual). Future +releases will include support for other databases. +{{/note}} +

Authentication and user accounts

Meteor includes [Meteor Accounts](#accounts_api), a state-of-the-art @@ -261,14 +268,6 @@ UI](#accountsui) to your app with just one line of code. The `accounts-ui` smart package even provides a configuration wizard that walks you through the steps to set up the external login services you're using in your app. -{{#note}} -The current release of Meteor supports MongoDB, the popular document -database, and the examples in this section use the - [MongoDB API](http://www.mongodb.org/display/DOCS/Manual). Future -releases will include support for other databases. -{{/note}} - -

Input validation

Meteor allows your methods and publish functions to take arguments of any diff --git a/meteor b/meteor index a0ce387c76..403f234875 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/bin/bash -BUNDLE_VERSION=0.3.7 +BUNDLE_VERSION=0.3.9 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. diff --git a/packages/accounts-password/password_server.js b/packages/accounts-password/password_server.js index a3d46d528a..663f7c15b4 100644 --- a/packages/accounts-password/password_server.js +++ b/packages/accounts-password/password_server.js @@ -16,11 +16,17 @@ var selectorFromUserQuery = function (user) { throw new Error("shouldn't happen (validation missed something)"); }; +// XXX maybe this belongs in the check package +var NonEmptyString = Match.Where(function (x) { + check(x, String); + return x.length > 0; +}); + var userQueryValidator = Match.Where(function (user) { check(user, { - id: Match.Optional(String), - username: Match.Optional(String), - email: Match.Optional(String) + id: Match.Optional(NonEmptyString), + username: Match.Optional(NonEmptyString), + email: Match.Optional(NonEmptyString) }); if (_.keys(user).length !== 1) throw new Match.Error("User property must have exactly one field"); diff --git a/scripts/admin/copy-dev-bundle-from-jenkins.sh b/scripts/admin/copy-dev-bundle-from-jenkins.sh new file mode 100755 index 0000000000..54a7cbca9e --- /dev/null +++ b/scripts/admin/copy-dev-bundle-from-jenkins.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Requires s3cmd to be installed and an appropriate ~/.s3cfg. +# Usage: +# scripts/admin/copy-dev-bundle-from-jenkins.sh [--prod] BUILDNUMBER +# where BUILDNUMBER is the small integer Jenkins build number. + +set -e +set -u + +cd `dirname $0` + +TARGET="s3://com.meteor.static/test/" +TEST=no +if [ $# -ge 1 -a $1 = '--prod' ]; then + shift + TARGET="s3://com.meteor.static/" +else + TEST=yes +fi + +if [ $# -ne 1 ]; then + echo "usage: $0 [--prod] jenkins-build-number" 1>&2 + exit 1 +fi + +DIRNAME=$(s3cmd ls s3://com.meteor.jenkins/ | perl -nle 'print $1 if m!/(dev-bundle-.+--'$1'--.+)/!') + +if [ -z "$DIRNAME" ]; then + echo "build not found" 1>&2 + exit 1 +fi + +echo Found build $DIRNAME + +# Check to make sure the proper number of each kind of file is there. +s3cmd ls s3://com.meteor.jenkins/$DIRNAME/ | \ + perl -nle 'if (/\.tar\.gz/) { ++$TAR } else { die "something weird" } END { exit !($TAR == 3) }' + +echo Copying to $TARGET +s3cmd -P cp -r s3://com.meteor.jenkins/$DIRNAME/ $TARGET diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh index 078cb31647..fa987d1218 100755 --- a/scripts/generate-dev-bundle.sh +++ b/scripts/generate-dev-bundle.sh @@ -73,8 +73,8 @@ cd build git clone git://github.com/joyent/node.git cd node # When upgrading node versions, also update the values of MIN_NODE_VERSION at -# the top of app/meteor/meteor.js and app/server/server.js. -git checkout v0.8.18 +# the top of tools/meteor.js and tools/server/server.js. +git checkout v0.8.24 ./configure --prefix="$DIR" make -j4 @@ -140,7 +140,7 @@ cd ../.. # click 'changelog' under the current version, then 'release notes' in # the upper right. cd "$DIR" -MONGO_VERSION="2.4.3" +MONGO_VERSION="2.4.4" MONGO_NAME="mongodb-${MONGO_OS}-${ARCH}-${MONGO_VERSION}" MONGO_URL="http://fastdl.mongodb.org/${MONGO_OS}/${MONGO_NAME}.tgz" curl "$MONGO_URL" | tar -xz diff --git a/tools/meteor.js b/tools/meteor.js index 1f0f9a786c..e20fdaa201 100644 --- a/tools/meteor.js +++ b/tools/meteor.js @@ -20,7 +20,7 @@ Fiber(function () { var logging = require('./logging.js'); // This code is duplicated in app/server/server.js. - var MIN_NODE_VERSION = 'v0.8.18'; + var MIN_NODE_VERSION = 'v0.8.24'; if (require('semver').lt(process.version, MIN_NODE_VERSION)) { process.stderr.write( 'Meteor requires Node ' + MIN_NODE_VERSION + ' or later.\n'); diff --git a/tools/meteor_npm.js b/tools/meteor_npm.js index 7b3ec3c978..966537dcc1 100644 --- a/tools/meteor_npm.js +++ b/tools/meteor_npm.js @@ -218,9 +218,8 @@ _.extend(exports, { } }); - self._shrinkwrap(newPackageNpmDir); - self._createReadme(newPackageNpmDir); - self._renameAlmostAtomically(newPackageNpmDir, packageNpmDir); + self._completeNpmDirectory( + packageName, newPackageNpmDir, packageNpmDir, npmDependencies); }, _createFreshNpmDirectory: function( @@ -236,7 +235,25 @@ _.extend(exports, { self._installNpmModule(name, version, newPackageNpmDir); }); + self._completeNpmDirectory( + packageName, newPackageNpmDir, packageNpmDir, npmDependencies); + }, + + // Shared code for _updateExistingNpmDirectory and _createFreshNpmDirectory. + _completeNpmDirectory: function ( + packageName, newPackageNpmDir, packageNpmDir, npmDependencies) { + var self = this; + + // temporarily construct a matching package.json to make `npm shrinkwrap` + // happy + self._constructPackageJson(packageName, newPackageNpmDir, npmDependencies); + + // Create a shrinkwrap file. self._shrinkwrap(newPackageNpmDir); + + // now delete package.json + fs.unlinkSync(path.join(newPackageNpmDir, 'package.json')); + self._createReadme(newPackageNpmDir); self._renameAlmostAtomically(newPackageNpmDir, packageNpmDir); }, diff --git a/tools/server/boot.js b/tools/server/boot.js index f5ae176e58..0f1057548e 100644 --- a/tools/server/boot.js +++ b/tools/server/boot.js @@ -4,7 +4,7 @@ var path = require("path"); var _ = require('underscore'); // This code is duplicated in tools/server/server.js. -var MIN_NODE_VERSION = 'v0.8.18'; +var MIN_NODE_VERSION = 'v0.8.24'; if (require('semver').lt(process.version, MIN_NODE_VERSION)) { process.stderr.write( 'Meteor requires Node ' + MIN_NODE_VERSION + ' or later.\n');