unfold / heroku-buildpack-pnpm

Run PNPM install on Heroku
MIT License
38 stars 39 forks source link

PNPM_VERSION env var is not respected anymore if the version is specified in the package.json #43

Open adamsosterics opened 1 year ago

adamsosterics commented 1 year ago

Describe the bug The documentation says that we can set the PNPM_VERSION env var to control which pnpm version is installed during the heroku build. However, when we set the engines.pnpm in the package.json, the buildpack is using that value over the env var which is not what I'd expect reading the documentation. For us, this is not a big deal, it was just surprising. I'm also not sure this was an intentional change or just a coincidence. Probably it's worth documenting and/or fixing. I think this commit introduced this new behaviour.

To Reproduce Steps to reproduce the behavior:

  1. Set the pnpm version in the package.json like this:
    "engines": {
    "node": "16.x",
    "pnpm": "8.x"
    }
  2. Set the PNPM_VERSION env var in your Heroku app to 7.30.5
  3. Build your app
  4. See that the buildpack is installing pnpm 8.2.0

Versions (please complete the following information):

Additional context Add any other context about the problem here.