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

deps(yargs): upgrade to 17.3.1 #13590

Merged
merged 21 commits into from
Jan 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comments
  • Loading branch information
connorjclark committed Jan 25, 2022
commit c23ea16794dd8faa92b26cf2953d47d8b639ecbf
12 changes: 10 additions & 2 deletions lighthouse-core/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,19 @@ class Runner {
const normalizedGatherSettings = Object.assign({}, artifacts.settings, overrides);
const normalizedAuditSettings = Object.assign({}, settings, overrides);

for (const k of Object.keys(normalizedGatherSettings)) {
// First, try each key individually so we can print which key differed.
const keys = new Set([
...Object.keys(normalizedGatherSettings),
...Object.keys(normalizedAuditSettings),
]);
for (const k of keys) {
if (!isDeepEqual(normalizedGatherSettings[k], normalizedAuditSettings[k])) {
connorjclark marked this conversation as resolved.
Show resolved Hide resolved
throw new Error('Cannot change settings between gathering and auditing: ' + k);
throw new Error(
`Cannot change settings between gathering and auditing. Difference found at: ${k}`);
}
}

// Call `isDeepEqual` on the entire thing, just in case something was missed.
if (!isDeepEqual(normalizedGatherSettings, normalizedAuditSettings)) {
throw new Error('Cannot change settings between gathering and auditing');
}
Expand Down