global install of Corepack should not enable Corepack
What would you like?
When Corepack is installed from the npm registry with
npm install -g corepack
then Corepack should not be automatically enabled for pnpm and Yarn.
Why is this needed?
In a situation where Corepack is needed for Yarn and not wanted for pnpm, automatically enabling Corepack for pnpm breaks local workflows that expect pnpm to have been installed with npm install -g pnpm. Installing Corepack overrides this. Due to https://github.com/nodejs/corepack/issues/112 it is not possible to simply execute corepack disable pnpm because Corepack does not restore the original state.
This is more of a problem for locally working with Corepack since the settings persist between projects.
In CI environments, jobs are generally isolated from each other, so it is less likely to have a mixture of Yarn and pnpm in the same CI job.
Possibly Corepack could be set up to be enabled by default in CI only and / or this could be influenced by a new COREPACK environment variable.
Closing, as with the release of Node.js 25.0.0, changing the behavior could be disruptive.