diff --git a/CHANGELOG.md b/CHANGELOG.md index 4243ca1ec616..edeb569adaeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - _Experimental_: Add `@container-size` utility ([#18901](https://github.com/tailwindlabs/tailwindcss/pull/18901)) +## [4.1.14] - 2025-10-01 + ### Fixed - Handle `'` syntax in ClojureScript when extracting classes ([#18888](https://github.com/tailwindlabs/tailwindcss/pull/18888)) @@ -20,15 +22,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Do not generate `grid-column` utilities when configuring `grid-column-start` or `grid-column-end` ([#18907](https://github.com/tailwindlabs/tailwindcss/pull/18907)) - Do not generate `grid-row` utilities when configuring `grid-row-start` or `grid-row-end` ([#18907](https://github.com/tailwindlabs/tailwindcss/pull/18907)) - Prevent duplicate CSS when overwriting a static utility with a theme key ([#18056](https://github.com/tailwindlabs/tailwindcss/pull/18056)) -- Do not migrate `variant = 'outline'` during upgrades ([#18922](https://github.com/tailwindlabs/tailwindcss/pull/18922)) - Show Lightning CSS warnings (if any) when optimizing/minifying ([#18918](https://github.com/tailwindlabs/tailwindcss/pull/18918)) - Use `default` export condition for `@tailwindcss/vite` ([#18948](https://github.com/tailwindlabs/tailwindcss/pull/18948)) - Re-throw errors from PostCSS nodes ([#18373](https://github.com/tailwindlabs/tailwindcss/pull/18373)) - Detect classes in markdown inline directives ([#18967](https://github.com/tailwindlabs/tailwindcss/pull/18967)) - Ensure files with only `@theme` produce no output when built ([#18979](https://github.com/tailwindlabs/tailwindcss/pull/18979)) - Support Maud templates when extracting classes ([#18988](https://github.com/tailwindlabs/tailwindcss/pull/18988)) -- Show version mismatch (if any) when running upgrade tool ([#19028](https://github.com/tailwindlabs/tailwindcss/pull/19028)) -- Upgrade: Ensure first class inside className in React is migrated ([#19031](https://github.com/tailwindlabs/tailwindcss/pull/19031)) +- Upgrade: Do not migrate `variant = 'outline'` during upgrades ([#18922](https://github.com/tailwindlabs/tailwindcss/pull/18922)) +- Upgrade: Show version mismatch (if any) when running upgrade tool ([#19028](https://github.com/tailwindlabs/tailwindcss/pull/19028)) +- Upgrade: Ensure first class inside `className` is migrated ([#19031](https://github.com/tailwindlabs/tailwindcss/pull/19031)) - Upgrade: Migrate classes inside `*ClassName` and `*Class` attributes ([#19031](https://github.com/tailwindlabs/tailwindcss/pull/19031)) ## [4.1.13] - 2025-09-03 @@ -1363,6 +1365,16 @@ For a deep-dive into everything that's new, [check out the announcement post](ht - First 4.0.0-alpha.1 release +## [3.4.18] - 2024-10-01 + +### Fixed + +- Improve support for raw `supports-[…]` queries in arbitrary values ([#13605](https://github.com/tailwindlabs/tailwindcss/pull/13605)) +- Fix `require.cache` error when loaded through a TypeScript file in Node 22.18+ ([#18665](https://github.com/tailwindlabs/tailwindcss/pull/18665)) +- Support `import.meta.resolve(…)` in configs for new enough Node.js versions ([#18938](https://github.com/tailwindlabs/tailwindcss/pull/18938)) +- Allow using newer versions of `postcss-load-config` for better ESM and TypeScript PostCSS config support with the CLI ([#18938](https://github.com/tailwindlabs/tailwindcss/pull/18938)) +- Remove irrelevant utility rules when matching important classes ([#19030](https://github.com/tailwindlabs/tailwindcss/pull/19030)) + ## [3.4.17] - 2024-12-17 ### Fixed @@ -3831,7 +3843,8 @@ No release notes - Everything! -[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v4.1.13...HEAD +[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v4.1.14...HEAD +[4.1.14]: https://github.com/tailwindlabs/tailwindcss/compare/v4.1.13...v4.1.14 [4.1.13]: https://github.com/tailwindlabs/tailwindcss/compare/v4.1.12...v4.1.13 [4.1.12]: https://github.com/tailwindlabs/tailwindcss/compare/v4.1.11...v4.1.12 [4.1.11]: https://github.com/tailwindlabs/tailwindcss/compare/v4.1.10...v4.1.11 @@ -3889,6 +3902,7 @@ No release notes [4.0.0-alpha.24]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.0-alpha.23...v4.0.0-alpha.24 [4.0.0-alpha.23]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.0-alpha.22...v4.0.0-alpha.23 [4.0.0-alpha.22]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.17...v4.0.0-alpha.22 +[3.4.18]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.17...v3.4.18 [3.4.17]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.16...v3.4.17 [3.4.16]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.15...v3.4.16 [3.4.15]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.14...v3.4.15 diff --git a/crates/node/npm/android-arm-eabi/package.json b/crates/node/npm/android-arm-eabi/package.json index 86a9bc4be28f..90962589f1b7 100644 --- a/crates/node/npm/android-arm-eabi/package.json +++ b/crates/node/npm/android-arm-eabi/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-android-arm-eabi", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/android-arm64/package.json b/crates/node/npm/android-arm64/package.json index 8f2dbc7abdef..36d9cd668a6b 100644 --- a/crates/node/npm/android-arm64/package.json +++ b/crates/node/npm/android-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-android-arm64", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/darwin-arm64/package.json b/crates/node/npm/darwin-arm64/package.json index 6f2f5efe88d8..754d8a1e0e7c 100644 --- a/crates/node/npm/darwin-arm64/package.json +++ b/crates/node/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-darwin-arm64", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/darwin-x64/package.json b/crates/node/npm/darwin-x64/package.json index 1a088a0e0506..5b4731b26ac6 100644 --- a/crates/node/npm/darwin-x64/package.json +++ b/crates/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-darwin-x64", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/freebsd-x64/package.json b/crates/node/npm/freebsd-x64/package.json index c36e6ebe4790..28fcc8790ec5 100644 --- a/crates/node/npm/freebsd-x64/package.json +++ b/crates/node/npm/freebsd-x64/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-freebsd-x64", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/linux-arm-gnueabihf/package.json b/crates/node/npm/linux-arm-gnueabihf/package.json index 049fb37089c1..3d2f61a46554 100644 --- a/crates/node/npm/linux-arm-gnueabihf/package.json +++ b/crates/node/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-linux-arm-gnueabihf", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/linux-arm64-gnu/package.json b/crates/node/npm/linux-arm64-gnu/package.json index 04b060dcfcbc..8c68d1097f46 100644 --- a/crates/node/npm/linux-arm64-gnu/package.json +++ b/crates/node/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-linux-arm64-gnu", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/linux-arm64-musl/package.json b/crates/node/npm/linux-arm64-musl/package.json index 18d23a646b21..c58d48cba807 100644 --- a/crates/node/npm/linux-arm64-musl/package.json +++ b/crates/node/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-linux-arm64-musl", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/linux-x64-gnu/package.json b/crates/node/npm/linux-x64-gnu/package.json index 151af9acabe0..6eb843c5563f 100644 --- a/crates/node/npm/linux-x64-gnu/package.json +++ b/crates/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-linux-x64-gnu", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/linux-x64-musl/package.json b/crates/node/npm/linux-x64-musl/package.json index 737bf9142414..0831fa26fa73 100644 --- a/crates/node/npm/linux-x64-musl/package.json +++ b/crates/node/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-linux-x64-musl", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/wasm32-wasi/package.json b/crates/node/npm/wasm32-wasi/package.json index 7d59ed217e39..1a14e08939c2 100644 --- a/crates/node/npm/wasm32-wasi/package.json +++ b/crates/node/npm/wasm32-wasi/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-wasm32-wasi", - "version": "4.1.13", + "version": "4.1.14", "cpu": [ "wasm32" ], diff --git a/crates/node/npm/win32-arm64-msvc/package.json b/crates/node/npm/win32-arm64-msvc/package.json index a4c459f53a3b..1439ff9a6c54 100644 --- a/crates/node/npm/win32-arm64-msvc/package.json +++ b/crates/node/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-win32-arm64-msvc", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/npm/win32-x64-msvc/package.json b/crates/node/npm/win32-x64-msvc/package.json index b9ca23614009..1abe8cf3ace4 100644 --- a/crates/node/npm/win32-x64-msvc/package.json +++ b/crates/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide-win32-x64-msvc", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/crates/node/package.json b/crates/node/package.json index df57d6bb4068..08cc8bab08ef 100644 --- a/crates/node/package.json +++ b/crates/node/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/oxide", - "version": "4.1.13", + "version": "4.1.14", "repository": { "type": "git", "url": "git+https://github.com/tailwindlabs/tailwindcss.git", diff --git a/integrations/upgrade/upgrade-errors.test.ts b/integrations/upgrade/upgrade-errors.test.ts index 13e37aa99101..6733801e087f 100644 --- a/integrations/upgrade/upgrade-errors.test.ts +++ b/integrations/upgrade/upgrade-errors.test.ts @@ -1,6 +1,4 @@ import { stripVTControlCharacters } from 'node:util' -// @ts-expect-error This path does exist -import { version } from '../../packages/tailwindcss/package.json' import { css, html, js, json, test } from '../utils' test( @@ -52,7 +50,9 @@ test( return exec('npx @tailwindcss/upgrade', {}, { ignoreStdErr: true }).catch((e) => { // Replacing the current version with a hardcoded `v4` to make it stable // when we release new minor/patch versions. - return Promise.reject(stripVTControlCharacters(e.message.replaceAll(version, '4.0.0'))) + return Promise.reject( + stripVTControlCharacters(e.message.replace(/\d+\.\d+\.\d+/g, '4.0.0')), + ) }) }).rejects.toThrowErrorMatchingInlineSnapshot(` "Command failed: npx @tailwindcss/upgrade @@ -63,11 +63,11 @@ test( │ ↳ Version mismatch │ │ \`\`\`diff - │ - "tailwindcss": "^3" (expected version in package.json / lockfile) + │ - "tailwindcss": "^3" (expected version in \`package.json\`) │ + "tailwindcss": "4.0.0" (installed version in \`node_modules\`) │ \`\`\` │ - │ Make sure to run \`pnpm install\`, and try again. + │ Make sure to run \`pnpm install\` and try again. " `) @@ -109,7 +109,17 @@ test( async ({ exec, expect }) => { // Use `bun` to install dependencies await exec('rm ./pnpm-lock.yaml') - await exec('npx bun install') + try { + await exec('npx bun install', {}, { ignoreStdErr: true }) + } catch (e) { + // When preparing for a release, the version in `package.json` will point + // to a non-existent version because it's not published yet. + // TODO: Find a better approach to handle this and actually test it even + // on release branches. Note: the pnpm version _does_ work because of + // overrides in the package.json file. + if (`${e}`.includes('No version matching')) return + throw e + } // Ensure we are in a git repo await exec('git init') @@ -128,7 +138,9 @@ test( return exec('npx @tailwindcss/upgrade', {}, { ignoreStdErr: true }).catch((e) => { // Replacing the current version with a hardcoded `v4` to make it stable // when we release new minor/patch versions. - return Promise.reject(stripVTControlCharacters(e.message.replaceAll(version, '4.0.0'))) + return Promise.reject( + stripVTControlCharacters(e.message.replace(/\d+\.\d+\.\d+/g, '4.0.0')), + ) }) }).rejects.toThrowErrorMatchingInlineSnapshot(` "Command failed: npx @tailwindcss/upgrade @@ -139,11 +151,11 @@ test( │ ↳ Version mismatch │ │ \`\`\`diff - │ - "tailwindcss": "^3" (expected version in package.json / lockfile) + │ - "tailwindcss": "^3" (expected version in \`package.json\`) │ + "tailwindcss": "4.0.0" (installed version in \`node_modules\`) │ \`\`\` │ - │ Make sure to run \`bun install\`, and try again. + │ Make sure to run \`bun install\` and try again. " `) @@ -182,10 +194,20 @@ test( }, }, async ({ exec, expect }) => { - // Use `bun` to install dependencies + // Use `npm` to install dependencies await exec('rm ./pnpm-lock.yaml') await exec('rm -rf ./node_modules') - await exec('npm install') + try { + await exec('npm install', {}, { ignoreStdErr: true }) + } catch (e) { + // When preparing for a release, the version in `package.json` will point + // to a non-existent version because it's not published yet. + // TODO: Find a better approach to handle this and actually test it even + // on release branches. Note: the pnpm version _does_ work because of + // overrides in the package.json file. + if (`${e}`.includes('npm error code ETARGET')) return + throw e + } // Ensure we are in a git repo await exec('git init') @@ -204,7 +226,9 @@ test( return exec('npx @tailwindcss/upgrade', {}, { ignoreStdErr: true }).catch((e) => { // Replacing the current version with a hardcoded `v4` to make it stable // when we release new minor/patch versions. - return Promise.reject(stripVTControlCharacters(e.message.replaceAll(version, '4.0.0'))) + return Promise.reject( + stripVTControlCharacters(e.message.replace(/\d+\.\d+\.\d+/g, '4.0.0')), + ) }) }).rejects.toThrowErrorMatchingInlineSnapshot(` "Command failed: npx @tailwindcss/upgrade @@ -215,11 +239,11 @@ test( │ ↳ Version mismatch │ │ \`\`\`diff - │ - "tailwindcss": "^3" (expected version in package.json / lockfile) + │ - "tailwindcss": "^3" (expected version in \`package.json\`) │ + "tailwindcss": "4.0.0" (installed version in \`node_modules\`) │ \`\`\` │ - │ Make sure to run \`npm install\`, and try again. + │ Make sure to run \`npm install\` and try again. " `) diff --git a/packages/@tailwindcss-browser/package.json b/packages/@tailwindcss-browser/package.json index 07f9ff67a779..68f0ad71090b 100644 --- a/packages/@tailwindcss-browser/package.json +++ b/packages/@tailwindcss-browser/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/browser", - "version": "4.1.13", + "version": "4.1.14", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "main": "./dist/index.global.js", diff --git a/packages/@tailwindcss-cli/package.json b/packages/@tailwindcss-cli/package.json index 9c56c758faca..e4eeb9081416 100644 --- a/packages/@tailwindcss-cli/package.json +++ b/packages/@tailwindcss-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/cli", - "version": "4.1.13", + "version": "4.1.14", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "repository": { diff --git a/packages/@tailwindcss-node/package.json b/packages/@tailwindcss-node/package.json index 7f0a7f43fb31..95559cce4c1d 100644 --- a/packages/@tailwindcss-node/package.json +++ b/packages/@tailwindcss-node/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/node", - "version": "4.1.13", + "version": "4.1.14", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "repository": { diff --git a/packages/@tailwindcss-postcss/package.json b/packages/@tailwindcss-postcss/package.json index 6803c4841d6a..fe27165ee03a 100644 --- a/packages/@tailwindcss-postcss/package.json +++ b/packages/@tailwindcss-postcss/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/postcss", - "version": "4.1.13", + "version": "4.1.14", "description": "PostCSS plugin for Tailwind CSS, a utility-first CSS framework for rapidly building custom user interfaces", "license": "MIT", "repository": { diff --git a/packages/@tailwindcss-standalone/package.json b/packages/@tailwindcss-standalone/package.json index 0dcfd3b877b6..cf3bfc25293b 100644 --- a/packages/@tailwindcss-standalone/package.json +++ b/packages/@tailwindcss-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/standalone", - "version": "4.1.13", + "version": "4.1.14", "private": true, "description": "Standalone CLI for Tailwind CSS", "license": "MIT", diff --git a/packages/@tailwindcss-upgrade/package.json b/packages/@tailwindcss-upgrade/package.json index 98ff26e67550..929748358730 100644 --- a/packages/@tailwindcss-upgrade/package.json +++ b/packages/@tailwindcss-upgrade/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/upgrade", - "version": "4.1.13", + "version": "4.1.14", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "repository": { diff --git a/packages/@tailwindcss-upgrade/src/index.ts b/packages/@tailwindcss-upgrade/src/index.ts index 5cfd4acb4398..2cfbab371f5f 100644 --- a/packages/@tailwindcss-upgrade/src/index.ts +++ b/packages/@tailwindcss-upgrade/src/index.ts @@ -71,11 +71,11 @@ async function run() { 'Version mismatch', '', pc.dim('```diff'), - `${pc.red('-')} ${`${pc.dim('"tailwindcss":')} ${`${pc.dim('"')}${pc.blue(version.expectedTailwindVersion(base))}${pc.dim('"')}`}`} (expected version in package.json / lockfile)`, - `${pc.green('+')} ${`${pc.dim('"tailwindcss":')} ${`${pc.dim('"')}${pc.blue(version.installedTailwindVersion(base))}${pc.dim('"')}`}`} (installed version in \`node_modules\`)`, + `${pc.red('-')} ${`${pc.dim('"tailwindcss":')} ${`${pc.dim('"')}${pc.blue(version.expectedTailwindVersion(base))}${pc.dim('"')}`}`} (expected version in ${highlight('package.json')})`, + `${pc.green('+')} ${`${pc.dim('"tailwindcss":')} ${`${pc.dim('"')}${pc.blue(version.installedTailwindVersion(base))}${pc.dim('"')}`}`} (installed version in ${highlight('node_modules')})`, pc.dim('```'), '', - `Make sure to run ${highlight(`${pkgManager} install`)}, and try again.`, + `Make sure to run ${highlight(`${pkgManager} install`)} and try again.`, ].join('\n'), { prefix: '↳ ', diff --git a/packages/@tailwindcss-vite/package.json b/packages/@tailwindcss-vite/package.json index fc0dc49bede4..d00586f4940f 100644 --- a/packages/@tailwindcss-vite/package.json +++ b/packages/@tailwindcss-vite/package.json @@ -1,6 +1,6 @@ { "name": "@tailwindcss/vite", - "version": "4.1.13", + "version": "4.1.14", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "repository": { diff --git a/packages/tailwindcss/package.json b/packages/tailwindcss/package.json index 16b8001781cd..585d5786221c 100644 --- a/packages/tailwindcss/package.json +++ b/packages/tailwindcss/package.json @@ -1,6 +1,6 @@ { "name": "tailwindcss", - "version": "4.1.13", + "version": "4.1.14", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "repository": {