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

Improve matchPathFilter to handle mixed arrays of string and glob paths #1050

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

udaykiranravva123
Copy link

@udaykiranravva123 udaykiranravva123 commented Oct 22, 2024

Description

The matchPathFilter function has been enhanced to handle mixed arrays of string and glob paths. This allows for more flexible URI matching, accommodating cases where both types of paths are specified in the same array.

Motivation and Context

This change is necessary to improve the functionality of the matchPathFilter function. Previously, it did not support arrays containing both string and glob paths, which could lead to unexpected behavior or failed matches. This enhancement addresses that limitation, allowing developers to utilize mixed path types seamlessly.

Error: [HPM] Invalid pathFilter. Expecting something like: ["/api", "/ajax"] or ["/api/", "!.html"]

How has this been tested?

The changes were tested with various scenarios, including:

  • Single string path matching.
  • Single glob path matching.
  • Mixed arrays containing both string and glob paths.
  • Edge cases with empty arrays or arrays with unsupported types.

Testing was performed in a local development environment and validated against existing unit tests for regression.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

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