From fe0090849c6968df644ed37aeb39ab38e91acc2f Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 30 Dec 2021 16:20:38 +0100 Subject: [PATCH 1/2] only take care of `tailwindcss` and not `tailwind` --- src/lib/sharedState.js | 8 ++++---- tests/shared-state.test.js | 8 -------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/lib/sharedState.js b/src/lib/sharedState.js index 2ef1be25aead..d060f01fdbc8 100644 --- a/src/lib/sharedState.js +++ b/src/lib/sharedState.js @@ -35,13 +35,13 @@ export function resolveDebug(debug) { let debuggers = debug.split(',').map((d) => d.split(':')[0]) - // Ignoring tailwind / tailwindcss - if (debuggers.includes('-tailwindcss') || debuggers.includes('-tailwind')) { + // Ignoring tailwindcss + if (debuggers.includes('-tailwindcss')) { return false } - // Definitely including tailwind / tailwindcss - if (debuggers.includes('tailwindcss') || debuggers.includes('tailwind')) { + // Including tailwindcss + if (debuggers.includes('tailwindcss')) { return true } diff --git a/tests/shared-state.test.js b/tests/shared-state.test.js index f4072353cf14..a3a9f287073d 100644 --- a/tests/shared-state.test.js +++ b/tests/shared-state.test.js @@ -7,20 +7,12 @@ it.each` ${'false'} | ${false} ${'0'} | ${false} ${'*'} | ${true} - ${'tailwind'} | ${true} - ${'tailwind:*'} | ${true} ${'tailwindcss'} | ${true} ${'tailwindcss:*'} | ${true} - ${'other,tailwind'} | ${true} - ${'other,tailwind:*'} | ${true} ${'other,tailwindcss'} | ${true} ${'other,tailwindcss:*'} | ${true} - ${'other,-tailwind'} | ${false} - ${'other,-tailwind:*'} | ${false} ${'other,-tailwindcss'} | ${false} ${'other,-tailwindcss:*'} | ${false} - ${'-tailwind'} | ${false} - ${'-tailwind:*'} | ${false} ${'-tailwindcss'} | ${false} ${'-tailwindcss:*'} | ${false} `('should resolve the debug ($value) flag correctly ($expected)', ({ value, expected }) => { From 42c2180f745e575af07d001db33979ce72b5fa30 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 30 Dec 2021 16:24:03 +0100 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7392f68d59b7..28be7d5c7b13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797)) +- Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797), [#6804](https://github.com/tailwindlabs/tailwindcss/pull/6804)) ## [3.0.8] - 2021-12-28