-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Ignore .eslintrc.json
at project init
#548
Comments
Hi @nvuillam! Thanks for raising this issue and thanks for contributing in making this project better! I think you could use the Let us know if it is suited for your use case, if not let's talk about a new feature! |
.eslintrc.json
at project init
Thanks for the reply :) But I really think it should be ignored by default because such behaviour is corresponding to 150% of sfdx-git-delta use cases, and these files must be committed anyway (and they are already in .forceignore by default) |
Hi @nvuillam, thanks for taking some times discussing this together in dm, really appreciated Framing the requirementIn this situation the need as I understand it is to not add in the package.xml the elements that are not metadata (indeed makes sense...). Solution spaceHere are the solution I can imagine for now (by order of preferences):
Let's think/spike on that, maybe more solution will raises and maybe more people will need it or explain something similar which will help us shape another solution ! |
@scolladon My 2 cents: I don't have a definitive opinion as whether it should be in the output folder containing incremental changes. But for sure it should not be in the package.xml.
So, I would vote solution # 1! |
@scolladon as discussed, I also vote Solution 1 : avoid items that are not metadata in package.xml, without having to add extra parameters to the command :) |
I couldn't reproduce this. I ran sgd without passing a .sgdignore in a brand new sfdx project, and nothing was added in the package.xml. Then I created a dummy lwc, added a new commit, ran sgd again, and finally verified that only the lwc was included. Then I deleted .forceignore, repeated the previous steps, and again verified only the lwc was included in the package.xml. |
The same for aura. No |
I tested with |
more or less related #552 |
I didn't invent the issue ;) |
Hi @nvuillam I just finalized a first draft of a PR (#554) to implement the solution 1. |
@scolladon of course :) |
Hi @AllanOricil What is the SGD version running ? What is the output of this command: $ git diff --name-status --no-renames <from> <to> |
Im using sgd 5.16.0, but the issue also happens with 5.14.0. This is the commit history of this repository This is the output of |
Thanks for those information @AllanOricil. According to the output of the It is expected to have the issue with any previous version. |
Shipped in release $ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install [email protected] |
@scolladon sorry, just tested with @latest-rc and I still have .eslintrc.json :/ (but it's ok for the github workflow not appearing ^^ ) |
Hi @nvuillam Thanks for the feedback and for your time testing it. I'm not able to reproduce it locally When you check it out: $ git diff --name-status HEAD~3
A .forceignore
A .github/CODEOWNERS
A .github/workflows/pull-request.yml
A README.md
A output/.keep
A package.json
A sfdx-project.json
A sgd/reproduction/playground/aura/.eslintrc.json
A sgd/reproduction/playground/classes/Test.cls
A sgd/reproduction/playground/classes/Test.cls-meta.xml
A sgd/reproduction/playground/lwc/.eslintrc.json This is what we want to reproduce because it contains When it executes using `v5.17.0`` $ sfdx sgd:source:delta -f HEAD~3 -d
$ cat output/package/package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Test</members>
<name>ApexClass</name>
</types>
<version>57.0</version>
</Package>
$tree output
output
├── destructiveChanges
│ ├── destructiveChanges.xml
│ └── package.xml
├── package
│ └── package.xml
└── sgd
└── reproduction
└── playground
└── classes
├── Test.cls
└── Test.cls-meta.xml The Maybe my setup to reproduce it is wrong. |
@scolladon everything you need is here :) I also just noticed that the files are Edit: with the sample repo it's probably better :D https://github.com/nvuillam/git-delta-test |
Thank you very much @nvuillam I cannot reproduce even using the repository provided. Here is the protocol used:
I suspect the issue is related to the environment (mac vs windows) |
I've been able to reproduce on Windows. Stay tuned ! |
Shipped in release $ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install [email protected] |
No more .eslintrc , I confirm this is ok with latest-rc, many thanks @scolladon :) |
When we do an init of CI project with sfdx-hardis, the first package.xml is computed using the great sfdx-git-delta :)
But it always adds .eslintrc.json in Aura and LWC types... so we have to update it manually
Would it be possible to always ignore them, as they won't never have any use being deployed to an org ? :)
The text was updated successfully, but these errors were encountered: