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 reinstantiation of inherited plugins #14241

Merged
merged 2 commits into from Feb 7, 2022

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Feb 4, 2022

Q                       A
Fixed Issues? Fixes #14233
Patch: Bug Fix? Y
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

We cannot always push the inherited external dependencies into a plugin's external dependencies, because if the "derived" plugin ìs cached it's dependencies array is frozen.

This PR fixes it by "joining" the two dependency lists into a new array, and moves the freeze earlier in the process so that TS would have caught this bug (because the array is now always frozen at that point, rather than just sometimes).

@babel-bot
Copy link
Collaborator

babel-bot commented Feb 4, 2022

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/51170/

@nicolo-ribaudo nicolo-ribaudo marked this pull request as ready for review February 4, 2022 21:30
@nicolo-ribaudo nicolo-ribaudo added i: regression pkg: core PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Feb 4, 2022
@nicolo-ribaudo nicolo-ribaudo changed the title [wip] Add test for #14233 Fix reinstantiation of inherited plugins Feb 4, 2022
@nicolo-ribaudo nicolo-ribaudo merged commit 165b735 into babel:main Feb 7, 2022
@nicolo-ribaudo nicolo-ribaudo deleted the bug-14233 branch February 7, 2022 22:41
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 10, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: core PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Release 7.17.0 breaks downstream plugins
4 participants