Skip to content

Commit 875c850

Browse files
authored
Improve DEBUG parsing: only take care of tailwindcss and not tailwind (#6804)
* only take care of `tailwindcss` and not `tailwind` * update changelog
1 parent 10710b0 commit 875c850

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12-
- Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797))
12+
- Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797), [#6804](https://github.com/tailwindlabs/tailwindcss/pull/6804))
1313

1414
## [3.0.8] - 2021-12-28
1515

src/lib/sharedState.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export function resolveDebug(debug) {
3535

3636
let debuggers = debug.split(',').map((d) => d.split(':')[0])
3737

38-
// Ignoring tailwind / tailwindcss
39-
if (debuggers.includes('-tailwindcss') || debuggers.includes('-tailwind')) {
38+
// Ignoring tailwindcss
39+
if (debuggers.includes('-tailwindcss')) {
4040
return false
4141
}
4242

43-
// Definitely including tailwind / tailwindcss
44-
if (debuggers.includes('tailwindcss') || debuggers.includes('tailwind')) {
43+
// Including tailwindcss
44+
if (debuggers.includes('tailwindcss')) {
4545
return true
4646
}
4747

tests/shared-state.test.js

-8
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,12 @@ it.each`
77
${'false'} | ${false}
88
${'0'} | ${false}
99
${'*'} | ${true}
10-
${'tailwind'} | ${true}
11-
${'tailwind:*'} | ${true}
1210
${'tailwindcss'} | ${true}
1311
${'tailwindcss:*'} | ${true}
14-
${'other,tailwind'} | ${true}
15-
${'other,tailwind:*'} | ${true}
1612
${'other,tailwindcss'} | ${true}
1713
${'other,tailwindcss:*'} | ${true}
18-
${'other,-tailwind'} | ${false}
19-
${'other,-tailwind:*'} | ${false}
2014
${'other,-tailwindcss'} | ${false}
2115
${'other,-tailwindcss:*'} | ${false}
22-
${'-tailwind'} | ${false}
23-
${'-tailwind:*'} | ${false}
2416
${'-tailwindcss'} | ${false}
2517
${'-tailwindcss:*'} | ${false}
2618
`('should resolve the debug ($value) flag correctly ($expected)', ({ value, expected }) => {

0 commit comments

Comments
 (0)