async function updateMonorepo(newVersion, versionDiff, rootManifest, repositoryUrl, tags) {
    // If the version bump is major or the new major version is still "0", we
    // synchronize the versions of all monorepo packages, meaning the "version"
    // field of their manifests and their version range specified wherever they
    // appear as a dependency.
    const synchronizeVersions = (0,dist.isMajorSemverDiff)(versionDiff) || major_default()(newVersion) === 0;
    // Collect required information to perform updates
    const allPackages = await getMetadataForAllPackages(rootManifest.workspaces);
    const packagesToUpdate = await getPackagesToUpdate(allPackages, synchronizeVersions, tags);
    const updateSpecification = {
        newVersion,
        packagesToUpdate,
        repositoryUrl,
        synchronizeVersions,
        shouldUpdateChangelog: true,
    };
    // Finally, bump the version of all packages and the root manifest, update the
    // changelogs of all updated packages, and add the new version as an output of
    // this Action.
    await updatePackages(allPackages, updateSpecification);
    await updatePackage({ dirPath: './', manifest: rootManifest }, { ...updateSpecification, shouldUpdateChangelog: false });
}
/**
 * Given that the checked out repository is a monorepo:
 *
 * If the semver diff is "major" or if it's the first release of the monorepo
 * (inferred from the complete absence of tags), updates all packages.
 * Otherwise, updates packages that changed since their previous release.
 * The changelog of any updated package will also be updated.
 *
 * @param newVersion - The new version of the package(s) to update.
 * @param versionDiff - A SemVer version diff, e.g. "major" or "prerelease".
 * @param rootManifest - The parsed root package.json file of the monorepo.
 * @param repositoryUrl - The HTTPS URL of the repository.
 * @param tags - All tags reachable from the current git HEAD, as from "git
 * tag --merged".
 */
Given that the checked out repository is a monorepo:
If the semver diff is "major" or if it's the first release of the monorepo
(inferred from the complete absence of tags), updates all packages.
Otherwise, updates packages that changed since their previous release.
The changelog of any updated package will also be updated.

@param newVersion - The new version of the package(s) to update.
@param versionDiff - A SemVer version diff, e.g. "major" or "prerelease".
@param rootManifest - The parsed root package.json file of the monorepo.
@param repositoryUrl - The HTTPS URL of the repository.
@param tags - All tags reachable from the current git HEAD, as from "git
tag --merged".
Given that the checked out repository is a monorepo : If the semver diff is " major " or if it ' s the first release of the monorepo ( inferred from the complete absence of tags ) updates all packages . Otherwise updates packages that changed since their previous release . The changelog of any updated package will also be updated . @param newVersion - The new version of the package ( s ) to update . @param versionDiff - A SemVer version diff e . g . " major " or " prerelease " . @param rootManifest - The parsed root package . json file of the monorepo . @param repositoryUrl - The HTTPS URL of the repository . @param tags - All tags reachable from the current git HEAD as from " git tag -- merged " .
async function updateMonorepo(newVersion, versionDiff, rootManifest, repositoryUrl, tags) {
    const synchronizeVersions = (0,dist.isMajorSemverDiff)(versionDiff) || major_default()(newVersion) === 0;
    const allPackages = await getMetadataForAllPackages(rootManifest.workspaces);
    const packagesToUpdate = await getPackagesToUpdate(allPackages, synchronizeVersions, tags);
    const updateSpecification = {
        newVersion,
        packagesToUpdate,
        repositoryUrl,
        synchronizeVersions,
        shouldUpdateChangelog: true,
    };
    await updatePackages(allPackages, updateSpecification);
    await updatePackage({ dirPath: './', manifest: rootManifest }, { ...updateSpecification, shouldUpdateChangelog: false });
}
async function updateMonorepo ( newVersion , versionDiff , rootManifest , repositoryUrl , tags ) { const synchronizeVersions = ( 0 , dist . isMajorSemverDiff ) ( versionDiff ) || major_default ( ) ( newVersion ) === 0 ; const allPackages = await getMetadataForAllPackages ( rootManifest . workspaces ) ; const packagesToUpdate = await getPackagesToUpdate ( allPackages , synchronizeVersions , tags ) ; const updateSpecification = { newVersion , packagesToUpdate , repositoryUrl , synchronizeVersions , shouldUpdateChangelog : true , } ; await updatePackages ( allPackages , updateSpecification ) ; await updatePackage ( { dirPath : './' , manifest : rootManifest } , { ... updateSpecification , shouldUpdateChangelog : false } ) ; }
Given that the checked out repository is a monorepo:
 If the semver diff is "major" or if it's the first release of the monorepo
 (inferred from the complete absence of tags), updates all packages.
Given that the checked out repository is a monorepo : If the semver diff is " major " or if it ' s the first release of the monorepo ( inferred from the complete absence of tags ) updates all packages .
// If the version bump is major or the new major version is still "0", we // synchronize the versions of all monorepo packages, meaning the "version" // field of their manifests and their version range specified wherever they // appear as a dependency. // Collect required information to perform updates // Finally, bump the version of all packages and the root manifest, update the // changelogs of all updated packages, and add the new version as an output of // this Action.