{"action":"created","comment":{"url":"https://api.github.com/repos/easternbloc/bramble/pulls/comments/47162014","id":47162014,"diff_hunk":"@@ -77,7 +77,26 @@ module.exports.install = function (packagesToUpdate, options) {\n             if (!err) {\n                 if (options.save) {\n                     try {\n-                        fs.writeFileSync(packagePath, fs.readFileSync(packagePath, 'utf8').replace(/[~^]/g, ''));\n+                        var packageJSON = JSON.parse(fs.readFileSync(packagePath, 'utf8'));\n+                        if (options.dev) {","path":"lib/npm.js","position":6,"original_position":6,"commit_id":"ddff35c03a2a70a274e34ec1c285a36c9c37fe82","original_commit_id":"ddff35c03a2a70a274e34ec1c285a36c9c37fe82","user":{"login":"roc","id":120181,"avatar_url":"https://avatars.githubusercontent.com/u/120181?v=3","gravatar_id":"","url":"https://api.github.com/users/roc","html_url":"https://github.com/roc","followers_url":"https://api.github.com/users/roc/followers","following_url":"https://api.github.com/users/roc/following{/other_user}","gists_url":"https://api.github.com/users/roc/gists{/gist_id}","starred_url":"https://api.github.com/users/roc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roc/subscriptions","organizations_url":"https://api.github.com/users/roc/orgs","repos_url":"https://api.github.com/users/roc/repos","events_url":"https://api.github.com/users/roc/events{/privacy}","received_events_url":"https://api.github.com/users/roc/received_events","type":"User","site_admin":false},"body":"What about \r\n\r\n```javascript\r\nvar dependencyType = options.dev ? 'devDependencies' : 'dependencies';\r\n```\r\n\r\nthen\r\n\r\n```javascript\r\npackageJSON.devDependencies[packName] = packageJSON ...\r\n```\r\n\r\ninstead of the `if` statement?","created_at":"2015-12-09T22:25:44Z","updated_at":"2015-12-09T22:25:44Z","html_url":"https://github.com/easternbloc/bramble/pull/13#discussion_r47162014","pull_request_url":"https://api.github.com/repos/easternbloc/bramble/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/easternbloc/bramble/pulls/comments/47162014"},"html":{"href":"https://github.com/easternbloc/bramble/pull/13#discussion_r47162014"},"pull_request":{"href":"https://api.github.com/repos/easternbloc/bramble/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/easternbloc/bramble/pulls/13","id":53185830,"html_url":"https://github.com/easternbloc/bramble/pull/13","diff_url":"https://github.com/easternbloc/bramble/pull/13.diff","patch_url":"https://github.com/easternbloc/bramble/pull/13.patch","issue_url":"https://api.github.com/repos/easternbloc/bramble/issues/13","number":13,"state":"open","locked":false,"title":"Ensure that bramble respects the semver range (~ or ^)","user":{"login":"easternbloc","id":92585,"avatar_url":"https://avatars.githubusercontent.com/u/92585?v=3","gravatar_id":"","url":"https://api.github.com/users/easternbloc","html_url":"https://github.com/easternbloc","followers_url":"https://api.github.com/users/easternbloc/followers","following_url":"https://api.github.com/users/easternbloc/following{/other_user}","gists_url":"https://api.github.com/users/easternbloc/gists{/gist_id}","starred_url":"https://api.github.com/users/easternbloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easternbloc/subscriptions","organizations_url":"https://api.github.com/users/easternbloc/orgs","repos_url":"https://api.github.com/users/easternbloc/repos","events_url":"https://api.github.com/users/easternbloc/events{/privacy}","received_events_url":"https://api.github.com/users/easternbloc/received_events","type":"User","site_admin":false},"body":"Example ~0.1.0 -> ~0.2.0 or ^1.0.1 -> ^1.1.0","created_at":"2015-12-09T22:11:55Z","updated_at":"2015-12-09T22:25:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30dcf68063f8e7675de4a6da2f810ebdee78d086","assignee":{"login":"roc","id":120181,"avatar_url":"https://avatars.githubusercontent.com/u/120181?v=3","gravatar_id":"","url":"https://api.github.com/users/roc","html_url":"https://github.com/roc","followers_url":"https://api.github.com/users/roc/followers","following_url":"https://api.github.com/users/roc/following{/other_user}","gists_url":"https://api.github.com/users/roc/gists{/gist_id}","starred_url":"https://api.github.com/users/roc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roc/subscriptions","organizations_url":"https://api.github.com/users/roc/orgs","repos_url":"https://api.github.com/users/roc/repos","events_url":"https://api.github.com/users/roc/events{/privacy}","received_events_url":"https://api.github.com/users/roc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/easternbloc/bramble/pulls/13/commits","review_comments_url":"https://api.github.com/repos/easternbloc/bramble/pulls/13/comments","review_comment_url":"https://api.github.com/repos/easternbloc/bramble/pulls/comments{/number}","comments_url":"https://api.github.com/repos/easternbloc/bramble/issues/13/comments","statuses_url":"https://api.github.com/repos/easternbloc/bramble/statuses/ddff35c03a2a70a274e34ec1c285a36c9c37fe82","head":{"label":"easternbloc:feature/respect-sem-ver-range-characters","ref":"feature/respect-sem-ver-range-characters","sha":"ddff35c03a2a70a274e34ec1c285a36c9c37fe82","user":{"login":"easternbloc","id":92585,"avatar_url":"https://avatars.githubusercontent.com/u/92585?v=3","gravatar_id":"","url":"https://api.github.com/users/easternbloc","html_url":"https://github.com/easternbloc","followers_url":"https://api.github.com/users/easternbloc/followers","following_url":"https://api.github.com/users/easternbloc/following{/other_user}","gists_url":"https://api.github.com/users/easternbloc/gists{/gist_id}","starred_url":"https://api.github.com/users/easternbloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easternbloc/subscriptions","organizations_url":"https://api.github.com/users/easternbloc/orgs","repos_url":"https://api.github.com/users/easternbloc/repos","events_url":"https://api.github.com/users/easternbloc/events{/privacy}","received_events_url":"https://api.github.com/users/easternbloc/received_events","type":"User","site_admin":false},"repo":{"id":14362613,"name":"bramble","full_name":"easternbloc/bramble","owner":{"login":"easternbloc","id":92585,"avatar_url":"https://avatars.githubusercontent.com/u/92585?v=3","gravatar_id":"","url":"https://api.github.com/users/easternbloc","html_url":"https://github.com/easternbloc","followers_url":"https://api.github.com/users/easternbloc/followers","following_url":"https://api.github.com/users/easternbloc/following{/other_user}","gists_url":"https://api.github.com/users/easternbloc/gists{/gist_id}","starred_url":"https://api.github.com/users/easternbloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easternbloc/subscriptions","organizations_url":"https://api.github.com/users/easternbloc/orgs","repos_url":"https://api.github.com/users/easternbloc/repos","events_url":"https://api.github.com/users/easternbloc/events{/privacy}","received_events_url":"https://api.github.com/users/easternbloc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/easternbloc/bramble","description":"A tool which helps you safely upgrade your NPM dependencies.","fork":false,"url":"https://api.github.com/repos/easternbloc/bramble","forks_url":"https://api.github.com/repos/easternbloc/bramble/forks","keys_url":"https://api.github.com/repos/easternbloc/bramble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easternbloc/bramble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easternbloc/bramble/teams","hooks_url":"https://api.github.com/repos/easternbloc/bramble/hooks","issue_events_url":"https://api.github.com/repos/easternbloc/bramble/issues/events{/number}","events_url":"https://api.github.com/repos/easternbloc/bramble/events","assignees_url":"https://api.github.com/repos/easternbloc/bramble/assignees{/user}","branches_url":"https://api.github.com/repos/easternbloc/bramble/branches{/branch}","tags_url":"https://api.github.com/repos/easternbloc/bramble/tags","blobs_url":"https://api.github.com/repos/easternbloc/bramble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easternbloc/bramble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easternbloc/bramble/git/refs{/sha}","trees_url":"https://api.github.com/repos/easternbloc/bramble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easternbloc/bramble/statuses/{sha}","languages_url":"https://api.github.com/repos/easternbloc/bramble/languages","stargazers_url":"https://api.github.com/repos/easternbloc/bramble/stargazers","contributors_url":"https://api.github.com/repos/easternbloc/bramble/contributors","subscribers_url":"https://api.github.com/repos/easternbloc/bramble/subscribers","subscription_url":"https://api.github.com/repos/easternbloc/bramble/subscription","commits_url":"https://api.github.com/repos/easternbloc/bramble/commits{/sha}","git_commits_url":"https://api.github.com/repos/easternbloc/bramble/git/commits{/sha}","comments_url":"https://api.github.com/repos/easternbloc/bramble/comments{/number}","issue_comment_url":"https://api.github.com/repos/easternbloc/bramble/issues/comments{/number}","contents_url":"https://api.github.com/repos/easternbloc/bramble/contents/{+path}","compare_url":"https://api.github.com/repos/easternbloc/bramble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easternbloc/bramble/merges","archive_url":"https://api.github.com/repos/easternbloc/bramble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easternbloc/bramble/downloads","issues_url":"https://api.github.com/repos/easternbloc/bramble/issues{/number}","pulls_url":"https://api.github.com/repos/easternbloc/bramble/pulls{/number}","milestones_url":"https://api.github.com/repos/easternbloc/bramble/milestones{/number}","notifications_url":"https://api.github.com/repos/easternbloc/bramble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easternbloc/bramble/labels{/name}","releases_url":"https://api.github.com/repos/easternbloc/bramble/releases{/id}","created_at":"2013-11-13T11:50:59Z","updated_at":"2015-08-10T05:03:11Z","pushed_at":"2015-12-09T22:11:55Z","git_url":"git://github.com/easternbloc/bramble.git","ssh_url":"git@github.com:easternbloc/bramble.git","clone_url":"https://github.com/easternbloc/bramble.git","svn_url":"https://github.com/easternbloc/bramble","homepage":"","size":39,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":14,"default_branch":"master"}},"base":{"label":"easternbloc:master","ref":"master","sha":"2a05fb560efd3b4ab634fa4cdaa15f0dcefaa58a","user":{"login":"easternbloc","id":92585,"avatar_url":"https://avatars.githubusercontent.com/u/92585?v=3","gravatar_id":"","url":"https://api.github.com/users/easternbloc","html_url":"https://github.com/easternbloc","followers_url":"https://api.github.com/users/easternbloc/followers","following_url":"https://api.github.com/users/easternbloc/following{/other_user}","gists_url":"https://api.github.com/users/easternbloc/gists{/gist_id}","starred_url":"https://api.github.com/users/easternbloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easternbloc/subscriptions","organizations_url":"https://api.github.com/users/easternbloc/orgs","repos_url":"https://api.github.com/users/easternbloc/repos","events_url":"https://api.github.com/users/easternbloc/events{/privacy}","received_events_url":"https://api.github.com/users/easternbloc/received_events","type":"User","site_admin":false},"repo":{"id":14362613,"name":"bramble","full_name":"easternbloc/bramble","owner":{"login":"easternbloc","id":92585,"avatar_url":"https://avatars.githubusercontent.com/u/92585?v=3","gravatar_id":"","url":"https://api.github.com/users/easternbloc","html_url":"https://github.com/easternbloc","followers_url":"https://api.github.com/users/easternbloc/followers","following_url":"https://api.github.com/users/easternbloc/following{/other_user}","gists_url":"https://api.github.com/users/easternbloc/gists{/gist_id}","starred_url":"https://api.github.com/users/easternbloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easternbloc/subscriptions","organizations_url":"https://api.github.com/users/easternbloc/orgs","repos_url":"https://api.github.com/users/easternbloc/repos","events_url":"https://api.github.com/users/easternbloc/events{/privacy}","received_events_url":"https://api.github.com/users/easternbloc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/easternbloc/bramble","description":"A tool which helps you safely upgrade your NPM dependencies.","fork":false,"url":"https://api.github.com/repos/easternbloc/bramble","forks_url":"https://api.github.com/repos/easternbloc/bramble/forks","keys_url":"https://api.github.com/repos/easternbloc/bramble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easternbloc/bramble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easternbloc/bramble/teams","hooks_url":"https://api.github.com/repos/easternbloc/bramble/hooks","issue_events_url":"https://api.github.com/repos/easternbloc/bramble/issues/events{/number}","events_url":"https://api.github.com/repos/easternbloc/bramble/events","assignees_url":"https://api.github.com/repos/easternbloc/bramble/assignees{/user}","branches_url":"https://api.github.com/repos/easternbloc/bramble/branches{/branch}","tags_url":"https://api.github.com/repos/easternbloc/bramble/tags","blobs_url":"https://api.github.com/repos/easternbloc/bramble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easternbloc/bramble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easternbloc/bramble/git/refs{/sha}","trees_url":"https://api.github.com/repos/easternbloc/bramble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easternbloc/bramble/statuses/{sha}","languages_url":"https://api.github.com/repos/easternbloc/bramble/languages","stargazers_url":"https://api.github.com/repos/easternbloc/bramble/stargazers","contributors_url":"https://api.github.com/repos/easternbloc/bramble/contributors","subscribers_url":"https://api.github.com/repos/easternbloc/bramble/subscribers","subscription_url":"https://api.github.com/repos/easternbloc/bramble/subscription","commits_url":"https://api.github.com/repos/easternbloc/bramble/commits{/sha}","git_commits_url":"https://api.github.com/repos/easternbloc/bramble/git/commits{/sha}","comments_url":"https://api.github.com/repos/easternbloc/bramble/comments{/number}","issue_comment_url":"https://api.github.com/repos/easternbloc/bramble/issues/comments{/number}","contents_url":"https://api.github.com/repos/easternbloc/bramble/contents/{+path}","compare_url":"https://api.github.com/repos/easternbloc/bramble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easternbloc/bramble/merges","archive_url":"https://api.github.com/repos/easternbloc/bramble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easternbloc/bramble/downloads","issues_url":"https://api.github.com/repos/easternbloc/bramble/issues{/number}","pulls_url":"https://api.github.com/repos/easternbloc/bramble/pulls{/number}","milestones_url":"https://api.github.com/repos/easternbloc/bramble/milestones{/number}","notifications_url":"https://api.github.com/repos/easternbloc/bramble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easternbloc/bramble/labels{/name}","releases_url":"https://api.github.com/repos/easternbloc/bramble/releases{/id}","created_at":"2013-11-13T11:50:59Z","updated_at":"2015-08-10T05:03:11Z","pushed_at":"2015-12-09T22:11:55Z","git_url":"git://github.com/easternbloc/bramble.git","ssh_url":"git@github.com:easternbloc/bramble.git","clone_url":"https://github.com/easternbloc/bramble.git","svn_url":"https://github.com/easternbloc/bramble","homepage":"","size":39,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/easternbloc/bramble/pulls/13"},"html":{"href":"https://github.com/easternbloc/bramble/pull/13"},"issue":{"href":"https://api.github.com/repos/easternbloc/bramble/issues/13"},"comments":{"href":"https://api.github.com/repos/easternbloc/bramble/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/easternbloc/bramble/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/easternbloc/bramble/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/easternbloc/bramble/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/easternbloc/bramble/statuses/ddff35c03a2a70a274e34ec1c285a36c9c37fe82"}}}}