Skip to content

Conversation

@connorjclark
Copy link
Collaborator

While converting core to ESM I came across a footgun where I used readJson inside core/, resulting in the bundled Lighthouse code being wrong (because we don't inline those calls). This large refactor is very simple: move readJson from root.js to test-utils.js, and update 70+ imports 👀

This is intended to make it very obvious that this function should not be used outside tests or scripts.

@connorjclark connorjclark requested a review from adamraine June 30, 2022 01:31
@connorjclark connorjclark requested a review from a team as a code owner June 30, 2022 01:31
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.

LGTM

@connorjclark connorjclark changed the title test: move readJson from root.js to test-utils.js tests: move readJson from root.js to test-utils.js Jun 30, 2022
@connorjclark connorjclark merged commit 6680d23 into master Jun 30, 2022
@connorjclark connorjclark deleted the readJson-move branch June 30, 2022 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants