From 179e5ddd7cb416e80ba2f0fd551ef2dd90e87fef Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Thu, 8 May 2025 11:27:11 +0200 Subject: [PATCH] Add more folders to the list of ignored content dirs (#17892) Closes #15452 This PR adds more directories to the list of ignored content dirs. These are now handled the same as `node_modules`: - Contents of this directory are ignored by default to avoid scanning dependency trees - Explicit `@import`s inside these folders are now treated as _external_, bypassing any `.gitignore` files. The new extensions are: - Version control systems: `.hg`, `.svn` - Bundler caches: `.venv`, `venv`, `.yarn` - Framework caches: `.next`, `.turbo`, `.parcel-cache`, `__pycache__`, `.svelte-kit` ## Test plan Verified with the repro of #15452 by renaming the ignored directory to `.venv` and installing a local tarball: Screenshot 2025-05-06 at 13 14 55 --- CHANGELOG.md | 5 +++++ .../src/scanner/fixtures/ignored-content-dirs.txt | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 615054562..be17ecc8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgrade: Don't add `-` to variants starting with `@` ([#17814](https://github.com/tailwindlabs/tailwindcss/pull/17814)) - Upgrade: Don't format stylesheets that didn't change when upgrading ([#17824](https://github.com/tailwindlabs/tailwindcss/pull/17824)) +### Changed + +- Ignore `.hg`, `.svn`, `.venv`, `venv`, `.yarn`, `.next`, `.turbo`, `.parcel-cache`, `__pycache__`, and `.svelte-kit` folders by default (can be overridden by `@source …` rules) ([#17892](https://github.com/tailwindlabs/tailwindcss/pull/17892)) +- `@source` rules that point inside `.hg`, `.svn`, `.venv`, `venv`, `.yarn`, `.next`, `.turbo`, `.parcel-cache`, `__pycache__`, and `.svelte-kit` folders no longer consider your `.gitignore` rules ([#17892](https://github.com/tailwindlabs/tailwindcss/pull/17892)) + ## [4.1.4] - 2025-04-14 ### Added diff --git a/crates/oxide/src/scanner/fixtures/ignored-content-dirs.txt b/crates/oxide/src/scanner/fixtures/ignored-content-dirs.txt index 85dcc16df..0ab932ab0 100644 --- a/crates/oxide/src/scanner/fixtures/ignored-content-dirs.txt +++ b/crates/oxide/src/scanner/fixtures/ignored-content-dirs.txt @@ -1,2 +1,12 @@ .git +.hg +.svn node_modules +.yarn +.venv +venv +.next +.turbo +.parcel-cache +__pycache__ +.svelte-kit