{"action":"created","comment":{"url":"https://api.github.com/repos/vitalets/bro-fs/pulls/comments/233694233","pull_request_review_id":175168855,"id":233694233,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzY5NDIzMw==","diff_hunk":"@@ -88,13 +88,19 @@ exports.write = function (fileEntry, data, options = {}) {\n exports.read = function (fileEntry, options = {}) {\n   return utils.promiseCall(fileEntry, 'file')\n     .then(file => {\n-      return new Promise((resolve, reject) => {\n-        const reader = new FileReader();\n-        reader.onload = () => resolve(reader.result);\n-        reader.onerror = () => reject(reader.error);\n-        // see: https://developer.mozilla.org/ru/docs/Web/API/FileReader\n-        readAs(options.type, reader, file);\n-      });\n+      if (options.type === 'Blob') {\n+        return new Response(file).blob();\n+      } else if (options.type === 'MutableFile') {","path":"src/file.js","position":25,"original_position":13,"commit_id":"2a5b5b1bf861f8471afac680cd7395326dfb066d","original_commit_id":"ca7257abf94ecf0c7b2c22c892a8368e1c10af03","user":{"login":"liqi0816","id":20200613,"node_id":"MDQ6VXNlcjIwMjAwNjEz","avatar_url":"https://avatars1.githubusercontent.com/u/20200613?v=4","gravatar_id":"","url":"https://api.github.com/users/liqi0816","html_url":"https://github.com/liqi0816","followers_url":"https://api.github.com/users/liqi0816/followers","following_url":"https://api.github.com/users/liqi0816/following{/other_user}","gists_url":"https://api.github.com/users/liqi0816/gists{/gist_id}","starred_url":"https://api.github.com/users/liqi0816/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqi0816/subscriptions","organizations_url":"https://api.github.com/users/liqi0816/orgs","repos_url":"https://api.github.com/users/liqi0816/repos","events_url":"https://api.github.com/users/liqi0816/events{/privacy}","received_events_url":"https://api.github.com/users/liqi0816/received_events","type":"User","site_admin":false},"body":"Trade-off added to jsdoc.\r\n\r\n`MutableFile` actually does *not* comply with the `File` spec:\r\n* `File` inherits `Blob`, which means a `File` should be immutable, or at least throws error when its content has changed (this is what FF does with its `IDBMutableFile`).\r\n* In our case, the content of a previously created `MutableFile` can be changed silently without error.\r\n\r\nA `File` submitted with `<input>` also suffers the same problem, i.e. its content may change if the user edits the original file on the disk at the same time. Such situation is rare though. In this library however data race may occur frequently. Therefore I think it would be better to explicitly distinguish between these two types, by intentionally using a different name.","created_at":"2018-11-15T02:32:30Z","updated_at":"2018-11-15T02:32:30Z","html_url":"https://github.com/vitalets/bro-fs/pull/5#discussion_r233694233","pull_request_url":"https://api.github.com/repos/vitalets/bro-fs/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/vitalets/bro-fs/pulls/comments/233694233"},"html":{"href":"https://github.com/vitalets/bro-fs/pull/5#discussion_r233694233"},"pull_request":{"href":"https://api.github.com/repos/vitalets/bro-fs/pulls/5"}},"in_reply_to_id":233101037},"pull_request":{"url":"https://api.github.com/repos/vitalets/bro-fs/pulls/5","id":179691055,"node_id":"MDExOlB1bGxSZXF1ZXN0MTc5NjkxMDU1","html_url":"https://github.com/vitalets/bro-fs/pull/5","diff_url":"https://github.com/vitalets/bro-fs/pull/5.diff","patch_url":"https://github.com/vitalets/bro-fs/pull/5.patch","issue_url":"https://api.github.com/repos/vitalets/bro-fs/issues/5","number":5,"state":"open","locked":false,"title":"add readFile type 'Blob' and 'MutableFile'","user":{"login":"liqi0816","id":20200613,"node_id":"MDQ6VXNlcjIwMjAwNjEz","avatar_url":"https://avatars1.githubusercontent.com/u/20200613?v=4","gravatar_id":"","url":"https://api.github.com/users/liqi0816","html_url":"https://github.com/liqi0816","followers_url":"https://api.github.com/users/liqi0816/followers","following_url":"https://api.github.com/users/liqi0816/following{/other_user}","gists_url":"https://api.github.com/users/liqi0816/gists{/gist_id}","starred_url":"https://api.github.com/users/liqi0816/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqi0816/subscriptions","organizations_url":"https://api.github.com/users/liqi0816/orgs","repos_url":"https://api.github.com/users/liqi0816/repos","events_url":"https://api.github.com/users/liqi0816/events{/privacy}","received_events_url":"https://api.github.com/users/liqi0816/received_events","type":"User","site_admin":false},"body":"implementation of #4","created_at":"2018-04-05T14:18:46Z","updated_at":"2018-11-15T02:32:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fd1bf23c28ed6fa9b365911ece28dde4e707440","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vitalets/bro-fs/pulls/5/commits","review_comments_url":"https://api.github.com/repos/vitalets/bro-fs/pulls/5/comments","review_comment_url":"https://api.github.com/repos/vitalets/bro-fs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vitalets/bro-fs/issues/5/comments","statuses_url":"https://api.github.com/repos/vitalets/bro-fs/statuses/2a5b5b1bf861f8471afac680cd7395326dfb066d","head":{"label":"liqi0816:master","ref":"master","sha":"2a5b5b1bf861f8471afac680cd7395326dfb066d","user":{"login":"liqi0816","id":20200613,"node_id":"MDQ6VXNlcjIwMjAwNjEz","avatar_url":"https://avatars1.githubusercontent.com/u/20200613?v=4","gravatar_id":"","url":"https://api.github.com/users/liqi0816","html_url":"https://github.com/liqi0816","followers_url":"https://api.github.com/users/liqi0816/followers","following_url":"https://api.github.com/users/liqi0816/following{/other_user}","gists_url":"https://api.github.com/users/liqi0816/gists{/gist_id}","starred_url":"https://api.github.com/users/liqi0816/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqi0816/subscriptions","organizations_url":"https://api.github.com/users/liqi0816/orgs","repos_url":"https://api.github.com/users/liqi0816/repos","events_url":"https://api.github.com/users/liqi0816/events{/privacy}","received_events_url":"https://api.github.com/users/liqi0816/received_events","type":"User","site_admin":false},"repo":{"id":128207312,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgyMDczMTI=","name":"bro-fs","full_name":"liqi0816/bro-fs","private":false,"owner":{"login":"liqi0816","id":20200613,"node_id":"MDQ6VXNlcjIwMjAwNjEz","avatar_url":"https://avatars1.githubusercontent.com/u/20200613?v=4","gravatar_id":"","url":"https://api.github.com/users/liqi0816","html_url":"https://github.com/liqi0816","followers_url":"https://api.github.com/users/liqi0816/followers","following_url":"https://api.github.com/users/liqi0816/following{/other_user}","gists_url":"https://api.github.com/users/liqi0816/gists{/gist_id}","starred_url":"https://api.github.com/users/liqi0816/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqi0816/subscriptions","organizations_url":"https://api.github.com/users/liqi0816/orgs","repos_url":"https://api.github.com/users/liqi0816/repos","events_url":"https://api.github.com/users/liqi0816/events{/privacy}","received_events_url":"https://api.github.com/users/liqi0816/received_events","type":"User","site_admin":false},"html_url":"https://github.com/liqi0816/bro-fs","description":"Promise-based HTML5 Filesystem API similar to Node.js fs module","fork":true,"url":"https://api.github.com/repos/liqi0816/bro-fs","forks_url":"https://api.github.com/repos/liqi0816/bro-fs/forks","keys_url":"https://api.github.com/repos/liqi0816/bro-fs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liqi0816/bro-fs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liqi0816/bro-fs/teams","hooks_url":"https://api.github.com/repos/liqi0816/bro-fs/hooks","issue_events_url":"https://api.github.com/repos/liqi0816/bro-fs/issues/events{/number}","events_url":"https://api.github.com/repos/liqi0816/bro-fs/events","assignees_url":"https://api.github.com/repos/liqi0816/bro-fs/assignees{/user}","branches_url":"https://api.github.com/repos/liqi0816/bro-fs/branches{/branch}","tags_url":"https://api.github.com/repos/liqi0816/bro-fs/tags","blobs_url":"https://api.github.com/repos/liqi0816/bro-fs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liqi0816/bro-fs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liqi0816/bro-fs/git/refs{/sha}","trees_url":"https://api.github.com/repos/liqi0816/bro-fs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liqi0816/bro-fs/statuses/{sha}","languages_url":"https://api.github.com/repos/liqi0816/bro-fs/languages","stargazers_url":"https://api.github.com/repos/liqi0816/bro-fs/stargazers","contributors_url":"https://api.github.com/repos/liqi0816/bro-fs/contributors","subscribers_url":"https://api.github.com/repos/liqi0816/bro-fs/subscribers","subscription_url":"https://api.github.com/repos/liqi0816/bro-fs/subscription","commits_url":"https://api.github.com/repos/liqi0816/bro-fs/commits{/sha}","git_commits_url":"https://api.github.com/repos/liqi0816/bro-fs/git/commits{/sha}","comments_url":"https://api.github.com/repos/liqi0816/bro-fs/comments{/number}","issue_comment_url":"https://api.github.com/repos/liqi0816/bro-fs/issues/comments{/number}","contents_url":"https://api.github.com/repos/liqi0816/bro-fs/contents/{+path}","compare_url":"https://api.github.com/repos/liqi0816/bro-fs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liqi0816/bro-fs/merges","archive_url":"https://api.github.com/repos/liqi0816/bro-fs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liqi0816/bro-fs/downloads","issues_url":"https://api.github.com/repos/liqi0816/bro-fs/issues{/number}","pulls_url":"https://api.github.com/repos/liqi0816/bro-fs/pulls{/number}","milestones_url":"https://api.github.com/repos/liqi0816/bro-fs/milestones{/number}","notifications_url":"https://api.github.com/repos/liqi0816/bro-fs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liqi0816/bro-fs/labels{/name}","releases_url":"https://api.github.com/repos/liqi0816/bro-fs/releases{/id}","deployments_url":"https://api.github.com/repos/liqi0816/bro-fs/deployments","created_at":"2018-04-05T13:04:36Z","updated_at":"2018-11-15T02:31:40Z","pushed_at":"2018-11-15T02:31:39Z","git_url":"git://github.com/liqi0816/bro-fs.git","ssh_url":"git@github.com:liqi0816/bro-fs.git","clone_url":"https://github.com/liqi0816/bro-fs.git","svn_url":"https://github.com/liqi0816/bro-fs","homepage":"https://vitalets.github.io/bro-fs","size":181,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vitalets:master","ref":"master","sha":"fe27501eeeb4f819ce25a0524a9f992d0b4a74cb","user":{"login":"vitalets","id":1473072,"node_id":"MDQ6VXNlcjE0NzMwNzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1473072?v=4","gravatar_id":"","url":"https://api.github.com/users/vitalets","html_url":"https://github.com/vitalets","followers_url":"https://api.github.com/users/vitalets/followers","following_url":"https://api.github.com/users/vitalets/following{/other_user}","gists_url":"https://api.github.com/users/vitalets/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalets/subscriptions","organizations_url":"https://api.github.com/users/vitalets/orgs","repos_url":"https://api.github.com/users/vitalets/repos","events_url":"https://api.github.com/users/vitalets/events{/privacy}","received_events_url":"https://api.github.com/users/vitalets/received_events","type":"User","site_admin":false},"repo":{"id":71727045,"node_id":"MDEwOlJlcG9zaXRvcnk3MTcyNzA0NQ==","name":"bro-fs","full_name":"vitalets/bro-fs","private":false,"owner":{"login":"vitalets","id":1473072,"node_id":"MDQ6VXNlcjE0NzMwNzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1473072?v=4","gravatar_id":"","url":"https://api.github.com/users/vitalets","html_url":"https://github.com/vitalets","followers_url":"https://api.github.com/users/vitalets/followers","following_url":"https://api.github.com/users/vitalets/following{/other_user}","gists_url":"https://api.github.com/users/vitalets/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalets/subscriptions","organizations_url":"https://api.github.com/users/vitalets/orgs","repos_url":"https://api.github.com/users/vitalets/repos","events_url":"https://api.github.com/users/vitalets/events{/privacy}","received_events_url":"https://api.github.com/users/vitalets/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vitalets/bro-fs","description":"Promise-based HTML5 Filesystem API similar to Node.js fs module","fork":false,"url":"https://api.github.com/repos/vitalets/bro-fs","forks_url":"https://api.github.com/repos/vitalets/bro-fs/forks","keys_url":"https://api.github.com/repos/vitalets/bro-fs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vitalets/bro-fs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vitalets/bro-fs/teams","hooks_url":"https://api.github.com/repos/vitalets/bro-fs/hooks","issue_events_url":"https://api.github.com/repos/vitalets/bro-fs/issues/events{/number}","events_url":"https://api.github.com/repos/vitalets/bro-fs/events","assignees_url":"https://api.github.com/repos/vitalets/bro-fs/assignees{/user}","branches_url":"https://api.github.com/repos/vitalets/bro-fs/branches{/branch}","tags_url":"https://api.github.com/repos/vitalets/bro-fs/tags","blobs_url":"https://api.github.com/repos/vitalets/bro-fs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vitalets/bro-fs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vitalets/bro-fs/git/refs{/sha}","trees_url":"https://api.github.com/repos/vitalets/bro-fs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vitalets/bro-fs/statuses/{sha}","languages_url":"https://api.github.com/repos/vitalets/bro-fs/languages","stargazers_url":"https://api.github.com/repos/vitalets/bro-fs/stargazers","contributors_url":"https://api.github.com/repos/vitalets/bro-fs/contributors","subscribers_url":"https://api.github.com/repos/vitalets/bro-fs/subscribers","subscription_url":"https://api.github.com/repos/vitalets/bro-fs/subscription","commits_url":"https://api.github.com/repos/vitalets/bro-fs/commits{/sha}","git_commits_url":"https://api.github.com/repos/vitalets/bro-fs/git/commits{/sha}","comments_url":"https://api.github.com/repos/vitalets/bro-fs/comments{/number}","issue_comment_url":"https://api.github.com/repos/vitalets/bro-fs/issues/comments{/number}","contents_url":"https://api.github.com/repos/vitalets/bro-fs/contents/{+path}","compare_url":"https://api.github.com/repos/vitalets/bro-fs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vitalets/bro-fs/merges","archive_url":"https://api.github.com/repos/vitalets/bro-fs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vitalets/bro-fs/downloads","issues_url":"https://api.github.com/repos/vitalets/bro-fs/issues{/number}","pulls_url":"https://api.github.com/repos/vitalets/bro-fs/pulls{/number}","milestones_url":"https://api.github.com/repos/vitalets/bro-fs/milestones{/number}","notifications_url":"https://api.github.com/repos/vitalets/bro-fs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vitalets/bro-fs/labels{/name}","releases_url":"https://api.github.com/repos/vitalets/bro-fs/releases{/id}","deployments_url":"https://api.github.com/repos/vitalets/bro-fs/deployments","created_at":"2016-10-23T20:12:01Z","updated_at":"2018-10-03T00:19:18Z","pushed_at":"2018-11-15T02:31:40Z","git_url":"git://github.com/vitalets/bro-fs.git","ssh_url":"git@github.com:vitalets/bro-fs.git","clone_url":"https://github.com/vitalets/bro-fs.git","svn_url":"https://github.com/vitalets/bro-fs","homepage":"https://vitalets.github.io/bro-fs","size":361,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":3,"open_issues":4,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vitalets/bro-fs/pulls/5"},"html":{"href":"https://github.com/vitalets/bro-fs/pull/5"},"issue":{"href":"https://api.github.com/repos/vitalets/bro-fs/issues/5"},"comments":{"href":"https://api.github.com/repos/vitalets/bro-fs/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/vitalets/bro-fs/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/vitalets/bro-fs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vitalets/bro-fs/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/vitalets/bro-fs/statuses/2a5b5b1bf861f8471afac680cd7395326dfb066d"}},"author_association":"NONE"}}
{"actor":{"display_login":"liqi0816"}}