Skip to content

feat(pluginutils): add exactRegex and prefixRegex#4458

Merged
sapphi-red merged 2 commits intorolldown:mainfrom
sapphi-red:feat/pluginutils-add-exact-regex-prefix-regex
May 9, 2025
Merged

feat(pluginutils): add exactRegex and prefixRegex#4458
sapphi-red merged 2 commits intorolldown:mainfrom
sapphi-red:feat/pluginutils-add-exact-regex-prefix-regex

Conversation

@sapphi-red
Copy link
Member

Description

Same with rollup/plugins#1865.
But for @rolldown/pluginutils so that we can release this.

Copilot AI review requested due to automatic review settings May 9, 2025 09:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces two new functions, exactRegex and prefixRegex, to support improved plugin hook filtering for the @rolldown/pluginutils package. It also refactors the module exports by removing inline type and helper definitions from index.ts and moving them into a separate composableFilters.ts file.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/pluginutils/src/simpleFilters.ts Adds exactRegex, prefixRegex, and an escapeRegex helper function.
packages/pluginutils/src/index.ts Refactors exports to only re-export from composableFilters.js and simpleFilters.js.
packages/pluginutils/src/composableFilters.ts Introduces the composable filters implementation previously inlined in index.ts.
Comments suppressed due to low confidence (1)

packages/pluginutils/src/index.ts:1

  • Verify that the file extensions in the exports match your build output. If using TypeScript, consider using extension-less imports (e.g. './composableFilters') to improve maintainability and avoid module resolution issues.
export * from './composableFilters.js';

@sapphi-red sapphi-red added this pull request to the merge queue May 9, 2025
Merged via the queue into rolldown:main with commit 7c58822 May 9, 2025
22 checks passed
@sapphi-red sapphi-red deleted the feat/pluginutils-add-exact-regex-prefix-regex branch May 9, 2025 09:37
github-merge-queue bot pushed a commit that referenced this pull request May 9, 2025
<!-- Thank you for contributing! -->

### Description

test for #4458

<!-- Please insert your description here and provide especially info
about the "what" this PR is solving -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants