packages/scripts/promoteRelease.js
/**
 * Modifies beachball config to the right npm tag and version bump restrictions
 *
 * @param {string} packageName name of the package to update
 * @param {string} release the release type
 * @param {string} version major + minor version
 */
Modifies beachball config to the right npm tag and version bump restrictions
@param {string} packageName name of the package to update
@param {string} release the release type
@param {string} version major + minor version
Modifies beachball config to the right npm tag and version bump restrictions @param { string } packageName name of the package to update @param { string } release the release type @param { string } version major + minor version
async function updateBeachballConfig(packageName, release, version) {
  switch (release) {
    case 'preview':
      return updatePackage(packageName, {
        beachball: {
          defaultNpmTag: distTag(release, version),
          disallowedChangeTypes: ['major', 'minor', 'patch'],
        },
      });
    case 'latest':
      return updatePackage(packageName, {
        beachball: {
          defaultNpmTag: distTag(release, version),
          disallowedChangeTypes: ['major', 'minor', 'prerelease'],
        },
      });
    case 'legacy':
      return updatePackage(packageName, {
        beachball: {
          defaultNpmTag: distTag(release, version),
          disallowedChangeTypes: ['major', 'minor', 'prerelease'],
        },
      });
  }
}
async function updateBeachballConfig ( packageName , release , version ) { switch ( release ) { case 'preview' : return updatePackage ( packageName , { beachball : { defaultNpmTag : distTag ( release , version ) , disallowedChangeTypes : [ 'major' , 'minor' , 'patch' ] , } , } ) ; case 'latest' : return updatePackage ( packageName , { beachball : { defaultNpmTag : distTag ( release , version ) , disallowedChangeTypes : [ 'major' , 'minor' , 'prerelease' ] , } , } ) ; case 'legacy' : return updatePackage ( packageName , { beachball : { defaultNpmTag : distTag ( release , version ) , disallowedChangeTypes : [ 'major' , 'minor' , 'prerelease' ] , } , } ) ; } }
Modifies beachball config to the right npm tag and version bump restrictions
 @param {string} packageName name of the package to update
 @param {string} release the release type
 @param {string} version major + minor version
Modifies beachball config to the right npm tag and version bump restrictions @param { string } packageName name of the package to update @param { string } release the release type @param { string } version major + minor version