folke / ultra-runner

🏃⛰ Ultra fast monorepo script runner and build tool
https://www.npmjs.com/package/ultra-runner
Apache License 2.0
1.2k stars 32 forks source link

fix(ultraignore): allow ultraignore to work with tracked git files #170

Closed alexkrautmann closed 3 years ago

alexkrautmann commented 3 years ago

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.

folke commented 3 years ago

:tada: This PR is included in version 3.10.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: