-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pnpm support #1224
pnpm support #1224
Conversation
64a2f4d
to
3678300
Compare
3678300
to
0718093
Compare
213ab2e
to
4de5c95
Compare
0718093
to
060ecd5
Compare
375fd1a
to
6ac0c04
Compare
Thanks for working on this @colincasey! So excited to be able to make use of these changes |
Thanks @l-campbell 😄 If you want to preview this in your application builds before it gets released, you can try it out today by swapping out the heroku/nodejs buildpack with one that references the pnpm_support branch: heroku buildpacks:remove heroku/nodejs -a <your-appname>
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#pnpm_support -a <your-appname> If you experience any build issues with pnpm during this preview phase, please file an issue and we'll do our best to address it before this PR is merged. |
Working like a dream @colincasey 🚀 👏 Any idea when this will land? |
Good to hear, @l-campbell. Thanks for giving it a try 😄 I can't give a specific time-frame for the release but it will be soon. I just have a couple of documentation tasks to complete first. |
26b784b
to
2419972
Compare
2419972
to
26b784b
Compare
These changes build on top of [existing corepack support](#1222) to allow `pnpm` to be installed via [Corepack](https://nodejs.org/docs/latest/api/corepack.html). The build process has also been modified use the `pnpm` binary at the following stages: - installing dependencies - running build scripts: - `heroku-prebuild` - `build` (or `heroku-postbuild`) - `heroku-cleanup` - pruning dev dependencies
These changes build on top of [existing pnpm support](#1224) and modify the failure message shown when multiple lockfiles are detected to now include pnpm.
These changes build on top of [existing pnpm support](#1224) to allow `pnpm` dependencies to be saved and restored between builds.
These changes build on top of [existing pnpm support](#1224) to default to the `latest` version when it appears that pnpm should be used but there is no `engines.pnpm` or `packageManager` specified in `package.json`.
These changes build on top of [existing pnpm support](#1224) to use the version specified by the `engines.pnpm` field in `package.json`.
26b784b
to
8f5e651
Compare
* pnpm support These changes build on top of [existing corepack support](heroku/heroku-buildpack-nodejs#1222) to allow `pnpm` to be installed via [Corepack](https://nodejs.org/docs/latest/api/corepack.html). The build process has also been modified use the `pnpm` binary at the following stages: - installing dependencies - running build scripts: - `heroku-prebuild` - `build` (or `heroku-postbuild`) - `heroku-cleanup` - pruning dev dependencies * Prune the pnpm store periodically (#1231) * Multiple lockfiles error (#1228) These changes build on top of [existing pnpm support](heroku/heroku-buildpack-nodejs#1224) and modify the failure message shown when multiple lockfiles are detected to now include pnpm. * Add pnpm caching (#1225) These changes build on top of [existing pnpm support](heroku/heroku-buildpack-nodejs#1224) to allow `pnpm` dependencies to be saved and restored between builds. * pnpm support (default version) (#1226) These changes build on top of [existing pnpm support](heroku/heroku-buildpack-nodejs#1224) to default to the `latest` version when it appears that pnpm should be used but there is no `engines.pnpm` or `packageManager` specified in `package.json`. * pnpm support engines (#1227) These changes build on top of [existing pnpm support](heroku/heroku-buildpack-nodejs#1224) to use the version specified by the `engines.pnpm` field in `package.json`. * Only prune when it's safe to do so (#1238) * Update CHANGELOG.md
These changes build on top of existing corepack support to allow
pnpm
to be installed via Corepack.The buildpack has also been modified use the
pnpm
binary at the following stages:heroku-prebuild
build
(orheroku-postbuild
)heroku-cleanup
Usage
As stated in the Corepack docs, setting the package manager to be used is done using the packageManager field in package.json:
It is also possible to specify the pnpm version in the engines.pnpm field of
package.json
:Notes
packageManager
andengines.pnpm
field ofpackage.json
then the version specified inpackageManager
will be used and a warning will be displayed noting this.packageManager
andengines.pnpm
field defined inpackage.json
then the buildpack will install the lastest version of pnpm.The PRs listed below enhance this baseline support: