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: ignore fs-specific tmp files in watch mode #729

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

PeachScript
Copy link
Member

修复在某些特殊文件系统(比如 CloudIDE)中会 watch 到临时文件,然后尝试读取导致报错的问题,错误类似:

error - ENOENT: no such file or directory, open '/path/to/index.tsx.450062575'

解法是使用 awaitWriteFinish 等文件稳定了再触发事件,目前检测时间间隔设置得很小,所以对 watch 性能的影响应该较小

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b4bd2bb) 94.43% compared to head (645fc9e) 94.43%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #729   +/-   ##
=======================================
  Coverage   94.43%   94.43%           
=======================================
  Files          55       55           
  Lines        1562     1562           
  Branches      373      351   -22     
=======================================
  Hits         1475     1475           
- Misses         82       87    +5     
+ Partials        5        0    -5     
Files Coverage Δ
src/builder/bundless/index.ts 91.66% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PeachScript PeachScript merged commit dce4be9 into master Nov 7, 2023
9 checks passed
@delete-merged-branch delete-merged-branch bot deleted the hotfix/ignore-tmp-file-in-watch branch November 7, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant