- [X] #11482: Add a timeout before querying npm right after publish
- [X] #11482: Conditionally log some post publish steps
- [X] #11482: Maybe print ready-to-paste `yarn add ...` instructions for CRA prerelease testing
- [x] #11504: Publish all packages that aren't `private` and remove the whitelist in config
- [x] #11504: Add "v" prefix for release tags
- [x] #11504: Nit: seconds => minutes for long tasks 😉 
const semver = require('semver');
const {execRead, execUnlessDry, logPromise} = require('../utils');
const {projects} = require('../config');
const push = async ({cwd, dry, version}) => {
  const errors = [];
  const isPrerelease = semver.prerelease(version);
  const tag = isPrerelease ? 'next' : 'latest';
  const publishProject = async project => {
    try {
      const path = join(cwd, 'build', 'packages', project);
      await execUnlessDry(`npm publish --tag ${tag}`, {cwd: path, dry});
      const packagePath = join(
        cwd,
        'build',
        'packages',
        project,
        'package.json'
      );
      const packageJSON = await readJson(packagePath);
      const packageVersion = packageJSON.version;
      if (!dry) {
        const status = JSON.parse(
          await execRead(`npm info ${project} dist-tags --json`)
        );
        const remoteVersion = status[tag];
        
        
        if (remoteVersion !== packageVersion) {
          throw Error(
            chalk`Published version {yellow.bold ${packageVersion}} for ` +