Closed elyeandre closed 7 months ago
Hi. Thanks for the feedback. In the next release I've already planned a noFileOutput
value that will be false
by default in a node environment, it exists in code but has no action yet. I'm a bit unwell at the moment but I'll prioritize this as soon as I can. If you want to speed things up you're more than welcome to create a PR, otherwise I'll handle this as soon as I can.
@elyeandre I've just pushed a new version that should prevent file operations when used as a node module. Please let me know if you encounter any other problems and I'll see what I can do.
As an extra note I plan on re-working the logging when I get the chance. I'll likely set up a simple event emitter that gives people the option to receive logging information if they want it, instead of blocking it completely with silent
= true
.
The majority of the code needs to be redone but I'm still very sick so the amount of time I can dedicate to these things is limited. Sorry for the inconvenience
@DrKain It's okay, thank you for taking the time to address the issue, and I appreciate your very useful library. I'm saddened to hear that you are unwell, I hope you get well soon. Take care
Problem: When using the library on serverless environments like Vercel with a read-only file system, the current implementation creates a log directory during the ensureDir function, causing issues.
Solution: I propose two potential solutions:
Alternatives Considered: The temporary solution I've implemented uses the /tmp directory, but having these options in the library directly would provide a more elegant and configurable solution.