Uh oh!
There was an error while loading. Please reload this page.
fs: return Buffer from mkdtemp when prefix is a Buffer - #64397
fs: return Buffer from mkdtemp when prefix is a Buffer#64397hamidrezaghavami wants to merge 16 commits into
Conversation
Thanks!
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #64397 +/- ##
==========================================
- Coverage 90.14% 90.13% -0.01%
==========================================
Files 769 769 Lines 261626 261654 +28 Branches 49663 49673 +10 ==========================================
+ Hits 235832 235851 +19 - Misses 16805 16811 +6 - Partials 8989 8992 +3
🚀 New features to boost your workflow:
|
40f2ae2 to
3e3da50Comparehamidrezaghavami
commented
Jul 10, 2026
@bakkot The CI is green! Here is a quick update: Buffer check: Switched to using the internal Let me know if there is anything else I need to adjust! |
| fs.mkdtemp(Buffer.from(tmpdir.resolve('bar.')), {}, common.mustCall(handler)); | ||
| // Warning fires only once | ||
| fs.mkdtemp(Buffer.from(tmpdir.resolve('bar.X')), common.mustCall(handler)); |
bakkot
commented
Jul 10, 2026
I'm not a maintainer but the new tests look good, thanks. Still not sure about, should it be an error if encoding is explicitly specified and not |
3e3da50 to
f06208fComparehamidrezaghavami
commented
Jul 10, 2026
My mistake! I accidentally deleted them while fixing the string coercion bug above. Just restored them in the latest push. |
a3b52bb to
f06208fCompare@nodejs/collaborators All JavaScript changes and tests are perfectly clean locally! |
Renegade334
commented
Jul 11, 2026
Please do not add merge commits, it breaks the tooling. https://github.com/nodejs/node/blob/main/doc/contributing/pull-requests.md#step-5-rebase |
546cb14 to
e4ebc2bComparee4ebc2b to
40fba96Comparehamidrezaghavami
commented
Jul 11, 2026
Thank you so much @aduh95 for stepping in and pushing that final fix—you are a lifesaver! 🙏 All 31 checks are completely green now! 🚀 |
Renegade334
commented
Jul 11, 2026
Looks like a response is outstanding to #64397 (comment) |
hamidrezaghavami
commented
Jul 11, 2026
@Renegade334 Thanks for pointing that out! Since bakkot mentioned he isn't a core maintainer, I wasn't sure if his question was a required change or just a general discussion, especially since @aduh95 already reviewed and force-pushed the final code today. Could you clarify if there is still anything specific you would like me to change, or are we good to go? 🙏 |
bakkot
commented
Jul 11, 2026
@hamidrezaghavami The link goes to my comment about deleted tests, not my question about an error. You said you'd restored the deleted tests but I think that got lost in your rebase. Those tests are still missing and you should presumably put them back. |
hamidrezaghavami
commented
Jul 11, 2026
bakkot
commented
Jul 11, 2026
No, they're still missing. |
hamidrezaghavami
commented
Jul 11, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Hamid Reza Ghavami <hamidr.ghavami@gmail.com>
6bcc8a7 to
dc2107aCompareUh oh!
There was an error while loading. Please reload this page.
dc2107a to
a271708Compareaduh95
commented
Sep 4, 2026
We still want a doc update |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
This PR fixes an issue where passing a
Bufferas theprefixto thefs.mkdtempfamily of functions incorrectly returned a string, which could mangle non-UTF8 paths.The options encoding is now safely forced to
'buffer'when a Buffer prefix is detected for both the asynchronous, synchronous, and disposable versions.Fixes: #58795