{"record":{"id":"1b3cbeffcc6d8ac3","repo":"saadeghi/daisyui","slug":"no-changed-component-css-files-were-found-between","errorCode":null,"errorMessage":"No changed component CSS files were found between the supplied commits","messagePattern":"No changed component CSS files were found between the supplied commits","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/tailwind-play-share/pr-preview.mjs","lineNumber":502,"sourceCode":"    .join(\"\\n\\n\")\n  return `${plugin}\\n${changedCss ? `\\n${changedCss}\\n` : \"\"}`\n}\n\nexport function buildPreviewInputs(baseSha, headSha) {\n  const diff = git([\n    \"diff\",\n    \"--name-status\",\n    \"--find-renames\",\n    \"-z\",\n    baseSha,\n    headSha,\n    \"--\",\n    \"packages/daisyui/src/components\",\n  ])\n  const changes = parseNameStatus(diff)\n  const plan = planComponentChanges(changes)\n  if (plan.excludeNames.length === 0) {\n    throw new Error(\"No changed component CSS files were found between the supplied commits\")\n  }\n\n  const cssFiles = plan.headCssPaths.map((filePath) => {\n    const css = readFileAtRevision(headSha, filePath)\n    assertSafePrCss(css, filePath)\n    return { componentName: componentNameFromPath(filePath), css }\n  })\n\n  const headDocs = buildDocsIndex(headSha)\n  const baseDocs = buildDocsIndex(baseSha)\n  const pagesByPath = new Map()\n\n  for (const target of plan.docsTargets) {\n    const preferred = target.preferredCssFilename && headDocs.get(target.preferredCssFilename)\n    const fallback = target.fallbackCssFilename && baseDocs.get(target.fallbackCssFilename)\n    const pages = preferred?.length ? preferred : fallback\n    if (!pages?.length) {\n      const cssFilename = target.preferredCssFilename ?? target.fallbackCssFilename","sourceCodeStart":484,"sourceCodeEnd":520,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/pr-preview.mjs#L484-L520","documentation":"Thrown by buildPreviewInputs when, after diffing base..head over packages/daisyui/src/components and planning the changes, plan.excludeNames is empty - i.e. no component CSS file was added/modified/deleted/renamed/copied between the two commits.","triggerScenarios":"git diff --name-status --find-renames -z BASE HEAD -- packages/daisyui/src/components yields no component CSS changes, so planComponentChanges produces an empty excludeNames set and the guard fires.","commonSituations":"Running pr-preview on a PR that changes only docs, tests, or non-component source, passing the same SHA for both base and head, swapped base/head SHAs, or a PR whose component changes are outside packages/daisyui/src/components.","solutions":["Confirm the PR actually changes a file under packages/daisyui/src/components/*.css.","Verify base and head SHAs are distinct and in the right order (base is the older commit).","Run `git diff --name-only BASE HEAD -- packages/daisyui/src/components` to see what changed.","Skip preview generation for PRs with no component CSS changes."],"exampleFix":"# before\npr-preview --base-sha $HEAD --head-sha $BASE --output out.json\n\n# after\npr-preview --base-sha $BASE --head-sha $HEAD --output out.json\ngit diff --name-only $BASE $HEAD -- packages/daisyui/src/components  # sanity check","handlingStrategy":"validation","validationCode":"import { execSync } from \"node:child_process\"\nfunction hasComponentCssChanges(baseSha, headSha) {\n  const out = execSync(`git diff --name-only ${baseSha} ${headSha} -- packages/daisyui/src/components`, { encoding: \"utf8\" })\n  return out.trim().length > 0\n}\nif (!hasComponentCssChanges(baseSha, headSha)) {\n  throw new Error(\"No component CSS changes; skip preview generation\")\n}","typeGuard":null,"tryCatchPattern":"try {\n  await generatePrPreview({ baseSha, headSha, output })\n} catch (error) {\n  if (error.message === \"No changed component CSS files were found between the supplied commits\") {\n  // skip the preview job for this PR - it has no component CSS changes\n  }\n  throw error\n}","preventionTips":["Gate the preview job on `git diff --name-only` touching packages/daisyui/src/components.","Pass distinct SHAs with base older than head.","Skip preview generation for docs/test-only PRs."],"tags":["git","pr-preview","components","validation"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}