alexanderGugel / ied

:package: Like npm, but faster - an alternative package manager for Node
http://alexandergugel.github.io/ied
MIT License
1.99k stars 53 forks source link

Store should be immutable #194

Open zkochan opened 7 years ago

zkochan commented 7 years ago

Added a section about store immutability.

I see two possibilities to achieve it: copying and hard linking. However, hard linking would allow editing... Howeverm, it is a huge space saver, so I really would love to keep the option of linking

billiegoose commented 7 years ago

@zkochan There's more than two possibilities! Here's all the one's I've thought of till now:

There are various pros and cons that I haven't mentally sorted out yet. Some of them are install time manipulations (hard linking) while others require a runtime modification (hijacking the 'require' module). I'm leaning toward trying hijacking the 'require' module myself, but I simply have not had time.

p.s. Hard-linking only allows edits if the file permissions allow edits. My suggestion would be to have a separate user 'node' be the store owner and allow others only read+execute permissions.