Commit 4df33e9
committed
fix: Avoid auto-reload for recently created source directory
Watchpack has a bug that caused it to dispatch change events for files
that were created recently (up to 2 seconds before now). This can
trigger an unwanted auto-reload, e.g. in the scenario of an extension
developer building an extension and using `web-ext run` to immediately
launch that built package.
Fixing this bug caused test.cli.run-target-chromium.js to time out
because the "with auto-reload" test got stuck, because it waited until
"The extension will reload if any source file changes" was logged before
writing a file to trigger auto-reload, but that message was logged
before the watcher was registered. To fix that test issue, move the
logging after initializing the reload strategy.1 parent 35a9e30 commit 4df33e9
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
| |||
217 | 215 | | |
218 | 216 | | |
219 | 217 | | |
| 218 | + | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
0 commit comments