heroku-buildpack-nodejs
heroku-buildpack-nodejs copied to clipboard
Allow Opting Out of Immutable Flags for Yarn 2
In some cases, a user may not want the --immutable-cache
or --immutable
flag to be passed. One example I have is when you have a repo with some workspace packages that you're not passing to Heroku by adding them to your .slugignore
. In this case, the lock files would change, which means calling install --immutable
will fail.
Additionally, when yarn install --immutable
does fail for this reason, there's no indication, and the build just appears to hang.
https://github.com/heroku/heroku-buildpack-nodejs/pull/836 solves half of this, but we still need a way to call Yarn 2 without --immutable
. @jpulec how should the buildpack detect that yarn.lock
should be mutable?
I'm wondering if it makes sense to allow disabling this via an environment variable. Something that is off by default, but could be set to allow lockfile discrepencies, i.e. YARN_IMMUTABLE=false
.
Any updates here?