deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

suggestion(fs): make `std/fs` Node-compatible

Open iuioiua opened this issue 1 year ago • 5 comments

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.

iuioiua avatar Feb 12 '24 04:02 iuioiua

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.

Leokuma avatar Feb 14 '24 21:02 Leokuma

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.

SampaioLeal avatar Feb 21 '24 19:02 SampaioLeal