doesn't explain that mixing globs and non-globs is prohibited. Although it shows one array with just non-glob paths and one with globs, it doesn't clarify that these are examples of 2 separate categories of pathFilters.
I had to find the answer by Googling the error message and reading the code that produces it.
The only cases handled for array are pathFilter.every(isStringPath) and pathFilter.every(isGlobPath). isStringPath checks that the string is not a glob - so for mixed paths and globs neither of the conditions will be fullfilled.
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
This message:
doesn't explain that mixing globs and non-globs is prohibited. Although it shows one array with just non-glob paths and one with globs, it doesn't clarify that these are examples of 2 separate categories of pathFilters.
I had to find the answer by Googling the error message and reading the code that produces it.
Step-by-step reproduction instructions
→ https://codesandbox.io/p/devbox/http-proxy-middleware-forked-6ky4n8?file=%2Fsrc%2Findex.js%3A10%2C5
Error message:
Expected behavior (be clear and concise)
Error explaining that globs and paths cannot be mixed. Perhaps just this explanation added on top of the existing message.
How is http-proxy-middleware used in your project?
What http-proxy-middleware configuration are you using?
What OS/version and node/version are you seeing the problem?
Additional context (optional)
The error is thrown in this line.
The only cases handled for array are
pathFilter.every(isStringPath)
andpathFilter.every(isGlobPath)
.isStringPath
checks that the string is not a glob - so for mixed paths and globs neither of the conditions will be fullfilled.