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

Fix crash when watching renamed files on FreeBSD #12193

Merged
merged 5 commits into from
Oct 17, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improve RegEx parser, reduce possibilities as the key for arbitrary properties ([#12121](https://github.com/tailwindlabs/tailwindcss/pull/12121))
- Fix sorting of utilities that share multiple candidates ([#12173](https://github.com/tailwindlabs/tailwindcss/pull/12173))
- Ensure variants with arbitrary values and a modifier are correctly matched in the RegEx based parser ([#12179](https://github.com/tailwindlabs/tailwindcss/pull/12179))
- Fix crash when watching renamed files on FreeBSD ([#12193](https://github.com/tailwindlabs/tailwindcss/pull/12193))

### Added

Expand Down
4 changes: 3 additions & 1 deletion integrations/rollup-sass/tests/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ describe('watcher', () => {
)
await runningProcess.onStderr(ready)

await new Promise((resolve) => setTimeout(resolve, 5000))

expect(await readOutputFile('index.css')).toIncludeCss(
css`
.btn {
Expand Down Expand Up @@ -334,5 +336,5 @@ describe('watcher', () => {
)

return runningProcess.stop()
})
}, 30000)
})
2 changes: 1 addition & 1 deletion src/cli/build/watching.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export function createWatcher(args, { state, rebuild }) {
// This is very likely a chokidar bug but it's one we need to work around
// We treat this as a change event and rebuild the CSS
watcher.on('raw', (evt, filePath, meta) => {
if (evt !== 'rename') {
if (evt !== 'rename' || filePath === null) {
return
}

Expand Down