Pick Node package manager via package.json packageManager field

Netlify builder currently runs either npm or yarn to install Node.js project dependencies.
The version of npm or yarn is not directly controllable by the author.

Since Node.js 16.x, the package.json file can have a packageManager property that defines the desired package manager and its precise version, such as:

  "packageManager": "pnpm@6.32.3"

I hope Netlify builder could extract this property and run the specified package manager.
Moreover, the package manager could be launched with corepack, which would automatically install the specified version.

Hey there, @yoursunny :wave:

Thanks for sharing this feedback with us! I have passed it along to the appropriate team.