CLI: Emit comment when source maps are saved to files#19447
CLI: Emit comment when source maps are saved to files#19447thecrypticace merged 7 commits intomainfrom
Conversation
WalkthroughAdded a Pre-merge checks✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
integrations/cli/index.test.ts(6 hunks)packages/@tailwindcss-cli/src/commands/build/index.ts(1 hunks)packages/@tailwindcss-node/src/source-maps.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/@tailwindcss-node/src/source-maps.ts (1)
packages/tailwindcss/src/ast.ts (1)
comment(104-109)
🔇 Additional comments (3)
packages/@tailwindcss-node/src/source-maps.ts (1)
9-9: LGTM! Clean API extension.The new
commentmethod properly exposes the source map URL comment generation logic, and the refactoring of theinlinegetter to use this helper is well done.Also applies to: 48-58
packages/@tailwindcss-cli/src/commands/build/index.ts (1)
185-195: LGTM! Correctly implements source map URL comment emission.The logic properly computes the relative path from the CSS output location to the map file, with appropriate fallback to
process.cwd()when writing to stdout. Thepath.relative()call handles cross-platform path concerns automatically.integrations/cli/index.test.ts (1)
755-755: LGTM! Test expectations correctly updated.The updated expectations properly reflect the new source map URL comment being appended to the generated CSS with the double newline prefix (
}\n\n/*# sou...).Also applies to: 821-821, 1124-1124, 1196-1196, 1296-1296
See #19362 (comment)