-
Notifications
You must be signed in to change notification settings - Fork 173
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
Do not auto pin by default COREPACK_ENABLE_AUTO_PIN=0 is now the default #552
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto-pinning solve the reproducibility problem that npm bundled with Node.js guarantees.
Without auto-pinning, corepack is the source of significant bugs and failed builds, as the version of the package manager is essentially free floating.
Co-authored-by: Steven <[email protected]>
Github tells me that you requested changes but I'm not sure what changes you asked for ? (maybe the comments were not commited, I've seen this happen in the past if you don't submit the review)
While I do agree, this is very invasive as mentioned in the issue. To sum them up again here:
That is why I made it so that a warning will be logged as long as the user does not provide the
I mean, that's not any different from people installing their own version of npm, pnpm or yarn. If the package.json does not restrict the package manager version properly, it's an issue whether or not you use corepack. |
An alternative to changing So what one could do:
|
Indeed it's the same. The change was requested when it was asked to enable corepack by default with Node.js. In that specific instance, there is no user will to install a package manager. If the user does not know that they are actually installing a package manager (and what version that is), I think the only sensible thing to do is to add the packageManager field. My -1 is that I don't think this should land at all in this form. |
This fixes all issues related to auto-pin mentioned in #485.