Repository script API / publish-tool-packages / getNpmRegistryVersions
Function: getNpmRegistryVersions()
getNpmRegistryVersions(
packageName,fetchImpl?):Promise<string[]>
Defined in: publish-tool-packages.mjs:274
Lists the versions already published for a public npm package.
Parameters
packageName
string
npm package name, including its scope when present.
fetchImpl?
{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
Fetch implementation used for the registry request.
Returns
Promise<string[]>
Exact versions currently listed by the npm registry.
Throws
When the package is missing or the registry response is unsuccessful or malformed.