Skip to content

[pull] main from nodejs:main#1130

Merged
pull[bot] merged 2 commits into
adamlaska:mainfrom
nodejs:main
Jul 14, 2026
Merged

[pull] main from nodejs:main#1130
pull[bot] merged 2 commits into
adamlaska:mainfrom
nodejs:main

Conversation

@pull

@pull pull Bot commented Jul 14, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

hkleungai and others added 2 commits July 14, 2026 15:49
From lib/internal/fs/promises.js, one can see fsPromises.appendFile() is
simply a wrapper on fsPromises.writeFile(). Hence if writeFile() can
take non-buffer data argument, so can appendFile() too.

To justify the doc change, I have also restuctured the relevant tests,
to enhance the test coverage. They now includes the below test cases
consistently.

- await do(Append|Write)Buffer();
- await do(Append|Write)BufferAndCancel();
- await do(Append|Write)String();
- await do(Append|Write)Stream();
- await do(Append|Write)StreamWithCancel();
- await do(Append|Write)Iterable();
- await do(Append|Write)InvalidIterable();
- await do(Append|Write)IterableWithEncoding();
- await do(Append|Write)BufferIterable();
- await do(Append|Write)AsyncIterable();
- await do(Append|Write)LargeIterable();
- await do(Append|Write)InvalidValues();
- await do(Append|Write)TypedArrays();

Note that test/parallel/test-fs-promises-writefile-typedarray.js is
subsumed by test/parallel/test-fs-promises-file-handle-writeFile.js, and
test/parallel/test-fs-promises-writefile-with-fd.js becomes a subcase in
test/parallel/test-fs-promises-file-handle-writeFile.js.

Refs: #41677
Signed-off-by: Jimmy Leung <mingfamily@hotmail.com.hk>
PR-URL: #64279
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: #64458
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
@pull pull Bot locked and limited conversation to collaborators Jul 14, 2026
@pull pull Bot added the ⤵️ pull label Jul 14, 2026
@pull
pull Bot merged commit f770243 into adamlaska:main Jul 14, 2026
0 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants