No description
## Summary Fixes #20051. The collapse canonicalization pass speculatively checks compatible functional utility roots. When one of those roots comes from a plugin registered with `matchComponents`/`matchUtilities`, the speculative candidate can call the plugin callback with an arbitrary value that is not present in the configured `values` map. Plugins such as the Phoenix Heroicons helper expect the mapped value shape and can throw while canonicalize is only probing possible replacements. This change skips speculative replacement utilities whose property lookup throws, matching the best-effort behavior already used by utility signature generation. The original candidates are preserved instead of crashing canonicalization. ## Test plan - `source ~/.nvm/nvm.sh && nvm use 22.14.0 && pnpm vitest run packages/tailwindcss/src/canonicalize-candidates.test.ts -t "does not crash when plugin matchComponents rejects speculative values during collapse"` - `source ~/.nvm/nvm.sh && nvm use 22.14.0 && pnpm vitest run packages/tailwindcss/src/canonicalize-candidates.test.ts` - `source ~/.nvm/nvm.sh && nvm use 22.14.0 && pnpm prettier --check packages/tailwindcss/src/canonicalize-candidates.ts packages/tailwindcss/src/canonicalize-candidates.test.ts` --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com> |
||
|---|---|---|
| .github | ||
| crates | ||
| integrations | ||
| packages | ||
| patches | ||
| playgrounds | ||
| scripts | ||
| .gitignore | ||
| .prettierignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| rust-toolchain.toml | ||
| turbo.json | ||
| vitest.config.ts | ||
A utility-first CSS framework for rapidly building custom user interfaces.
Documentation
For full documentation, visit tailwindcss.com.
Community
For help, discussion about best practices, or feature ideas:
Discuss Tailwind CSS on GitHub
Contributing
If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.