function toPosixPath(relativePathOrSpecifier: string): string {
  if (path.sep === path.posix.sep) {
    return relativePathOrSpecifier;
  }

  return relativePathOrSpecifier.replace(
    MATCH_NON_POSIX_PATH_SEPS,
    path.posix.sep,
  );
}
Replace path separators in the passed string to coerce to a POSIX path. This
is a no-op on POSIX systems.