Skip to content

[babel] Remove unused babel plugins/dependencies#6779

Merged
cee-chen merged 3 commits intoelastic:mainfrom
cee-chen:babel/plugin-syntax-dynamic-import
May 16, 2023
Merged

[babel] Remove unused babel plugins/dependencies#6779
cee-chen merged 3 commits intoelastic:mainfrom
cee-chen:babel/plugin-syntax-dynamic-import

Conversation

@cee-chen
Copy link
Copy Markdown
Contributor

@cee-chen cee-chen commented May 16, 2023

Summary

This PR is part of our ongoing babel upgrade work (#6652). It removes the following unused babel packages:

  • @babel/plugin-syntax-dynamic-import
    • Per Babel's docs (https://babeljs.io/docs/babel-plugin-syntax-dynamic-import.html), @babel/plugin-syntax-dynamic-import is now included automatically in @babel/core above v7.8.0 (which we're above) as well as in @babel/preset-env which we already have. As such, we shouldn't need to define it manually in our package.json or as a babel plugin.
  • babel-plugin-dynamic-import-node
    • same reasoning as above - EuiIcon Jest tests do not fail with this removed, which would be the primary usage
  • babel-core@7.0.0-bridge.0
    • doesn't seem to be affecting anything either. will wait and see if CI throws

QA

  • CI passes
  • No changelog, tech debt only

@cee-chen cee-chen added chore skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) tech debt labels May 16, 2023
@cee-chen cee-chen requested a review from a team May 16, 2023 19:44
const keysToRemove = new Set(
toRemovePropTypes.arguments[0].elements
.map(keyToRemove =>
.map((keyToRemove) =>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

whoops, sorry, I missed all these diffs when doing git add. Everything below this is all Prettier auto-save lint fixes and shouldn't materially impact functionality

@cee-chen cee-chen changed the title [babel] Remove unnecessary dynamic import plugin definition [babel] Remove unused babel plugins/dependencies May 16, 2023
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_6779/

@cee-chen cee-chen removed the chore label May 16, 2023
Copy link
Copy Markdown
Contributor

@breehall breehall left a comment

Choose a reason for hiding this comment

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

No build / CI errors! Thanks for the babel cleanup!

@cee-chen cee-chen merged commit bfc864b into elastic:main May 16, 2023
@cee-chen cee-chen deleted the babel/plugin-syntax-dynamic-import branch May 16, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants