fs: validate position argument before length === 0 early return#62674
fs: validate position argument before length === 0 early return#62674geeksilva97 wants to merge 1 commit intonodejs:mainfrom
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62674 +/- ##
==========================================
+ Coverage 89.77% 89.80% +0.03%
==========================================
Files 673 699 +26
Lines 203820 216235 +12415
Branches 39175 41331 +2156
==========================================
+ Hits 182987 194199 +11212
- Misses 13152 14148 +996
- Partials 7681 7888 +207
π New features to boost your workflow:
|
|
Moving One question on the validation ordering: Previously, On the new test cases: The tests with empty buffer and an invalid position object are good β but note that |
Commit Queue failed- Loading data for nodejs/node/pull/62674
β Done loading data for nodejs/node/pull/62674
----------------------------------- PR info ------------------------------------
Title fs: validate position argument before length === 0 early return (#62674)
Author Edy Silva <edigleyssonsilva@gmail.com> (@geeksilva97)
Branch geeksilva97:fix-fs-read-sync -> nodejs:main
Labels fs, author ready, needs-ci
Commits 1
- fs: validate position argument before length === 0 early return
Committers 1
- Edy Silva <edigleyssonsilva@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62674
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62674
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
--------------------------------------------------------------------------------
βΉ This PR was created on Fri, 10 Apr 2026 16:46:18 GMT
β Approvals: 2
β - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/62674#pullrequestreview-4094424429
β - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/62674#pullrequestreview-4101570935
β Last GitHub CI successful
βΉ Last Full PR CI on 2026-04-14T09:32:37Z: https://ci.nodejs.org/job/node-test-pull-request/72680/
- Querying data for job/node-test-pull-request/72680/
β Build data downloaded
β Last Jenkins CI successful
--------------------------------------------------------------------------------
β No git cherry-pick in progress
β No git am in progress
β No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
* branch main -> FETCH_HEAD
β origin/main is now up-to-date
- Downloading patch for 62674
From https://github.com/nodejs/node
* branch refs/pull/62674/merge -> FETCH_HEAD
β Fetched commits as d0fa608c0796..de1c2438a977
--------------------------------------------------------------------------------
Auto-merging lib/fs.js
Auto-merging lib/internal/fs/promises.js
[main d32bcd2881] fs: validate position argument before length === 0 early return
Author: Edy Silva <edigleyssonsilva@gmail.com>
Date: Fri Apr 10 13:42:53 2026 -0300
5 files changed, 84 insertions(+), 19 deletions(-)
β Patches applied
--------------------------------------------------------------------------------
--------------------------------- New Message ----------------------------------
PR-URL: https://github.com/nodejs/node/pull/62674
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
--------------------------------------------------------------------------------
[main 908808fa7e] PR-URL: https://github.com/nodejs/node/pull/62674 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Author: Edy Silva <edigleyssonsilva@gmail.com>
Date: Fri Apr 10 13:42:53 2026 -0300
5 files changed, 84 insertions(+), 19 deletions(-)
β 908808fa7e8ca1d8b750911952a60a27d5d8302d
β 0:0 no Co-authored-by metadata co-authored-by-is-trailer
β 0:0 skipping fixes-url fixes-url
β 1:0 blank line expected after title line-after-title
β 0:0 line-lengths are valid line-length
β 0:0 metadata is at end of message metadata-end
β 0:0 Commit must have a PR-URL. pr-url
β 0:0 reviewers are valid reviewers
β 0:0 Invalid subsystem: "PR-URL" subsystem
β 0:0 Title is formatted correctly. title-format
β 0:0 Title is <= 50 columns. title-length
βΉ Please fix the commit message and try again.
Please manually ammend the commit message, by running
`git commit --amend`
Once commit message is fixed, finish the landing command running
`git node land --continue`https://github.com/nodejs/node/actions/runs/24407872429 |
Move position validation upwards to match documented behavior.
Fixes #62638