deno_std
deno_std copied to clipboard
suggestion(fs): make `std/fs` Node-compatible
The Standard Library is now on JSR, and JSR now lists the runtimes compatible with any given package. A recent request was that std/fs
be made Node-compatible. We should investigate the viability of this idea and how it can be done. Ideas are welcome.
What's the goal?
Even if std/fs
came to be Node-compatible, the main FS functions (e.g. Deno.readTextFile
) are not Node-compatible. So if the goal is to achieve cross-platform code, this will fall short. The only way to write cross-platform code is to write Node code, and if they are writing Node code they can use node:fs
functions.
Adding Node dependencies to Deno's Std just so folks can use walkSync()
doesn't sound very good to me.
I saw some mentions about the std scope should change to @deno/
and i agree because deno_std
is made for deno and other runtimes should worry about their std modules.
Also i guess deno team is making this @std
scope only because deno doesn't have modules binded to the runtime. And i think that's a good idea.