This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Description
|
const getMatcher = id => ( isRegexp( id ) ? id : { test: mm.matcher( resolve( id ) ) } ); |
If you invoke createFilter() with a string for include or exclude it'll be run through path.resolve before it's passed to mm.matcher().
Why?
It means that unless you pass a regular expression matcher all globs will only match files underneath process.cwd(). This cropped up as I tried to move my fixtures to the system temp folder and suddenly my plugin's filters stopped matching anything because they're all scoped. It seems like it'd be more intuitive for the glob to be passed to mm.matcher() w/o the resolving.
const { createFilter } = require("rollup-pluginutils");
const filter = createFilter("**/*.css");
// Now filter() is matching against
`${process.cwd()}/**/*.css`
// instead of what I expected, which is
`**/*.css`