From 2702cfcc2c04f0615f0d53846850cbe769d57262 Mon Sep 17 00:00:00 2001 From: Brody McKee Date: Thu, 28 Nov 2024 21:12:08 +1100 Subject: [PATCH 1/4] Fix Plugin type issue (#14668) This is a quick fix to an issue where the types for PluginsConfig don't match those used in plugins like [`@tailwindcss/container-queries`](https://github.com/tailwindlabs/tailwindcss-container-queries). This was caught by TypeScript with [`exactOptionalPropertyTypes`]( https://www.typescriptlang.org/tsconfig/exactOptionalPropertyTypes.html) enabled, where TypeScript checks if `undefined` can be supplied as a value for optional types. I felt that it made more sense to fix this here, as it makes the core types more flexible, as opposed to each plugin needing to fix this when/if they hit it. --------- Co-authored-by: Philipp Spiess --- CHANGELOG.md | 4 +++- types/config.d.ts | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6c0fa7f4f84..e0958ba4c655 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Nothing yet! +### Fixed + +- Ensure the TypeScript types for `PluginsConfig` allow `undefined` values ([#14668](https://github.com/tailwindlabs/tailwindcss/pull/14668)) ## [3.4.15] - 2024-11-14 diff --git a/types/config.d.ts b/types/config.d.ts index 2c95a6dec67f..64fbf63c4878 100644 --- a/types/config.d.ts +++ b/types/config.d.ts @@ -344,9 +344,12 @@ export interface PluginAPI { export type PluginCreator = (api: PluginAPI) => void export type PluginsConfig = ( | PluginCreator - | { handler: PluginCreator; config?: Partial } + | { handler: PluginCreator; config?: Partial | undefined } | { - (options: any): { handler: PluginCreator; config?: Partial } + (options: any): { + handler: PluginCreator; + config?: Partial | undefined; + }; __isOptionsFunction: true } )[] From 8c8c986e09249fc485e1ba4886c0b76477291b2d Mon Sep 17 00:00:00 2001 From: Andrew Powell Date: Tue, 3 Dec 2024 14:19:29 -0500 Subject: [PATCH 2/4] fix: update lilconfig for ESM and Windows support (#15289) This PR updates `lilconfig` from v2.1.0 to v3.1.3. Significant improvements to this package include Windows absolute path support as well as ESM config files support. This supersedes https://github.com/tailwindlabs/tailwindcss/pull/14029 which has fallen behind and has conflicts with the upstream branch. This is a critical update for Next.js apps running in development which have dependencies on packages that use an updated version of `lilconfig`. I understand that v4 will not be using `lilconfig` but it's an important update for users on v3.x in the meantime. --------- Co-authored-by: Jordan Pittman --- CHANGELOG.md | 4 ++++ package-lock.json | 58 +++++++++-------------------------------------- package.json | 2 +- 3 files changed, 16 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0958ba4c655..097bd4399b22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ensure the TypeScript types for `PluginsConfig` allow `undefined` values ([#14668](https://github.com/tailwindlabs/tailwindcss/pull/14668)) +# Changed + +- Bumped lilconfig to v3.x ([#15289](https://github.com/tailwindlabs/tailwindcss/pull/15289)) + ## [3.4.15] - 2024-11-14 - Bump versions for security vulnerabilities ([#14697](https://github.com/tailwindlabs/tailwindcss/pull/14697)) diff --git a/package-lock.json b/package-lock.json index 47b430b06a84..cfc398bdf84e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "jiti": "^1.21.6", - "lilconfig": "^2.1.0", + "lilconfig": "^3.1.3", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", @@ -3379,18 +3379,6 @@ "postcss": "^8.4.31" } }, - "node_modules/cssnano/node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, "node_modules/csso": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", @@ -5819,11 +5807,14 @@ } }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -6561,18 +6552,6 @@ } } }, - "node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, "node_modules/postcss-merge-longhand": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.5.tgz", @@ -10353,14 +10332,6 @@ "requires": { "cssnano-preset-default": "^6.1.2", "lilconfig": "^3.1.1" - }, - "dependencies": { - "lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true - } } }, "cssnano-preset-default": { @@ -12039,9 +12010,9 @@ "optional": true }, "lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==" }, "lines-and-columns": { "version": "1.2.4" @@ -12499,13 +12470,6 @@ "requires": { "lilconfig": "^3.0.0", "yaml": "^2.3.4" - }, - "dependencies": { - "lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==" - } } }, "postcss-merge-longhand": { diff --git a/package.json b/package.json index bf1ed97ea43b..3bc24fb11f55 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "jiti": "^1.21.6", - "lilconfig": "^2.1.0", + "lilconfig": "^3.1.3", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", From 8f91c27d3e638d4c7835e2738adfd1e5b62c51c5 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 3 Dec 2024 14:22:00 -0500 Subject: [PATCH 3/4] v3.4.16 --- CHANGELOG.md | 7 ++++++- package-lock.json | 4 ++-- package.json | 2 +- standalone-cli/package-lock.json | 6 +++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 097bd4399b22..64adf989ab2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Nothing yet! + +## [3.4.16] - 2024-12-03 + ### Fixed - Ensure the TypeScript types for `PluginsConfig` allow `undefined` values ([#14668](https://github.com/tailwindlabs/tailwindcss/pull/14668)) @@ -2467,7 +2471,8 @@ No release notes - Everything! -[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.15...HEAD +[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.16...HEAD +[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 [3.4.14]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.13...v3.4.14 [3.4.13]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.12...v3.4.13 diff --git a/package-lock.json b/package-lock.json index cfc398bdf84e..636141639c14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tailwindcss", - "version": "3.4.15", + "version": "3.4.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tailwindcss", - "version": "3.4.15", + "version": "3.4.16", "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", diff --git a/package.json b/package.json index 3bc24fb11f55..10e7c83963be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tailwindcss", - "version": "3.4.15", + "version": "3.4.16", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "main": "lib/index.js", diff --git a/standalone-cli/package-lock.json b/standalone-cli/package-lock.json index 338b3baae78f..e8136a1162f2 100644 --- a/standalone-cli/package-lock.json +++ b/standalone-cli/package-lock.json @@ -25,7 +25,7 @@ }, "..": { "name": "tailwindcss", - "version": "3.4.14", + "version": "3.4.16", "dev": true, "license": "MIT", "dependencies": { @@ -38,7 +38,7 @@ "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "jiti": "^1.21.6", - "lilconfig": "^2.1.0", + "lilconfig": "^3.1.3", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", @@ -9672,7 +9672,7 @@ "jest-diff": "^29.7.0", "jiti": "^1.21.6", "lightningcss": "1.27.0", - "lilconfig": "^2.1.0", + "lilconfig": "^3.1.3", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", From f875ab9706cae8262e15e5b382580fc8e2d4197f Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 3 Dec 2024 14:25:44 -0500 Subject: [PATCH 4/4] Bump macos version --- .github/workflows/prepare-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 15b56434d9fd..9f952303e919 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -17,7 +17,7 @@ jobs: permissions: contents: write # for softprops/action-gh-release to create GitHub release - runs-on: macos-12 + runs-on: macos-13 timeout-minutes: 15 strategy: