scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
428 stars 115 forks source link

fix: `--include` parameter for metadata contained in file #678

Closed scolladon closed 1 year ago

scolladon commented 1 year ago

Explain your changes


Include implementation is now done in post processing. It deals with inFile metadata more gracefully allowing them to be listed in package.xml and copied (when -d is set) include destructive also benefit from this improvement

README file has been updated to explain the specificity of this implementation as it requires full repo fetch depth. micromatch has been removed from the dependency and ignore implementation has been reused for include (exact inverted logic)

E2E tests have been added for include, include-destructive, ignore and ignore-destructive cases

Does this close any currently open issues?


closes #677

Any particular element that can be tested locally


You can use the issue/677 branch in the reproduction playground

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (2982f02) 100.00% compared to head (9d9b4ca) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #678 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 32 34 +2 Lines 905 948 +43 ========================================= + Hits 905 948 +43 ``` | [Files Changed](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien) | Coverage Δ | | |---|---|---| | [src/main.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL21haW4uanM=) | `100.00% <100.00%> (ø)` | | | [src/post-processor/includeProcessor.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL3Bvc3QtcHJvY2Vzc29yL2luY2x1ZGVQcm9jZXNzb3IuanM=) | `100.00% <100.00%> (ø)` | | | [src/post-processor/postProcessorManager.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL3Bvc3QtcHJvY2Vzc29yL3Bvc3RQcm9jZXNzb3JNYW5hZ2VyLmpz) | `100.00% <100.00%> (ø)` | | | [src/service/diffLineInterpreter.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL3NlcnZpY2UvZGlmZkxpbmVJbnRlcnByZXRlci5qcw==) | `100.00% <100.00%> (ø)` | | | [src/utils/gitConstants.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL3V0aWxzL2dpdENvbnN0YW50cy5qcw==) | `100.00% <100.00%> (ø)` | | | [src/utils/ignoreHelper.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL3V0aWxzL2lnbm9yZUhlbHBlci5qcw==) | `100.00% <100.00%> (ø)` | | | [src/utils/repoGitDiff.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL3V0aWxzL3JlcG9HaXREaWZmLmpz) | `100.00% <100.00%> (ø)` | | | [src/utils/repoSetup.js](https://app.codecov.io/gh/scolladon/sfdx-git-delta/pull/678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sebastien#diff-c3JjL3V0aWxzL3JlcG9TZXR1cC5qcw==) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codeclimate[bot] commented 1 year ago

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

View more on Code Climate.

github-actions[bot] commented 1 year ago

Shipped in release v5.25.0. You can install the new version using the version number or the latest-rc channel

$ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install sfdx-git-delta@v5.25.0