When trying out the new .ultraignore feature, I found a bug where you could not ignore files tracked by git.
After looking into this, it is because the git ls-files -X <file> does not work for files being tracked in git. In my case, I wanted to ignore jest.config.js as well as test files under src/.
This PR uses the popular node-ignore package to parse the .ultraignore file and excludes its entries directly at the cache level.
Note that I have a failing test on my machine. This was failing before making my change, and I think it is environment-specific. Maybe I am on a newer version of npx than the one these tests were written with?
I did add a test for the new .ultraignore behavior.
When trying out the new
.ultraignore
feature, I found a bug where you could not ignore files tracked by git.After looking into this, it is because the
git ls-files -X <file>
does not work for files being tracked in git. In my case, I wanted to ignorejest.config.js
as well as test files undersrc/
.This PR uses the popular node-ignore package to parse the
.ultraignore
file and excludes its entries directly at the cache level.Note that I have a failing test on my machine. This was failing before making my change, and I think it is environment-specific. Maybe I am on a newer version of
npx
than the one these tests were written with?I did add a test for the new
.ultraignore
behavior.