Skip to content

Commit

Permalink
Updates README links. (#401)
Browse files Browse the repository at this point in the history
* Updates README links.

* Updates web.dev URLs in code comments.
  • Loading branch information
malchata committed Nov 25, 2023
1 parent 07f6f96 commit 16e6e93
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 54 deletions.
56 changes: 28 additions & 28 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/attribution/onCLS.ts
Expand Up @@ -56,11 +56,11 @@ const attributeCLS = (metric: CLSMetric): void => {
};

/**
* Calculates the [CLS](https://web.dev/cls/) value for the current page and
* Calculates the [CLS](https://web.dev/articles/cls) value for the current page and
* calls the `callback` function once the value is ready to be reported, along
* with all `layout-shift` performance entries that were used in the metric
* value calculation. The reported value is a `double` (corresponding to a
* [layout shift score](https://web.dev/cls/#layout-shift-score)).
* [layout shift score](https://web.dev/articles/cls#layout_shift_score)).
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called as soon as the value is initially
Expand Down
2 changes: 1 addition & 1 deletion src/attribution/onFCP.ts
Expand Up @@ -54,7 +54,7 @@ const attributeFCP = (metric: FCPMetric): void => {
};

/**
* Calculates the [FCP](https://web.dev/fcp/) value for the current page and
* Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `paint` performance entry used to determine the value. The reported
* value is a `DOMHighResTimeStamp`.
Expand Down
2 changes: 1 addition & 1 deletion src/attribution/onFID.ts
Expand Up @@ -37,7 +37,7 @@ const attributeFID = (metric: FIDMetric): void => {
};

/**
* Calculates the [FID](https://web.dev/fid/) value for the current page and
* Calculates the [FID](https://web.dev/articles/fid) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `first-input` performance entry used to determine the value. The
* reported value is a `DOMHighResTimeStamp`.
Expand Down
4 changes: 2 additions & 2 deletions src/attribution/onINP.ts
Expand Up @@ -51,7 +51,7 @@ const attributeINP = (metric: INPMetric): void => {
};

/**
* Calculates the [INP](https://web.dev/responsiveness/) value for the current
* Calculates the [INP](https://web.dev/articles/inp) value for the current
* page and calls the `callback` function once the value is ready, along with
* the `event` performance entries reported for that interaction. The reported
* value is a `DOMHighResTimeStamp`.
Expand All @@ -61,7 +61,7 @@ const attributeINP = (metric: INPMetric): void => {
* default threshold is `40`, which means INP scores of less than 40 are
* reported as 0. Note that this will not affect your 75th percentile INP value
* unless that value is also less than 40 (well below the recommended
* [good](https://web.dev/inp/#what-is-a-good-inp-score) threshold).
* [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called as soon as the value is initially
Expand Down
2 changes: 1 addition & 1 deletion src/attribution/onLCP.ts
Expand Up @@ -90,7 +90,7 @@ const attributeLCP = (metric: LCPMetric) => {
};

/**
* Calculates the [LCP](https://web.dev/lcp/) value for the current page and
* Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and
* calls the `callback` function once the value is ready (along with the
* relevant `largest-contentful-paint` performance entry used to determine the
* value). The reported value is a `DOMHighResTimeStamp`.
Expand Down
2 changes: 1 addition & 1 deletion src/attribution/onTTFB.ts
Expand Up @@ -60,7 +60,7 @@ const attributeTTFB = (metric: TTFBMetric): void => {
};

/**
* Calculates the [TTFB](https://web.dev/time-to-first-byte/) value for the
* Calculates the [TTFB](https://web.dev/articles/ttfb) value for the
* current page and calls the `callback` function once the page has loaded,
* along with the relevant `navigation` performance entry used to determine the
* value. The reported value is a `DOMHighResTimeStamp`.
Expand Down
6 changes: 3 additions & 3 deletions src/onCLS.ts
Expand Up @@ -29,15 +29,15 @@ import {
ReportOpts,
} from './types.js';

/** Thresholds for CLS. See https://web.dev/cls/#what-is-a-good-cls-score */
/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */
export const CLSThresholds: MetricRatingThresholds = [0.1, 0.25];

/**
* Calculates the [CLS](https://web.dev/cls/) value for the current page and
* Calculates the [CLS](https://web.dev/articles/cls) value for the current page and
* calls the `callback` function once the value is ready to be reported, along
* with all `layout-shift` performance entries that were used in the metric
* value calculation. The reported value is a `double` (corresponding to a
* [layout shift score](https://web.dev/cls/#layout-shift-score)).
* [layout shift score](https://web.dev/articles/cls#layout_shift_score)).
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called as soon as the value is initially
Expand Down
4 changes: 2 additions & 2 deletions src/onFCP.ts
Expand Up @@ -29,11 +29,11 @@ import {
ReportOpts,
} from './types.js';

/** Thresholds for FCP. See https://web.dev/fcp/#what-is-a-good-fcp-score */
/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */
export const FCPThresholds: MetricRatingThresholds = [1800, 3000];

/**
* Calculates the [FCP](https://web.dev/fcp/) value for the current page and
* Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `paint` performance entry used to determine the value. The reported
* value is a `DOMHighResTimeStamp`.
Expand Down
4 changes: 2 additions & 2 deletions src/onFID.ts
Expand Up @@ -34,11 +34,11 @@ import {
ReportOpts,
} from './types.js';

/** Thresholds for FID. See https://web.dev/fid/#what-is-a-good-fid-score */
/** Thresholds for FID. See https://web.dev/articles/fid#what_is_a_good_fid_score */
export const FIDThresholds: MetricRatingThresholds = [100, 300];

/**
* Calculates the [FID](https://web.dev/fid/) value for the current page and
* Calculates the [FID](https://web.dev/articles/fid) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `first-input` performance entry used to determine the value. The
* reported value is a `DOMHighResTimeStamp`.
Expand Down
6 changes: 3 additions & 3 deletions src/onINP.ts
Expand Up @@ -37,7 +37,7 @@ interface Interaction {
entries: PerformanceEventTiming[];
}

/** Thresholds for INP. See https://web.dev/inp/#what-is-a-good-inp-score */
/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */
export const INPThresholds: MetricRatingThresholds = [200, 500];

// Used to store the interaction count after a bfcache restore, since p98
Expand Down Expand Up @@ -123,7 +123,7 @@ const estimateP98LongestInteraction = () => {
};

/**
* Calculates the [INP](https://web.dev/responsiveness/) value for the current
* Calculates the [INP](https://web.dev/articles/inp) value for the current
* page and calls the `callback` function once the value is ready, along with
* the `event` performance entries reported for that interaction. The reported
* value is a `DOMHighResTimeStamp`.
Expand All @@ -133,7 +133,7 @@ const estimateP98LongestInteraction = () => {
* default threshold is `40`, which means INP scores of less than 40 are
* reported as 0. Note that this will not affect your 75th percentile INP value
* unless that value is also less than 40 (well below the recommended
* [good](https://web.dev/inp/#what-is-a-good-inp-score) threshold).
* [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called as soon as the value is initially
Expand Down
4 changes: 2 additions & 2 deletions src/onLCP.ts
Expand Up @@ -31,13 +31,13 @@ import {
ReportOpts,
} from './types.js';

/** Thresholds for LCP. See https://web.dev/lcp/#what-is-a-good-lcp-score */
/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */
export const LCPThresholds: MetricRatingThresholds = [2500, 4000];

const reportedMetricIDs: Record<string, boolean> = {};

/**
* Calculates the [LCP](https://web.dev/lcp/) value for the current page and
* Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and
* calls the `callback` function once the value is ready (along with the
* relevant `largest-contentful-paint` performance entry used to determine the
* value). The reported value is a `DOMHighResTimeStamp`.
Expand Down
4 changes: 2 additions & 2 deletions src/onTTFB.ts
Expand Up @@ -26,7 +26,7 @@ import {
import {getActivationStart} from './lib/getActivationStart.js';
import {whenActivated} from './lib/whenActivated.js';

/** Thresholds for TTFB. See https://web.dev/ttfb/#what-is-a-good-ttfb-score */
/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */
export const TTFBThresholds: MetricRatingThresholds = [800, 1800];

/**
Expand All @@ -45,7 +45,7 @@ const whenReady = (callback: () => void) => {
};

/**
* Calculates the [TTFB](https://web.dev/time-to-first-byte/) value for the
* Calculates the [TTFB](https://web.dev/articles/ttfb) value for the
* current page and calls the `callback` function once the page has loaded,
* along with the relevant `navigation` performance entry used to determine the
* value. The reported value is a `DOMHighResTimeStamp`.
Expand Down
8 changes: 4 additions & 4 deletions src/types/lcp.ts
Expand Up @@ -43,25 +43,25 @@ export interface LCPAttribution {
/**
* The time from when the user initiates loading the page until when the
* browser receives the first byte of the response (a.k.a. TTFB). See
* [Optimize LCP](https://web.dev/optimize-lcp/) for details.
* [Optimize LCP](https://web.dev/articles/optimize-lcp) for details.
*/
timeToFirstByte: number;
/**
* The delta between TTFB and when the browser starts loading the LCP
* resource (if there is one, otherwise 0). See [Optimize
* LCP](https://web.dev/optimize-lcp/) for details.
* LCP](https://web.dev/articles/optimize-lcp) for details.
*/
resourceLoadDelay: number;
/**
* The total time it takes to load the LCP resource itself (if there is one,
* otherwise 0). See [Optimize LCP](https://web.dev/optimize-lcp/) for
* otherwise 0). See [Optimize LCP](https://web.dev/articles/optimize-lcp) for
* details.
*/
resourceLoadTime: number;
/**
* The delta between when the LCP resource finishes loading until the LCP
* element is fully rendered. See [Optimize
* LCP](https://web.dev/optimize-lcp/) for details.
* LCP](https://web.dev/articles/optimize-lcp) for details.
*/
elementRenderDelay: number;
/**
Expand Down

0 comments on commit 16e6e93

Please sign in to comment.