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: only delete non-forceignored sub-directories #847

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Feb 8, 2023

What does this PR do?

When retrieving bundle type metadata that has some pieces of the bundle deleted (or it looks that way because there are more local files than what was retrieved), only delete the pieces that are not forceignored.

What issues does this PR fix or reference?

@W-12460543@
forcedotcom/cli#1904

Functionality Before

would delete the entire component and replace with what was retrieved if there was any file within the component locally that was not retrieved, even if forceignored.

Functionality After

Removes pieces of a component only if they are not forceignored and they were not part of the retrieve.

@shetzel shetzel requested review from a team as code owners February 8, 2023 23:32
@shetzel shetzel requested a review from RitamAgrawal February 8, 2023 23:32
}

this.logger.debug(
`Local component (${comp.fullName}) contains ${fileName} while remote component does not. This file is being removed.`
);
deleteLocalComp = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@WillieRuemmele
Copy link
Member

QA Notes


✅ : add a file to a LWC, retrieve it, new file is gone
✅ : add a file to a LWC, forceignore that new file, retrieve the LWC, the file remains
✅ : add a directory, forceignore it, retrieve, directory remains
✅ : add a directory, retrieve, directory is gone

@mshanemc mshanemc merged commit 90e9415 into main Feb 9, 2023
@mshanemc mshanemc deleted the sh/partial-bundle-delete-fixes branch February 9, 2023 17:41
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

Successfully merging this pull request may close these issues.

4 participants