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: chunkFiles chunks normalized files even when maxArgLength is set #858

Merged
merged 1 commit into from May 1, 2020

Conversation

iiroj
Copy link
Member

@iiroj iiroj commented Apr 30, 2020

The previous PR #857 only fixed the situation when maxArgLength was not set (when used throught the Node.js API).

@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #858 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #858   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          593       593           
  Branches       142       142           
=========================================
  Hits           593       593           
Impacted Files Coverage Δ
lib/chunkFiles.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5883296...7406e42. Read the comment docs.

@iiroj
Copy link
Member Author

iiroj commented Apr 30, 2020

@okonet I already "upgraded" the integration tests to use lib/index.js instead of lib/runAll.js`, but maybe it should actually really spawn the entire cli using execa.

@iiroj iiroj merged commit fc72170 into master May 1, 2020
@iiroj iiroj deleted the fix-chunk-files branch May 1, 2020 04:07
@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2020

🎉 This PR is included in version 10.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ram3shyadav
Copy link

@iiroj Still NOT working :)

@iiroj
Copy link
Member Author

iiroj commented May 1, 2020

@Ramesh-Yadav please post the full debug log, then.

Here's my run inside lint-staged's repo's test/ directory with some additional console logs:

~/git/lint-staged/test master*
❯ node ../bin/lint-staged.js --relative
matchFiles (for tasks) Set(1) { 'chunkFiles.spec.js' }
matchedFileChunks (for git add) [ [ '/Users/iiro/git/lint-staged/test/chunkFiles.spec.js' ] ]
✔ Preparing...
✔ Running tasks...
✖ Prevented an empty git commit!
✔ Reverting to original state because of errors...
✔ Cleaning up... 

  ⚠ lint-staged prevented an empty git commit.
  Use the --allow-empty option to continue, or check your task configuration

as you can see, the task receives a relative file from the test dir's root, but the matchedFileChunks contains an absolute path, that is correct.

I don't understand how it's still not working for you, unless you post more debug logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants