Could we consider changing the behavior of Corepack to loosen the definition of the packageManager field?
That way you could define any npm package name in the packageManager field and Corepack would fetch from the npm registry if its not found in the hardcoded known package manager list.
Examples
Pros
- Less gatekeeping because a new package manager can be used immediately without changing Corepack's src code.
- A little more intuitive since the
packageManager field feels a lot more like dependencies
Cons
- We might lose the ability to catch typos since today those are caught with
Usage Error: Unsupported package manager specification.
- We might lose the ability to catch wrong package manager install with
Usage Error: This project is configured to use
I think number 1 is okay but number 2 sounds problematic. Perhaps number 2 still requires a PR to Corepack.
Related
Could we consider changing the behavior of Corepack to loosen the definition of the
packageManagerfield?That way you could define any npm package name in the
packageManagerfield and Corepack would fetch from the npm registry if its not found in the hardcoded known package manager list.Examples
Pros
packageManagerfield feels a lot more likedependenciesCons
Usage Error: Unsupported package manager specification.Usage Error: This project is configured to useI think number 1 is okay but number 2 sounds problematic. Perhaps number 2 still requires a PR to Corepack.
Related