Skip to content
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

Bump pnpm to 8.15.7 #3396

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@
"engines": {
"npm": "please-use-pnpm",
"node": ">=18",
"pnpm": "8.15.6"
"pnpm": "8.15.7"
Copy link
Member

@oliviertassinari oliviertassinari Apr 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get we want to use https://pnpm.io/installation#using-corepack but do we need to have this here?

Suggested change
"pnpm": "8.15.7"

Maybe with pnpm v9 we don't need this anymore: https://github.com/pnpm/pnpm/releases/tag/v9.0.0-rc.2

pnpm will now check the package.json file for a packageManager field. If this field is present and specifies a different package manager or a different version of pnpm than the one you're currently using, pnpm will not proceed. This ensures that you're always using the correct package manager and version that the project requires.

we would then match the other repositories.

Copy link
Member

@Janpot Janpot Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We enforce a specific version with the engines field. In case someone tries to install who is not using corepack, or an older (pre-corepack) pnpm version.

So:

  • the packageManager field: makes sure the correct pnpm version is used when corepack is enabled
  • the preinstall script: makes sure when corepack is not enabled and an older version of e.g. yarn is used
  • the engines field: makes sure the correct version of pnpm is used in case corepack is not enabled, and an older version of pnpm is used

Recent versions of yarn and pnpm should detect that corepack is intended and refuse to install. Older ones happily install and run scripts regardless. With v9, this field will still be necessary, for contributors that are not on v9 yet. We should port this to other reporitories (and the .npmrc's engines-strict option as well)

Copy link
Member

@oliviertassinari oliviertassinari May 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this makes sense.

I would wait to see that the next upgrades of pnpm go smoothly, and once they do go all-in to propagate this in all repositories mui/mui-public#157.

Copy link
Member

@Janpot Janpot May 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks like it does: #3499

},
"resolutions": {
"google-auth-library": "*"
},
"packageManager": "pnpm@8.15.6"
"packageManager": "pnpm@8.15.7"
}
Loading