{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/47374288","id":47374288,"diff_hunk":"@@ -73,8 +74,13 @@ const historyPath = path.join(common.tmpDir, '.fixture_copy_repl_history');\n const historyPathFail = path.join(common.tmpDir, '.node_repl\\u0000_history');\n const oldHistoryPath = path.join(fixtures, 'old-repl-history-file.json');\n const enoentHistoryPath = path.join(fixtures, 'enoent-repl-history-file.json');\n+const emptyHistoryPath = path.join(fixtures, '.empty-repl-history-file');\n const defaultHistoryPath = path.join(common.tmpDir, '.node_repl_history');\n ","path":"test/sequential/test-repl-persistent-history.js","position":14,"original_position":14,"commit_id":"a958d3bdb0d158d6be25580eb3ec8c00f3e8905c","original_commit_id":"a958d3bdb0d158d6be25580eb3ec8c00f3e8905c","user":{"login":"Fishrock123","id":1093990,"avatar_url":"https://avatars.githubusercontent.com/u/1093990?v=3","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false},"body":"Could you move this empty line down to before `const tests =`?","created_at":"2015-12-11T16:31:31Z","updated_at":"2015-12-11T16:31:31Z","html_url":"https://github.com/nodejs/node/pull/4108#discussion_r47374288","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/4108","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/47374288"},"html":{"href":"https://github.com/nodejs/node/pull/4108#discussion_r47374288"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/4108"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/4108","id":52315466,"html_url":"https://github.com/nodejs/node/pull/4108","diff_url":"https://github.com/nodejs/node/pull/4108.diff","patch_url":"https://github.com/nodejs/node/pull/4108.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/4108","number":4108,"state":"open","locked":false,"title":"repl: Fixed node repl history edge case. Fixes #4102.","user":{"login":"zeusdeux","id":635512,"avatar_url":"https://avatars.githubusercontent.com/u/635512?v=3","gravatar_id":"","url":"https://api.github.com/users/zeusdeux","html_url":"https://github.com/zeusdeux","followers_url":"https://api.github.com/users/zeusdeux/followers","following_url":"https://api.github.com/users/zeusdeux/following{/other_user}","gists_url":"https://api.github.com/users/zeusdeux/gists{/gist_id}","starred_url":"https://api.github.com/users/zeusdeux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeusdeux/subscriptions","organizations_url":"https://api.github.com/users/zeusdeux/orgs","repos_url":"https://api.github.com/users/zeusdeux/repos","events_url":"https://api.github.com/users/zeusdeux/events{/privacy}","received_events_url":"https://api.github.com/users/zeusdeux/received_events","type":"User","site_admin":false},"body":"If the deprecated NODE_REPL_HISTORY_FILE is set to default\r\nnode history file path ($HOME/.node_repl_history) and the file\r\ndoesn't exist, then node creates the file and then crashes when\r\nit tries to parse that file as JSON thinking that it's an older\r\nJSON formatted history file. This fixes that bug.\r\n\r\nThis patch also prevents node repl from throwing if the old\r\nhistory file is empty or if $HOME/.node_repl_history is empty.\r\n\r\nAlso, in the test file, I moved the file paths above common\r\nmessages to make it easier to shift to template strings in the\r\nfuture to build the messages.","created_at":"2015-12-01T21:03:57Z","updated_at":"2015-12-11T16:31:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fed7a150cd10c0fbf659fc5894fbdb2bb8ddb11d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/4108/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/4108/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/4108/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/a958d3bdb0d158d6be25580eb3ec8c00f3e8905c","head":{"label":"zeusdeux:issue-4102","ref":"issue-4102","sha":"a958d3bdb0d158d6be25580eb3ec8c00f3e8905c","user":{"login":"zeusdeux","id":635512,"avatar_url":"https://avatars.githubusercontent.com/u/635512?v=3","gravatar_id":"","url":"https://api.github.com/users/zeusdeux","html_url":"https://github.com/zeusdeux","followers_url":"https://api.github.com/users/zeusdeux/followers","following_url":"https://api.github.com/users/zeusdeux/following{/other_user}","gists_url":"https://api.github.com/users/zeusdeux/gists{/gist_id}","starred_url":"https://api.github.com/users/zeusdeux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeusdeux/subscriptions","organizations_url":"https://api.github.com/users/zeusdeux/orgs","repos_url":"https://api.github.com/users/zeusdeux/repos","events_url":"https://api.github.com/users/zeusdeux/events{/privacy}","received_events_url":"https://api.github.com/users/zeusdeux/received_events","type":"User","site_admin":false},"repo":{"id":30488639,"name":"io.js","full_name":"zeusdeux/io.js","owner":{"login":"zeusdeux","id":635512,"avatar_url":"https://avatars.githubusercontent.com/u/635512?v=3","gravatar_id":"","url":"https://api.github.com/users/zeusdeux","html_url":"https://github.com/zeusdeux","followers_url":"https://api.github.com/users/zeusdeux/followers","following_url":"https://api.github.com/users/zeusdeux/following{/other_user}","gists_url":"https://api.github.com/users/zeusdeux/gists{/gist_id}","starred_url":"https://api.github.com/users/zeusdeux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeusdeux/subscriptions","organizations_url":"https://api.github.com/users/zeusdeux/orgs","repos_url":"https://api.github.com/users/zeusdeux/repos","events_url":"https://api.github.com/users/zeusdeux/events{/privacy}","received_events_url":"https://api.github.com/users/zeusdeux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zeusdeux/io.js","description":"A friendly fork of Node.js with an open governance model","fork":true,"url":"https://api.github.com/repos/zeusdeux/io.js","forks_url":"https://api.github.com/repos/zeusdeux/io.js/forks","keys_url":"https://api.github.com/repos/zeusdeux/io.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeusdeux/io.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeusdeux/io.js/teams","hooks_url":"https://api.github.com/repos/zeusdeux/io.js/hooks","issue_events_url":"https://api.github.com/repos/zeusdeux/io.js/issues/events{/number}","events_url":"https://api.github.com/repos/zeusdeux/io.js/events","assignees_url":"https://api.github.com/repos/zeusdeux/io.js/assignees{/user}","branches_url":"https://api.github.com/repos/zeusdeux/io.js/branches{/branch}","tags_url":"https://api.github.com/repos/zeusdeux/io.js/tags","blobs_url":"https://api.github.com/repos/zeusdeux/io.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeusdeux/io.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeusdeux/io.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeusdeux/io.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeusdeux/io.js/statuses/{sha}","languages_url":"https://api.github.com/repos/zeusdeux/io.js/languages","stargazers_url":"https://api.github.com/repos/zeusdeux/io.js/stargazers","contributors_url":"https://api.github.com/repos/zeusdeux/io.js/contributors","subscribers_url":"https://api.github.com/repos/zeusdeux/io.js/subscribers","subscription_url":"https://api.github.com/repos/zeusdeux/io.js/subscription","commits_url":"https://api.github.com/repos/zeusdeux/io.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeusdeux/io.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeusdeux/io.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeusdeux/io.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeusdeux/io.js/contents/{+path}","compare_url":"https://api.github.com/repos/zeusdeux/io.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeusdeux/io.js/merges","archive_url":"https://api.github.com/repos/zeusdeux/io.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeusdeux/io.js/downloads","issues_url":"https://api.github.com/repos/zeusdeux/io.js/issues{/number}","pulls_url":"https://api.github.com/repos/zeusdeux/io.js/pulls{/number}","milestones_url":"https://api.github.com/repos/zeusdeux/io.js/milestones{/number}","notifications_url":"https://api.github.com/repos/zeusdeux/io.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeusdeux/io.js/labels{/name}","releases_url":"https://api.github.com/repos/zeusdeux/io.js/releases{/id}","created_at":"2015-02-08T11:10:36Z","updated_at":"2015-02-08T11:10:40Z","pushed_at":"2015-12-07T15:18:44Z","git_url":"git://github.com/zeusdeux/io.js.git","ssh_url":"git@github.com:zeusdeux/io.js.git","clone_url":"https://github.com/zeusdeux/io.js.git","svn_url":"https://github.com/zeusdeux/io.js","homepage":"https://iojs.org","size":157703,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v1.x"}},"base":{"label":"nodejs:master","ref":"master","sha":"d2c8ba5248d68a6b152ea8443a1c50feab35a162","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","created_at":"2014-11-26T19:57:11Z","updated_at":"2015-12-11T16:26:42Z","pushed_at":"2015-12-11T14:09:14Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":176984,"stargazers_count":18200,"watchers_count":18200,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2013,"mirror_url":null,"open_issues_count":597,"forks":2013,"open_issues":597,"watchers":18200,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/4108"},"html":{"href":"https://github.com/nodejs/node/pull/4108"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/4108"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/4108/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/4108/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/4108/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/a958d3bdb0d158d6be25580eb3ec8c00f3e8905c"}}}}