Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laurence-myers/chokidar_issue_646
Demonstrates a bug in chokidar when watching files named like "test.html" and "test.html.ts"
https://github.com/laurence-myers/chokidar_issue_646
Last synced: 6 days ago
JSON representation
Demonstrates a bug in chokidar when watching files named like "test.html" and "test.html.ts"
- Host: GitHub
- URL: https://github.com/laurence-myers/chokidar_issue_646
- Owner: laurence-myers
- Created: 2017-10-29T12:55:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-29T12:56:44.000Z (about 7 years ago)
- Last Synced: 2024-11-10T20:44:58.413Z (2 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo demonstrates an issue in chokidar.
Watching two file, "test.file" and "test.file.txt", and editing only "test.file", will cause a "change" event to be triggered for both "test.file" and "test.file.txt".
Watching files in the "polling" mode does not exhibit this behaviour, so could be used as a workaround.
(Enabling the "disableGlobbing" option does not seem to have an impact.)
Here is the output of index.js, after editing test.html, then test.html.ts, then test.html, then test.html.ts.
```
$ node ./index.js
EVENT: File was changed: test.html.ts
EVENT: File was changed: test.html
POLL: File was changed: test.html
EVENT: File was changed: test.html.ts
POLL: File was changed: test.html.ts
EVENT: File was changed: test.html.ts
EVENT: File was changed: test.html
POLL: File was changed: test.html
EVENT: File was changed: test.html.ts
POLL: File was changed: test.html.ts
```Tested on Windows 8.1, using Node 6.9.1, chokidar 1.7.0.