Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 27, 2021

Conversation

alexkrautmann
Copy link
Contributor

@alexkrautmann alexkrautmann commented Feb 27, 2021

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.

@alexkrautmann alexkrautmann changed the title fix(ultraignore) allow ultraignore to work with tracked git files fix(ultraignore): allow ultraignore to work with tracked git files Feb 27, 2021
Copy link
Owner

@folke folke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the update!

I looked at the test problem and it's indeed not a real issue. Tests run fine on Windows and Linux, so all good

@folke folke merged commit 65cc044 into folke:master Feb 27, 2021
folke pushed a commit that referenced this pull request Feb 27, 2021
### [3.10.1](v3.10.0...v3.10.1) (2021-02-27)

### Bug Fixes

* **ultraignore:** allow ultraignore to work with tracked git files ([#170](#170)) ([65cc044](65cc044))

### Other

* **deps:** pin dependency @yarnpkg/pnp to 2.3.2 ([#169](#169)) ([880073f](880073f))
@folke
Copy link
Owner

folke commented Feb 27, 2021

🎉 This PR is included in version 3.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@folke folke added the released label Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants