{"action":"created","comment":{"url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/comments/168110782","pull_request_review_id":96422433,"id":168110782,"diff_hunk":"@@ -89,39 +90,46 @@ const isValidNodeVersion = () => {\n \n const isValidAppInstall = command => {\n   if (['help', 'init', 'login', 'apps', 'convert'].includes(command)) {\n-    return true;\n+    return { valid: true };\n   }\n \n   let packageJson;\n   try {\n     packageJson = require(path.join(process.cwd(), 'package.json'));\n     const coreVersion = packageJson.dependencies[PLATFORM_PACKAGE];\n     // could check for a lot more, but this is probably enough: https://docs.npmjs.com/files/package.json#dependencies\n-    if (!coreVersion || coreVersion.includes('^')) {\n-      return false;\n+    if (!coreVersion) {\n+      return {\n+        valid: false,\n+        reason: `Your app must depend on ${PLATFORM_PACKAGE}`\n+      };\n+    } else if (!semver.valid(coreVersion)) {\n+      // semver.valid only matches single versions\n+      return {\n+        valid: false,\n+        reason: `Your app must depend on an exact version of ${PLATFORM_PACKAGE}. Found \"${coreVersion}\" instead`","path":"src/utils/misc.js","position":32,"original_position":32,"commit_id":"3fb9d983562efe9d66557c68de97691b5fdd13a4","original_commit_id":"3fb9d983562efe9d66557c68de97691b5fdd13a4","user":{"login":"eliangcs","id":740461,"avatar_url":"https://avatars0.githubusercontent.com/u/740461?v=4","gravatar_id":"","url":"https://api.github.com/users/eliangcs","html_url":"https://github.com/eliangcs","followers_url":"https://api.github.com/users/eliangcs/followers","following_url":"https://api.github.com/users/eliangcs/following{/other_user}","gists_url":"https://api.github.com/users/eliangcs/gists{/gist_id}","starred_url":"https://api.github.com/users/eliangcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliangcs/subscriptions","organizations_url":"https://api.github.com/users/eliangcs/orgs","repos_url":"https://api.github.com/users/eliangcs/repos","events_url":"https://api.github.com/users/eliangcs/events{/privacy}","received_events_url":"https://api.github.com/users/eliangcs/received_events","type":"User","site_admin":false},"body":"Same here. I'd suggest something like\r\n\r\n> Your app must depend on an exact version of ${PLATFORM_PACKAGE}. Found \"${coreVersion} in your package.json instead. Try specifying an exact version.\"","created_at":"2018-02-14T09:04:33Z","updated_at":"2018-02-14T09:13:42Z","html_url":"https://github.com/zapier/zapier-platform-cli/pull/238#discussion_r168110782","pull_request_url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/comments/168110782"},"html":{"href":"https://github.com/zapier/zapier-platform-cli/pull/238#discussion_r168110782"},"pull_request":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238"}}},"pull_request":{"url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238","id":169027455,"html_url":"https://github.com/zapier/zapier-platform-cli/pull/238","diff_url":"https://github.com/zapier/zapier-platform-cli/pull/238.diff","patch_url":"https://github.com/zapier/zapier-platform-cli/pull/238.patch","issue_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/238","number":238,"state":"open","locked":false,"title":"be more specific when we cry invalid install","user":{"login":"xavdid","id":1231935,"avatar_url":"https://avatars0.githubusercontent.com/u/1231935?v=4","gravatar_id":"","url":"https://api.github.com/users/xavdid","html_url":"https://github.com/xavdid","followers_url":"https://api.github.com/users/xavdid/followers","following_url":"https://api.github.com/users/xavdid/following{/other_user}","gists_url":"https://api.github.com/users/xavdid/gists{/gist_id}","starred_url":"https://api.github.com/users/xavdid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavdid/subscriptions","organizations_url":"https://api.github.com/users/xavdid/orgs","repos_url":"https://api.github.com/users/xavdid/repos","events_url":"https://api.github.com/users/xavdid/events{/privacy}","received_events_url":"https://api.github.com/users/xavdid/received_events","type":"User","site_admin":false},"body":"Fixes [PDE-69](https://zapierorg.atlassian.net/browse/PDE-69). the only part of this I wasn't sure on was the purpose of the following [blurb](https://github.com/zapier/zapier-platform-cli/blob/master/src/utils/misc.js#L107-L111) from @bryanhelmig:\r\n\r\n```js\r\n// try skipping the CLI itself\r\nconst CLIpackageJson = require(path.join(__dirname, '../../package.json'));\r\nif (_.isEqual(packageJson, CLIpackageJson)) {\r\n  return true;\r\n}\r\n```\r\n\r\nAs far as I can tell, this isn't needed anymore (it's only true if the command is run from within the `platform-cli` directory itself?\r\n\r\nPast that, just some nicer messages!","created_at":"2018-02-14T05:51:50Z","updated_at":"2018-02-14T09:13:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f5106e5b77bd49f28182652f6e001a4e179fb71","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238/commits","review_comments_url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238/comments","review_comment_url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/238/comments","statuses_url":"https://api.github.com/repos/zapier/zapier-platform-cli/statuses/3fb9d983562efe9d66557c68de97691b5fdd13a4","head":{"label":"zapier:better-error-messages","ref":"better-error-messages","sha":"3fb9d983562efe9d66557c68de97691b5fdd13a4","user":{"login":"zapier","id":1261889,"avatar_url":"https://avatars1.githubusercontent.com/u/1261889?v=4","gravatar_id":"","url":"https://api.github.com/users/zapier","html_url":"https://github.com/zapier","followers_url":"https://api.github.com/users/zapier/followers","following_url":"https://api.github.com/users/zapier/following{/other_user}","gists_url":"https://api.github.com/users/zapier/gists{/gist_id}","starred_url":"https://api.github.com/users/zapier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zapier/subscriptions","organizations_url":"https://api.github.com/users/zapier/orgs","repos_url":"https://api.github.com/users/zapier/repos","events_url":"https://api.github.com/users/zapier/events{/privacy}","received_events_url":"https://api.github.com/users/zapier/received_events","type":"Organization","site_admin":false},"repo":{"id":72045868,"name":"zapier-platform-cli","full_name":"zapier/zapier-platform-cli","owner":{"login":"zapier","id":1261889,"avatar_url":"https://avatars1.githubusercontent.com/u/1261889?v=4","gravatar_id":"","url":"https://api.github.com/users/zapier","html_url":"https://github.com/zapier","followers_url":"https://api.github.com/users/zapier/followers","following_url":"https://api.github.com/users/zapier/following{/other_user}","gists_url":"https://api.github.com/users/zapier/gists{/gist_id}","starred_url":"https://api.github.com/users/zapier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zapier/subscriptions","organizations_url":"https://api.github.com/users/zapier/orgs","repos_url":"https://api.github.com/users/zapier/repos","events_url":"https://api.github.com/users/zapier/events{/privacy}","received_events_url":"https://api.github.com/users/zapier/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zapier/zapier-platform-cli","description":":computer: Build Zapier integrations and test locally using the JavaScript tools you already know.","fork":false,"url":"https://api.github.com/repos/zapier/zapier-platform-cli","forks_url":"https://api.github.com/repos/zapier/zapier-platform-cli/forks","keys_url":"https://api.github.com/repos/zapier/zapier-platform-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zapier/zapier-platform-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zapier/zapier-platform-cli/teams","hooks_url":"https://api.github.com/repos/zapier/zapier-platform-cli/hooks","issue_events_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/events{/number}","events_url":"https://api.github.com/repos/zapier/zapier-platform-cli/events","assignees_url":"https://api.github.com/repos/zapier/zapier-platform-cli/assignees{/user}","branches_url":"https://api.github.com/repos/zapier/zapier-platform-cli/branches{/branch}","tags_url":"https://api.github.com/repos/zapier/zapier-platform-cli/tags","blobs_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zapier/zapier-platform-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/zapier/zapier-platform-cli/languages","stargazers_url":"https://api.github.com/repos/zapier/zapier-platform-cli/stargazers","contributors_url":"https://api.github.com/repos/zapier/zapier-platform-cli/contributors","subscribers_url":"https://api.github.com/repos/zapier/zapier-platform-cli/subscribers","subscription_url":"https://api.github.com/repos/zapier/zapier-platform-cli/subscription","commits_url":"https://api.github.com/repos/zapier/zapier-platform-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/zapier/zapier-platform-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/zapier/zapier-platform-cli/contents/{+path}","compare_url":"https://api.github.com/repos/zapier/zapier-platform-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zapier/zapier-platform-cli/merges","archive_url":"https://api.github.com/repos/zapier/zapier-platform-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zapier/zapier-platform-cli/downloads","issues_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues{/number}","pulls_url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/zapier/zapier-platform-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/zapier/zapier-platform-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zapier/zapier-platform-cli/labels{/name}","releases_url":"https://api.github.com/repos/zapier/zapier-platform-cli/releases{/id}","deployments_url":"https://api.github.com/repos/zapier/zapier-platform-cli/deployments","created_at":"2016-10-26T21:27:01Z","updated_at":"2018-02-12T00:51:18Z","pushed_at":"2018-02-14T08:46:11Z","git_url":"git://github.com/zapier/zapier-platform-cli.git","ssh_url":"git@github.com:zapier/zapier-platform-cli.git","clone_url":"https://github.com/zapier/zapier-platform-cli.git","svn_url":"https://github.com/zapier/zapier-platform-cli","homepage":"https://zapier.github.io/zapier-platform-cli/","size":2043,"stargazers_count":125,"watchers_count":125,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":28,"license":null,"forks":36,"open_issues":28,"watchers":125,"default_branch":"master"}},"base":{"label":"zapier:master","ref":"master","sha":"e741b89099373c8c14e7d4bd00237c7b148e006d","user":{"login":"zapier","id":1261889,"avatar_url":"https://avatars1.githubusercontent.com/u/1261889?v=4","gravatar_id":"","url":"https://api.github.com/users/zapier","html_url":"https://github.com/zapier","followers_url":"https://api.github.com/users/zapier/followers","following_url":"https://api.github.com/users/zapier/following{/other_user}","gists_url":"https://api.github.com/users/zapier/gists{/gist_id}","starred_url":"https://api.github.com/users/zapier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zapier/subscriptions","organizations_url":"https://api.github.com/users/zapier/orgs","repos_url":"https://api.github.com/users/zapier/repos","events_url":"https://api.github.com/users/zapier/events{/privacy}","received_events_url":"https://api.github.com/users/zapier/received_events","type":"Organization","site_admin":false},"repo":{"id":72045868,"name":"zapier-platform-cli","full_name":"zapier/zapier-platform-cli","owner":{"login":"zapier","id":1261889,"avatar_url":"https://avatars1.githubusercontent.com/u/1261889?v=4","gravatar_id":"","url":"https://api.github.com/users/zapier","html_url":"https://github.com/zapier","followers_url":"https://api.github.com/users/zapier/followers","following_url":"https://api.github.com/users/zapier/following{/other_user}","gists_url":"https://api.github.com/users/zapier/gists{/gist_id}","starred_url":"https://api.github.com/users/zapier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zapier/subscriptions","organizations_url":"https://api.github.com/users/zapier/orgs","repos_url":"https://api.github.com/users/zapier/repos","events_url":"https://api.github.com/users/zapier/events{/privacy}","received_events_url":"https://api.github.com/users/zapier/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zapier/zapier-platform-cli","description":":computer: Build Zapier integrations and test locally using the JavaScript tools you already know.","fork":false,"url":"https://api.github.com/repos/zapier/zapier-platform-cli","forks_url":"https://api.github.com/repos/zapier/zapier-platform-cli/forks","keys_url":"https://api.github.com/repos/zapier/zapier-platform-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zapier/zapier-platform-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zapier/zapier-platform-cli/teams","hooks_url":"https://api.github.com/repos/zapier/zapier-platform-cli/hooks","issue_events_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/events{/number}","events_url":"https://api.github.com/repos/zapier/zapier-platform-cli/events","assignees_url":"https://api.github.com/repos/zapier/zapier-platform-cli/assignees{/user}","branches_url":"https://api.github.com/repos/zapier/zapier-platform-cli/branches{/branch}","tags_url":"https://api.github.com/repos/zapier/zapier-platform-cli/tags","blobs_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zapier/zapier-platform-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/zapier/zapier-platform-cli/languages","stargazers_url":"https://api.github.com/repos/zapier/zapier-platform-cli/stargazers","contributors_url":"https://api.github.com/repos/zapier/zapier-platform-cli/contributors","subscribers_url":"https://api.github.com/repos/zapier/zapier-platform-cli/subscribers","subscription_url":"https://api.github.com/repos/zapier/zapier-platform-cli/subscription","commits_url":"https://api.github.com/repos/zapier/zapier-platform-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/zapier/zapier-platform-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/zapier/zapier-platform-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/zapier/zapier-platform-cli/contents/{+path}","compare_url":"https://api.github.com/repos/zapier/zapier-platform-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zapier/zapier-platform-cli/merges","archive_url":"https://api.github.com/repos/zapier/zapier-platform-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zapier/zapier-platform-cli/downloads","issues_url":"https://api.github.com/repos/zapier/zapier-platform-cli/issues{/number}","pulls_url":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/zapier/zapier-platform-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/zapier/zapier-platform-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zapier/zapier-platform-cli/labels{/name}","releases_url":"https://api.github.com/repos/zapier/zapier-platform-cli/releases{/id}","deployments_url":"https://api.github.com/repos/zapier/zapier-platform-cli/deployments","created_at":"2016-10-26T21:27:01Z","updated_at":"2018-02-12T00:51:18Z","pushed_at":"2018-02-14T08:46:11Z","git_url":"git://github.com/zapier/zapier-platform-cli.git","ssh_url":"git@github.com:zapier/zapier-platform-cli.git","clone_url":"https://github.com/zapier/zapier-platform-cli.git","svn_url":"https://github.com/zapier/zapier-platform-cli","homepage":"https://zapier.github.io/zapier-platform-cli/","size":2043,"stargazers_count":125,"watchers_count":125,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":28,"license":null,"forks":36,"open_issues":28,"watchers":125,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238"},"html":{"href":"https://github.com/zapier/zapier-platform-cli/pull/238"},"issue":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/238"},"comments":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/issues/238/comments"},"review_comments":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238/comments"},"review_comment":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/pulls/238/commits"},"statuses":{"href":"https://api.github.com/repos/zapier/zapier-platform-cli/statuses/3fb9d983562efe9d66557c68de97691b5fdd13a4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"eliangcs"}}