From 430f2ad9808e02d43a60673b6cdb2c1d65a35c40 Mon Sep 17 00:00:00 2001 From: Adriana Ixba Date: Wed, 10 Apr 2024 15:17:07 -0700 Subject: [PATCH] some more clean up --- docs/architecture.md | 2 +- docs/understanding-results.md | 10 +++++----- readme.md | 4 ++-- types/artifacts.d.ts | 21 --------------------- types/audit.d.ts | 10 ---------- types/internal/smokehouse.d.ts | 2 +- viewer/README.md | 2 +- 7 files changed, 10 insertions(+), 41 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index 761b6114b263..ce83a712586b 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -16,7 +16,7 @@ _Some incomplete notes_ * **Report** - The report UI, created client-side from the LHR. See [HTML Report Generation Overview](../report/README.md) for details. ### Audit/Report terminology -* **Category** - Roll-up collection of audits and audit groups into a user-facing section of the report (eg. `Best Practices`). Applies weighting and overall scoring to the section. Examples: PWA, Accessibility, Best Practices. +* **Category** - Roll-up collection of audits and audit groups into a user-facing section of the report (eg. `Best Practices`). Applies weighting and overall scoring to the section. Examples: Accessibility, Best Practices. * **Audit title** - Short user-visible title for the successful audit. eg. “All image elements have `[alt]` attributes.” * **Audit failureTitle** - Short user-visible title for a failing audit. eg. “Some image elements do not have `[alt]` attributes.” * **Audit description** - Explanation of why the user should care about the audit. Not necessarily how to fix it, unless there is no external link that explains it. ([See description guidelines](../CONTRIBUTING.md#audit-description-guidelines)). eg. “Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute. [Learn more].” diff --git a/docs/understanding-results.md b/docs/understanding-results.md index 400c5cc198e9..15a3d3c69087 100644 --- a/docs/understanding-results.md +++ b/docs/understanding-results.md @@ -174,14 +174,14 @@ An array containing the different categories, their scores, and the results of t ### Example ```json { - "pwa": { - "id": "pwa", - "title": "Progressive Web App", - "description": "PWAs are awesome. [Learn more](...)", + "seo": { + "id": "seo", + "title": "SEO", + "description": "These checks ensure that your page is following basic search engine optimization advice...", "score": 0.54, "auditRefs": [ { - "id": "is-on-https", + "id": "crawlable-anchors", "weight": 1 } ] diff --git a/readme.md b/readme.md index 9b9bedf94bc5..652e768beead 100644 --- a/readme.md +++ b/readme.md @@ -103,7 +103,7 @@ Configuration: --gather-mode, -G Collect artifacts from a connected browser and save to disk. (Artifacts folder path may optionally be provided). If audit-mode is not also enabled, the run will quit early. --audit-mode, -A Process saved artifacts from disk. (Artifacts folder path may be provided, otherwise defaults to ./latest-run/) --only-audits Only run the specified audits [array] - --only-categories Only run the specified categories. Available categories: accessibility, best-practices, performance, pwa, seo [array] + --only-categories Only run the specified categories. Available categories: accessibility, best-practices, performance, seo [array] --skip-audits Run everything except these audits [array] --budget-path The path to the budget.json file for LightWallet. [string] --disable-full-page-screenshot Disables collection of the full page screenshot, which can be quite large [boolean] @@ -148,7 +148,7 @@ Examples: lighthouse --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging lighthouse --extra-headers "{\"Cookie\":\"monster=blue\", \"x-men\":\"wolverine\"}" Stringify'd JSON HTTP Header key/value pairs to send in requests lighthouse --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests - lighthouse --only-categories=performance,pwa Only run the specified categories. Available categories: accessibility, best-practices, performance, pwa, seo + lighthouse --only-categories=performance,seo Only run the specified categories. Available categories: accessibility, best-practices, performance, seo For more information on Lighthouse, see https://developers.google.com/web/tools/lighthouse/. ``` diff --git a/types/artifacts.d.ts b/types/artifacts.d.ts index fef7ff9f1808..fa4bba072af7 100644 --- a/types/artifacts.d.ts +++ b/types/artifacts.d.ts @@ -158,8 +158,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts { TraceError: Trace; /** Elements associated with metrics (ie: Largest Contentful Paint element). */ TraceElements: Artifacts.TraceElement[]; - /** Parsed version of the page's Web App Manifest, or null if none found. */ - WebAppManifest: Artifacts.Manifest | null; /** COMPAT: A set of traces, keyed by passName. */ traces: {[passName: string]: Trace}; /** COMPAT: A set of DevTools debugger protocol records, keyed by passName. */ @@ -595,25 +593,6 @@ declare module Artifacts { } } - type ManifestValueCheckID = 'hasStartUrl'|'hasIconsAtLeast144px'|'hasIconsAtLeast512px'|'fetchesIcon'|'hasPWADisplayValue'|'hasBackgroundColor'|'hasThemeColor'|'hasShortName'|'hasName'|'shortNameLength'|'hasMaskableIcon'; - - type ManifestValues = { - isParseFailure: false; - allChecks: { - id: ManifestValueCheckID; - failureText: string; - passing: boolean; - }[]; - } | { - isParseFailure: true; - parseFailureReason: string; - allChecks: { - id: ManifestValueCheckID; - failureText: string; - passing: boolean; - }[]; - } - type MeasureEntry = LHResult.MeasureEntry; interface MetricComputationDataInput { diff --git a/types/audit.d.ts b/types/audit.d.ts index 0201a68902ab..f43c9e6198e2 100644 --- a/types/audit.d.ts +++ b/types/audit.d.ts @@ -117,16 +117,6 @@ declare module Audit { /** Type returned by Audit.audit(). Only score is required. */ type Product = NonNumericProduct | NumericProduct; - - type MultiCheckAuditP1 = Partial>; - type MultiCheckAuditP2 = Partial; - interface MultiCheckAuditP3 { - failures: Array; - manifestValues?: undefined; - allChecks?: undefined; - } - - type MultiCheckAuditDetails = MultiCheckAuditP1 & MultiCheckAuditP2 & MultiCheckAuditP3; } export default Audit; diff --git a/types/internal/smokehouse.d.ts b/types/internal/smokehouse.d.ts index 154cdd4193e7..a0e5c8f0b3dc 100644 --- a/types/internal/smokehouse.d.ts +++ b/types/internal/smokehouse.d.ts @@ -33,7 +33,7 @@ declare global { } export interface TestDfn { - /** Identification of test. Can be used for group selection (e.g. `yarn smoke pwa` will run all tests with `id.includes('pwa')`). */ + /** Identification of test. Can be used for group selection (e.g. `yarn smoke csp` will run all tests with `id.includes('csp')`). */ id: string; /** Expected test results. */ expectations: ExpectedRunnerResult; diff --git a/viewer/README.md b/viewer/README.md index 832b312ecacb..136ce32e06a7 100644 --- a/viewer/README.md +++ b/viewer/README.md @@ -41,7 +41,7 @@ e.g., `http://localhost:7333/?jsonurl=https://gist.githubusercontent.com/Kikobea Pass target URL `psiurl` query parameter. -e.g., `http://localhost:7333/?psiurl=https://www.example.com&category=pwa&category=seo` +e.g., `http://localhost:7333/?psiurl=https://www.example.com&category=seo` The following query parameters are also supported as options: