Do you want to request a feature or report a bug?
...bug? (It's unclear whether this should be yarn's responsibility or the installed package's)
What is the current behavior?
Yarn normally purges unexpected files found in node_modules as described in #231 (comment). To avoid purging build artifacts, yarn keeps a list of files created during the install process and doesn't remove those (see 3f765c3 for the latest implementation).
Some packages, however, add files to their installation directory outside of the regular lifecycle hooks; selenium-standalone for example provides an install CLI command which downloads the selenium .jar and user-specified driver binaries to [project]/node_modules/selenium-standalone/.selenium. Since these are not in yarn's list of artifacts, they're eventually purged.
If the current behavior is a bug, please provide the steps to reproduce.
echo "{}" > package.json
yarn add --dev selenium-standalone
node_modules/.bin/selenium-standalone install
node_modules/.bin/selenium-standalone start # Works
yarn add left-pad
node_modules/.bin/selenium-standalone start # Error: Missing [...]/.selenium/chromedriver/2.25-x64-chromedriver
What is the expected behavior?
Before seeing #231, my expectation was that dependencies' folders would not be touched by yarn after they had been installed. I see a few ways forward:
-
If that this isn't a supported use case for yarn,
- leave the purging behavior as is,
- add a note about it to the docs, and
- open issues with packages that modify their install folders to have them provide an alternative.
-
If this is a supported use case for yarn, modify the purging implementation to permit it.
Please mention your node.js, yarn and operating system version.
yarn 0.17.6
Node 6.9.1
OS X 10.11.6
...Thanks for the great tool! 📦
Do you want to request a feature or report a bug?
...bug? (It's unclear whether this should be yarn's responsibility or the installed package's)
What is the current behavior?
Yarn normally purges unexpected files found in
node_modulesas described in #231 (comment). To avoid purging build artifacts, yarn keeps a list of files created during the install process and doesn't remove those (see 3f765c3 for the latest implementation).Some packages, however, add files to their installation directory outside of the regular lifecycle hooks; selenium-standalone for example provides an
installCLI command which downloads the selenium .jar and user-specified driver binaries to[project]/node_modules/selenium-standalone/.selenium. Since these are not in yarn's list of artifacts, they're eventually purged.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Before seeing #231, my expectation was that dependencies' folders would not be touched by yarn after they had been installed. I see a few ways forward:
If that this isn't a supported use case for yarn,
If this is a supported use case for yarn, modify the purging implementation to permit it.
Please mention your node.js, yarn and operating system version.
yarn 0.17.6
Node 6.9.1
OS X 10.11.6
...Thanks for the great tool! 📦