You can’t import or require() a module that only exists in memory. You can convert it into a data url and import that, can't you?
Node.js needs a virtual file system
21–30 of 275 posts
Re: Node.js needs a virtual file system
#22Would be nice if node packages could be packed up in ZIP files so to avoid the security/metadata tax for small file access on Windows.
The number of files in the node modules folder is crazy, any amount of organization that can tame that chaos is welcomed.
Re: Node.js needs a virtual file system
#23Would be nice if node packages could be packed up in ZIP files so to avoid the security/metadata tax for small file access on Windows.
Re: Node.js needs a virtual file system
#24Earlier quoted context omitted.
I don't really understand what the value proposition of Bun and Deno is. And I see huge problems with their governance and long-term sustainability. Node.js on the other hand is not owned or controlled by one entity. It is not beholden to the whims of investors or a large corporation. I have contributed to Node.js in the past and I was really impressed by its rock-solid governance model and processes. I think this an…
Deno has some pretty nice unique features like sandboxing that, afaik, don't exist in other runtimes (yet). It's enough of a draw that it's the recommended runtime for projects like yt-dlp: https://github.com/yt-dlp/yt-dlp/issues/14404
Re: Node.js needs a virtual file system
#25Are people still building new projects on Node.js? I would have thought the ecosystem was moving to deno or bun now
I don't really understand what the value proposition of Bun and Deno is. And I see huge problems with their governance and long-term sustainability. Node.js on the other hand is not owned or controlled by one entity. It is not beholden to the whims of investors or a large corporation. I have contributed to Node.js in the past and I was really impressed by its rock-solid governance model and processes. I think this an…
Re: Node.js needs a virtual file system
#26Re: Node.js needs a virtual file system
#27Are people still building new projects on Node.js? I would have thought the ecosystem was moving to deno or bun now
I don't really understand what the value proposition of Bun and Deno is. And I see huge problems with their governance and long-term sustainability. Node.js on the other hand is not owned or controlled by one entity. It is not beholden to the whims of investors or a large corporation. I have contributed to Node.js in the past and I was really impressed by its rock-solid governance model and processes. I think this an…
Re: Node.js needs a virtual file system
#28I'm not convinced that allowing Node to import "code generated at runtime" is actually a good thing. I think it should have to go through the hoops to get loaded, for security reasons. I like the idea of it mocking the file system for tests, but I feel like that should probably be part of the test suite, not Node. The example towards the end that stores data in a sqlite provider and then saves it as a JSON file is mi…
But then you go "hang on, doesn't ESM exist?" and you realize that argument 4 isn't even true. You can literally do what this argument says you can't, by creating a blob instead of "writing a temp file" and then importing that using the same dynamic import we've had available since 2020.