version.js
async function updateVersion(file) {
  const { default: config } = await import(`${CONFIGS_PATH}/${file}`);
  const { packageName } = config;

  const packageInfoFile = `${PACKAGES_PATH}/${packageName}/package.json`;
  const { default: packageInfo } = await import(packageInfoFile);

  if (info.version !== packageInfo.version) {
    const newPackageInfo = {
      ...packageInfo,
      version: info.version,
    };

    writeFileAsync(packageInfoFile, JSON.stringify(newPackageInfo, null, '  '))
      .then(
        () => console.log(`Updated ${packageName} to ${info.version}`),
        error => console.log(error),
      );
  }
}
async function updateVersion(file) {
  const { default: config } = await import(`${CONFIGS_PATH}/${file}`);
  const { packageName } = config;

  const packageInfoFile = `${PACKAGES_PATH}/${packageName}/package.json`;
  const { default: packageInfo } = await import(packageInfoFile);

  if (info.version !== packageInfo.version) {
    const newPackageInfo = {
      ...packageInfo,
      version: info.version,
    };

    writeFileAsync(packageInfoFile, JSON.stringify(newPackageInfo, null, '  '))
      .then(
        () => console.log(`Updated ${packageName} to ${info.version}`),
        error => console.log(error),
      );
  }
}
async function updateVersion ( file ) { const { default : config } = await import ( ` ${ CONFIGS_PATH } ${ file } ` ) ; const { packageName } = config ; const packageInfoFile = ` ${ PACKAGES_PATH } ${ packageName } ` ; const { default : packageInfo } = await import ( packageInfoFile ) ; if ( info . version !== packageInfo . version ) { const newPackageInfo = { ... packageInfo , version : info . version , } ; writeFileAsync ( packageInfoFile , JSON . stringify ( newPackageInfo , null , '  ' ) ) . then ( ( ) => console . log ( ` ${ packageName } ${ info . version } ` ) , error => console . log ( error ) , ) ; } }
Update all packages to latest version

@param {string} file
Update all packages to latest version