Bump vendored Tailwind to ^4.3.0 to fix spurious 'Unsupported bare value' warnings for --default() - #472
Merged
Conversation
The vendored Tailwind snapshot that gets bundled into `dist/v4-*.mjs` predates Tailwind 4.3.0, which is missing a guard in the `--value(...)` argument preprocessor that was added by tailwindlabs/tailwindcss#19989 (2026-05-08): without the `!arg.includes("(")` check, `--default(1px)` picks up a trailing `-*` during normalization (becoming `--default(1px)-*`), and the value validator then warns `Unsupported bare value data type: "-*"` for every `@utility name-*` whose declarations use `--default(...)`. Real Tailwind 4.3.x parses the same CSS without warnings; our bundle only reproduces the bug because it snapshot older code. Bumping the pin to `^4.3.0` refreshes the vendored code (`c[0]==="-" && c[1]==="-" && !c.includes("(") && !c.includes("-*") && (c+="-*")`), verified end-to-end by rebuilding this plugin, dropping the rebuilt `v4-*.mjs` into an oxfmt install (which vendors this package), and confirming the "Unsupported bare value" warnings drop from N to 0 on a project using `--value([*], --default(1px))`.
|
Likely also fixes #471 (as well as the other issue referenced by that one) |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Tailwind snapshot vendored into
dist/v4-*.mjsis pre-4.3.0, so it lacks the!arg.includes("(")guard that was added in tailwindlabs/tailwindcss#19989 (2026-05-08). Without that guard,--value(...)argument normalization appends a trailing-*to--default(1px), producing--default(1px)-*; the value validator then walks the parsed nodes and warns:.prettierrc:{ "plugins": ["prettier-plugin-tailwindcss"], "tailwindStylesheet": "./entry.css" }with
entry.cssimporting tailwindcss andutils.css. Thenprettier --check(or any host running the sorter) emits NUnsupported bare valuewarnings.Fix
Bump
tailwindcss-v4: "npm:tailwindcss@^4.1.14"→"^4.3.0"so the rebuild picks up the guarded normalizer. Existing pin allowed 4.3.x semver-wise, but the lockfile stayed on 4.1.18 across insider builds — the specifier bump forces a floor.Verification
Verified end-to-end:
dist/v4-*.mjscontainsc[0]==="-"&&c[1]==="-"&&!c.includes("(")&&!c.includes("-*")&&(c+="-*")(the guard) instead of the oldf[0]==="-"&&f[1]==="-"&&!f.includes("-*")&&(f+="-*").oxfmt@0.65.0install of a monorepo using--default(1px)in three functional utilities.oxfmt --check .went from 24Unsupported bare valuewarnings to 0.Both
pnpm buildand the existing test suite pass locally after the bump.Related
Edit by @RobinMalfait:
Fixes: #468
Fixes: #471