From f2bc150471a61ae4fa18996ced744cd4df4dc7e0 Mon Sep 17 00:00:00 2001 From: Huzaifa Iftikhar Date: Fri, 28 Aug 2026 05:01:29 +0500 Subject: [PATCH] split the variant guard into one rule per syntax form three rounds of review kept finding holes in a single pattern because one regex was trying to know where the value ends in three different syntaxes at once each form now stops at what actually ends it. a brace for a jsx expression, the opening quote for an attribute so it cannot run into a neighbouring one, a comma or brace for an object literal where quotes are normal the array already tests each rule on its own so this needs no other change --- .../template/is-safe-migration.test.ts | 3 ++ .../codemods/template/is-safe-migration.ts | 33 ++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/packages/@tailwindcss-upgrade/src/codemods/template/is-safe-migration.test.ts b/packages/@tailwindcss-upgrade/src/codemods/template/is-safe-migration.test.ts index 5b1b7fa90..8c9b630d2 100644 --- a/packages/@tailwindcss-upgrade/src/codemods/template/is-safe-migration.test.ts +++ b/packages/@tailwindcss-upgrade/src/codemods/template/is-safe-migration.test.ts @@ -125,6 +125,9 @@ describe('is-safe-migration', async () => { [`