From aa2867b3ead070f95969b1e852bc04c506610ada Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 20 Mar 2015 11:03:36 -0700 Subject: [PATCH 1/4] Clean up Cordova app IDs a bit Starting with cordova-lib 4.2.0 (shipped with Meteor 1.0.4) the cordova create command checks that app IDs look like Java namespaces. Clean up the most obvious ways that our generated app IDs won't look like Java namespaces (most notably hyphens). This isn't perfect (eg we don't check for leading digits or consecutive/leading/trailing dots, or for Java reserved words). This check is implemented by the valid-identifier NPM package. While we're at it, put app ids under `com.meteor.userapps` so that there are other parts of `com.meteor` available for potential MDG Java work. Fixes #3950. --- tools/commands-cordova.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 767aaf421c..b9319ea1bd 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -375,7 +375,10 @@ var ensureCordovaProject = function (projectContext, appName) { try { var creation = execFileSyncOrThrow(localCordova, ['create', files.pathBasename(cordovaPath), - 'com.meteor.' + appName, appName.replace(/\s/g, '')], + // Cordova app identifiers have to look like Java namespaces. + // Change weird characters (especially hyphens) into underscores. + 'com.meteor.userapps.' + appName.replace(/[^a-zA-Z\d_$.]/g, '_'), + appName.replace(/\s/g, '')], { cwd: files.pathDirname(cordovaPath), env: buildCordovaEnv() }); // create a folder for storing local plugins From 9e2539bcd139242ba09b915ec80096111099f852 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 20 Mar 2015 11:13:06 -0700 Subject: [PATCH 2/4] 1.0.4.2 --- History.md | 6 ++++++ packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-official.json | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index 7df099e502..84263683ba 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,11 @@ ## v.NEXT +## v1.0.4.2, 2015-Mar-20 + +* Fix regression in 1.0.4 where using Cordova for the first time in a project + with hyphens in its directory name would fail. #3950 + + ## v1.0.4.1, 2015-Mar-18 * Fix regression in 1.0.4 where `meteor publish-for-arch` only worked for diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index d915b3b44e..641d597b06 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.43' + version: '1.0.44' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index 78d5bcb878..36aa8a73f1 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,7 +1,7 @@ { "track": "METEOR", - "version": "1.0.4.1", - "patchFrom": ["1.0.4"], + "version": "1.0.4.2", + "patchFrom": ["1.0.4", "1.0.4.1"], "recommended": false, "official": true, "description": "The Official Meteor Distribution" From f9579beab4fc376c6e18cd1bd1f8633f498aee21 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 20 Mar 2015 11:17:51 -0700 Subject: [PATCH 3/4] banner update --- scripts/admin/banners.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/admin/banners.json b/scripts/admin/banners.json index 096f56966b..c4ae75fa57 100644 --- a/scripts/admin/banners.json +++ b/scripts/admin/banners.json @@ -5,13 +5,19 @@ "0.9.2.1", "0.9.2.2", "0.9.3", "0.9.3.1", "0.9.4", "1.0", "1.0.1", "1.0.2", "1.0.2.1", "1.0.3", "1.0.3.1", "1.0.3.2"], "banner": { - "text": "=> Meteor 1.0.4.1: MongoDB 2.6 and 3.0 support, performance improvements,\n Cordova upgrades, template-specific subscriptions, and more!\n\n This release is being downloaded in the background. Update your app to\n Meteor 1.0.4.1 by running 'meteor update'." + "text": "=> Meteor 1.0.4.2: MongoDB 2.6 and 3.0 support, performance improvements,\n Cordova upgrades, template-specific subscriptions, and more!\n\n This release is being downloaded in the background. Update your app to\n Meteor 1.0.4.2 by running 'meteor update'." } }, { "versions": ["1.0.4"], "banner": { - "text": "=> Meteor 1.0.4.1: Fixes a regression in publishing packages in 1.0.4.\n\n This release is being downloaded in the background. Update your app to\n Meteor 1.0.4.1 by running 'meteor update'." + "text": "=> Meteor 1.0.4.2: Fixes regressions in publishing packages and creating new Cordova projects in 1.0.4.\n\n This release is being downloaded in the background. Update your app to Meteor 1.0.4.2 by running 'meteor update --patch'." + } + }, + { + "versions": ["1.0.4.1"], + "banner": { + "text": "=> Meteor 1.0.4.2: Fixes a regression in creating new Cordova projects in 1.0.4 and 1.0.4.1.\n\n This release is being downloaded in the background. Update your app to Meteor 1.0.4.2 by running 'meteor update --patch'." } } ] From c8c9f8dc60a4363e4c01d3ae0f0d4cecc647a101 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 20 Mar 2015 11:32:45 -0700 Subject: [PATCH 4/4] Update docs and examples to 1.0.4.2 --- docs/.meteor/release | 2 +- docs/client/helpers.js | 2 +- examples/clock/.meteor/release | 2 +- examples/leaderboard/.meteor/release | 2 +- examples/localmarket/.meteor/release | 2 +- examples/todos/.meteor/release | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/.meteor/release b/docs/.meteor/release index 23c0429646..41f2e623eb 100644 --- a/docs/.meteor/release +++ b/docs/.meteor/release @@ -1 +1 @@ -METEOR@1.0.4.1 +METEOR@1.0.4.2 diff --git a/docs/client/helpers.js b/docs/client/helpers.js index b32379594d..a5b620006c 100644 --- a/docs/client/helpers.js +++ b/docs/client/helpers.js @@ -1,4 +1,4 @@ -release = Meteor.release ? "1.0.4.1" : "(checkout)"; +release = Meteor.release ? "1.0.4.2" : "(checkout)"; Template.registerHelper("release", release); diff --git a/examples/clock/.meteor/release b/examples/clock/.meteor/release index 23c0429646..41f2e623eb 100644 --- a/examples/clock/.meteor/release +++ b/examples/clock/.meteor/release @@ -1 +1 @@ -METEOR@1.0.4.1 +METEOR@1.0.4.2 diff --git a/examples/leaderboard/.meteor/release b/examples/leaderboard/.meteor/release index 23c0429646..41f2e623eb 100644 --- a/examples/leaderboard/.meteor/release +++ b/examples/leaderboard/.meteor/release @@ -1 +1 @@ -METEOR@1.0.4.1 +METEOR@1.0.4.2 diff --git a/examples/localmarket/.meteor/release b/examples/localmarket/.meteor/release index 23c0429646..41f2e623eb 100644 --- a/examples/localmarket/.meteor/release +++ b/examples/localmarket/.meteor/release @@ -1 +1 @@ -METEOR@1.0.4.1 +METEOR@1.0.4.2 diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index 23c0429646..41f2e623eb 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -METEOR@1.0.4.1 +METEOR@1.0.4.2