Closed ggorlen closed 4 months ago
Latest commit: 7b50ddb6c955660b0bc242b7f59af9151ac7488b
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/ggorlen/E2B/new/use-buffer-from?filename=.changeset/wise-pumpkins-fetch.md&value=---%0A%0A---%0A%0AUse%20%60Buffer.from()%60%20when%20writing%20a%20file%0A)
Hey @ggorlen, thank you for catching this and opening the PR! We will check this out 👌
Running the JS file download snippet in Node 20 gave me:
on
writeFileSync
.But using
Buffer.from(buffer)
fixed the issue and wrote the CSV file successfully. I haven't tested this extensively since I'm working with a remote client who's using the library on his end, so more validation that this change makes sense would be good before merging (this may be specific to our text file use case).