| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
You could also add a line that compares file.bytesRead with the actual file size, like this:
assert.strictEqual(file.bytesRead, fs.statSync(fn).size);
Sorry, something went wrong.
Sorry, something went wrong.
|
Thank you for this, a very welcome addition. 👍 |
Sorry, something went wrong.
|
Addressed comment and rebased on latest master 👌 edit: How do I trigger CI? Or is that something that someone from the core team does? |
Sorry, something went wrong.
Sorry, something went wrong.
✅ Green CI |
Sorry, something went wrong.
|
@addaleax @bnoordhuis @trevnorris ... would love to get your review on this also! |
Sorry, something went wrong.
There was a problem hiding this comment.
I’d say with 99 % confidence that the version here is accurate, but ideally you can use added: REPLACEME here so that the correct version will be inserted when the release is made.
Sorry, something went wrong.
There was a problem hiding this comment.
oh, good catch... yeah, using REPLACEME is likely better
Sorry, something went wrong.
|
LGTM with a comment, thanks for the work behind this! |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
Add a property named bytesRead that exposes how many bytes that have currently been read from the file. This brings consistency with WriteStream that has bytesWritten and net.Socket which have both bytesRead and bytesWritten. Fixes nodejs#7938
|
Sorry, something went wrong.
|
Thank you for bearing with us! :-) One more CI run following the updated commits: https://ci.nodejs.org/job/node-test-pull-request/3544/ |
Sorry, something went wrong.
|
There was a build bot failure on freebsd... running again just to make sure it's a one off: https://ci.nodejs.org/job/node-test-pull-request/3546/ |
Sorry, something went wrong.
|
hmm... failed on freebsd again... one more try: https://ci.nodejs.org/job/node-test-pull-request/3572/ |
Sorry, something went wrong.
|
Failed on Windows this time, unrelated build bot failure tho, at least that's different from last time. getting this landed! |
Sorry, something went wrong.
Add a property named bytesRead that exposes how many bytes that have currently been read from the file. This brings consistency with WriteStream that has bytesWritten and net.Socket which have both bytesRead and bytesWritten. Fixes: https://github.com/nodejs/node/issues/#7938 PR-URL: #7942 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
Awesome 🎉 thank you! |
Sorry, something went wrong.
Add a property named bytesRead that exposes how many bytes that have currently been read from the file. This brings consistency with WriteStream that has bytesWritten and net.Socket which have both bytesRead and bytesWritten. Fixes: https://github.com/nodejs/node/issues/#7938 PR-URL: #7942 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) #7983 and #7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) #7811 and #7838 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) #7942 * repl: The REPL now supports editor mode. (Prince J Wesley) #7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) #8013 Refs: #8020 PR-URL: #8070
Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) #7983 and #7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) #7811 and #7838 * child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) #7696 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) #7942 * repl: The REPL now supports editor mode. (Prince J Wesley) #7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) #8013 Refs: #8020 PR-URL: #8070
Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) #7983 and #7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) #7811 and #7838 * child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) #7696 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) #7942 * repl: The REPL now supports editor mode. (Prince J Wesley) #7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) #8013 Refs: #8020 PR-URL: #8070
Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) nodejs#7983 and nodejs#7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) nodejs#7811 and nodejs#7838 * child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) nodejs#7696 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) nodejs#7942 * repl: The REPL now supports editor mode. (Prince J Wesley) nodejs#7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) nodejs#8013 Refs: nodejs#8020 PR-URL: nodejs#8070
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
fs
Description of change
Add a property named bytesRead that exposes how many bytes that have currently been read from the file. This brings consistency with WriteStream that has bytesWritten and net.Socket which have both bytesRead and bytesWritten.
Fixes #7938