From 702ba6aaee165f176b9413bee0d13cf5a51fd879 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Thu, 8 Aug 2024 15:05:52 +0200 Subject: [PATCH 1/2] Don't warn about broad globs in vendor folders (#14147) After shipping the new warning that prevents unexpected scanning of all dependencies in 3.4.8, we noticed that it was firing more often than we wanted to. The heuristics we added works by finding broad glob patterns (once that contain `/**/`) and when those are found and are the _sole pattern used to match a file of a known-large directory_, we were showing the warning. The motivation for this is that we have seen time and time again that an incorrect config like `/**/*.js` can cause recursive scans through _all_ dependencies including many minified libraries which greatly impacts performance. In #14140, we were adding two known-large directory names: - `node_modules` (used by npm) - `vendor` (used by PHP) The problem with the `vendor` name though is that it is more generic than we would like it and there are legit use cases to have a folder named `vendor` inside your component folder. Additionally, PHP vendors behave a bit differently and it's not super common to have minified build files in that folder (which is one of the main reasons for the slow builds). Because of this, we decided to revert the change for `vendor` and only scan for `node_modules` going forward. --- CHANGELOG.md | 4 +++- src/lib/content.js | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b48a54b41775..419a9562fb98 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 + +- No longer warns when broad glob patterns are detecting `vendor` folders ## [3.4.8] - 2024-08-07 diff --git a/src/lib/content.js b/src/lib/content.js index abb0e5840f13..1a9d3c70e741 100644 --- a/src/lib/content.js +++ b/src/lib/content.js @@ -185,7 +185,6 @@ export function resolvedChangedContent(context, candidateFiles, fileModifiedMap) const LARGE_DIRECTORIES = [ 'node_modules', // Node - 'vendor', // PHP ] // Ensures that `node_modules` has to match as-is, otherwise `mynode_modules` From f65023efb97832660dc17cf954504f9f156047ba Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 8 Aug 2024 15:10:17 +0200 Subject: [PATCH 2/2] 3.4.9 --- CHANGELOG.md | 7 ++++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 419a9562fb98..413cde328927 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.9] - 2024-08-08 + ### Fixed - No longer warns when broad glob patterns are detecting `vendor` folders @@ -2421,7 +2425,8 @@ No release notes - Everything! -[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.8...HEAD +[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.9...HEAD +[3.4.9]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.8...v3.4.9 [3.4.8]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.7...v3.4.8 [3.4.7]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.6...v3.4.7 [3.4.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.5...v3.4.6 diff --git a/package-lock.json b/package-lock.json index 72ac5883ce4f..67d3035f66b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tailwindcss", - "version": "3.4.8", + "version": "3.4.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tailwindcss", - "version": "3.4.8", + "version": "3.4.9", "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", diff --git a/package.json b/package.json index 5fb0100ff2e0..6f56cb0762a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tailwindcss", - "version": "3.4.8", + "version": "3.4.9", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "main": "lib/index.js",