SIGN IN SIGN UP
yarnpkg / yarn UNCLAIMED

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry

0 0 76 JavaScript

Run the prepare script of git dependencies even if NODE_ENV=production (#7398)

* Run the prepare script of git dependencies even if NODE_ENV=production

When installing a git dependency with the `NODE_ENV` environment variable set to `production`, yarn did not run the `prepare` lifecycle script, because `config.production` would default to true, and then `wrapLifecycle` would skip `prepare`:

https://github.com/yarnpkg/yarn/blob/b6569538de69e0ccd201f0a33f1f5b52f2656f5b/src/cli/commands/install.js#L1202-L1207

This is contrary to npm's behavior and the intent of `GitFetcher#fetchFromInstallAndPack`, which is to install the dependency with its devDependencies and run all the relevant lifecycle scripts (excluding `prepublish`), regardless of the configuration or environment settings of the parent install command.

* Update CHANGELOG.md

* Update CHANGELOG.md
J
John Firebaugh committed
ee29a5fd6a9763b4befa3d3f28671e40f6579b2f
Parent: 84e01a9
Committed by Maël Nison <nison.mael@gmail.com> on 7/24/2019, 12:46:11 PM