Skip to content

Commit 8e4ed70

Browse files
committed
Fix crash when watching renamed files on FreeBSD (#12193)
* Fix file watching bug when renaming files on FreeBSD * Update changelog * Add delay to test * Bump delay * Update test
1 parent b162ae7 commit 8e4ed70

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- Improve RegEx parser, reduce possibilities as the key for arbitrary properties ([#12121](https://github.com/tailwindlabs/tailwindcss/pull/12121))
2727
- Fix sorting of utilities that share multiple candidates ([#12173](https://github.com/tailwindlabs/tailwindcss/pull/12173))
2828
- Ensure variants with arbitrary values and a modifier are correctly matched in the RegEx based parser ([#12179](https://github.com/tailwindlabs/tailwindcss/pull/12179))
29+
- Fix crash when watching renamed files on FreeBSD ([#12193](https://github.com/tailwindlabs/tailwindcss/pull/12193))
2930

3031
## [3.3.3] - 2023-07-13
3132

integrations/rollup-sass/tests/integration.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ describe('watcher', () => {
352352
)
353353
await runningProcess.onStderr(ready)
354354

355+
await new Promise((resolve) => setTimeout(resolve, 5000))
356+
355357
expect(await readOutputFile('index.css')).toIncludeCss(
356358
css`
357359
.btn {
@@ -409,5 +411,5 @@ describe('watcher', () => {
409411
}
410412

411413
return runningProcess.stop()
412-
})
414+
}, 30000)
413415
})

src/cli/build/watching.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function createWatcher(args, { state, rebuild }) {
164164
// This is very likely a chokidar bug but it's one we need to work around
165165
// We treat this as a change event and rebuild the CSS
166166
watcher.on('raw', (evt, filePath, meta) => {
167-
if (evt !== 'rename') {
167+
if (evt !== 'rename' || filePath === null) {
168168
return
169169
}
170170

0 commit comments

Comments
 (0)