Merged
Conversation
Seems since using files API in pascalgn#54, `IGNORED` stopped to work
Contributor
Author
levsa
reviewed
Oct 5, 2024
Contributor
levsa
left a comment
There was a problem hiding this comment.
Good work! But I think undefined may be an issue.
parseIgnored.test.js
Outdated
| // then | ||
| expect(isIgnored("file")).toBe(false); | ||
| // always ignored | ||
| expect(isIgnored(null)).toBe(true); |
Contributor
There was a problem hiding this comment.
I think file.previous_filename may be undefined diffs that don't rename files? Can you add a test for isIgnored(undefined) and handle it in isIgnored()?
Contributor
Author
There was a problem hiding this comment.
I added a test and luckily it works as path is compared with null using ==, not === in index.js, line 148 👍🏻 😄
if (path == null || path === "/dev/null") {|
Hey! I also ran into this recently after updating from 0.5.0, thanks for implementing! |
Contributor
Author
I temporarily use my fork directly in the repo and you can try as well: |
Owner
|
Thanks for the PR, it's merged now! 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seems since using files API in #54,
IGNOREDstopped to work. I added tests to confirm and it seemspath.slice(2)insideisIgnoredis not needed anymore as theDiffadding extra chars is not used.