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

feat: upgrade @parcel/watcher to support glob expression #2180

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

erha19
Copy link
Member

@erha19 erha19 commented Jan 10, 2023

Types

  • 🎉 New Features

Background or solution

@parcel/watcher release v2.1.0 to support glob expression https://github.com/parcel-bundler/watcher/releases/tag/v2.1.0.

The **/node_modules/** pattern will ignore all node_modules events containing itself.

The **/node_modules/*/** doesn't work.

It's better to use **/node_modules/**/* instead of **/node_modules/** or **/node_modules/*/**.

Changelog

upgrade @parcel/watcher to support glob expression

@erha19 erha19 requested a review from life2015 January 10, 2023 08:02
@github-actions github-actions bot added the 🎨 feature feature required label Jan 10, 2023
@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Base: 57.77% // Head: 57.76% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (302f1f6) compared to base (144720e).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2180      +/-   ##
==========================================
- Coverage   57.77%   57.76%   -0.02%     
==========================================
  Files        1315     1315              
  Lines       83050    83005      -45     
  Branches    17291    17268      -23     
==========================================
- Hits        47986    47950      -36     
+ Misses      31867    31859       -8     
+ Partials     3197     3196       -1     
Flag Coverage Δ
jsdom 52.72% <66.66%> (-0.02%) ⬇️
node 16.46% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core-browser/src/core-preferences.ts 92.30% <ø> (ø)
...ages/file-service/src/node/file-service-watcher.ts 74.82% <100.00%> (+2.48%) ⬆️
packages/utils/src/strings.ts 37.09% <0.00%> (-2.39%) ⬇️
packages/utils/src/buffer.ts 31.97% <0.00%> (+2.32%) ⬆️

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.

@erha19
Copy link
Member Author

erha19 commented Jan 10, 2023

这里可能表达的还有点问题 **/node_modules/*/** 正则也可以正常工作,但不仅会监听到 node_modules 变化事件,也会接收到 node_modules 下一级目录,如 node_modules/fs-extra 变化,但对于 node_modules/fs-extra/package.json 会忽略,或者也可以考虑用回来原来的表达式减少对集成侧的影响,但与之前的效果差别有点大。

@erha19
Copy link
Member Author

erha19 commented Jan 11, 2023

这里还是保持行为与之前一致,否则在 cnpm\yarn\npm 等安装模式下 node_modules 目录下会产生大量包目录(包括软链目录),这部分有一定的通信开销。

@erha19 erha19 merged commit a1ec64a into main Jan 11, 2023
@erha19 erha19 deleted the feat/upgrade-parcelwatcher-2.1.0 branch January 11, 2023 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 feature feature required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants