8000 Add support for hook filters by sapphi-red · Pull Request #5882 · rollup/rollup · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for hook filters #5882

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

Merged
merged 12 commits into from
Mar 29, 2025

Conversation

sapphi-red
Copy link
Contributor

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

This PR adds support for plugin hook filters described in #5869.
The implementation is based on vitejs/vite#19602 which aimed to be compatible with rolldown, but I think we can tweak behaviors in rolldown where it should be improved.

Filter related code in rolldown for reference: https://github.com/rolldown/rolldown/blob/3ad87bf9df910fd1fd69d7fe949169156b1fcf03/crates/rolldown_utils/src/pattern_filter.rs

Copy link
vercel bot commented Mar 18, 2025

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

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 8:51am

Copy link
codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.56%. Comparing base (e192a67) to head (da5d57d).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5882      +/-   ##
==========================================
+ Coverage   98.55%   98.56%   +0.01%     
==========================================
  Files         269      270       +1     
  Lines        8588     8663      +75     
  Branches     1472     1485      +13     
==========================================
+ Hits         8464     8539      +75     
  Misses         92       92              
  Partials       32       32              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member
@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks quite refined, thanks a lot! I only found minor comments.

@sapphi-red
Copy link
Contributor Author

Thanks for the review, fixed them 👍

@sapphi-red sapphi-red marked this pull request as draft March 27, 2025 08:05
@sapphi-red
Copy link
Contributor Author
sapphi-red commented Mar 28, 2025

I ported the two changes on rolldown side (rolldown/rolldown#3972, rolldown/rolldown#3976).

@sapphi-red sapphi-red marked this pull request as ready for review March 28, 2025 09:25
Copy link
Member
@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@lukastaegert lukastaegert added this pull request to the merge queue Mar 29, 2025
Merged via the queue into rollup:master with commit 41a0b6f Mar 29, 2025
41 checks passed
Copy link

This PR has been released as part of rollup@4.38.0. You can test it via npm install rollup.

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.

support filter for hooks
2 participants
0