Closed TkDodo closed 11 months ago
That's totally fine to have multiple versions of the same dependency, and that's why we have this --ignore-package
option: but it's indeed a special case (probably fairly common in fact) that you've raised, and I also think that --ignore-package
should support globs for package names and paths.
Here's what we should do:
--ignore-package
should also supports path to a specific package--ignore-package
should support globs for both path or package nameREADME.md
for --ignore-package
should better explain how this option worksReleased in https://github.com/QuiiBz/sherif/releases/tag/v0.7.0, sorry for the delay!
We have an integrations folder in TanStack Query where we run integration tests of our library against various bundlers. We now test against vite4 and vite5, which yields the following errors:
I would like to exclude the
integrations
directory from sherif completely, because we will have multiple versions of the same lib in there on purpose.I'm now using:
and that works, but it doesn't scale when adding more tests, e.g. against different
nextJs
versions.Suggestion
ignore-package
needs to provide the package name, wich I didn't know - I was trying to specify a path to a package. For me, this syntax would be preferable:but I could also have those packages start with a prefix and then exclude them if they would allow for a glob pattern. So given that I rename them to
integration-react-vite5
andintegration-react-vite4
, a glob pattern like this should exclude them all: