tailwindcss/packages
Philipp Spiess 144581d3e4
Properly skip over nodes when using replaceNode (#16300)
Fixes #16298 

This PR fixes an issue where using an AST walk in combination with
`replaceNode` and various `SkipAction` would either cause children to be
visited multiple times or not visited at all even though it should. This
PR fixes the issue which also means we can get rid of a custom walk for
`@variant` inside the `@media` that was used to apply `@variant` because
we never recursively visited children inside the `@media` rule.

Because we now can use the regular walk for `@variant`, we now properly
convert `@variant` to `@custom-variant` inside `@reference`-ed
stylesheet which also fixes #16298

## Test plan

Lots of tests added to ensure the combinations of `WalkAction` and
`replaceWith()` works as expected.
2025-02-06 14:30:04 +01:00
..
@tailwindcss-browser Prepare v4.0.3 (#16146) 2025-02-01 12:38:55 +01:00
@tailwindcss-cli Upgrade @parcel/watcher to 2.5.1 (#16248) 2025-02-04 15:14:52 +01:00
@tailwindcss-node Take NODE_PATH into account when resolving modules (#16274) 2025-02-05 16:21:31 +01:00
@tailwindcss-postcss Prepare v4.0.3 (#16146) 2025-02-01 12:38:55 +01:00
@tailwindcss-standalone Standalone: Use bun baseline builds for Linux (#16244) 2025-02-06 14:29:54 +01:00
@tailwindcss-upgrade Ensure first argument to var(…) still unescapes \_ (#16206) 2025-02-04 15:13:18 +01:00
@tailwindcss-vite Vite: Skip parsing stylesheets with the ?commonjs-proxy flag (#16238) 2025-02-04 12:45:23 +01:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Properly skip over nodes when using replaceNode (#16300) 2025-02-06 14:30:04 +01:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00