function _formatFileName(mod) {
  const { fileName, baseName } = mod;

  // Source file.
  if (!baseName) {
    return `{green-fg}.${sep}${relative(process.cwd(), resolve(fileName))}{/}`;
  }

  // Package
  let parts = fileName.split(sep);
  // Remove starting path.
  const firstNmIdx = parts.indexOf("node_modules");
  parts = parts.slice(firstNmIdx);

  // Remove trailing path after package.
  const lastNmIdx = parts.lastIndexOf("node_modules");
  const isScoped = (parts[lastNmIdx + 1] || "").startsWith("@");
  parts = parts.slice(0, lastNmIdx + (isScoped ? 3 : 2)); // eslint-disable-line no-magic-numbers

  return parts.map(part => (part === "node_modules" ? "~" : `{yellow-fg}${part}{/}`)).join(sep);
}
Modules are the individual files within an asset.