readPackageManagerPin
readPackageManagerPin(
projectRoot):PackageManagerPin|null
package.json’s packageManager field at projectRoot, parsed into
{manager, version}. null when the file is absent/unparseable, the
field is missing or malformed (no @, empty version), or its manager name
isn’t one NODE_LOCKFILE_MANAGERS recognises — a repo can pin a tool this
ladder doesn’t resolve (e.g. a future manager); that’s not this function’s
problem, it just declines to match.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
projectRoot | string |
Returns
Section titled “Returns”PackageManagerPin | null