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: chain extract on watched file changes #1435

Merged
merged 1 commit into from
Feb 14, 2023
Merged

fix: chain extract on watched file changes #1435

merged 1 commit into from
Feb 14, 2023

Conversation

taozhou-glean
Copy link
Contributor

@taozhou-glean taozhou-glean commented Feb 13, 2023

Description

This avoids a racing when run extract with --watch (no debounce) when multiple files changed together (or in a very short period of time)

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Fixes # 1434

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works - I did not find any existing tests on watch mode, so just tested manually on example/js folder
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Feb 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 13, 2023 at 9:12PM (UTC)

@github-actions
Copy link

size-limit report 📦

Path Size
./packages/core/build/esm/index.js 1.76 KB (0%)
./packages/detect-locale/build/esm/index.js 812 B (0%)
./packages/react/build/esm/index.js 1.79 KB (0%)
./packages/remote-loader/build/esm/index.js 7.29 KB (0%)

@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 72.22% // Head: 69.52% // Decreases project coverage by -2.70% ⚠️

Coverage data is based on head (68c8ea9) compared to base (3de0811).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1435      +/-   ##
==========================================
- Coverage   72.22%   69.52%   -2.70%     
==========================================
  Files          72       72              
  Lines        2459     2146     -313     
  Branches      708      581     -127     
==========================================
- Hits         1776     1492     -284     
+ Misses        536      519      -17     
+ Partials      147      135      -12     
Impacted Files Coverage Δ
packages/cli/src/lingui-extract.ts 0.00% <0.00%> (ø)
packages/cli/src/api/extractors/babel.ts 54.54% <0.00%> (-24.41%) ⬇️
packages/cli/src/api/catalog.ts 85.77% <0.00%> (-4.34%) ⬇️
packages/cli/src/api/extractors/index.ts 57.89% <0.00%> (-4.18%) ⬇️
...ackages/babel-plugin-extract-messages/src/index.ts 80.95% <0.00%> (-4.14%) ⬇️
packages/cli/src/api/utils.ts 72.50% <0.00%> (-2.94%) ⬇️
packages/conf/src/index.ts 85.36% <0.00%> (-1.97%) ⬇️
packages/cli/src/api/extractors/typescript.ts 16.66% <0.00%> (+7.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@andrii-bodnar
Copy link
Contributor

@taozhou-glean thank you for the contribution!

@timofei-iatsenko
Copy link
Collaborator

This also possible fixed by #1358
As far as i understand, this delete of tmp folder happens because of intermediate catalogs.

@timofei-iatsenko
Copy link
Collaborator

Checked the code, looks good to me.

@andrii-bodnar andrii-bodnar merged commit 5dd50d3 into lingui:main Feb 14, 2023
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.

extract --watch keeps crashing
4 participants