Skip to content

fix(types): allow string resourceQueryExclude#48

Merged
chenjiahan merged 1 commit into
masterfrom
chenjiahan/resource-query-exclude-string
May 13, 2026
Merged

fix(types): allow string resourceQueryExclude#48
chenjiahan merged 1 commit into
masterfrom
chenjiahan/resource-query-exclude-string

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

This PR aligns the public resourceQueryExclude option type and docs with runtime behavior by allowing string patterns alongside RegExp values. It adds a shared option type, documents string conversion to RegExp with examples, and covers string patterns in the resource query test.

Copilot AI review requested due to automatic review settings May 13, 2026 06:59
@chenjiahan chenjiahan merged commit 00a0e01 into master May 13, 2026
8 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/resource-query-exclude-string branch May 13, 2026 07:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the public resourceQueryExclude option typing and documentation to reflect the plugin’s existing runtime behavior of accepting string patterns (in addition to RegExp), and extends the test suite to cover a string-based exclusion.

Changes:

  • Added a shared ResourceQueryExclude type and used it for PluginOptions/ResolvedOptions.
  • Updated README docs for resourceQueryExclude to include string support and usage examples.
  • Added a test case ensuring string patterns work for excluding resource queries.

Reviewed changes

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

File Description
src/options.ts Introduces ResourceQueryExclude and applies it to option typings.
README.md Updates the documented option type and explains string-to-RegExp behavior with examples.
test/resource-query.test.js Adds coverage for resourceQueryExclude when provided as a string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
as `raw` in `import './file.js?raw'`.

String values are converted to `RegExp`. Use anchors when you need an exact
match.
expect(stats.hasErrors()).toBe(false);
});

it('should exclude the match resource query from string pattern', async () => {
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.

2 participants