fix(fs): `writeFile` create file by default

pull/2846/head
Tony 3 days ago
parent 6210cd31df
commit 9c5dde6db2
No known key found for this signature in database
GPG Key ID: 34BDD3EA27824956

@ -0,0 +1,6 @@
---
fs: patch
fs-js: patch
---
Fix `writeFile` doesn't create a new file by default when the data is a `ReadableStream`

File diff suppressed because one or more lines are too long

@ -1074,7 +1074,7 @@ async function writeFile(
} }
if (data instanceof ReadableStream) { if (data instanceof ReadableStream) {
const file = await open(path, options) const file = await open(path, { create: true, ...options })
const reader = data.getReader() const reader = data.getReader()
try { try {

Loading…
Cancel
Save