Live data from Hacker News

Node.js needs a virtual file system

blog.platformatic.dev

21–30 of 275 posts

Re: Node.js needs a virtual file system

#22

Would 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.

And if you thought malware hiding in a mess of files was bad, just wait till you see it in two layers of container files.

Re: Node.js needs a virtual file system

#24
post #9

Earlier 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

Node has sandboxing these days: https://nodejs.org/api/permissions.html

Re: Node.js needs a virtual file system

#25
post #9
post #3

Are 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…

If one gets nothing from them directly, they've at least been a good kick to get several features into Node. It's almost like neovim was to vim, perhaps to a lesser extent.

Re: Node.js needs a virtual file system

#27
post #9
post #3

Are 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…

[deleted]

Re: Node.js needs a virtual file system

#28

I'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.

There's also a module expression proposal, that would remove the need to use blob imports.

https://github.com/tc39/proposal-module-expressions

Re: Node.js needs a virtual file system

#29
Taking the question of whether this would be a useful addition to Node.js core or aside, it must be noted that this 19k LoC PR was mostly generated by Claude Code and manually reviewed by the submitter which in my opinion is against the spirit of the project and directly violates the terms of Developer's Certificate of Origin set in the project's CONTRIBUTING.md
Post reply on HN