function getPackageJson(rootPath) {
  try {
    const fileContent = fs.readFileSync(`${rootPath}/package.json`, 'utf8');
    return JSON.parse(fileContent);
  } catch {
    return undefined;
  }
}
@param {string} rootPath
@returns {object|undefined}