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(import), do not remove the local env config in component.json #9319

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

davidfirst
Copy link
Member

Currently, when the component.json of a component is written and the env is set to a local one, it gets removed upon bit import unexpectedly.
After a long debugging, it turned out that the culprit was the aspect-merger. In order to remove multiple envs, it mutated the original ExtensionData of the scope component and deleted the env from there.
This PR fixes it by cloning the entry before modifying it.

(for future reference - use Proxy to catch this issues, specifically the deleteProperty method of the Proxy).

@davidfirst davidfirst merged commit ff4c15a into master Nov 21, 2024
11 checks passed
@davidfirst davidfirst deleted the import-with-component-json branch November 21, 2024 17:37
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.

2 participants