nodejs / corepack

Zero-runtime-dependency package acting as bridge between Node projects and their package managers
MIT License
2.36k stars 150 forks source link

feat: add support for URL in `"packageManager"` #359

Closed aduh95 closed 5 months ago

aduh95 commented 6 months ago

Fixes: https://github.com/nodejs/corepack/issues/354

aduh95 commented 6 months ago

This PR still lacks a protection for the built-in package manager (Corepack should not silently use a non-official Yarn/PNPM/npm version, unless there's some env variable that explicitly opt-into that)

aduh95 commented 6 months ago

I'm sure how to handle the corepack pkgName --version, when pkgName is not one of the supported package managers – I guess we'd need a new command, e.g. corepack run pkgName --version, but I figured I'd better get some reviews first to see if I'm going in a wrong direction. Code could use some cleanup, I'm not very proficient in TS, if someone wants to refactor to make it more readable, be my guest.

Raedalmalki250 commented 5 months ago

Fixes: https://github.com/nodejs/corepack/issues/354

aduh95 commented 5 months ago

I think we dropped support for Node.js 19.x when it went EOL a while back, although I reckon it wouldn't hurt to specify that in the engines field.

merceyz commented 5 months ago

I reckon it wouldn't hurt to specify that in the engines field.

Keep in mind that's a breaking change, could you do it in a separate PR?