MCPcopy Create free account
hub / github.com/angular/dev-infra / isVersionPublishedToNpm

Function isVersionPublishedToNpm

ng-dev/release/versioning/npm-registry.ts:47–53  ·  view source on GitHub ↗
(
  version: semver.SemVer,
  config: ReleaseConfig,
)

Source from the content-addressed store, hash-verified

45
46/** Gets whether the given version is published to NPM or not */
47export async function isVersionPublishedToNpm(
48 version: semver.SemVer,
49 config: ReleaseConfig,
50): Promise<boolean> {
51 const {versions} = await fetchProjectNpmPackageInfo(config);
52 return versions[version.format()] !== undefined;
53}
54
55/** Fetches the specified NPM package from the NPM registry. */
56async function fetchPackageInfoFromNpmRegistry(pkgName: string): Promise<NpmPackageInfo> {

Callers 4

printActiveReleaseTrainsFunction · 0.85
isActiveMethod · 0.85

Calls 2

formatMethod · 0.45

Tested by

no test coverage detected