Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve DEBUG parsing: only take care of tailwindcss and not tailwind #6804

Merged
merged 2 commits into from Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/lib/sharedState.js
Expand Up @@ -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
}

Expand Down
8 changes: 0 additions & 8 deletions tests/shared-state.test.js
Expand Up @@ -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 }) => {
Expand Down