readPolicy = async (
  policyPath,
  { readFile = nodeFs.promises.readFile } = {}
) => {
  /** @type {unknown} */
  let allegedPolicy
  try {
    // eslint-disable-next-line @jessie.js/safe-await-separator
    allegedPolicy = await readJsonFile(policyPath, { readFile })
  } catch (err) {
    if (err instanceof SyntaxError) {
      throw new InvalidPolicyError(
        `Invalid LavaMoat policy at ${hrPath(policyPath)}; failed to parse JSON`,
        { cause: err }
      )
    }
    if (/** @type {NodeJS.ErrnoException} */ (err).code === 'ENOENT') {
      throw new NoPolicyError(
        `LavaMoat policy file not found at ${hrPath(policyPath)}`,
        { cause: err }
      )
    } else {
      throw new NoPolicyError(
        `Failed to read LavaMoat policy file at ${hrPath(policyPath)}`,
        {
          cause: err,
        }
      )
    }
  }
  try {
    assertPolicy(allegedPolicy)
    return allegedPolicy
  } catch (err) {
    throw new InvalidPolicyError(
      `Invalid LavaMoat policy at ${hrPath(policyPath)}; does not match expected schema`,
      { cause: err }
    )
  }
}
Reads a `policy.json` from disk

@param {string | URL} policyPath Path to policy
@param {ReadPolicyOptions} [options] Options
@returns {Promise<LavaMoatPolicy>}
@internal