-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Node.js version: tested 7.7.4 and 9.4.0
Yarn version: tested 1.0.1 and 1.3.2
** Feature request **
I'm requesting a feature to completely disable the automatic removal of extraneous files that happens as part of other commands (yarn install --check-files in my case).
** Current behavior **
In my use case I run electron-rebuild to rebuild native modules for my version of electron.
From time to time I have to force yarn to reinstall some module so I remove it and run "yarn install --check-files" but every time I do that it goes and removes the build artifacts from all modules.
** Requested behavior **
I don't care for some extraneous files in my development environment. I'd much rather have some harmless files lying around than having to rebuild all native modules multiple times a day.
Obviously it would be nice if yarn only removed files I actually don't need anymore but I somehow doubt this will ever be possible so this shouldn't be part of some other command.
Yarn install --check-files is documented as "Verifies that already installed files in node_modules did not get removed." which is incorrect, the current behaviour is "Verifies that already installed files in node_modules did not get removed and removes files that were added post-install."
Ideally this would be two commands, maybe something like "yarn prune"? But obviously this would be a change of the interface so I'm just asking for a toggle to control the behavior.