@wilfredh Node.js's decoupled approach comes at a dubious upside, however: it's very easy to edit files in node_modules to e.g. add prints while debugging.
(But then again, such an ability is not as useful in Rust, where a small change in one module can result in cascading rebuilds of the whole world)
Bojidar Marinov@bojidar_bg@mastodon.social
the only thing you need to worry about is changing Cargo.toml then committing before running cargo, as this will cause Cargo.lock to get out of sync
@bojidar_bg That's an excellent point: I've had a few hairy debugging sessions where that was useful.
That doesn't seem entirely conflicting with automatically updating your node_modules, but I guess the explicit invocation helps.
Wilfred Hughes
@wilfredh Hm.. what happens if you change the package.json file while you have a changed file in node_modules? If it's a direct dependency, overwriting the changes seems warranted, but what about changes in transitive dependencies?
..I guess the correct thing to do is to detect changes and show a diff to the user / ask them to confirm / store the diff in a special folder, but all of that comes at the cost of added package manager complexity, so not sure if someone'd implement it 😅😅
Bojidar Marinov@bojidar_bg@mastodon.social