function getPackageMajorVersion (pkgName, dir) {
  if (dir === void 0) {
    console.error('getPackageMajorVersion() -> dir param is required')
    process.exit(1)
  }

  const pkg = getPackageJson(pkgName, dir)

  if (pkg) {
    return getMajorVersion(pkg.version)
  }
}
Get major version of a host package.