From 3c5c9579dfdec4b1705ec2fba317e5308b120299 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 12:32:58 -0700 Subject: [PATCH 1/9] Update Node to 0.8.24 and MongoDB to 2.4.4. Have not yet tweaked MIN_NODE_VERSION. We are still avoiding Node 0.10 because http-proxy has bugs with websocket proxying on Node 0.10. --- scripts/generate-dev-bundle.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh index ecd274ad7e..47baf89c6c 100755 --- a/scripts/generate-dev-bundle.sh +++ b/scripts/generate-dev-bundle.sh @@ -74,7 +74,7 @@ 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 +git checkout v0.8.24 ./configure --prefix="$DIR" make -j4 @@ -141,7 +141,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 From e72c7472a8af66b74b92126815c776d0f929f9f2 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 13:18:32 -0700 Subject: [PATCH 2/9] Restore copy from jenkins script, this time for dev bundle --- scripts/admin/copy-dev-bundle-from-jenkins.sh | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scripts/admin/copy-dev-bundle-from-jenkins.sh diff --git a/scripts/admin/copy-dev-bundle-from-jenkins.sh b/scripts/admin/copy-dev-bundle-from-jenkins.sh new file mode 100644 index 0000000000..03c2d53582 --- /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 From e0ef4d4ce9cc69f2fbfb05f8d1f42c2708cd940a Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 14:01:07 -0700 Subject: [PATCH 3/9] docs: move note that slipped down a section. --- docs/client/concepts.html | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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 From b61eea15097f38880cfa9e5ac5c92c6bd30c0731 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 13:30:22 -0700 Subject: [PATCH 4/9] Make selectorFromUserQuery actually match userQueryValidator. Now the "shouldn't happen" really shouldn't happen. Fixes #1106. --- packages/accounts-password/password_server.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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"); From acf2f716a18716442474cb0e44f1b149c5f0fdcd Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 14:37:40 -0700 Subject: [PATCH 5/9] bump dev bundle version number. (0.3.7 is on linker.) --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index eefa2949df..743beee97b 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/bin/bash -BUNDLE_VERSION=0.3.6 +BUNDLE_VERSION=0.3.8 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 4e4e5add87c357f0f0d0ad8add6dd03c1655e39d Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 15:47:01 -0700 Subject: [PATCH 6/9] chmod +x and fix bug in new script --- scripts/admin/copy-dev-bundle-from-jenkins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 scripts/admin/copy-dev-bundle-from-jenkins.sh diff --git a/scripts/admin/copy-dev-bundle-from-jenkins.sh b/scripts/admin/copy-dev-bundle-from-jenkins.sh old mode 100644 new mode 100755 index 03c2d53582..54a7cbca9e --- a/scripts/admin/copy-dev-bundle-from-jenkins.sh +++ b/scripts/admin/copy-dev-bundle-from-jenkins.sh @@ -35,7 +35,7 @@ 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) }' + 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 From 870b0c5065356993a44785194da9756e697cdf35 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 15:52:30 -0700 Subject: [PATCH 7/9] Bump MIN_NODE_VERSION. --- scripts/generate-dev-bundle.sh | 2 +- tools/meteor.js | 2 +- tools/server/server.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh index 47baf89c6c..50574c8935 100755 --- a/scripts/generate-dev-bundle.sh +++ b/scripts/generate-dev-bundle.sh @@ -73,7 +73,7 @@ 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. +# the top of tools/meteor.js and tools/server/server.js. git checkout v0.8.24 ./configure --prefix="$DIR" diff --git a/tools/meteor.js b/tools/meteor.js index 93f9ef7adf..c6c8823449 100644 --- a/tools/meteor.js +++ b/tools/meteor.js @@ -13,7 +13,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/server/server.js b/tools/server/server.js index 211c1d32c8..010b858a09 100644 --- a/tools/server/server.js +++ b/tools/server/server.js @@ -23,7 +23,7 @@ var useragent = require('useragent'); 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'); From 1ae01d3149b0c8b96684392b10cce115eb72d803 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 15:53:50 -0700 Subject: [PATCH 8/9] Update History.md. --- History.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. From 664fca93e26676d5be50b5fb49e248bae5e6e782 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 10 Jun 2013 16:22:08 -0700 Subject: [PATCH 9/9] New npm requires you to have a decent package.json when running shrinkwrap. --- tools/meteor_npm.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tools/meteor_npm.js b/tools/meteor_npm.js index 6b3c73c42d..5a080e53b0 100644 --- a/tools/meteor_npm.js +++ b/tools/meteor_npm.js @@ -174,9 +174,8 @@ _.extend(exports, { } }); - self._shrinkwrap(newPackageNpmDir); - self._createReadme(newPackageNpmDir); - self._renameAlmostAtomically(newPackageNpmDir, packageNpmDir); + self._completeNpmDirectory( + packageName, newPackageNpmDir, packageNpmDir, npmDependencies); }, _createFreshNpmDirectory: function( @@ -192,7 +191,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); },