function compareVersions(versionsA, versionsB) {
  let output = '';
  const newVersions = { ...versionsA };
  Object.keys(versionsB).forEach(dep => {
    // we accept different versions of glob for node packages
    if (dep === 'glob') {
      return;
    }
    if (versionsA[dep] && versionsB[dep] && versionsA[dep] !== versionsB[dep]) {
      if (!semver.satisfies(versionsA[dep], versionsB[dep])) {
        // if version doesn't satisfy range, check if they are both ranges,
        // and if so, if either of them is entirely contained by the other,
        // if so, then they are semver compatible and will resolve to the same thing
        const rangeA = semver.validRange(versionsA[dep]);
        const rangeB = semver.validRange(versionsB[dep]);
        if (
          // @ts-ignore
          !(rangeA && rangeB && (semver.subset(rangeA, rangeB) || semver.subset(rangeB, rangeA)))
        ) {
          output += `  - "${dep}" "${versionsB[dep]}" does not seem semver compatible with "${versionsA[dep]}" and probably one of them needs a bump"\n`;
        }
      }
    }
    if (!newVersions[dep]) {
      newVersions[dep] = versionsB[dep];
    }
  });

  return {
    output,
    newVersions,
  };
}
@param {object} versionsA
@param {object} versionsB
@returns