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

Suggestion for enhance function readExistingPackageXML #118

Open
nguyenmht opened this issue Jun 8, 2024 · 0 comments
Open

Suggestion for enhance function readExistingPackageXML #118

nguyenmht opened this issue Jun 8, 2024 · 0 comments

Comments

@nguyenmht
Copy link

nguyenmht commented Jun 8, 2024

Hi Vignaesh,

I have a suggestion for enhance function readExistingPackageXML of your awesome extension.

Current: When I have a package.xml with more than one block of a type (ex: Flow), function readExistingPackageXML will identify only the lasted block and ignore the others.

Future: I think we should combine all element in all block have the same type and de-duplicate them.

So I made a change in your code and it works for me.
Change code in around line 686 from:
mpExistingPackageXML[name] = members;
to

                        if(mpExistingPackageXML[name] !== undefined) {
                            mpExistingPackageXML[name].push(...members);
                        } else {
                            mpExistingPackageXML[name] = members;
                        }
                        mpExistingPackageXML[name] = [...new Set(mpExistingPackageXML[name])];

image

Result:

  • Before:
    image
  • After:
    image

Can you take a look in this suggestion.
Thank you very much for your extension!

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

No branches or pull requests

1 participant