Skip to content

Conversation

@florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented Dec 10, 2025

Changes

  • See https://rolldown.rs/apis/plugin-hook-filters
  • Rolldown introduced a new way of filtering some hooks in order to be more efficient. This API has been backported to rollup so it's fine to adopt it now
  • This is mostly a 1-1 port. I improved the filters when I had to opportunity to. That can make a huge diff (eg. vite-plugin-config-alias load hook ran twice as less in my test)
  • It converts all relevant resolveId and load hooks. I didn't want to include transform to avoid making it more complicated than it already is. There will be another PR for it entirely (feat: plugin hook filters (part 2) #15000)
  • Regexes are the key. I used Chatgpt and Regex101 to help write them
  • Review this PR without whitespace changes!
  • This PR contains a lot of unrelated diffs because of formatting, not much I can do about unfortunately until the zod 4 is merged

Testing

Should pass

Docs

N/A, internal refactor

@florian-lefebvre florian-lefebvre self-assigned this Dec 10, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

⚠️ No Changeset found

Latest commit: dacba07

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Dec 10, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
@cloudflare/unenv-preset trusted-with-provenance none
workerd trusted-with-provenance none
undici provenance none
miniflare trusted-with-provenance none
youch provenance none
@cloudflare/workerd-darwin-64 trusted-with-provenance none
@cloudflare/workerd-darwin-arm64 trusted-with-provenance none
@cloudflare/workerd-linux-64 trusted-with-provenance none
@cloudflare/workerd-linux-arm64 trusted-with-provenance none
@cloudflare/workerd-windows-64 trusted-with-provenance none
wrangler trusted-with-provenance none

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Dec 10, 2025
@github-actions github-actions bot added pkg: vue Related to Vue (scope) pkg: react Related to React (scope) labels Dec 10, 2025
@florian-lefebvre florian-lefebvre changed the title feat: plugin hook filters feat: plugin hook filters (part 1) Dec 11, 2025
@florian-lefebvre florian-lefebvre marked this pull request as ready for review December 11, 2025 14:22
@matthewp
Copy link
Contributor

@florian-lefebvre I hate to ask this of you, but it's really difficult to review this given how many formatting changes there are. Could you submit another PR that formats and then rebase/merge this branch so that the diff is reduced to the relevant filter changes? Thanks!

@florian-lefebvre
Copy link
Member Author

Yeah I understand! I'll wait for #14956 to be merged first to avoid you too many merge conflicts there

};
}
},
},
Copy link
Member Author

Choose a reason for hiding this comment

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

transform below needs to be converted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: react Related to React (scope) pkg: vue Related to Vue (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants