Add .changes and formatting tweaks

pull/2550/head
Tim Ramage 4 months ago
parent e4a34c9e6d
commit ff911e16bd

@ -0,0 +1,6 @@
---
"fs": "patch:bug"
"fs-js": "patch:bug"
---
Fix `writeFile` ReadableStream handling due to missing async iterator support on macOS platform

File diff suppressed because one or more lines are too long

@ -1076,7 +1076,7 @@ async function writeFile(
if (data instanceof ReadableStream) { if (data instanceof ReadableStream) {
const file = await open(path, options) const file = await open(path, options)
const reader = data.getReader() const reader = data.getReader()
try { try {
while (true) { while (true) {
const { done, value } = await reader.read() const { done, value } = await reader.read()
@ -1086,7 +1086,7 @@ async function writeFile(
} finally { } finally {
reader.releaseLock() reader.releaseLock()
} }
await file.close() await file.close()
} else { } else {
await invoke('plugin:fs|write_file', data, { await invoke('plugin:fs|write_file', data, {

Loading…
Cancel
Save