fix(fs): fix panic due to unwrap & truncate by default (#847)

* fix(fs): fix panic due to unwrap & truncate by default

closes #846

* fmt and change file
This commit is contained in:
Amr Bashir
2023-12-27 15:27:45 +02:00
committed by GitHub
parent 38b5d37b54
commit c60123093d
5 changed files with 43 additions and 11 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"fs": "patch"
"fs-js": "patch"
---
Add `createNew` option for `writeFile` and `writeTextFile` to create the file if doesn't exist and fail if it does.
+6
View File
@@ -0,0 +1,6 @@
---
"fs": "patch"
"fs-js": "patch"
---
Truncate files when using `writeFile` and `writeTextFile` with `append: false`.
+6
View File
@@ -0,0 +1,6 @@
---
"fs": "patch"
"fs-js": "patch"
---
Fix panic when using `writeFile` or `writeTextFile` without passing an option object.