{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/code-push/pulls/comments/55105122","id":55105122,"diff_hunk":"@@ -840,8 +841,8 @@ function promote(command: cli.IPromoteCommand): Promise<void> {\n export var release = (command: cli.IReleaseCommand): Promise<void> => {\n     if (isBinaryOrZip(command.package)) {\n         throw new Error(\"It is unnecessary to package releases in a .zip or binary file. Please specify the direct path to the update content's directory (e.g. /platforms/ios/www) or file (e.g. main.jsbundle).\");\n-    } else if (semver.valid(command.appStoreVersion) === null) {\n-        throw new Error(\"Please use a semver-compliant app store version, for example \\\"1.0.3\\\".\");\n+    } else if (semver.validRange(command.appStoreVersion) === null) {\n+        throw new Error(\"Please use a semver-compliant target binary version range, for example \\\"1.0.0\\\", \\\"*\\\" or \\\"^1.2.3\\\".\");","path":"cli/script/command-executor.ts","position":43,"original_position":43,"commit_id":"d448e58feb395737554223045563b11e5d498a86","original_commit_id":"d448e58feb395737554223045563b11e5d498a86","user":{"login":"silhouettes","id":696206,"avatar_url":"https://avatars.githubusercontent.com/u/696206?v=3","gravatar_id":"","url":"https://api.github.com/users/silhouettes","html_url":"https://github.com/silhouettes","followers_url":"https://api.github.com/users/silhouettes/followers","following_url":"https://api.github.com/users/silhouettes/following{/other_user}","gists_url":"https://api.github.com/users/silhouettes/gists{/gist_id}","starred_url":"https://api.github.com/users/silhouettes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silhouettes/subscriptions","organizations_url":"https://api.github.com/users/silhouettes/orgs","repos_url":"https://api.github.com/users/silhouettes/repos","events_url":"https://api.github.com/users/silhouettes/events{/privacy}","received_events_url":"https://api.github.com/users/silhouettes/received_events","type":"User","site_admin":false},"body":"I don't think we need to optimize the performance in error cases like this. More importantly, I think client-side validation comes with a maintenance cost, as well as the cost of having less flexibility to change things on the server (which we've already run into a few times).\r\n\r\nI agree with having a friendlier error message, and ideally that would be generated on the server, but I understand if it's too much work to do it as part of this PR.","created_at":"2016-03-04T23:36:29Z","updated_at":"2016-03-04T23:36:29Z","html_url":"https://github.com/Microsoft/code-push/pull/149#discussion_r55105122","pull_request_url":"https://api.github.com/repos/Microsoft/code-push/pulls/149","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/code-push/pulls/comments/55105122"},"html":{"href":"https://github.com/Microsoft/code-push/pull/149#discussion_r55105122"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/code-push/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/code-push/pulls/149","id":61644907,"html_url":"https://github.com/Microsoft/code-push/pull/149","diff_url":"https://github.com/Microsoft/code-push/pull/149.diff","patch_url":"https://github.com/Microsoft/code-push/pull/149.patch","issue_url":"https://api.github.com/repos/Microsoft/code-push/issues/149","number":149,"state":"open","locked":false,"title":"Let updates target a range of binary versions","user":{"login":"geof90","id":8598682,"avatar_url":"https://avatars.githubusercontent.com/u/8598682?v=3","gravatar_id":"","url":"https://api.github.com/users/geof90","html_url":"https://github.com/geof90","followers_url":"https://api.github.com/users/geof90/followers","following_url":"https://api.github.com/users/geof90/following{/other_user}","gists_url":"https://api.github.com/users/geof90/gists{/gist_id}","starred_url":"https://api.github.com/users/geof90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geof90/subscriptions","organizations_url":"https://api.github.com/users/geof90/orgs","repos_url":"https://api.github.com/users/geof90/repos","events_url":"https://api.github.com/users/geof90/events{/privacy}","received_events_url":"https://api.github.com/users/geof90/received_events","type":"User","site_admin":false},"body":"Allow updates to target a range of binary versions using semver range expressions https://github.com/npm/node-semver#advanced-range-syntax. Added an extra option in the `release-react` command to allow users to override the target binary range value specified in the app metadata. Added some tests for the new changes.\r\n\r\nUpdated the docs to reflect this new behaviour. ","created_at":"2016-03-03T23:40:51Z","updated_at":"2016-03-04T23:36:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ceeba2b2e5c79ecfe43a55c76c727454f04258e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/code-push/pulls/149/commits","review_comments_url":"https://api.github.com/repos/Microsoft/code-push/pulls/149/comments","review_comment_url":"https://api.github.com/repos/Microsoft/code-push/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/code-push/issues/149/comments","statuses_url":"https://api.github.com/repos/Microsoft/code-push/statuses/d448e58feb395737554223045563b11e5d498a86","head":{"label":"Microsoft:target-binary-range","ref":"target-binary-range","sha":"d448e58feb395737554223045563b11e5d498a86","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":43459513,"name":"code-push","full_name":"Microsoft/code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/code-push","description":"A cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices","fork":false,"url":"https://api.github.com/repos/Microsoft/code-push","forks_url":"https://api.github.com/repos/Microsoft/code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/code-push/deployments","created_at":"2015-09-30T21:12:55Z","updated_at":"2016-03-04T18:25:20Z","pushed_at":"2016-03-04T23:28:42Z","git_url":"git://github.com/Microsoft/code-push.git","ssh_url":"git@github.com:Microsoft/code-push.git","clone_url":"https://github.com/Microsoft/code-push.git","svn_url":"https://github.com/Microsoft/code-push","homepage":"http://codepush.tools","size":5118,"stargazers_count":1032,"watchers_count":1032,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":1,"forks":65,"open_issues":1,"watchers":1032,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"7bd6ad6201a1ad190b5f2f080314f9314ea3e894","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":43459513,"name":"code-push","full_name":"Microsoft/code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/code-push","description":"A cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices","fork":false,"url":"https://api.github.com/repos/Microsoft/code-push","forks_url":"https://api.github.com/repos/Microsoft/code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/code-push/deployments","created_at":"2015-09-30T21:12:55Z","updated_at":"2016-03-04T18:25:20Z","pushed_at":"2016-03-04T23:28:42Z","git_url":"git://github.com/Microsoft/code-push.git","ssh_url":"git@github.com:Microsoft/code-push.git","clone_url":"https://github.com/Microsoft/code-push.git","svn_url":"https://github.com/Microsoft/code-push","homepage":"http://codepush.tools","size":5118,"stargazers_count":1032,"watchers_count":1032,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":1,"forks":65,"open_issues":1,"watchers":1032,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/code-push/pulls/149"},"html":{"href":"https://github.com/Microsoft/code-push/pull/149"},"issue":{"href":"https://api.github.com/repos/Microsoft/code-push/issues/149"},"comments":{"href":"https://api.github.com/repos/Microsoft/code-push/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/code-push/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/code-push/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/code-push/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/code-push/statuses/d448e58feb395737554223045563b11e5d498a86"}}}}