Skip to content

Commit

Permalink
Use absolute paths when resolving changed files (#9032)
Browse files Browse the repository at this point in the history
* Fix vite3 postcss statSync not found

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
  • Loading branch information
jardenliu and thecrypticace committed Aug 8, 2022
1 parent 99b53b4 commit fbbe3c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Use absolute paths when resolving changed files for resilience against working directory changes ([#9032](https://github.com/tailwindlabs/tailwindcss/pull/9032))

## [3.1.8] - 2022-08-05

Expand Down
2 changes: 1 addition & 1 deletion src/lib/setupTrackingContext.js
Expand Up @@ -96,7 +96,7 @@ function resolvedChangedContent(context, candidateFiles, fileModifiedMap) {
function resolveChangedFiles(candidateFiles, fileModifiedMap) {
let changedFiles = new Set()
env.DEBUG && console.time('Finding changed files')
let files = fastGlob.sync(candidateFiles)
let files = fastGlob.sync(candidateFiles, { absolute: true })
for (let file of files) {
let prevModified = fileModifiedMap.has(file) ? fileModifiedMap.get(file) : -Infinity
let modified = fs.statSync(file).mtimeMs
Expand Down

0 comments on commit fbbe3c0

Please sign in to comment.