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

core(computed-artifacts): convert to named exports #14352

Merged
merged 4 commits into from
Sep 8, 2022
Merged

Conversation

connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented Sep 2, 2022

ref #12689

  • the lantern metric computed artifact names are pretty long. most imports would abbreviate them. currently the PR uses the long version, but the classes themselves could be abbreviated. ex: LanternLargestContentfulPaint could be renamed LanternLCP
  • the exported symbols could be XComputed instead of X... not very sure about this one. The caller kinda cares that the thing is a computed artifact insomuch that it needs to call .request (and not something else by accident, missing out on the cache). The previous importing code was inconsistent on this, so I went with X for brevity. No one wants to see NetworkRecordsComputed everywhere, for example.
  • a few computed artifacts are named the same as the audit that uses them, so in those instances they get imported as XComputed.

@connorjclark connorjclark requested a review from a team as a code owner September 2, 2022 22:14
@connorjclark connorjclark requested review from brendankenny and removed request for a team September 2, 2022 22:14
Copy link
Member

@adamraine adamraine left a comment

Choose a reason for hiding this comment

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

In general this change looks good. A couple of consistency things:

  • ComputedX vs XCompeted
  • ComputedFcp vs ComputedCLS

Would be nice to pick one and stick to it but I don't think we need to do that here.

core/test/config/config-test.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants