microsoft / microsoft/Oryx

[Feature] pnpm/corepack support

Open
#2,340 18 comments 48 reactions 1 assignee View on GitHub

@cormacpayne is already working on this.

Since Jan 14, 2024.

enhancement
Dominant language
C#
Stars
881
Forks
195
Avg merge
20h 13m
Merged PRs (30d)
13

Description

Feature Request

From https://github.com/microsoft/Oryx/issues/1150#issuecomment-1886067023

We're not currently looking to support pnpm. Closing this issue for now, please create a new issue and link to this one if you feel strongly.

I feel strongly about this and decided to open a new issue.

My suggestions is at follows:

  • Detect presence of packageManager key in package.json.
  • If found,
    • Run corepack enable
    • Run npm install / yarn install / pnpm install depending on the package manager name
  • If not found,
    • Just run npm install as before

How this will improve things:

  • Azure Static Site and Azure Web Service users can build their app without having to set up PRE_BUILD_COMMAND and CUSTOM_BUILD_COMMAND. I use Netlify and Vercel, and they are supported out-of-the-box, so I expect the same in other hosting services. Azure services not recognizing pnpm in my project is a turn off for me.

  • GitHub Codespaces currently run npm install even in pnpm projects. This means not only it takes a longer time for Codespace to initialize pnpm projects (due to waiting for npm install), afterwards I have to go ahead and rm -rf node_modules package-lock.json and run pnpm install again.

In short, supporting pnpm via corepack will improve both developer experience in Codespaces and deployment experiences in Azure services.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.