search = async (
  readPowers,
  moduleLocation,
  { log = noop } = {},
) => {
  const { data, directory, location, packageDescriptorLocation } =
    await searchDescriptor(
      moduleLocation,
      loc => maybeReadDescriptorDefault(readPowers, loc),
      { log },
    );

  if (!data) {
    throw Error(
      `Cannot find package.json along path to module ${q(moduleLocation)}`,
    );
  }

  return {
    packageLocation: directory,
    packageDescriptorText: data,
    packageDescriptorLocation,
    moduleSpecifier: relativize(relative(directory, location)),
  };
}
Searches for the first ancestor directory of a module file that contains a
package.json.
Probes by attempting to read the file, not stat.
To avoid duplicate work later, returns the text of the package.json for
inevitable later use.

@param {ReadFn | ReadPowers | MaybeReadPowers} readPowers
@param {string} moduleLocation
@param {SearchOptions} [options]
@returns {Promise<SearchResult>}