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: readDir git based implementation #419

Merged
merged 7 commits into from
Jan 17, 2023

Conversation

scolladon
Copy link
Owner

@scolladon scolladon commented Jan 10, 2023

What does this pull request contain?


  • Added (for new features).
  • Changed (for changes in existing functionality).
  • Deprecated (for soon-to-be removed features).
  • Removed (for now removed features).
  • Fixed (for any bug fixes).
  • Security (for vulnerability fixes).

Explain your changes


Fix home made git based readDir implementation and usage

fs.readdir returns a fs.Dirent data structure which tell us if the element is a folder or a file.
Using git to explore folder content returns string.
A element is a folder if it ends with '/'
Some part of the code relied on not having this slash at the end of a file.

Fix config parameter in fsHelper
Improve error handling in fsHelper

Does this close any currently open issues?


closes #413
closes #414
closes #416

  • Jest test added to check the fix is applied.

Any particular element that can be tested locally


Build a lwc component with subfolder (for test for example), modify the js file, check all the content of the module (even sub folder) is copied to output

This playground can be used as well
This branch in our playground can be used as well

Any other comments


@scolladon scolladon requested a review from mehdicherf as a code owner January 10, 2023 22:25
@codeclimate
Copy link

codeclimate bot commented Jan 10, 2023

Code Climate has analyzed commit fa144a2 and detected 0 issues on this pull request.

View more on Code Climate.

@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (fa144a2) compared to base (09405d3).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #419   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines          815       814    -1     
=========================================
- Hits           815       814    -1     
Impacted Files Coverage Δ
src/post-processor/flowTranslationProcessor.js 100.00% <100.00%> (ø)
src/service/customObjectHandler.js 100.00% <100.00%> (ø)
src/service/inFolderHandler.js 100.00% <100.00%> (ø)
src/service/inResourceHandler.js 100.00% <100.00%> (ø)
src/service/standardHandler.js 100.00% <100.00%> (ø)
src/utils/fsHelper.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants