Skip to content

Conversation

@connorjclark
Copy link
Collaborator

Split out the changes made for convenience from those made to maintain backwards compatibility. Also exposes to node api.

@connorjclark connorjclark requested a review from a team as a code owner January 23, 2023 20:27
@connorjclark connorjclark requested review from adamraine and removed request for a team January 23, 2023 20:27
core/util.cjs Outdated
* TODO(team): we all agree the LHR shape change is technical debt we should fix
* @param {LH.Result} result
* @return {LH.ReportResult}
* Upgrades an lhr object in-place to account for changes in the data structure over major versions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a note here mentioning that this doesn't verify lhr shape

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wait, what about the name/interface makes that not clear already?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair, it's probably fine.

Copy link
Contributor

@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.

Looks good pending CI + spelling

@connorjclark
Copy link
Collaborator Author

connorjclark commented Jan 27, 2023

Updated to account for recent util/report util split.

@connorjclark connorjclark changed the title core: expose back compat as upgradeLhrForCompatability misc: split lhr compat code to lib/lighthouse-compatibility.js Jan 31, 2023
@connorjclark connorjclark merged commit ddf48a9 into main Feb 1, 2023
@connorjclark connorjclark deleted the compat-refactor branch February 1, 2023 00:30
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.

5 participants