Repository script API / publish-tool-packages / getNpmRegistryIntegrity
Function: getNpmRegistryIntegrity()
getNpmRegistryIntegrity(
packageName,version,fetchImpl?):Promise<string|null>
Defined in: publish-tool-packages.mjs:235
Reads one exact public npm version after confirming its package exists on the public registry.
Parameters
packageName
string
npm package name, including its scope when present.
version
string
Exact semantic version to query.
fetchImpl?
{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
Fetch implementation used for the registry request.
Returns
Promise<string | null>
Registry integrity, or null only when the existing package's exact version returns 404.
Throws
When the registry is unavailable or returns an unsuccessful or malformed response.