From 0a836f76bbd15d72e3ed4a57b73ff375314e2c22 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 17 Dec 2024 13:43:33 -0500 Subject: [PATCH 1/4] Work around issue with Node 22 and Jiti (#15421) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #15374 If we always use Jiti the problem should, in theory, go away (I hope). It does mean that loading configs is slower than it would be if they're written in CJS but 🤷‍♂️ Wanna get this running with the integration tests to see if anything breaks. --- src/lib/load-config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/load-config.ts b/src/lib/load-config.ts index eaff8e95b410..7eab412ca09a 100644 --- a/src/lib/load-config.ts +++ b/src/lib/load-config.ts @@ -33,6 +33,10 @@ function lazyJiti() { export function loadConfig(path: string): Config { let config = (function () { + // Always use jiti for now. There is a a bug that occurs in Node v22.12+ + // where imported files return invalid results + return lazyJiti()(path) + // Always use jiti for ESM or TS files if ( path && From e268b2aa962918eed3ab46b6f692041bafc25f4a Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 17 Dec 2024 13:45:39 -0500 Subject: [PATCH 2/4] Update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64adf989ab2c..6266df0cadfc 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 + +- Work around Node v22.12+ issue ([#15421](https://github.com/tailwindlabs/tailwindcss/pull/15421)) ## [3.4.16] - 2024-12-03 From 02faa1529e77b4000e66c0835a8344f55d182f54 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 17 Dec 2024 13:46:50 -0500 Subject: [PATCH 3/4] v3.4.17 --- CHANGELOG.md | 7 ++++++- package-lock.json | 4 ++-- package.json | 2 +- standalone-cli/package-lock.json | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6266df0cadfc..2547f13b8ee2 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.17] - 2024-12-17 + ### Fixed - Work around Node v22.12+ issue ([#15421](https://github.com/tailwindlabs/tailwindcss/pull/15421)) @@ -2473,7 +2477,8 @@ No release notes - Everything! -[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.16...HEAD +[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.17...HEAD +[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 [3.4.14]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.13...v3.4.14 diff --git a/package-lock.json b/package-lock.json index 636141639c14..2c4d2cdbaef4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tailwindcss", - "version": "3.4.16", + "version": "3.4.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tailwindcss", - "version": "3.4.16", + "version": "3.4.17", "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", diff --git a/package.json b/package.json index 10e7c83963be..03484eb103c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tailwindcss", - "version": "3.4.16", + "version": "3.4.17", "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 e8136a1162f2..f33a9b2c3a42 100644 --- a/standalone-cli/package-lock.json +++ b/standalone-cli/package-lock.json @@ -25,7 +25,7 @@ }, "..": { "name": "tailwindcss", - "version": "3.4.16", + "version": "3.4.17", "dev": true, "license": "MIT", "dependencies": { From 4f9f603e12b51cc53b8a09c7739b8f88c8eb87eb Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 17 Dec 2024 14:07:10 -0500 Subject: [PATCH 4/4] Fix error --- src/lib/load-config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/load-config.ts b/src/lib/load-config.ts index 7eab412ca09a..af518d9cc6b1 100644 --- a/src/lib/load-config.ts +++ b/src/lib/load-config.ts @@ -33,6 +33,8 @@ function lazyJiti() { export function loadConfig(path: string): Config { let config = (function () { + if (!path) return {} + // Always use jiti for now. There is a a bug that occurs in Node v22.12+ // where imported files return invalid results return lazyJiti()(path)