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: rename Config.Json to Config #14673

Merged
merged 1 commit into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function begin() {

const urlUnderTest = cliFlags._[0];

/** @type {LH.Config.Json|undefined} */
/** @type {LH.Config|undefined} */
let config;
if (cliFlags.configPath) {
// Resolve the config file path relative to where cli was called.
Expand Down
2 changes: 1 addition & 1 deletion cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async function potentiallyKillChrome(launchedChrome) {
/**
* @param {string} url
* @param {LH.CliFlags} flags
* @param {LH.Config.Json|undefined} config
* @param {LH.Config|undefined} config
* @return {Promise<LH.RunnerResult|undefined>}
*/
async function runLighthouse(url, flags, config) {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/cli/run-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {parseChromeFlags} from '../../run.js';
import {getFlags} from '../../cli-flags.js';
import {LH_ROOT} from '../../../root.js';

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const testConfig = {
'extends': 'lighthouse:default',
'settings': {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/fixtures/esm-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Config file for running PWA smokehouse audits for axe.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
4 changes: 2 additions & 2 deletions cli/test/smokehouse/lighthouse-runners/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (!isMainThread && parentPort) {

/**
* @param {string} url
* @param {LH.Config.Json|undefined} config
* @param {LH.Config|undefined} config
* @param {{isDebug?: boolean, useLegacyNavigation?: boolean}} testRunnerOptions
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts}>}
*/
Expand Down Expand Up @@ -109,7 +109,7 @@ async function runBundledLighthouse(url, config, testRunnerOptions) {
/**
* Launch Chrome and do a full Lighthouse run via the Lighthouse DevTools bundle.
* @param {string} url
* @param {LH.Config.Json=} config
* @param {LH.Config=} config
* @param {{isDebug?: boolean, useLegacyNavigation?: boolean}=} testRunnerOptions
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
*/
Expand Down
4 changes: 2 additions & 2 deletions cli/test/smokehouse/lighthouse-runners/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const execFileAsync = promisify(execFile);
/**
* Launch Chrome and do a full Lighthouse run via the Lighthouse CLI.
* @param {string} url
* @param {LH.Config.Json=} config
* @param {LH.Config=} config
* @param {{isDebug?: boolean, useFraggleRock?: boolean}=} testRunnerOptions
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
*/
Expand All @@ -45,7 +45,7 @@ async function runLighthouse(url, config, testRunnerOptions = {}) {
* Internal runner.
* @param {string} url
* @param {string} tmpPath
* @param {LH.Config.Json=} config
* @param {LH.Config=} config
* @param {{isDebug?: boolean, useLegacyNavigation?: boolean}=} options
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
*/
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/lighthouse-runners/devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function setup() {
* unless DEVTOOLS_PATH is set.
* CHROME_PATH determines which Chrome is used–otherwise the default is puppeteer's chrome binary.
* @param {string} url
* @param {LH.Config.Json=} config
* @param {LH.Config=} config
* @param {{isDebug?: boolean, useLegacyNavigation?: boolean}=} testRunnerOptions
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
*/
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See [`SmokehouseOptions`](https://github.com/GoogleChrome/lighthouse/blob/main/c
| -------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `id` | `string` | The string identifier of the test. |
| `expectations` | `{lhr: Object, artifacts: Object}` | See below. |
| `config` | `LH.Config.Json` (optional) | An optional Lighthouse config. If not specified, the default config is used. |
| `config` | `LH.Config` (optional) | An optional Lighthouse config. If not specified, the default config is used. |
| `runSerially` | `boolean` (optional) | An optional flag. If set to true, the test won't be run in parallel to other tests. Useful if the test is performance sensitive. |

### Expectations
Expand Down
4 changes: 2 additions & 2 deletions cli/test/smokehouse/smokehouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ function purpleify(str) {
}

/**
* @param {LH.Config.Json=} config
* @return {LH.Config.Json|undefined}
* @param {LH.Config=} config
* @return {LH.Config|undefined}
*/
function convertToLegacyConfig(config) {
if (!config) return config;
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Config for running PWA smokehouse audits for axe.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/byte-efficiency.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/**
* @type {LH.Config.Json}
* @type {LH.Config}
* Config file for running byte efficiency smokehouse audits.
*/
const config = {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/byte-gzip.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/dobetterweb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
audits: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Config file for sites with various errors, just fail out quickly.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Config file for sites with various errors, just fail out quickly.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Config file for sites with various errors, just fail out quickly.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import experimentalConfig from '../../../../core/config/experimental-config.js';

/**
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
...experimentalConfig,
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/fps-max.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/fps-scaled.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/lantern-fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/lantern-online.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/lantern-xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/metrics-debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A config with no throttling used for tricky-metrics tests.
* Those class of tricky metrics need to use observed metrics and DevTools throttling has too many bugs
* to capture the nuances we're testing.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A config with no throttling used for tricky-metrics tests.
* Those class of tricky metrics need to use observed metrics and DevTools throttling has too many bugs
* to capture the nuances we're testing.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A config with no throttling used for tricky-metrics tests.
* Those class of tricky metrics need to use observed metrics and DevTools throttling has too many bugs
* to capture the nuances we're testing.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A config with no throttling used for tricky-metrics tests.
* Those class of tricky metrics need to use observed metrics and DevTools throttling has too many bugs
* to capture the nuances we're testing.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A config with no throttling used for tricky-metrics tests.
* Those class of tricky metrics need to use observed metrics and DevTools throttling has too many bugs
* to capture the nuances we're testing.
* @type {LH.Config.Json}
* @type {LH.Config}
*/
const config = {
extends: 'lighthouse:default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/offline-ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/offline-sw-slow.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/oopif-requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
categories: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/oopif-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
categories: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/perf-budgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/perf-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

/** @type {LH.Config.Json} */
/** @type {LH.Config} */
const config = {
extends: 'lighthouse:default',
settings: {
Expand Down
Loading