{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/10242","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/10242/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/10242/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/10242/events","html_url":"https://github.com/nodejs/node/issues/10242","id":195092301,"number":10242,"title":"Change in fs.statSync behavior between 7.1.0 and 7.2.0","user":{"login":"sharkinsspatial","id":3671262,"avatar_url":"https://avatars1.githubusercontent.com/u/3671262?v=3","gravatar_id":"","url":"https://api.github.com/users/sharkinsspatial","html_url":"https://github.com/sharkinsspatial","followers_url":"https://api.github.com/users/sharkinsspatial/followers","following_url":"https://api.github.com/users/sharkinsspatial/following{/other_user}","gists_url":"https://api.github.com/users/sharkinsspatial/gists{/gist_id}","starred_url":"https://api.github.com/users/sharkinsspatial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharkinsspatial/subscriptions","organizations_url":"https://api.github.com/users/sharkinsspatial/orgs","repos_url":"https://api.github.com/users/sharkinsspatial/repos","events_url":"https://api.github.com/users/sharkinsspatial/events{/privacy}","received_events_url":"https://api.github.com/users/sharkinsspatial/received_events","type":"User","site_admin":false},"labels":[{"id":155435785,"url":"https://api.github.com/repos/nodejs/node/labels/fs","name":"fs","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-12-12T21:35:43Z","updated_at":"2017-05-16T17:59:52Z","closed_at":"2017-05-16T17:59:52Z","body":"<!--\r\nThank you for reporting an issue.\r\n\r\nThis issue tracker is for bugs and issues found within Node.js core.\r\nIf you require more general support please file an issue on our help\r\nrepo. https://github.com/nodejs/help\r\n\r\n\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n\r\nIf possible, please provide code that demonstrates the problem, keeping it as\r\nsimple and free of external dependencies as you are able.\r\n-->\r\n\r\n* **Version**: 7.1.0 & 7.2.0\r\n* **Platform**: OSX 10.9.5\r\n* **Subsystem**: fs\r\n\r\n<!-- Enter your issue details below this comment. -->\r\nI noted a change in behavior between fs.statSync when migrating between 7.1.0 and 7.2.0.  With \r\n7.1.0 the following code reports a file size of 0.\r\n```javascript\r\nvar fs = require('fs');\r\n\r\nvar buffer = new Buffer(16);\r\nbuffer.fill(0);\r\n\r\nfd = fs.openSync('test', 'a');\r\nfs.writeSync(fd, buffer);\r\nfs.fsyncSync(fd);\r\nfs.closeSync(fd);\r\n\r\nvar stats = fs.statSync('./test');\r\nconsole.log(stats['size']);\r\nfs.unlinkSync('test');\r\n\r\n```\r\nWhile using 7.2.0 it reports a file size of 16.\r\n\r\nInterestingly using appendFileSync rather than opening file handles is not affected by version differences.  The Changelog notes a libuv upgrade between the two versions but I'm unsure what could produce this change. "},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/301864026","html_url":"https://github.com/nodejs/node/issues/10242#issuecomment-301864026","issue_url":"https://api.github.com/repos/nodejs/node/issues/10242","id":301864026,"user":{"login":"gibfahn","id":15943089,"avatar_url":"https://avatars3.githubusercontent.com/u/15943089?v=3","gravatar_id":"","url":"https://api.github.com/users/gibfahn","html_url":"https://github.com/gibfahn","followers_url":"https://api.github.com/users/gibfahn/followers","following_url":"https://api.github.com/users/gibfahn/following{/other_user}","gists_url":"https://api.github.com/users/gibfahn/gists{/gist_id}","starred_url":"https://api.github.com/users/gibfahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibfahn/subscriptions","organizations_url":"https://api.github.com/users/gibfahn/orgs","repos_url":"https://api.github.com/users/gibfahn/repos","events_url":"https://api.github.com/users/gibfahn/events{/privacy}","received_events_url":"https://api.github.com/users/gibfahn/received_events","type":"User","site_admin":false},"created_at":"2017-05-16T17:59:52Z","updated_at":"2017-05-16T17:59:52Z","body":"It sounds like this issue can be closed (reopen if you disagree)."}}
{"actor":{"display_login":"gibfahn"}}