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

Update Babel and dependencies #15392

Merged
merged 2 commits into from
Aug 5, 2022
Merged

Update Babel and dependencies #15392

merged 2 commits into from
Aug 5, 2022

Conversation

brad-decker
Copy link
Contributor

@brad-decker brad-decker commented Jul 31, 2022

Explanation

This pull request updates our babel and its dependencies. The goal here is to unlock further build system improvements as well as tap into improvements made to babel as well as unlock TypeScript 4.7 support.

Things to note:

  1. A number of plugins, such as object rest spread, nullish coalescing and optional chaining are not part of preset-env and are no longer needed explicitly.
  2. The 'targets' property in babel.config.js is moved to the top level scope instead of preset-env.
  3. Babel runtime was updated and patched in a similar fashion as the previous version.

More Information

I am keeping a close eye on the MV3 metrics in relation to this PR. Once i'm solid i'm going to ask for @jpuri to do an analysis of the impact.

TODO:

  • Confirm that adding/removing babel-runtime plugin does not impact bundle size / load times
  • Get sign off from MV3 team

Manual Testing Steps

  1. Load the extension
  2. Check out functionality in general
  3. All E2E tests pass so asking for manual review just to make sure nothing crazy happened.

Pre-Merge Checklist

  • PR template is filled out
  • IF this PR fixes a bug, a test that would have caught the bug has been added
  • PR is linked to the appropriate GitHub issue
  • PR has been added to the appropriate release Milestone

+ If there are functional changes:

  • Manual testing complete & passed
  • "Extension QA Board" label has been applied

@metamaskbot
Copy link
Collaborator

Builds ready [1e7d60c]
Page Load Metrics (1604 ± 41 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint861119774
domContentLoaded1470178415968240
load1488180616048641
domInteractive1470178415968240

@metamaskbot
Copy link
Collaborator

Builds ready [90e52d4]
Page Load Metrics (1606 ± 43 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint862521063517
domContentLoaded1488187115959345
load1488187116068943
domInteractive1488187115959345

@brad-decker brad-decker changed the title WIP Update Babel and dependencies Aug 1, 2022
@metamaskbot
Copy link
Collaborator

Builds ready [5488aae]
Page Load Metrics (1850 ± 91 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint942301232475228
domContentLoaded16432305183316479
load16492424185018991
domInteractive16432305183316479

@metamaskbot
Copy link
Collaborator

Builds ready [433d87f]
Page Load Metrics (1737 ± 54 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint851941113115
domContentLoaded1548191517109847
load15481934173711254
domInteractive1548191517109847

@brad-decker brad-decker marked this pull request as ready for review August 1, 2022 16:48
@brad-decker brad-decker requested review from a team and kumavis as code owners August 1, 2022 16:48
jpuri
jpuri previously approved these changes Aug 4, 2022
Copy link
Contributor

@jpuri jpuri left a comment

Choose a reason for hiding this comment

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

Changes look good, I also checked MV3 build artifacts to ensure that build changes have no effect on that.

@brad-decker brad-decker added the needs-qa Label will automate into QA workspace label Aug 4, 2022
Comment on lines +7 to +9
targets: {
browsers: ['chrome >= 66', 'firefox >= 68'],
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Gudahtt pinging you on this, just wanted to alert you of this change as it will likely impact #12847. This was changed in babel to support making the targets available to all plugins and presets instead of just preset-env.

@metamaskbot
Copy link
Collaborator

Builds ready [845d27d]
Page Load Metrics (1631 ± 56 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint84147102178
domContentLoaded15002054162012057
load15002054163111856
domInteractive15002054162012057

Copy link
Member

@kumavis kumavis left a comment

Choose a reason for hiding this comment

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

looks good

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Not going to pretend I know a lot about build tooling but have checked storybook still works yarn storybook and the extension still runs yarn start.

@brad-decker brad-decker merged commit 7b42c54 into develop Aug 5, 2022
@brad-decker brad-decker deleted the update-babel branch August 5, 2022 15:04
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-qa Label will automate into QA workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants