273 points by voctor 4 days ago | 248 comments | View on ycombinator
indutny 4 days ago |
wccrawford 4 days ago |
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 mind-boggling to me. Especially for a system that's supposed to be about not saving to the disk. Perhaps it's just a bad example, but I'm really trying to figure out how this isn't just adding complexity.
lacoolj 4 days ago |
Just my opinion, probably not a popular one. But I will be avoiding an upgrade to Node.js after 24.14 for a while if this is becoming an acceptable precedent.
austin-cheney 4 days ago |
I do see some original benefits to a VFS though, bad application decisions aside, but they are exceedingly minor.
As an aside I think JavaScript would benefit from an in-memory database. This would be more of language enhancement than a Node.js enhancement. Imagine the extended application capabilities of an object/array store native to the language that takes queries using JS logic to return one or more objects/records. No SQL language and no third party databases for stuff that you don't want to keep in offline storage on a disk.
socalgal2 4 days ago |
I get it, I've implemented things for tests, I'm just wondering if this shouldn't be solved at an OS level.
--- update
Let's put this another way, my code does effectively, child_process.spawn('something-that-reads-and-write-a-file')
now I'm back to the same issue. To test I need a virtual file system. Node providing one won't help.
il-b 4 days ago |
That’s so dehumanizing, I would happily write such code.
PaulHoule 4 days ago |
mg 4 days ago |
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?giancarlostoro 4 days ago |
This is the biggest takeaway for me for AI. It's not even that nobody wants to do these things, its that by the time you finish your tasks, you have no time to do these things, because your manage / scrum master / powers that be want you to work on the next task.
torginus 4 days ago |
There's Docker, OverlayFS, FUSE, ZFS or Btrfs snapshots?
Do you not trust your OS to do this correctly, or do you think you can do better?
A lot of this stuff existed 5, 10, 15 years ago...
Somehow there's been a trend for every effing program to grow and absorb the features and responsibilities of every other program.
Actually, I have a brilliant idea, what if we used nodejs, and added html display capabilities, and browser features? After all Cursor has already proven you can vibecode a browser, why not just do it?
I'm just tired at this point
themafia 4 days ago |
Sure you can. Function() exists and require.cache exists. This is _intentionally_ exploitable.
westurner 4 days ago |
From https://github.com/jupyterlite/jupyterlite/issues/949#issuec... :
> Ideally, the virtual filesystem of JupyterLite would be shared with the one from the virtual terminal.
emscripten-core/emscripten > "New File System Implementation": https://github.com/emscripten-core/emscripten/issues/15041#i... :
> [ BrowserFS, isomorphic-git/lightningfs, ]
pyodide/pyodide: "Native file system API" #738: https://github.com/pyodide/pyodide/issues/738 re: [Chrome,] Filesystem API :
> jupyterlab-git [should work with the same VFS as Jupyter kernels and Terminals]
pyodide/pyodide: "ENH Add API for mounting native file system" #2987: https://github.com/pyodide/pyodide/pull/2987
Normal_gaussian 4 days ago |
- https://github.com/yarnpkg/berry/issues/7065
- https://github.com/nodejs/node/issues/62012
This is because yarn patches fs in order to introduce virtual file path resolution of modules in the yarn cache (which are zips), which is quite brittle and was broken by a seemingly unrelated change in 25.7.
The discussion in issue 62012 is notable - it was suggested yarn just wait for vfs to land. This is interesting to me in two ways: firstly, the node team seems quite happy for non-trivial amounts of the ecosystem to just be broken, and suggests relying on what I'm assuming will be an experimental API when it does land; secondly, it implies a lot of confidence that this feature will land before LTS.
philo23 4 days ago |
The sqlar schema is missing some of the info thats being stored atm, but there's nothing stopping you from adding your own fields/tables on top of the format, if anything the docs encourage it. It is just a sqlite database at the end of the day.
gnarbarian 4 days ago |
mohsen1 4 days ago |
What I really want is a way of swapping FS with VFS in a Node.js program harness. Something like
node --use-vfs --vfs-cache=BIG_JSON_FILE
So basically Node never touches the disk and load everything from the memorykeepamovin 4 days ago |
Not saying vfs is bad, just it's not impossible in a few lines of code to set up that. My idea for a simple version of a vfs in node is to use a RAM disk/RAMfs - would that work?
chmod775 4 days ago |
Basically an "fs-core" that everything ultimately goes through, and which can be switched out/layered with another implementation. Think express-style routing but for the filesystem.
That'll keep things simple in node's codebase while handing more power to users.
moralestapia 4 days ago |
The node.js codebase and standard library has a very high standard of quality, hope that doesn't get washed out by sloppy AI-generated code.
OTOH, Matteo is an excellent engineer and the community owes a lot to him. So I guess the code is solid :).
notnullorvoid 4 days ago |
adzm 4 days ago |
ozlikethewizard 4 days ago |
butz 4 days ago |
huksley 3 days ago |
est 4 days ago |
I miss those days where you can tweak all kinds of software GUI by your self. Change icons, menus, shortcut keys, etc.
verdverm 4 days ago |
ThomIves 3 days ago |
AntonCTO 3 days ago |
cmrx64 4 days ago |
gwbas1c 4 days ago |
(I know, I know, it's ugly and has its own set of problems)
sidewndr46 4 days ago |
undefined 4 days ago |
AndyKelley 4 days ago |
These arguments don't even make sense, they look LLM generated. I can't even formulate a disagreement against this nonsense.
minraws 4 days ago |
bronlund 4 days ago |
leontloveless 4 days ago |
iam_circuit 4 days ago |
AgentNode 3 days ago |
openinstaclaw 4 days ago |
aplomb1026 4 days ago |
rigorclaw 4 days ago |
andrewmcwatters 4 days ago |
buttsack 4 days ago |
syrusakbary 4 days ago |
wei03288 4 days ago |
AgentMarket 4 days ago |
pier25 4 days ago |
By far the most critical issue is the over reliance on third party NPM packages for even fundamental needs like connecting to a database.
petcat 4 days ago |