Skip to content

test(upgrade): enable SCSS #{!important} @apply migration test#19738

Closed
pavan-sh wants to merge 2 commits intotailwindlabs:mainfrom
pavan-sh:feat/upgrade-handle-scss-at-apply
Closed

test(upgrade): enable SCSS #{!important} @apply migration test#19738
pavan-sh wants to merge 2 commits intotailwindlabs:mainfrom
pavan-sh:feat/upgrade-handle-scss-at-apply

Conversation

@pavan-sh
Copy link
Contributor

Summary

This PR enables coverage for Sass/SCSS @apply usage with interpolation (#{!important}) in the @tailwindcss/upgrade codemod.

The codemod already handles #{!important} in migrate-at-apply.ts, but the corresponding test was previously skipped with a TODO. This change removes the skip and updates the comment so CI will catch regressions and the supported behavior stays documented.

Test plan

  • Updated the existing unit test in packages/@tailwindcss-upgrade/src/codemods/css/migrate-at-apply.test.ts by un-skipping the #{!important} case and verifying the expected output snapshot.
  • Local verification (limited in this environment): ensured lint/pre-commit formatting passes and that the change is isolated to tests only.

Recommended CI/local verification in a full dev environment (with Rust toolchain available):

pnpm install
pnpm test

@pavan-sh pavan-sh requested a review from a team as a code owner February 28, 2026 15:55
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf2e2fe and dcd48d7.

📒 Files selected for processing (1)
  • packages/@tailwindcss-upgrade/src/codemods/css/migrate-at-apply.test.ts

Walkthrough

A skipped test in the migrate-at-apply test suite was enabled. The test validates Sass interpolation for the !important declaration using the #{!important} syntax. The test logic remains consistent with existing !important handling in the migration flow. No changes were made to the core migration behavior or error handling logic. The test file was modified with minimal changes totaling +2/-2 lines.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: enabling a skipped SCSS #{!important} @apply migration test.
Description check ✅ Passed The description is directly related to the changeset, explaining why the test was previously skipped, what the change does, and how to verify it.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Moses-main
Copy link

Hi team,

I'll enable the SCSS #(!important} @apply migration test. Let me work on this!

@RobinMalfait
Copy link
Member

Hey! We skipped this test on purpose, we're currently not looking to add SCSS support. Thanks!

@pavan-sh
Copy link
Contributor Author

pavan-sh commented Mar 3, 2026

Hey! We skipped this test on purpose, we're currently not looking to add SCSS support. Thanks!

No problem. Thanks for review and valuable time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants