instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
GoogleChrome__lighthouse__15702
GoogleChrome/lighthouse
15,702
defect
8b119b143413bc3d3ea0384ec2f180f5a1f9f7a2
30b7e6b177cfacca9c32c504cb10b1442a80cde2
core(cumulative-layout-shift): experiment with new shared trace engine
This pulls in the new shared trace engine via `@paulirish/trace_engine`, and uses it to calculate CLS. If it fails, it falls back to our current approach. Also falls back to current approach if any trace has recent input, which we handle differently and need to upstream to the shared trace engine. EDIT: This P...
diff --git a/core/computed/metrics/cumulative-layout-shift.js b/core/computed/metrics/cumulative-layout-shift.js index 2d70e22bcc4c..20207fa1c75f 100644 --- a/core/computed/metrics/cumulative-layout-shift.js +++ b/core/computed/metrics/cumulative-layout-shift.js @@ -7,8 +7,9 @@ import {makeComputedArtifact} from '../c...
4
4
2
[{"id": "G0", "claim": "The catch block around the new trace engine should report the error to Sentry in addition to logging it to the console.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The filter should not keep all non-LayoutShift events ...
null
GoogleChrome__lighthouse__15724
GoogleChrome/lighthouse
15,724
defect
dd8feb782652a962451aab6ac255c36e897c5afd
8a9f52e8d6855a46ca4c4c2deb3e7e0823d30136
deps: upgrade puppeteer to 21.7.0
https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v21.7.0 Also closes https://github.com/GoogleChrome/lighthouse/issues/15510
diff --git a/core/gather/driver/navigation.js b/core/gather/driver/navigation.js index 4ea0cd99d236..5b69b6bd118d 100644 --- a/core/gather/driver/navigation.js +++ b/core/gather/driver/navigation.js @@ -97,7 +97,8 @@ async function gotoURL(driver, requestor, options) { let waitForNavigationTriggered; if (typeof r...
1
1
0
[{"id": "G0", "claim": "The 'ignores protocol timeouts from puppeteer' test asserts a result that in theory should never happen, since Lighthouse would throw its own PROTOCOL_TIMEOUT in that situation, so maybe the test isn't good.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"...
null
GoogleChrome__lighthouse__15738
GoogleChrome/lighthouse
15,738
defect
e86124b878f4c21c8d40d5d477850dc26b86dd53
d4109d644f5e84afd67e2693edff212c32839cb1
core(legacy-javascript): detect es-shims polyfills
Detects the polyfills from https://github.com/es-shims
diff --git a/core/audits/byte-efficiency/legacy-javascript.js b/core/audits/byte-efficiency/legacy-javascript.js index df5e023b8cf9..69a023c3575a 100644 --- a/core/audits/byte-efficiency/legacy-javascript.js +++ b/core/audits/byte-efficiency/legacy-javascript.js @@ -152,6 +152,12 @@ class LegacyJavascript extends ByteE...
1
1
1
[{"id": "G0", "claim": "The regex escape `\\s` in the es-shims expression string is a useless escape equivalent to `s` and should be written `\\\\s`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleChrome__lighthouse__15764
GoogleChrome/lighthouse
15,764
defect
f8a16b7eadf7e4d66b66dd656c4b058fa908503b
2757f330dea0d91f77b22d438053a28919bc63f5
clients(lr): include flag for ignoring bad page status code
ref https://github.com/GoogleChrome/lighthouse/issues/10493
diff --git a/clients/lightrider/lightrider-entry.js b/clients/lightrider/lightrider-entry.js index 4a47c7b5efd2..20b29cb34268 100644 --- a/clients/lightrider/lightrider-entry.js +++ b/clients/lightrider/lightrider-entry.js @@ -77,11 +77,11 @@ async function getPageFromConnection(connection) { * @param {any} connectio...
1
1
0
[{"id": "G0", "claim": "Update the Next ID comment on line 131 of proto/lighthouse-result.proto to reflect the newly added field.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__lighthouse__15913
GoogleChrome/lighthouse
15,913
defect
458ded802cc48c2b92f07433ef8aa29eb5fbb53d
5d4c678df5776cf8b048be2e9608cbbdfc04277b
core(driver): add sendCommandAndIgnore
followup from https://github.com/GoogleChrome/lighthouse/pull/15833#pullrequestreview-1902218228
diff --git a/core/gather/driver.js b/core/gather/driver.js index 0afef34f8f5f..73a9ba7cf78f 100644 --- a/core/gather/driver.js +++ b/core/gather/driver.js @@ -26,6 +26,7 @@ const throwingSession = { once: throwNotConnectedFn, off: throwNotConnectedFn, sendCommand: throwNotConnectedFn, + sendCommandAndIgnore: ...
1
1
1
[{"id": "G0", "claim": "sendCommandAndIgnore should return void (doing the `void` floating-promise marking inside the method) instead of returning the command's typed promise, since its semantics are just tossing the command to CDP and moving on.", "category": "design", "verdict": "supported", "priority": "P1", "scope"...
null
GoogleChrome__lighthouse__15915
GoogleChrome/lighthouse
15,915
defect
4fb9ceac8d1cb07384ab304995d803301b67541f
0c306df07b963229e316e6de5a434665cb2e19e4
core(trace-elements): add sentry debugging for `impactedNodes`
This should alleviate the symptoms of https://github.com/GoogleChrome/lighthouse/issues/15870 and adds some extra sentry instrumentation to help us get to the bottom of this.
diff --git a/core/audits/layout-shifts.js b/core/audits/layout-shifts.js index d09da2722afb..2201ed185460 100644 --- a/core/audits/layout-shifts.js +++ b/core/audits/layout-shifts.js @@ -78,7 +78,7 @@ class LayoutShifts extends Audit { .slice(0, MAX_LAYOUT_SHIFTS); for (const event of topLayoutShiftEvents) ...
1
1
0
[{"id": "G0", "claim": "The Sentry `extra` payload may not be serializable for some reason (what if it is a map), so to be safe three more supplemental fields should be added — a JSON-stringified `impactedNodes` guarded by try/catch, the `typeof impactedNodes`, and `impactedNodes?.constructor?.name` — in addition to `i...
null
GoogleChrome__lighthouse__15942
GoogleChrome/lighthouse
15,942
defect
79c78be86b8ff7ab99f482758aa572a595648d36
537f68f86cc2092088f77cebde3d0ff84831f946
core(service-worker): remove `service-worker` gatherer
continuation of the PWA category + unused gatherers removal: https://github.com/GoogleChrome/lighthouse/issues/15535
diff --git a/core/config/default-config.js b/core/config/default-config.js index ef28546cf3a0..476d00335978 100644 --- a/core/config/default-config.js +++ b/core/config/default-config.js @@ -133,7 +133,6 @@ const defaultConfig = { {id: 'OptimizedImages', gatherer: 'dobetterweb/optimized-images'}, {id: 'Respon...
1
1
0
[{"id": "G0", "claim": "Several other references to the removed service-worker gatherer remain in core/test/scripts/run-mocha-tests.js, core/test/runner-test.js and types/artifacts.d.ts and should be removed too.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__lighthouse__15946
GoogleChrome/lighthouse
15,946
defect
9a62cd867010196f7bfb163e0a393a2cde9350ba
ebb0a615004b31e6cfbe01808c06a7efc66db486
core(lantern): remove LR statistics
ref #15944 Lantern does not need to know about our lrStatistics object. Instead, we can set the timing object based on it in our LH NetworkRequest -> Lantern NetworkRequest adapter.
diff --git a/core/lib/lantern/simulator/network-analyzer.js b/core/lib/lantern/simulator/network-analyzer.js index 59e5ba51a699..a624261e73ce 100644 --- a/core/lib/lantern/simulator/network-analyzer.js +++ b/core/lib/lantern/simulator/network-analyzer.js @@ -140,15 +140,6 @@ class NetworkAnalyzer { const {timing, ...
1
1
0
[{"id": "G0", "claim": "The closing comment marker of the new doc comment should be indented as ` */` instead of ` */`.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
GoogleChrome__lighthouse__15990
GoogleChrome/lighthouse
15,990
defect
2566009c44d9b465f6514255421a16d9480876f1
5ea6d4d19902c8a3f80f55d956a7d9b705230dff
cli: create writeFile destination if necessary
**Summary** This PR introduces a fix for `writeFile`. The function currently assumes that the directories leading to the specified `filePath` exist, but this PR ensures that they exist. **Related Issues/PRs** No related issues or PRs.
diff --git a/cli/printer.js b/cli/printer.js index 2105fa3be7b3..026cc9ae9b5d 100644 --- a/cli/printer.js +++ b/cli/printer.js @@ -5,6 +5,7 @@ */ import fs from 'fs'; +import path from 'path'; import log from 'lighthouse-logger'; @@ -58,13 +59,17 @@ function writeToStdout(output) { */ function writeFile(fi...
2
2
2
[{"id": "G0", "claim": "Add a test for the new directory-creating writeFile behavior in `cli/test/cli/printer-test.js`.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The 'throws for invalid paths' test case is failing because `!/#@.json` is now a valid...
null
GoogleChrome__lighthouse__16048
GoogleChrome/lighthouse
16,048
defect
52eb22c3058683b49de325fe07e76c38a1645779
1f58ced1f252fad2179d950cdd31af889f1e11ff
core(lantern): remove usage of Lighthouse's ProcessedNavigation
ref https://github.com/GoogleChrome/lighthouse/issues/15841
diff --git a/core/audits/redirects.js b/core/audits/redirects.js index d5742e20e0bd..6201544c9de5 100644 --- a/core/audits/redirects.js +++ b/core/audits/redirects.js @@ -90,6 +90,7 @@ class Redirects extends Audit { const processedTrace = await ProcessedTrace.request(trace, context); const networkRecords =...
1
1
1
[{"id": "G0", "claim": "createProcessedNavigation takes metric scores from only the first main-frame navigation, so the reviewer asks whether it would handle JS redirects, which produce later main-frame navigations.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleChrome__lighthouse__16049
GoogleChrome/lighthouse
16,049
defect
322a3b71dd8ff7d764b30fac27df203704e9ef77
738389b4aea214e6d5aade6883d3788ba83e3eb3
core(lantern): extract main thread events w/o TraceProcessor
Lantern needs just the main thread events (regardless of navigations), so it used `lib/trace-processor`. Now Lantern does that itself in `createGraphFromTrace`. ref https://github.com/GoogleChrome/lighthouse/issues/15841
diff --git a/core/computed/page-dependency-graph.js b/core/computed/page-dependency-graph.js index 0a03ce4a356a..04072f00b376 100644 --- a/core/computed/page-dependency-graph.js +++ b/core/computed/page-dependency-graph.js @@ -29,7 +29,7 @@ class PageDependencyGraph { if (data.fromTrace) { const traceEngine...
2
2
1
[{"id": "G0", "claim": "The PR author asks whether the newly added `_filteredTraceSort` helper is needed at all, since tests pass with a plain array.filter in its place.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR's `rendererPidToTid` is constr...
null
GoogleChrome__lighthouse__16117
GoogleChrome/lighthouse
16,117
defect
a21fde7f0e997802d6bd574edf156bb04649ecf9
fe14152965699df4b94331764243fbe6206354a2
core(third-party-summary): correct blocking time calculation
Closes https://github.com/GoogleChrome/lighthouse/issues/15184 The problem with the old method was we were doing a `- 50ms` operation on tasks that were not top level. These tasks do contribute to blocking time if their root task is longer than 50ms, even if they aren't larger than 50ms themselves. The TBT impact...
diff --git a/core/audits/third-party-summary.js b/core/audits/third-party-summary.js index bb2fc70d3073..1df99923a9c6 100644 --- a/core/audits/third-party-summary.js +++ b/core/audits/third-party-summary.js @@ -104,7 +104,7 @@ class ThirdPartySummary extends Audit { // The amount of time spent *blocking* on main...
2
2
1
[{"id": "G0", "claim": "The comment above the blocking-time accumulation (that third-party blocking time sums all task time over 50ms and is not equivalent to TBT) may be stale now that the calculation changed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",...
null
GoogleChrome__lighthouse__16147
GoogleChrome/lighthouse
16,147
defect
c79628af9bdaa537a2abd1b34da922e28b81bd98
e60874af8e0ea076a400005e1498a0afa71ace0e
deps: upgrade jest packages to 29.7.0
Some types related to mocks went from any to something else - that's the cause of the bulk of the code changes.
diff --git a/cli/test/cli/bin-test.js b/cli/test/cli/bin-test.js index 710b05970684..43170f0518ef 100644 --- a/cli/test/cli/bin-test.js +++ b/cli/test/cli/bin-test.js @@ -7,16 +7,15 @@ import {pathToFileURL} from 'url'; import * as td from 'testdouble'; -import jestMock from 'jest-mock'; import {LH_ROOT} from '....
1
1
1
[{"id": "G0", "claim": "Adding `?? []` makes `frameListener` never undefined, so the `expect(frameListener).toBeDefined()` assertion can no longer fail and the test no longer ensures the listener is defined.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleChrome__lighthouse__16221
GoogleChrome/lighthouse
16,221
defect
4276b07fdb3d349971a648b7d69e6c52035bf2bd
9016a51d1e3a4fb1dd78aa6c2998a9c0736f3675
core(target-manager): ignore target if type is unknown
Closes https://github.com/GoogleChrome/lighthouse/issues/15739
diff --git a/core/gather/driver/target-manager.js b/core/gather/driver/target-manager.js index 330198d42867..839bf140b44c 100644 --- a/core/gather/driver/target-manager.js +++ b/core/gather/driver/target-manager.js @@ -128,7 +128,15 @@ class TargetManager extends ProtocolEventEmitter { let targetType; try {...
1
1
1
[{"id": "G0", "claim": "The catch(() => null) added around Target.getTargetInfo should check for the error explicitly rather than ignoring all errors from the command.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleChrome__lighthouse__16393
GoogleChrome/lighthouse
16,393
defect
be357f5bafcaff368611de00260f739be47fe9ef
4128e867989e8b6e84e0f24e31ed549a60288d51
misc: move support files to core/lib/legacy-javascript
just moving more stuff also fix `core/scripts/legacy-javascript/examine-latest-run.js`, which broke at some point over the last year
diff --git a/core/audits/byte-efficiency/legacy-javascript.js b/core/audits/byte-efficiency/legacy-javascript.js index 4efb2ed248a9..a7b0a7c40024 100644 --- a/core/audits/byte-efficiency/legacy-javascript.js +++ b/core/audits/byte-efficiency/legacy-javascript.js @@ -21,7 +21,7 @@ import {EntityClassification} from '../...
1
1
1
[{"id": "G0", "claim": "The console.time/console.timeEnd calls around detectLegacyJavaScript look like leftover debug logging and should be removed (or, if kept, replaced with lighthouse-logger).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleChrome__lighthouse__16466
GoogleChrome/lighthouse
16,466
defect
f549c5349ed2567e0770bb1817db8cd218e58855
69eec2f9b899b6f0c37ff5453885208e04bdf308
report: add analytics hook for insights state
* add DEFAULT state to insight toggle * add analytics hook for initial insight state; and for toggling it * update analytics hook / viewer to use gtag (GA4) instead of ga this probably works. have to wait 24hr to know
diff --git a/package.json b/package.json index 8a54ff18190b..a38598f94521 100644 --- a/package.json +++ b/package.json @@ -117,6 +117,7 @@ "@types/eslint": "^8.2.1", "@types/estree": "^0.0.50", "@types/gh-pages": "^2.0.0", + "@types/gtag.js": "0.0.20", "@types/google.analytics": "0.0.39", "@...
2
2
2
[{"id": "G0", "claim": "The analytics hook in report/clients/standalone.js should forward custom events with the gtag command 'event' rather than 'custom_event'.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The gtag call in viewer/app/src/lighthou...
null
GoogleChrome__lighthouse__16858
GoogleChrome/lighthouse
16,858
defect
fe78589bb12c9af5c43e6a5df0171fee616f375d
ca9ed7a7f52d08e52cb43512735df3edd3e0aee2
misc(build): create a bundle for devtools-mcp
Adds a bundle to use in Chrome DevTools MCP that includes non-performance categories (because the MCP server already does performance). The bundle includes also report generation in json and HTML. It should only include the EN locale for the report. The bundle is not minified with legal comments inline to simplify c...
diff --git a/build/build-bundle-mcp.js b/build/build-bundle-mcp.js new file mode 100644 index 000000000000..b65422aa3eef --- /dev/null +++ b/build/build-bundle-mcp.js @@ -0,0 +1,367 @@ +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @fileoverview Script to bundle ...
5
3
1
[{"id": "G0", "claim": "Although the non-a11y audits and the non-snapshot gatherer are filtered out, the speedline module still appears to be imported unconditionally and causes errors about a dynamic require of the 'fs' module, so the author asks paulirish for a suggestion on how to bundle it better.", "category": "de...
null
GoogleChrome__lighthouse__16927
GoogleChrome/lighthouse
16,927
defect
f525c6b8f835536076b7312c6811c4d4aebc1097
67b1ac95ff62b3b3ae2852b516ba8da0791b1ecd
core(baseline): add baseline icons to baseline audit lighthouse report
<img width="843" height="537" alt="Screenshot 2026-03-23 at 11 30 11 AM" src="https://github.com/user-attachments/assets/95165241-8f12-440d-bcba-a0b5ae38dc09" /> This commit introduces a visual icon for each respective baseline status on the lighthouse report
diff --git a/cli/test/smokehouse/test-definitions/baseline.js b/cli/test/smokehouse/test-definitions/baseline.js index 6d819fc065f3..ab22222bc1fe 100644 --- a/cli/test/smokehouse/test-definitions/baseline.js +++ b/cli/test/smokehouse/test-definitions/baseline.js @@ -37,11 +37,19 @@ const expectations = { _...
3
3
1
[{"id": "G0", "claim": "Consider using the Baseline logos directly from the official Web Platform DX name-and-logo-usage guidelines instead of hand-rolled inline SVG copies.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'baseline-status' case statem...
null
GoogleChrome__lighthouse__16956
GoogleChrome/lighthouse
16,956
defect
1e22f8a6fa627e51e69fadbf06e0ae5080771cdd
7042affe6579b2e13ca850ac9128e5a40d23d91e
core: implement UKM Invalidate fallback for LCP
If no standard LCP candidates are found in the trace, fall back to using the last UKM Invalidate event as a mock candidate. This prevents NO_LCP errors when standard candidates are missing.
diff --git a/core/lib/tracehouse/trace-processor.js b/core/lib/tracehouse/trace-processor.js index bdfc58a0ef50..b61bb64e5685 100644 --- a/core/lib/tracehouse/trace-processor.js +++ b/core/lib/tracehouse/trace-processor.js @@ -349,7 +349,7 @@ class TraceProcessor { const ret = this.getMainThreadTopLevelEventDura...
7
5
0
[{"id": "G0", "claim": "The UKM invalidate filter should match the exact event name 'NavStartToLargestContentfulPaint::Invalidate::AllFrames::UKM' instead of any event whose name contains 'Invalidate'.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "...
null
GoogleChrome__lighthouse__1987
GoogleChrome/lighthouse
1,987
defect
e475bdb5d7b71153b5c1b00e62d9b441834d71bf
0e1a4081279a9b151fae9283cc322e1b477e3535
refactor: split report-renderer into multiple files
In preparation for introducing tags/grouped audit renderers the report-renderer.js started getting unwieldy. This splits it into 3 files DOM, DetailsRenderer, and ReportRenderer. I know @brendankenny [had Eric kill DOM](https://github.com/GoogleChrome/lighthouse/pull/1963#discussion_r110069398) but c'mon having thes...
diff --git a/lighthouse-core/report/v2/renderer/details-renderer.js b/lighthouse-core/report/v2/renderer/details-renderer.js new file mode 100644 index 000000000000..936fdc04f6e6 --- /dev/null +++ b/lighthouse-core/report/v2/renderer/details-renderer.js @@ -0,0 +1,91 @@ +/** + * Copyright 2017 Google Inc. All rights re...
1
1
1
[{"id": "G0", "claim": "The module-scoped `let DetailsJSON` typedef won't work because it is scoped to the module like regular variables, so it must be attached to `DetailsRenderer` and referred to as `DetailsRenderer.DetailsJSON` in report-renderer.js.", "category": "correctness", "verdict": "supported", "priority": "...
null
GoogleChrome__lighthouse__9801
GoogleChrome/lighthouse
9,801
defect
f84dcedc8dee8b5f64b9876d15a1326b36cec44f
edc41c91bfc8c7faf0984f09a1b45518770e51b5
core(crc): exclude non network nodes from being a leaf
I ran LH on nytimes and noticed data uris in the crc graph: ![image](https://user-images.githubusercontent.com/39191/66356458-d519b300-e91f-11e9-86c8-cace0b536748.png) They seem out of place. To me, CRC is about optimizing network load, but datauris are inlined into the parent request, so I dont think it's fai...
diff --git a/lighthouse-core/audits/uses-rel-preload.js b/lighthouse-core/audits/uses-rel-preload.js index 767232e9b91f..30c24177aaf6 100644 --- a/lighthouse-core/audits/uses-rel-preload.js +++ b/lighthouse-core/audits/uses-rel-preload.js @@ -104,8 +104,6 @@ class UsesRelPreloadAudit extends Audit { if (request.is...
4
2
1
[{"id": "G0", "claim": "The comment above the NON_NETWORK_PROTOCOLS check should read \"If it's not a request loaded over the network...\" rather than \"It's not a request loaded over the network...\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim":...
null
GoogleChrome__web-vitals__221
GoogleChrome/web-vitals
221
defect
230124b5825a07532e9c39add8f43fcd512c9df0
efd0f31e1886132ff2309693a7424436c79d07e2
Finish adding getINP()
Fixes #208. This PR builds on top of what @mmocny added in #213 with the following: - Updates the `observe` module logic to support processing a list of entries rather than each individually. - Moves the `interactionCount` logic into its own module and rewrites it as a "polyfill" so it won't run if the browser n...
diff --git a/src/getINP.ts b/src/getINP.ts index 580c778c..8754aecd 100644 --- a/src/getINP.ts +++ b/src/getINP.ts @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wi...
5
4
1
[{"id": "G0", "claim": "The early-return if statement in processEntry leads to bugs with the new approach of accumulating all parts of an interaction, because it can skip entries that belong to an existing interaction, so it should be removed or extended with a check for entries that are part of an existing interaction...
null
GoogleChrome__web-vitals__281
GoogleChrome/web-vitals
281
defect
7f0ed0bfb03c356e348a558a3eda111b498a2a11
bbb5cb7f55abfef0caf3face04d55a6f8271f8af
Ignore TTFB for loads where responseStart is zero
This PR fixes #275 by ignoring loads where the `responseStart` property of the navigation entry is 0. The assumption is that `responseStart` should never be zero unless the browser is intentionally concealing navigation timing data.
diff --git a/src/onTTFB.ts b/src/onTTFB.ts index c7b56867..04e3b0dc 100644 --- a/src/onTTFB.ts +++ b/src/onTTFB.ts @@ -67,21 +67,28 @@ export const onTTFB = (onReport: ReportCallback, opts?: ReportOpts) => { const navEntry = getNavigationEntry(); if (navEntry) { - // The activationStart reference is us...
1
1
1
[{"id": "G0", "claim": "Fold the zero-responseStart case into the earlier guard (`responseStart <= 0 || responseStart > performance.now()`) instead of a separate nested `if (responseStart > 0)` block, because the split is confusing: the comment below says those cases are not reported, yet bfcache restores still report ...
null
GoogleChrome__web-vitals__284
GoogleChrome/web-vitals
284
defect
861d0650ecf766b7c7a13b2c12bafef048840590
b894478dd5f0b058e8afbc0632da37cfc4b16d63
Support 'restore' as a navigationType
Fixes #280
diff --git a/README.md b/README.md index 71431874..63728f6a 100644 --- a/README.md +++ b/README.md @@ -697,10 +697,13 @@ interface Metric { * The type of navigation * * Navigation Timing API (or `undefined` if the browser doesn't - * support that API). For pages that are restored from the bfcache, this - ...
3
3
0
[{"id": "G0", "claim": "Move the wasDiscarded `declare global` block out of src/types/base.ts and into src/types.ts alongside the existing `document.prerendering` declaration.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The e2e tests don't uniformly c...
null
GoogleChrome__web-vitals__297
GoogleChrome/web-vitals
297
defect
cd560dc372ddc30d1327246ee2d28cbc478480a7
1101fd8d1b675fe14ba562110519dfcb82c15ef9
Defer CLS logic until after onFCP callback
This PR fixes #180 by removing some of the logic that would listen and keep track of whether or not FCP had fired, and instead just wraps all of the `onCLS()` logic inside of an `onFCP()` call (and ensuring the logic only runs the first time `onFCP()` is invoked). The "ensuring the logic only runs the first time `on...
diff --git a/.eslintrc b/.eslintrc index ff8ab59e..93bf34fa 100644 --- a/.eslintrc +++ b/.eslintrc @@ -12,9 +12,7 @@ "overrides": [ { "files": "wdio.conf.js", - "extends": [ - "eslint:recommended", "google" - ], + "extends": ["eslint:recommended"], "rules": { "max-le...
4
2
0
[{"id": "G0", "claim": "A bfcache restore that happens before FCP (e.g. type a URL, click back before FCP, then click forward) could trigger a CLS report in addition to the FCP-driven one, and it is unclear whether that would matter.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "intro...
null
GoogleChrome__web-vitals__323
GoogleChrome/web-vitals
323
defect
9f11c4c6578fb4c5ee6fa4e32b9d1d756475f135
86194e67c7f3745565f6057a488b154387a9c080
Export metric rating thresholds, add explicit `MetricRatingThresholds` type
# What? This PR exports the existing rating thresholds for all metrics, e.g., ```ts import {CLSThresholds} from 'web-vitals'; console.log(CLSThresholds); // [ 0.1, 0.25 ] ``` ... and defines the existing rating thresholds format with an explicit `MetricRatingThresholds` type: ```ts /** * The thresh...
diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..b009dfb9 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/README.md b/README.md index 429e0e9b..3be3f5be 100644 --- a/README.md +++ b/README.md @@ -761,6 +761,20 @@ Metric-specific subclasses: - [`LCPMetricWithAttribution`](/src/types/lcp.ts...
8
3
2
[{"id": "G0", "claim": "Add something to the README so the newly exported thresholds are not a hidden, undocumented API.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add tests to ensure the exported thresholds are not accidentally reverted or br...
null
GoogleChrome__web-vitals__421
GoogleChrome/web-vitals
421
defect
2301de5015e82b09925238a228a0893635854587
0eaec2183f401f7b8210b3aa638588c6b6fd913c
Pick the first non-null target for INP attribution
Some pointer entries have a known [bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1367329) causing them to have null event targets. In cases where there are mouse or click entries in the same interaction that do have non-null event targets, always prefer those. This PR works around the bug by changing th...
diff --git a/src/attribution/onINP.ts b/src/attribution/onINP.ts index d787fc6c..501b3f40 100644 --- a/src/attribution/onINP.ts +++ b/src/attribution/onINP.ts @@ -37,8 +37,10 @@ const attributeINP = (metric: INPMetric): void => { ); })[0]; + const targetEntry = metric.entries.find(entry => entry.target...
4
4
2
[{"id": "G0", "claim": "The new first-non-null-target lookup should carry a TODO comment with a link to Chromium bug 1367329 so the workaround is flagged for later removal.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comment explaining the ...
null
GoogleChrome__web-vitals__435
GoogleChrome/web-vitals
435
defect
8058a007c9878c2b56c787040d4e8ca282dc203a
d02753fd0388abcb310cdcfbc41cc90b2a6ceb68
Deprecate onFID() and remove previously deprecated APIs
Makes the following changes assumiong the next release after this merge is a major version bump: - Removes old deprecated APIs (`getXXX` calls and `ReportCallback`) - Marks `onFID` as deprecated and to be removed in next major version - Removes polyfill base builds as per #238 (note this includes `NavigationTiming...
diff --git a/README.md b/README.md index 55db7669..122c34f8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ - [Batch multiple reports together](#batch-multiple-reports-together) - [Build options](#build-options) - [Which build is right for you?](#which-build-is-right-for-you) - - [How the polyfill work...
7
7
2
[{"id": "G0", "claim": "The inner `if (po)` guard added inside the onHidden callback in src/onFID.ts is unnecessary and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The following onBFCacheRestore block, guarded by a second `...
null
GoogleChrome__web-vitals__453
GoogleChrome/web-vitals
453
defect
b3a7f3d64732837e32889c3a477c67d735dfb1ab
ca8cd7346312c2fb8a5c241720971ca368466b15
Rename `TTFBAttribution` fields from `*Time` to `*Duration`
This PR continues the renaming work from #450 and updates the `TTFBAttribution` interface with the same changes—all properties whose name ended in `*Time` have been renamed to `*Duration`, in order to make it more clear that these are durations of time rather than timestamps. ```diff interface TTFBAttribution { - ...
diff --git a/src/attribution/onTTFB.ts b/src/attribution/onTTFB.ts index 8228462a..fa99e1cb 100644 --- a/src/attribution/onTTFB.ts +++ b/src/attribution/onTTFB.ts @@ -42,20 +42,20 @@ const attributeTTFB = (metric: TTFBMetric): void => { ); (metric as TTFBMetricWithAttribution).attribution = { - waiting...
4
3
1
[{"id": "G0", "claim": "The README should be updated for the field renames (and the CHANGELOG as part of the pre-release routine).", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "It would also be nice to add redirect time as per issue #395.", "cate...
null
GoogleChrome__web-vitals__458
GoogleChrome/web-vitals
458
defect
91d27484bff3b5f5b3af391e2c2a18c972243594
f88e069ce8fbe1056048fa0176a823d46e3eef78
Split `waitingDuration` to make it easier to understand redirect delays
Fixes #395 This splits `waitingDuration` (formerly known as `waitingTime` in v3) into two: - `waitingDuration` - which the time until (`workerStart` or `fetchStart`). This will mostly be redirect time but I've avoided explicitly calling that as [`redirectStart/End` can't be used](https://github.com/w3c/navigation-...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 60aaa5b0..0e0c00b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### v4.0.0-beta.2 (???) + +- **[BREAKING]** Split `waitingDuration` in `TTFBAttribution` into `redirectDuration` and `cacheDuration` ([#458](https://github.com/GoogleChrome/web-...
4
4
0
[{"id": "G0", "claim": "Fix the typo 'Npote' to 'Note' in the redirectDuration doc comment, as the provided suggestion does.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the v4 upgrade guide, add a line under 'Removed' and two lines under 'Ad...
null
GoogleChrome__web-vitals__460
GoogleChrome/web-vitals
460
defect
91d27484bff3b5f5b3af391e2c2a18c972243594
9b5f89bad1ecf71092f63faff22a9e035f4e7930
Improved testing options
Improved version of #286 Changes: - Allows you to run: `npm run test:e2e -- --browser=chrome --metric=TTFB` for example to limit tests to a particular browser and/or metric. - Adds a precommit test for any stray `it.only`'s, `depends.only`'s, or `browser.debug`'s accidentally left around while testing. - Adds in...
diff --git a/.husky/pre-commit b/.husky/pre-commit index a4fc3255..971b4bbb 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,14 @@ . "$(dirname -- "$0")/_/husky.sh" npm exec lint-staged + +echo "Checking for leftover it.only's..." +grep it.only test/*/* && exit 1 + +echo "Checking for leftover desc...
1
1
0
[{"id": "G0", "claim": "The bfcache CLS test triggers a layout shift before the forward/back navigation, which the reviewer believes belongs to the previous page, so a second CLS can be reported for the original page while the test only checks one beacon, and the reviewer suspects this is what makes the test flaky on C...
null
GoogleChrome__web-vitals__468
GoogleChrome/web-vitals
468
defect
e756e57eda694b276120b5ff14274bb99444f49c
ef00c5db0244c48287f01f7b9d7c2011cc8a7a69
Fix `reportAllChanges` behavior for LCP when library is loaded late
Currently if `reportAllChanges=true` but web-vitals is loaded late, then it doesn't report all LCP changes as we take the last one. This can be confusing and make you think only one LCP entry was emitted when multiple ones were. It can be useful to know that multiple entries are emitted and this works for all the ot...
diff --git a/src/onLCP.ts b/src/onLCP.ts index 622c3638..984793df 100644 --- a/src/onLCP.ts +++ b/src/onLCP.ts @@ -58,6 +58,12 @@ export const onLCP = (onReport: LCPReportCallback, opts?: ReportOpts) => { let report: ReturnType<typeof bindReporter>; const handleEntries = (entries: LCPMetric['entries']) => {...
3
3
0
[{"id": "G0", "claim": "The recursive call to handleEntries for reportAllChanges makes the code hard to read; restructure it to trim the entries array to the last one when reportAllChanges is false and use a forEach over the logic below instead.", "category": "maintainability", "verdict": "supported", "priority": "P2",...
null
GoogleChrome__web-vitals__487
GoogleChrome/web-vitals
487
defect
b32786bf6baa82593a4cae12226f8e81172b8407
d41f3bc377a58388c39a96e5a106ee89009a8df6
Fix missing LoAF attribution when entries are dispatched before event entries
fixes #485 As described there, I added an extra condition to keep any LoAFs around that are _after_ any existing known interactions, in case those interactions then come in later. I then realized that would leave the LoAF collection unbounded, since a page can have a bunch of slow animation frames without the use...
diff --git a/src/attribution/onINP.ts b/src/attribution/onINP.ts index 361fa4f2..0973c269 100644 --- a/src/attribution/onINP.ts +++ b/src/attribution/onINP.ts @@ -38,6 +38,12 @@ interface pendingEntriesGroup { entries: PerformanceEventTiming[]; } +/** + * The maximum number of LoAFs to retain on cleanup that don'...
3
2
0
[{"id": "G0", "claim": "The fix could not be covered by a reliable test — the attempted test is inherently flaky and subject to future Chrome scheduler changes — and the author asks for other ideas, such as unit tests or overriding PerformanceObserver in an e2e test.", "category": "testing", "verdict": "uncertain", "pr...
null
GoogleChrome__web-vitals__507
GoogleChrome/web-vitals
507
defect
dc0ee2b1560533e4e2a38b270d316764fe0775de
6e15ba85ff70fda5459b3b03f40ee0e3d1ba968c
Improve test flakiness
Makes the following improvements: - Reverts temp workarounds from #473, #475, #476, #486 as no longer required as discussed in: https://bugzilla.mozilla.org/show_bug.cgi?id=1893921 - Skips prerender on unsupported browser (seemed to be causing flakiness for FCP tests on Safari). - Adds an extra delay until `interac...
diff --git a/test/e2e/onFCP-test.js b/test/e2e/onFCP-test.js index ce0de79c..0e6f4328 100644 --- a/test/e2e/onFCP-test.js +++ b/test/e2e/onFCP-test.js @@ -17,28 +17,11 @@ import assert from 'assert'; import {beaconCountIs, clearBeacons, getBeacons} from '../utils/beacons.js'; import {browserSupportsEntry} from '../u...
1
1
0
[{"id": "G0", "claim": "The added `browser.pause(1000)` needs justification, and at minimum its comment is wrong because the test already waits for the beacon further down.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__web-vitals__518
GoogleChrome/web-vitals
518
defect
9b932519b16f72328c6d8e9814b811f1bc1a0bb5
f90723473cd6c78169d0898bba71460c56bbffbe
Sort the classes that appear in attribution selectors to reduce cardinality
Fixes #514 Adding this to v5 branch due reasons given in https://github.com/GoogleChrome/web-vitals/issues/514#issuecomment-2277072435
diff --git a/src/lib/getSelector.ts b/src/lib/getSelector.ts index 4ca0bb95..759ce50a 100644 --- a/src/lib/getSelector.ts +++ b/src/lib/getSelector.ts @@ -34,7 +34,7 @@ export const getSelector = (node: Node | null | undefined, maxLen?: number) => { el.classList.value && el.classList.value.trim() ...
2
2
0
[{"id": "G0", "claim": "The class splitting could use `Array.from(el.classList).sort().join('.')`, which would also deduplicate classes.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G3", "claim": "Unit tests must be added covering classes that are out of order a...
null
GoogleChrome__web-vitals__583
GoogleChrome/web-vitals
583
defect
b4e84bd8fbab4f5b45c20a2ca385387541a4eb59
db419b4f9f28100789b23ec5a6bc3eb38b0618d8
Support multiple calls to `onINP()` with different config options
Fixes #582. This PR updates the `interactions.ts` logic to encapsulate it in a class that can be instantiated per `onINP()` call. It also moves most of the functions in the `attribution/onINP.ts` file inside of the `onINP()` closure, to keep all of the variables local to each `onINP()` call. The main downside of ...
diff --git a/rollup.config.js b/rollup.config.js index 9ce0b619..bd16daae 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -42,8 +42,16 @@ const configurePlugins = ({module}) => { }), terser({ module, - mangle: true, compress: true, + mangle: { + properties: { + ...
2
2
0
[{"id": "G0", "claim": "Mixing the `$` prefix with unprefixed names in the InteractionManager code is unmaintainable and confusing; the `$` prefix should be dropped in favour of the more conventional `_` prefix for internal (mangled) symbols.", "category": "maintainability", "verdict": "supported", "priority": "P2", "s...
null
GoogleChrome__web-vitals__585
GoogleChrome/web-vitals
585
defect
06df5a74eb28285c51a9156516c0337ed56cd6be
b4e0f526310eca5bf77a056b876929b3252d76da
Add support for generating custom targets in the attribution build
Fixes #561 and #580. This PR is an alternative approach to #562 (built on top of my proposed changes in #583) that also adds a new top-level `generateTarget` configuration option which allows developers to pass in their own function—as an alternative to the libraries internal `getSelector()` function. All of the ...
diff --git a/src/attribution/onCLS.ts b/src/attribution/onCLS.ts index 34e036d7..31eb6a2e 100644 --- a/src/attribution/onCLS.ts +++ b/src/attribution/onCLS.ts @@ -14,8 +14,10 @@ * limitations under the License. */ +import {LayoutShiftManager} from '../lib/LayoutShiftManager.js'; import {getLoadState} from '../li...
4
4
1
[{"id": "G0", "claim": "The new comment in onCLS.ts still says `LCPEntryManager`/`unattributedOnLCP` from the copied LCP code and should say `LayoutShiftManager`/`unattributedOnCLS`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `$`-prefixed in...
null
GoogleChrome__web-vitals__611
GoogleChrome/web-vitals
611
defect
3b9acdb1702bf1dbd76f2091cb585619d9d65481
1b21007797d880d79f0e64eb2fe828d54fc843a1
Fixing flakey tests
Fixing flakey tests (especially now Firefox Nightly supports INP so they are even more flakey!) Fixes #601 Fixes #608
diff --git a/test/e2e/onINP-test.js b/test/e2e/onINP-test.js index c1e178de..dcecae64 100644 --- a/test/e2e/onINP-test.js +++ b/test/e2e/onINP-test.js @@ -17,10 +17,12 @@ import assert from 'assert'; import {beaconCountIs, clearBeacons, getBeacons} from '../utils/beacons.js'; import {browserSupportsEntry} from '../u...
3
3
0
[{"id": "G0", "claim": "The lines at test/e2e/onINP-test.js L370-L373 are failing on Firefox, and canova asks whether the author managed to figure out why, since it looks weird given the 300ms pointerdown blocking time above them.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "pre_existing...
null
GoogleChrome__web-vitals__617
GoogleChrome/web-vitals
617
defect
03388e81a28dafbef462399cdaa2a34a80fb2369
75e36468eda3731c88e323307af2b281da759de2
Fix CI flakiness
Fixes #601 There's a race condition here where event timing entries are not always emitted straight away, and before `await stubVisibilityChange('hidden');` is handled. Particularly for Firefox, and particularly in CI. Web Vitals then only emits INP for any event timings processed by the time the `hidden` `visib...
diff --git a/test/e2e/onINP-test.js b/test/e2e/onINP-test.js index 7d58e73c..697175e8 100644 --- a/test/e2e/onINP-test.js +++ b/test/e2e/onINP-test.js @@ -18,10 +18,12 @@ import assert from 'assert'; import {beaconCountIs, clearBeacons, getBeacons} from '../utils/beacons.js'; import {browserSupportsEntry} from '../ut...
2
2
0
[{"id": "G0", "claim": "The new isCloseTo() helper should be renamed to assertIsCloseTo() for consistency with similar assertions in the LCP tests.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In waitUntilIdle(), the requestIdleCallback featur...
null
GoogleChrome__web-vitals__621
GoogleChrome/web-vitals
621
defect
d98f066dba242ead76d7ae1c99a18ccf9c47f3ae
199f663e5ad4e290d7f48f3e101c96cb221f6fb8
Fix missing FCP and LCP for prerendered pages
As noted in https://github.com/GoogleChrome/web-vitals/pull/612#issuecomment-2872294421 we're failing to log FCP and LCP since web-vitals v5.0.0 due to incorrect logic. This wasn't flagged by our test suite as it emulates prerender and did not emulate the correct stats of `visibility-state` performance entries (whic...
diff --git a/src/lib/getVisibilityWatcher.ts b/src/lib/getVisibilityWatcher.ts index 052abc7f..f65f176c 100644 --- a/src/lib/getVisibilityWatcher.ts +++ b/src/lib/getVisibilityWatcher.ts @@ -15,6 +15,7 @@ */ import {onBFCacheRestore} from './bfcache.js'; +import {getActivationStart} from './getActivationStart.js';...
4
4
0
[{"id": "G0", "claim": "The comment in test/views/layout.njk misspells \"iniitial\" and should read \"initial entries\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The indentation of the `window.performance.getEntriesByType = function(type) {`...
null
GoogleChrome__web-vitals__634
GoogleChrome/web-vitals
634
defect
8a54167b8a455128bd5ae0f3729c3e81ea146f62
92ea1fa3726b4260d725d4db8b8498b6d13aa10c
Fallback to default getSelector if custom function is null or undefined
Fixes #633
diff --git a/README.md b/README.md index 6c72f232..0cb3fcfa 100644 --- a/README.md +++ b/README.md @@ -648,7 +648,7 @@ A subclass of `ReportOpts` used for each metric function exported in the [attrib ```ts interface AttributionReportOpts extends ReportOpts { - generateTarget?: (el: Node | null) => string; + gener...
1
1
0
[{"id": "G0", "claim": "The generateTarget/getSelector fallback logic in onCLS is hard to read and more complex than it needs to be, and should be rewritten more simply (e.g. as a one-liner `const target = opts.generateTarget?.(node) ?? getSelector(node);`).", "category": "maintainability", "verdict": "supported", "pri...
null
GoogleChrome__web-vitals__635
GoogleChrome/web-vitals
635
defect
8a54167b8a455128bd5ae0f3729c3e81ea146f62
07c36e3d4a535be5d83a009215c11b76c8d7b2ed
Only finalize LCP on user events (`isTrusted=true`)
Fixes #632 Note this meant the stubVisibilityChange no longer finalized LCP in the test suite so I switched most of those to a new `switchToNewTabAndBack` function.
diff --git a/src/onLCP.ts b/src/onLCP.ts index d89f5ebc..465a1467 100644 --- a/src/onLCP.ts +++ b/src/onLCP.ts @@ -96,17 +96,25 @@ export const onLCP = ( report(true); }); + // Need a separate wrapper to ensure the `runOnce` function above is + // common for all three functions + const ...
2
2
0
[{"id": "G0", "claim": "The 100ms browser.pause before navigating away is arbitrary, and the test should wait for a real signal instead of a timed pause.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The event parameter of stopListeningWrapper should b...
null
GoogleChrome__web-vitals__647
GoogleChrome/web-vitals
647
defect
1b872cf5f2159e8ace0e98d55d8eb54fb09adfbe
c99bcddc95bc8108aba592f7e70e131cfa9fcbe0
Update browser support docs for INP and LCP
I've been using this library and do appreciate this project! While reading through the README, I noticed that Firefox isn't mentioned as a supported browser for `onINP()`, but according to [this Mozilla blog post](https://blog.mozilla.org/performance/2025/10/15/firefox-144-ships-interactionid-for-inp/), Firefox 144+ (r...
diff --git a/README.md b/README.md index 0cb3fcfa..19812b67 100644 --- a/README.md +++ b/README.md @@ -1135,7 +1135,7 @@ Browser support for each function is as follows: - `onCLS()`: Chromium - `onFCP()`: Chromium, Firefox, Safari -- `onINP()`: Chromium +- `onINP()`: Chromium, Firefox - `onLCP()`: Chromium, Firefo...
2
2
0
[{"id": "G0", "claim": "Update the onINP() and onLCP() browser-support lines in README.md to list Safari Tech Preview, preparing for upcoming Safari support.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Reword the limitations paragraph in README...
null
GoogleChrome__web-vitals__676
GoogleChrome/web-vitals
676
defect
ead0677108cb195c4b696f4f2ee4842450ce12d5
943aec5ad0ca3d7e7a7590eb53d49a6e3e52ee56
Use LargestContentfulPaint.id as fallback when element is removed from DOM
Fixes: #674 This PR implements support for the `LargestContentfulPaint.id` property to provide a fallback when the LCP element has been removed from the DOM. Previously, if the LCP element was removed from the DOM before the web-vitals library processed the entry, the `entry.element` property would be `null`, ma...
diff --git a/src/attribution/onLCP.ts b/src/attribution/onLCP.ts index 32d7ac98..5810c600 100644 --- a/src/attribution/onLCP.ts +++ b/src/attribution/onLCP.ts @@ -57,6 +57,10 @@ export const onLCP = ( if (node) { const customTarget = opts.generateTarget?.(node) ?? getSelector(node); lcpTargetMap.set(...
1
1
1
[{"id": "G0", "claim": "Safari seems to need an extra pause after awaiting element rendering before the LCP element is removed, so the suggested setTimeout(0) pause should be added to the test page or the new test may fail on Safari.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduce...
null
GoogleChrome__web-vitals__700
GoogleChrome/web-vitals
700
defect
51b809c48d02c1cadaeb516ed262ef7cbb618403
729a5f7bef1f8d3da08de41d49c3b36340ee2345
Remove express and use the native node calls for test server
## Summary This PR replaces the Express-based test server with a native node:http implementation The test server only needs to serve a handful of static file types, handle one POST endpoint, and render Nunjucks templates. Express was doing very little here and can be replaced with native node calls ## Testing Pas...
diff --git a/package-lock.json b/package-lock.json index f80f4756..3be19cac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "@wdio/mocha-framework": "^9.23.0", "@wdio/spec-reporter": "^9.20.0", "eslint": "^9.39.2", - "express": "^5.2.1", "fs-extra": "^...
4
4
3
[{"id": "G0", "claim": "Remove the '.map' entry from MIME_TYPES since no sourcemaps are served by this repo.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add basic path-traversal checks to the static file serving so requests cannot read files ...
null
GoogleChrome__web-vitals__710
GoogleChrome/web-vitals
710
defect
910532baee0797712ec6996270f6d5df08b46cc9
baccee19b321e8760c70f1e7300072a037876706
Limit pending events to conserve memory
https://issues.chromium.org/issues/484342204#comment4 shows that we can quickly hold on to a LOT of heavy EventTiming objects if not careful, especially in busy frames and especially when we have many events without an interactionId. I'm proposing we cap these per group.
diff --git a/README.md b/README.md index cfbe6145..32deacc8 100644 --- a/README.md +++ b/README.md @@ -930,6 +930,7 @@ interface INPAttribution { /** * An array of Event Timing entries that were processed within the same * animation frame as the INP candidate interaction. + * Note this is capped to a max o...
4
2
1
[{"id": "G0", "claim": "Instead of slicing and recreating the array on every entry beyond the cap, the last slot should be replaced in place (group.entries[4] = entry) to avoid the memory-allocation overhead while keeping the same first-4-plus-last behaviour.", "category": "performance", "verdict": "supported", "priori...
null
GoogleChrome__workbox__1016
GoogleChrome/workbox
1,016
defect
7ac6b46593429be12e943d9a241730107c49c95e
a2e9d250339627324d88895eacbbc6a2b36ab3f5
Create a single (prod) build of workbox-sw.
R: @addyosmani @gauntface Fixes #969 Assuming this is merged, I'll go through the CDN publishing steps from start to finish to confirm that everything works for me, and to get the new `workbox-sw.js` pushed out there.
diff --git a/demos/functions/index.js b/demos/functions/index.js index b824d3ee7e..369c081cce 100644 --- a/demos/functions/index.js +++ b/demos/functions/index.js @@ -70,7 +70,7 @@ app.get('/demo/:moduleName/:swfile', function(req, res, next) { modulePathPrefix: '${cdnUrl}'`; } - const swImport = `importScript...
1
1
1
[{"id": "G0", "claim": "getModuleUrl should read the module's package.json and validate the build type, throwing when a prodOnly module is requested with a 'dev' buildType and, inversely, throwing 'buildType required' when a non-prodOnly module omits buildType.", "category": "correctness", "verdict": "supported", "prio...
null
GoogleChrome__workbox__1064
GoogleChrome/workbox
1,064
defect
feb7ede248518bcf6b4ab3b08d78d3c60850895a
b6fc6266a1d912befe74ffb22c9c6ab6e35e88fc
Use a hash of asset.source() for non-chunk assets
R: @goldhand @addyosmani @gauntface CC: @anilanar Fixes #1037 The high-level logic used in this PR: - If a filepath is present as part of a chunk, continue using the hash associated with that chunk for the `revision` field when creating a `ManifestEntry`. - For everything in `compilation.assets` that isn't als...
diff --git a/infra/testing/validator/compare-manifest-entries.js b/infra/testing/validator/compare-manifest-entries.js deleted file mode 100644 index 26b6db9622..0000000000 --- a/infra/testing/validator/compare-manifest-entries.js +++ /dev/null @@ -1,15 +0,0 @@ -const expect = require('chai').expect; - -module.exports ...
2
2
0
[{"id": "G0", "claim": "Rename the \"webpackAsset\" helper, since its name does not explain what it does.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment explaining that stringify (json-stable-stringify) is used to remove randomness...
null
GoogleChrome__workbox__1149
GoogleChrome/workbox
1,149
defect
3fc01789ce12708bfb5deb14481f94a84e2630e3
a1943b81036f5f0e45ae644d13498c7c9133aaf9
Add in asset filename filtering via {test, include, exclude}
R: @jeffposnick @addyosmani @gauntface CC: @anilanar Fixes #935 As mentioned in the comments/the original issue, this takes advantage of a pattern native to webpack and used in other plugins (like UglifyJS) for filtering the precache manifest of webpack assets based on an object with `test`, `include`, and `excl...
diff --git a/package-lock.json b/package-lock.json index f2f4b7fb60..5efc42dbe0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7181,6 +7181,12 @@ } } }, + "generate-asset-webpack-plugin": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/generate-asset-webpa...
2
1
0
[{"id": "G0", "claim": "The new peerDependencies entry seems to stipulate that the plugin only works with webpack 2 and 3, excluding webpack 4.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new comment should drop the pasted links and instead say in a...
null
GoogleChrome__workbox__1173
GoogleChrome/workbox
1,173
defect
a4d67a71da8513ee134b65684371c125e027b7f6
bb3166f7365b9c7918f64767ebcf1f074d41516b
Properly deal with webpack's publicPath + importWorkboxFrom: 'local'
R: @addyosmani @gauntface Fixes #1172 This was due to a missing `()` around an `||` operator.
diff --git a/packages/workbox-webpack-plugin/src/lib/get-workbox-sw-imports.js b/packages/workbox-webpack-plugin/src/lib/get-workbox-sw-imports.js index 84369dbd7a..9e003c5ae1 100644 --- a/packages/workbox-webpack-plugin/src/lib/get-workbox-sw-imports.js +++ b/packages/workbox-webpack-plugin/src/lib/get-workbox-sw-impo...
1
1
0
[{"id": "G0", "claim": "Lines 197 and 311 run expect(basenames).to.eql() against what appears to be the same list of dev, prod and map files, so that list of basenames should be extracted into a shared variable if it is identical between both tests.", "category": "maintainability", "verdict": "supported", "priority": "...
null
GoogleChrome__workbox__1220
GoogleChrome/workbox
1,220
defect
b3120732ea88b0db039f3a5b7c690f13d2408dbf
96d2cc692ef91993481db81f0051c5f96b149d08
Basic bg sync test
R: @jeffposnick Very trivial bg sync test but ensures: - loads in browser - sync event is used This doesn't test the offline to online sync event that is desirable, but that becomes difficult to test. Fixes #1190
diff --git a/test/workbox-background-sync/integration/test-bg-sync.js b/test/workbox-background-sync/integration/test-bg-sync.js new file mode 100644 index 0000000000..3f2c8d92b3 --- /dev/null +++ b/test/workbox-background-sync/integration/test-bg-sync.js @@ -0,0 +1,80 @@ +const expect = require('chai').expect; +const ...
1
1
1
[{"id": "G0", "claim": "Rewrite the test to wait on a promise that resolves or rejects after a maximum period instead of a tight `while(true)` loop with custom timeout mechanics.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleChrome__workbox__1230
GoogleChrome/workbox
1,230
defect
76168a32b57cda21768a4cde57e2b2e431306346
1b1f9b8f9fe37ec1ae905bad0967adfbccfe30e6
Workbox sw integration test
R: @addyosmani @gauntface Fixes #1197
diff --git a/test/workbox-sw/integration/workbox-sw.js b/test/workbox-sw/integration/workbox-sw.js new file mode 100644 index 0000000000..2ad054fa6c --- /dev/null +++ b/test/workbox-sw/integration/workbox-sw.js @@ -0,0 +1,53 @@ +const expect = require('chai').expect; +const seleniumAssistant = require('selenium-assista...
1
1
0
[{"id": "G0", "claim": "It would be nice to add a TODO about auto-generating the namespaces list if possible.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
GoogleChrome__workbox__1234
GoogleChrome/workbox
1,234
defect
1eb463e52fdb30d1d3e757d7cc3ac7e5f2154388
2242ceba797deb83152a3dbc61dc66868ab8a8bc
Adding integration tests for remaining strategies
R: @jeffposnick Fixes #1196 Integration tests for networkonly networkfirst and stalewhilerevalidate.
diff --git a/infra/testing/test-server.js b/infra/testing/test-server.js index 11b6992008..401fd48cb3 100644 --- a/infra/testing/test-server.js +++ b/infra/testing/test-server.js @@ -47,6 +47,13 @@ app.get('/test/uniqueETag', (req, res) => { res.send('ignored'); }); +let uniqueValue = 0; +app.get('/test/uniqueVal...
1
1
0
[{"id": "G0", "claim": "The /test/uniqueValue test-server route shouldn't set an ETag header; unlike the uniqueETag helper route, nothing here compares ETag values.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__126
GoogleChrome/workbox
126
defect
2603933fbbc154a19cc3e43c72def7f9d89ace86
6367625e8539935240137e1bac115f26212b9ea5
sw-routing unit tests
R: @gauntface Some unit tests for `sw-routing`. I'll follow up with end-to-end tests and unit + end-to-end tests for the other packages, but I wanted to keep the PRs small, and make sure I wasn't doing anything wrong w.r.t. the current testing best practices.
diff --git a/packages/sw-routing/src/lib/express-route.js b/packages/sw-routing/src/lib/express-route.js index 4e88e87761..002445049b 100644 --- a/packages/sw-routing/src/lib/express-route.js +++ b/packages/sw-routing/src/lib/express-route.js @@ -40,7 +40,6 @@ class ExpressRoute extends Route { */ constructor({p...
5
4
0
[{"id": "G0", "claim": "Asking why the assert.hasMethod({handler}, 'handle') check is being dropped from the ExpressRoute constructor.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The placeholder comment block with sample script tags added to index....
null
GoogleChrome__workbox__1327
GoogleChrome/workbox
1,327
defect
aee6b98469cdc56b6c7fb3744c0df53b824e199b
7ddc9b7e2f9c5a5742131fb305763a02d39e5a24
Add a new workboxSWImport option to the template.
R: @addyosmani @gauntface CC: @beatrizdemiguelperez Fixes #1324 Should hopefully be a clean fix to the issue.
diff --git a/packages/workbox-build/src/entry-points/generate-sw.js b/packages/workbox-build/src/entry-points/generate-sw.js index 4f777096d2..69027ea8a0 100644 --- a/packages/workbox-build/src/entry-points/generate-sw.js +++ b/packages/workbox-build/src/entry-points/generate-sw.js @@ -51,9 +51,7 @@ async function gene...
1
1
1
[{"id": "G0", "claim": "The webpack plugin should keep all workboxSWImports grouped together at the front of the generated importScripts (workbox imports, then config, then developer scripts) instead of shifting out only the first element of the array.", "category": "design", "verdict": "supported", "priority": "P1", "...
null
GoogleChrome__workbox__1488
GoogleChrome/workbox
1,488
defect
49ec72ae57c131fe4dfd7871b20d6dfc7fae8353
74d564eaccd1f124a6423aecf890ee97432534ce
Improve the code that swaps 'prod' for 'dev' in copyWorkboxLibraries
R: @philipwalton Fixes #1478 This code path is still a bit hacky, and there's a lot of hardcoded assumptions, but at least it should now work as expected when the `source` path contains multiple instances of `DEFAULT_BUILD_TYPE`.
diff --git a/packages/workbox-build/src/lib/use-build-type.js b/packages/workbox-build/src/lib/use-build-type.js index 9ea9dee203..6c57edd083 100644 --- a/packages/workbox-build/src/lib/use-build-type.js +++ b/packages/workbox-build/src/lib/use-build-type.js @@ -14,9 +14,35 @@ limitations under the License. */ -/...
1
1
0
[{"id": "G0", "claim": "The test name added by this pull request says 'is there is no match' where it should say 'if there is no match'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__170
GoogleChrome/workbox
170
defect
c82ee01ed22030ab2094772756b466782ba3cf4a
ef9e573cbf50eccc9bdea225ab30c1e437bb096c
Making bgQueue compatible with higher level library
R: @jeffposnick @addyosmani @gauntface This makes sw-background-sync-queue compatible with higher level library.
diff --git a/packages/sw-background-sync-queue/demo/sw.js b/packages/sw-background-sync-queue/demo/sw.js index 2d4b417e07..5ca0ea257e 100644 --- a/packages/sw-background-sync-queue/demo/sw.js +++ b/packages/sw-background-sync-queue/demo/sw.js @@ -1,5 +1,13 @@ /* global goog*/ -importScripts('../build/background-sync-q...
6
5
2
[{"id": "G0", "claim": "The JSDoc line 'This function is a call wrapper over' should be reworded to 'Wraps the' so it is not an incomplete sentence.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new fetchDidFail method's JSDoc lacks a definit...
null
GoogleChrome__workbox__184
GoogleChrome/workbox
184
defect
1649f5eb757240757cde4eef7cca6b9277826d38
15ba9b2021787293d50a3a58de91719a5744545b
Initial attempt at an e2e test for RegExpRoute
This is a bit of a throwaway PR, so that I can solicit feedback from @gauntface
diff --git a/packages/sw-routing/test/automated-test-suite.js b/packages/sw-routing/test/automated-test-suite.js index 74495b1d8d..d50770fa53 100644 --- a/packages/sw-routing/test/automated-test-suite.js +++ b/packages/sw-routing/test/automated-test-suite.js @@ -49,7 +49,7 @@ describe(`sw-routing Browser Tests`, functi...
5
5
0
[{"id": "G0", "claim": "Rename the service worker test directory from 'sw-unit'/'unit' to just 'sw' and standardise that naming across the tests.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Avoid fat-arrow callbacks for Mocha describe()/it() ...
null
GoogleChrome__workbox__189
GoogleChrome/workbox
189
defect
e97bebda4b7e50873935a18d35b68bfb809479ab
87531c886f5abcede1bbeae0ef0e2eeea6027008
adding missing tests
R: @jeffposnick @addyosmani @gauntface This PR adds the missing tests for response manager.
diff --git a/packages/sw-background-sync-queue/src/lib/response-manager.js b/packages/sw-background-sync-queue/src/lib/response-manager.js index 159feedb6e..9a206ac833 100644 --- a/packages/sw-background-sync-queue/src/lib/response-manager.js +++ b/packages/sw-background-sync-queue/src/lib/response-manager.js @@ -28,7 ...
2
2
0
[{"id": "G0", "claim": "Explain in the test why the cached response body must be passed through a FileReader (the response is stored as a BLOB in IDB), by adding a comment.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment to highligh...
null
GoogleChrome__workbox__1928
GoogleChrome/workbox
1,928
defect
d76e77066e9a23cb33f99a5dde796fa81bc0ea93
8259a76fb5b4d513ef23fc007174f9f2c6299b21
Call bind() to get the right this in precaching's plugins
R: @philipwalton Fixes #1927 by properly `bind()`ing to the `Plugin` instance. This also adds to the integration test for `workbox-precaching` to ensure that the `addPlugins()` flow has better test coverage.
diff --git a/packages/workbox-precaching/PrecacheController.mjs b/packages/workbox-precaching/PrecacheController.mjs index d890b01144..2def75d9c6 100644 --- a/packages/workbox-precaching/PrecacheController.mjs +++ b/packages/workbox-precaching/PrecacheController.mjs @@ -177,7 +177,7 @@ class PrecacheController { l...
1
1
0
[{"id": "G0", "claim": "Add an explicit unit test verifying that cacheWillUpdate is called with the correct this context, rather than relying only on the updated static sw-1.js integration test.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__1981
GoogleChrome/workbox
1,981
defect
ca79dab1e5e7230b04d3acd08d91a27f476bed13
3f3dc21aab3c95ad7080380003c2e20956af367a
Support for navigationPreload in workbox-build
R: @jeffposnick @philipwalton Fixes #1915 Adds `navigationPreload` config property (defaulting to false) to `workbox-build`'s `generateSW` and `generateSWString` modes, which would also expose it to the wrappers like `workbox-cli` and `workbox-webpack-plugin`. `gulp lint test` passes locally. I've been added t...
diff --git a/infra/testing/validator/service-worker-runtime.js b/infra/testing/validator/service-worker-runtime.js index 0aa22fe9c5..d78d3b7a9f 100644 --- a/infra/testing/validator/service-worker-runtime.js +++ b/infra/testing/validator/service-worker-runtime.js @@ -53,6 +53,9 @@ function setupSpiesAndContext() { ...
2
1
1
[{"id": "G0", "claim": "The navigationPreload.enable() call may be placed in the wrong position in the service worker template order (the author put it ahead of strategies and routing config per the docs but was unsure).", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1"...
null
GoogleChrome__workbox__1985
GoogleChrome/workbox
1,985
defect
f1164254b8abdd12c5c601ee7e7fc7d73fffd979
0939b85f8d75f65fbb6403734e863e91c1dcdd64
Migrate google analytics tests to run in a SW environment
R: @jeffposnick Continues the test-conversion work started in #1965. I also added the `extendable-event-utils.mjs` helpers, which makes it easier to test dispatching events and awaiting their extend lifetime promises.
diff --git a/infra/testing/helpers/extendable-event-utils.mjs b/infra/testing/helpers/extendable-event-utils.mjs new file mode 100644 index 0000000000..7d991ee985 --- /dev/null +++ b/infra/testing/helpers/extendable-event-utils.mjs @@ -0,0 +1,46 @@ +/* + Copyright 2018 Google LLC + + Use of this source code is govern...
1
1
0
[{"id": "G0", "claim": "Replace the confusing implicit spy access `Queue.prototype.pushRequest.thisValues[0]` with an explicitly named spy variable (e.g. `const pushRequestSpy = sandbox.spy(Queue.prototype, 'pushRequest')`) at the commented line and in the other usage.", "category": "maintainability", "verdict": "suppo...
null
GoogleChrome__workbox__211
GoogleChrome/workbox
211
defect
a52d3f2e5f4cf903c46bc930eee03eeafa5fb243
a10c2571a64cbc4e925901e6a89db355f4877a70
sw-cache-expiration unit tests
R: @addyosmani @gauntface Unit tests for `sw-cache-expiration`. There's also a bug fix for an issue I found in the underlying library (yay testing!) and I'm exposing a few additional symbols that could be useful. The unit tests are fairly in depth, so I'm not sure that I'm going to prioritize writing end-to-end t...
diff --git a/packages/sw-cache-expiration/src/index.js b/packages/sw-cache-expiration/src/index.js index 3df7d6a357..dc1f1d58b4 100644 --- a/packages/sw-cache-expiration/src/index.js +++ b/packages/sw-cache-expiration/src/index.js @@ -48,6 +48,11 @@ * @module sw-cache-expiration */ +import {timestampPropertyName,...
5
3
0
[{"id": "G0", "claim": "The JSDoc for findExtraEntries (\"Expires entries base on the the maximum cache size\") reads as the opposite of the method's name and behaviour, which finds URLs to expire rather than expiring entries.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existi...
null
GoogleChrome__workbox__2124
GoogleChrome/workbox
2,124
defect
c2c6724cee51ec835c8725542c96e4332a408beb
c16c15f5079be009fa37fb940fba63d8f826bcc9
Adds support for additionalManifestEntries build option
R: @philipwalton Fixes #1571 by adding in a new `additionalManifestEntries` option that can be passed in to any of the build tools.
diff --git a/packages/workbox-build/src/entry-points/options/base-schema.js b/packages/workbox-build/src/entry-points/options/base-schema.js index b34709d3db..6f345f596d 100644 --- a/packages/workbox-build/src/entry-points/options/base-schema.js +++ b/packages/workbox-build/src/entry-points/options/base-schema.js @@ -9...
3
2
1
[{"id": "G0", "claim": "The new files' copyright headers say 2018 but should say 2019.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "Workbox could optionally generate its own revision data for external URLs (e.g. by fetching and hashing the res...
null
GoogleChrome__workbox__2143
GoogleChrome/workbox
2,143
defect
cd993b3f02ab84a10426e466938402780cdc679b
7553068187c522df2085fde60a13a3c573d85bf4
Remove registerNavigationRoute, add createHandlerForURL
R: @philipwalton Fixes #2095 This includes the removal of `registerNavigationRoute()`, the addition of `createHandlerForURL()`, and changes to the `generateSW` template to preserve the equivalent behavior when `navigateFallback` is set.
diff --git a/infra/testing/validator/service-worker-runtime.js b/infra/testing/validator/service-worker-runtime.js index 69d86816fd..639feb0582 100644 --- a/infra/testing/validator/service-worker-runtime.js +++ b/infra/testing/validator/service-worker-runtime.js @@ -109,15 +109,15 @@ function setupSpiesAndContextForGen...
2
1
0
[{"id": "G0", "claim": "The reviewer asks whether the cache-miss fallback in createHandlerForURL should fetch the `url` instead of the `cacheKey`, warning that fetching the `cacheKey` (which carries the __WB_REVISION query param) may bypass the HTTP cache unnecessarily.", "category": "correctness", "verdict": "opposed"...
null
GoogleChrome__workbox__2176
GoogleChrome/workbox
2,176
defect
93cc3cce6c9c9741d25f098fe73e9da943b57f25
7d5a61165094c933083688bd55a663bb58fe491b
Set cache: 'reload' on precaching requests
R: @philipwalton Fixes #2146 This PR sets `cache: 'reload'` as an alternative to using the `__WB_REVISION=...` URL query parameter on the outgoing network requests used to populate the precache. I also renamed some variables to clarify the distinction between `cacheKey` & `url` within the `install()` method. ...
diff --git a/packages/workbox-precaching/src/PrecacheController.ts b/packages/workbox-precaching/src/PrecacheController.ts index 1caacee3bb..14bdd08002 100644 --- a/packages/workbox-precaching/src/PrecacheController.ts +++ b/packages/workbox-precaching/src/PrecacheController.ts @@ -113,35 +113,37 @@ class PrecacheContr...
1
1
0
[{"id": "G0", "claim": "The `toBePrecached` and `alreadyPrecached` array declarations would be easier to understand if type information were added to them.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__2232
GoogleChrome/workbox
2,232
defect
4486dfff1cb268472ddc15e3c7833c3b79ce6488
477a48cff7ce07cd2933bec4b281a20b37ebafff
Ignore both swSrc and swDest when globbing for the manifest
R: @philipwalton Fixes #2229 We previously had some code that ensured that `swDest` was omitted from the `glob` matches when generating the precache manifest. This extends that to also ignore `swSrc` in `injectManifest` mode. I also improved the that generates the `globIgnores` value so that instead of just...
diff --git a/packages/workbox-build/src/generate-sw.js b/packages/workbox-build/src/generate-sw.js index 893fa53796..73a7fb938c 100644 --- a/packages/workbox-build/src/generate-sw.js +++ b/packages/workbox-build/src/generate-sw.js @@ -6,8 +6,11 @@ https://opensource.org/licenses/MIT. */ +const upath = require('up...
3
3
0
[{"id": "G0", "claim": "The manifest globbing should also ignore the generated `workbox-*.js` runtime files, not just swSrc and swDest.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The new rebase-path.js file's copyright header says 2018; it sho...
null
GoogleChrome__workbox__2254
GoogleChrome/workbox
2,254
defect
f23924a988a3e321dbcd9e3781f07b1de5dce916
eedca3e1935a786c4824c91fb49b6a687df308c8
New precache helper functions + removal of createHandlerForURL
R: @philipwalton Fixes #2249 Exposes three new functions: - `async function matchPrecache(request: string|Request): Promise<Response|null>` - `function createHandler(fallbackToNetwork = true): RouteHandlerCallback` - `function createHandlerBoundToURL(url: string, fallbackToNetwork = true): RouteHandlerCallba...
diff --git a/infra/testing/validator/service-worker-runtime.js b/infra/testing/validator/service-worker-runtime.js index 57cd70c744..7ee885a5f9 100644 --- a/infra/testing/validator/service-worker-runtime.js +++ b/infra/testing/validator/service-worker-runtime.js @@ -109,7 +109,7 @@ function setupSpiesAndContextForGener...
6
2
0
[{"id": "G0", "claim": "The explicit `return undefined;` at the end of matchPrecache() is unnecessary and should be removed.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `new Error(...)` thrown in createHandler() on a cache miss should be a `Workbo...
null
GoogleChrome__workbox__2262
GoogleChrome/workbox
2,262
defect
ac28527b25e301e1330c044a59770af80e8c909a
e0572ff45b4d02ae460d6a569d9dead20e88a4c0
Unrevisioned precaching warning
R: @philipwalton Fixes #2259 Let me know if it's too verbose. The https://bit.ly/wb-precache link goes to https://developers.google.com/web/tools/workbox/modules/workbox-precaching#explanation_of_the_precache_list right now, which needs to be rewritten a to provide full context about what the problem is and wh...
diff --git a/packages/workbox-build/src/lib/additional-manifest-entries-transform.js b/packages/workbox-build/src/lib/additional-manifest-entries-transform.js index aff04d9e98..57d4747617 100644 --- a/packages/workbox-build/src/lib/additional-manifest-entries-transform.js +++ b/packages/workbox-build/src/lib/additional...
1
1
0
[{"id": "G0", "claim": "The unrevisioned-precaching warning message is too long and should be shortened to something like \"Workbox is precaching URLs without revision info. This is generally NOT safe. Learn more at https://bit.ly/wb-precache.\", passing the list of URLs as the second argument to console.warn() and mov...
null
GoogleChrome__workbox__2400
GoogleChrome/workbox
2,400
defect
182554127ee86feccdc3f90172ee36278b603a09
305dcac6ad9f47754111376015f7cc52bbba2b5f
Fix/plugins workbox webpack plugin
Fixes #2376 *Description of what's changed/fixed.* The application of plugins is now a separate step, making sure that childCompiler is aware of the necessary changes before the plugins are applied
diff --git a/package-lock.json b/package-lock.json index 6e6f289224..934660062c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10078,7 +10078,7 @@ }, "html-webpack-plugin": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.t...
3
3
1
[{"id": "G0", "claim": "Change the new test file's copyright header year from 2018 to 2020.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Replace `globby(outputDir)` with `globby('**', {cwd: outputDir})` so the new test works on Windows.", "categ...
null
GoogleChrome__workbox__2532
GoogleChrome/workbox
2,532
defect
05e6bd631b9cd239b8e44eeff132533430e668cb
111f5ea8449a9dfe8dedb6e630d6d0dfe46c920f
Ignore fbclid by default when matching precached URLs
R: @philipwalton Fixes #2417 This adds `fbclid` to the default list of URL query parameters that should be ignored when matching against precached URLs.
diff --git a/packages/workbox-build/src/generate-sw.js b/packages/workbox-build/src/generate-sw.js index 3856b69158..9a2516ba39 100644 --- a/packages/workbox-build/src/generate-sw.js +++ b/packages/workbox-build/src/generate-sw.js @@ -88,7 +88,7 @@ const writeServiceWorkerUsingDefaultTemplate = * definition of `stric...
1
1
1
[{"id": "G0", "claim": "The test URL `index.html?^fbclid$=test` (and the same on line 63) wrongly contains the `^` and `$` RegExp anchor characters, so the test never exercises the actual fbclid query parameter, and the tests should additionally check the inverse, that a non-matching fbclid URL is requested from the ne...
null
GoogleChrome__workbox__261
GoogleChrome/workbox
261
defect
0c7b21c54158338960d5ad2fbf2a3b432b6e49c3
f51d2746f27f45a5e4db45a9151e4d58cfaa2e00
Support for a function as a Route's handler
R: @addyosmani @gauntface Fixes #231
diff --git a/packages/sw-routing/demo/service-worker.js b/packages/sw-routing/demo/service-worker.js index a9ffcc05e3..7bcf37f065 100755 --- a/packages/sw-routing/demo/service-worker.js +++ b/packages/sw-routing/demo/service-worker.js @@ -16,11 +16,9 @@ self.addEventListener('activate', (event) => { const route = ne...
2
2
1
[{"id": "G0", "claim": "Swap the JSDoc handler type union from `Object|function` to `function|Object` (and reorder the comment accordingly), since function will be the preferred form.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Add end-to-end t...
null
GoogleChrome__workbox__2766
GoogleChrome/workbox
2,766
defect
a2f373ece2bf5c72a7177e2e461368acbb7df361
9792f02fb3b0b45c31c33775d4f0000dbf89edbe
[Fix] (Workbox wizard) Manually enter the path of the web app root and unselectable separator
Fixes *#2764* R: @jeffposnick @philipwalton ### Changes * Fixed error thrown during the workbox wizard regarding the web application root directory prompt (first question) when `Manually enter path` option is chosen, * Made the separator unselectable, * Extended upon the existing unit tests regarding this func...
diff --git a/packages/workbox-cli/src/lib/questions/ask-root-of-web-app.ts b/packages/workbox-cli/src/lib/questions/ask-root-of-web-app.ts index 528818f9f0..a6cfdf265e 100644 --- a/packages/workbox-cli/src/lib/questions/ask-root-of-web-app.ts +++ b/packages/workbox-cli/src/lib/questions/ask-root-of-web-app.ts @@ -17,8 ...
1
1
0
[{"id": "G0", "claim": "Rename the variables `question_rootDirectory` and `question_manualInput` (and their uses) to camelCase, e.g. `questionRootDirectory`, to match the project's variable naming pattern.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__391
GoogleChrome/workbox
391
defect
57ce2474fffe10e94eaa6770873db6e39c5b8aad
04934a6e604e5c44c67c43565a8440ceedc63ae5
Refactor the CacheableResponsePlugin to a separate class
R: @addyosmani @gauntface This is part of #282, in which the Plugin classes are refactored to extend a base class, and expose the lifecycle methods. In addition to refactoring, it also adds tests, as this module was previously untested.
diff --git a/packages/sw-cacheable-response/src/index.js b/packages/sw-cacheable-response/src/index.js index 8c4f614322..8a73fa1f75 100644 --- a/packages/sw-cacheable-response/src/index.js +++ b/packages/sw-cacheable-response/src/index.js @@ -43,6 +43,10 @@ * @module sw-cacheable-response */ -import Plugin from '...
2
2
0
[{"id": "G0", "claim": "Make the `packageName` constant in test/automated-test-suite.js upper case.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Make the test constants (validStatus, invalidStatus, statuses, headers) upper case in test/sw/cach...
null
GoogleChrome__workbox__431
GoogleChrome/workbox
431
defect
2c365cbc62e772ba6918f0f6c9a1a8cc78ab16db
d7ea6f71d9fee05a86a65c567f4d694b2f34a78f
Save plugin references and call methods on them
R: @addyosmani @gauntface I'm addressing some of the feedback from https://github.com/GoogleChrome/sw-helpers/pull/399 out of band, as it extends past the boundaries of that PR. This moves away from `RequestWrapper` saving and then invoking references to the bound functions exposed by plugins, and instead saves r...
diff --git a/packages/sw-lib/test/sw/caching-strategies.js b/packages/sw-lib/test/sw/caching-strategies.js index bf5184eb0b..ba58d3052c 100644 --- a/packages/sw-lib/test/sw/caching-strategies.js +++ b/packages/sw-lib/test/sw/caching-strategies.js @@ -74,8 +74,8 @@ describe('Test caching strategies.', function() { ...
3
1
0
[{"id": "G0", "claim": "Throw the multiple-cacheWillUpdate / multiple-cacheWillMatch plugin error while the plugins are being added, instead of adding them first and throwing afterwards.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Capture the plugin a...
null
GoogleChrome__workbox__439
GoogleChrome/workbox
439
defect
75bf4e6a7295885bcafa71b9d8a51a1b033f56a3
6da247df2763cea7d476b59a00f2c258a6fe3260
adding replay All functionality
R: @jeffposnick @addyosmani @gauntface *Description of what's changed/fixed.* This adds `replayAll` method to instances of backgroundSyncQueue I have also added the same in example `sw.js`
diff --git a/packages/sw-background-sync-queue/demo/sw.js b/packages/sw-background-sync-queue/demo/sw.js index 6d42017533..e76cc10c53 100644 --- a/packages/sw-background-sync-queue/demo/sw.js +++ b/packages/sw-background-sync-queue/demo/sw.js @@ -28,12 +28,17 @@ let bgQueue = new goog.backgroundSyncQueue.BackgroundSync...
2
2
0
[{"id": "G0", "claim": "The indentation of the newly added line in the test file is off and should be corrected.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The author should double-check that these indentation changes are not caught by linti...
null
GoogleChrome__workbox__450
GoogleChrome/workbox
450
defect
75bf4e6a7295885bcafa71b9d8a51a1b033f56a3
30db11e52a0ca9acfab036deebc8112b01723d49
Webpack bug fix
R: @jeffposnick @addyosmani @gauntface current webpack plugin implemation pointed towards the source code of other plugin and also used the relative key from webpack config instead of absolute one.
diff --git a/packages/sw-background-sync-queue/demo/sw.js b/packages/sw-background-sync-queue/demo/sw.js index 6d42017533..e76cc10c53 100644 --- a/packages/sw-background-sync-queue/demo/sw.js +++ b/packages/sw-background-sync-queue/demo/sw.js @@ -28,12 +28,17 @@ let bgQueue = new goog.backgroundSyncQueue.BackgroundSync...
1
1
0
[{"id": "G0", "claim": "The pull request includes commits for the separate Background Sync Queue issue, and only commits related to the Webpack change should be included - the unrelated change should be dropped from this PR.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__452
GoogleChrome/workbox
452
defect
7b5fca580e58f3e4b65f03d16d89396cbd36fe40
c6836798034a7f1a756b98dd0b3008ec77e63f86
Support for a BroadcastCacheUpdate plugin for precached() assets
R: @addyosmani @gauntface Fixes #309, fixes #441 This adds support for a `BroadcastCacheUpdates` plugin that's enabled by default in `SWLib`, and announces when previously cached resources are updated. I had to account for the fact that `precache()` might append a cache-busting URL parameter when retrieving re...
diff --git a/packages/sw-broadcast-cache-update/src/lib/broadcast-cache-update-plugin.js b/packages/sw-broadcast-cache-update/src/lib/broadcast-cache-update-plugin.js index 981e14992c..fb52290651 100644 --- a/packages/sw-broadcast-cache-update/src/lib/broadcast-cache-update-plugin.js +++ b/packages/sw-broadcast-cache-u...
1
1
0
[{"id": "G0", "claim": "The SWLib constructor option should be named precacheChannelName instead of precacheUpdatesChannel.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__461
GoogleChrome/workbox
461
defect
5d0a3bdf9c27d657e02771f8a96406d09e393e01
27418c40d322215358b1884f3ce86d50befd32ec
Throw an error if a glob pattern doesn't match anything
R: @addyosmani @gauntface Fixes #449
diff --git a/packages/sw-build/src/lib/errors.js b/packages/sw-build/src/lib/errors.js index 8fa7f9ad96..22c9db8776 100644 --- a/packages/sw-build/src/lib/errors.js +++ b/packages/sw-build/src/lib/errors.js @@ -65,4 +65,6 @@ module.exports = { `of 'swlib.precache([])' in your service worker file.`, 'populating...
1
1
1
[{"id": "G0", "claim": "The newly added useless-glob-pattern error should stringify globDirectory instead of the out-of-scope rootDirectory variable.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
GoogleChrome__workbox__491
GoogleChrome/workbox
491
defect
fe243fd480e58cfdfbae8f863c8ab23fdcf5c599
afd0a3b821449f03d1265cbb31cf1551e6b5e3ac
Dont cache bust urls
R: @jeffposnick @addyosmani Adds dontCacheBustURLsMatching parameter
diff --git a/packages/sw-build/src/lib/generate-sw.js b/packages/sw-build/src/lib/generate-sw.js index 0a6d279948..a167d649a0 100644 --- a/packages/sw-build/src/lib/generate-sw.js +++ b/packages/sw-build/src/lib/generate-sw.js @@ -55,6 +55,9 @@ const errors = require('./errors'); * @param {number} [input.maximumFileS...
1
1
0
[{"id": "G0", "claim": "The JSDoc type for input.dontCacheBustUrlsMatching should be spelled RegExp (the JavaScript class name), not Regex or Regexp, in both generate-sw.js and get-file-manifest-entries.js.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__493
GoogleChrome/workbox
493
defect
fe243fd480e58cfdfbae8f863c8ab23fdcf5c599
872ade1b764c2d5bd0ac30a9dfd3ae28be3c11e7
Runtimecaching
R: @jeffposnick @addyosmani runtimeCaching parameter.
diff --git a/packages/sw-build/src/lib/errors.js b/packages/sw-build/src/lib/errors.js index 13b6ed337f..24de1e477e 100644 --- a/packages/sw-build/src/lib/errors.js +++ b/packages/sw-build/src/lib/errors.js @@ -69,4 +69,6 @@ module.exports = { `Please remove of fix the following: `, 'bad-template-urls-asset': `...
1
1
0
[{"id": "G0", "claim": "Add a JSDoc comment for the runtimeCaching input validation added in generate-sw.js.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__498
GoogleChrome/workbox
498
defect
88e3520dec33415424d1ec9f3cf1356369c51009
f2b16c80bc7f3cb4de9637e192635839f9fbc346
Adding ignoreUrlParamsMatching to sw-lib
R: @jeffposnick @addyosmani This just adds the logic to sw-lib, will hook up with sw-build in a seperate PR. @jeffposnick could you check my logic isn't crazy different from yours in sw-precache.
diff --git a/packages/sw-lib/src/lib/sw-lib.js b/packages/sw-lib/src/lib/sw-lib.js index 722ec1a881..8c06821e44 100644 --- a/packages/sw-lib/src/lib/sw-lib.js +++ b/packages/sw-lib/src/lib/sw-lib.js @@ -49,10 +49,14 @@ class SWLib { * plugin sends a message whenever a precached URL is updated. To disable this *...
1
1
0
[{"id": "G0", "claim": "The JSDoc for the ignoreUrlParametersMatching parameter reads 'An of regex's', missing the word 'array', in both _getCacheMatchPlugin and _removeIgnoreUrlParams.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__528
GoogleChrome/workbox
528
defect
7c2d645de6347b67928abf95d61ee02eb532875a
4600fda26f8543766cd6b0bb51c24b5a7b0b971d
Adding checks for dependencies and marking as required
R: @jeffposnick @addyosmani Fixes #527 fs-extra is required but marked as devDep. Added some more tests to dependency checks unit tests to guard against this in the future.
diff --git a/packages/sw-build-webpack-plugin/package.json b/packages/sw-build-webpack-plugin/package.json index 7bf20e2011..5cebeea36b 100644 --- a/packages/sw-build-webpack-plugin/package.json +++ b/packages/sw-build-webpack-plugin/package.json @@ -24,9 +24,6 @@ "dependencies": { "sw-build": "^0.0.25" }, -...
1
1
1
[{"id": "G0", "claim": "The new 'should have no devDependencies' tests guard with `pkg.devDependencies && pkg.devDependencies > 0`, which compares the devDependencies object to 0 so the throw is unreachable, and the condition should be `Object.keys(pkg.devDependencies).length > 0` instead.", "category": "correctness", ...
null
GoogleChrome__workbox__589
GoogleChrome/workbox
589
defect
e09b8c8c5d80e08fb4a424360ad8f92b74d4951f
d62c7035ba0da6f7c532bdbd8e9310c904a84ea3
Fix for #560 leading slash added to files in manifest
R: @jeffposnick @addyosmani @gauntface Fixes #560 *Description of what's changed/fixed.* Removed the leading slash being added to the files in the manifest for caching. Also updated the test cases for the same. *Please ensure that `gulp lint test` passes locally prior to filing a PR!* Unable to test since...
diff --git a/packages/workbox-build/src/lib/utils/filter-files.js b/packages/workbox-build/src/lib/utils/filter-files.js index 5b9e93de70..812c2935d3 100644 --- a/packages/workbox-build/src/lib/utils/filter-files.js +++ b/packages/workbox-build/src/lib/utils/filter-files.js @@ -22,9 +22,6 @@ module.exports = (fileDetai...
2
2
2
[{"id": "G0", "claim": "Templated URLs should support both with and without a leading slash instead of the change forcing them to be relative.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The forward slash prepended to expected files in fake-run-and-co...
null
GoogleChrome__workbox__590
GoogleChrome/workbox
590
defect
e09b8c8c5d80e08fb4a424360ad8f92b74d4951f
11419abfd9821b33d75fdf4b9cf93d6fc2dd24c5
More robust runtimeCaching conversion.
R: @addyosmani @gauntface Fixes #574 This should give us parity with the full set of options that `runtimeCaching` in `sw-precache` supported.
diff --git a/packages/workbox-build/src/lib/errors.js b/packages/workbox-build/src/lib/errors.js index 72ddbf48bd..7ee1ccf506 100644 --- a/packages/workbox-build/src/lib/errors.js +++ b/packages/workbox-build/src/lib/errors.js @@ -75,4 +75,10 @@ module.exports = { `staticFileGlobs are set. Please fully migrate to ...
2
2
0
[{"id": "G0", "claim": "Using `delete` on effectiveOptions.cache will likely cause V8 deopts, and assigning `undefined` instead would be just as effective for the JSON output.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A comment should be added ...
null
GoogleChrome__workbox__633
GoogleChrome/workbox
633
defect
15c5f3bb29cca85309831a43a51d87bbd2c04f17
e2a6ba61517229bec818eb2c4020bff7a951fd85
Strips the hash from a URL in a couple of places
R: @addyosmani @gauntface The discussion in #488 talked about putting as much of the logic as possible inside reusable plugins; some of the logic that was changed in this PR is inside the `CacheExpiration` plugin. However, there's no concept of plugins for routing (only for request handlers), and we needed to adj...
diff --git a/packages/workbox-cache-expiration/src/lib/cache-expiration.js b/packages/workbox-cache-expiration/src/lib/cache-expiration.js index a9294b3a7f..0a5901e223 100644 --- a/packages/workbox-cache-expiration/src/lib/cache-expiration.js +++ b/packages/workbox-cache-expiration/src/lib/cache-expiration.js @@ -187,1...
1
1
0
[{"id": "G0", "claim": "The comment in the route match should state the actual problem being referenced (issue 488) instead of only linking to it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleChrome__workbox__664
GoogleChrome/workbox
664
defect
20c9da05294cbe8569f3b8e4a82683f197db41fd
8873690cb3a67aaf4742214d0f37bc8b2b04fa9e
Adds support for manifestTransforms
R: @addyosmani @gauntface Fixes #626 This is based on the discussion from #626 + some follow-up meetings. It adds support for a new `manifestTransforms` option to `workbox-build`, which takes one or more `ManifestTransform` functions as a parameter. This opens the door for doing post-processing of the manifest...
diff --git a/packages/workbox-build/src/lib/errors.js b/packages/workbox-build/src/lib/errors.js index 347b1437ff..74f33dad7f 100644 --- a/packages/workbox-build/src/lib/errors.js +++ b/packages/workbox-build/src/lib/errors.js @@ -33,6 +33,8 @@ module.exports = { 'object', 'invalid-glob-directory': 'The supplie...
7
6
3
[{"id": "G0", "claim": "The revision property of a manifest entry should be required to be a string with at least one character (with the key deleted rather than set falsey), because accepting any falsey value invites silent mistakes in user code that produce unexpected behavior.", "category": "design", "verdict": "sup...
null
GoogleChrome__workbox__666
GoogleChrome/workbox
666
defect
e49f3aa9233169376a06c2503955fbbacce48a49
ac3d74aa04df8ba192a189a4aef3acf7c4ea24e5
Background sync queue callbacks
R: @jeffposnick @prateekbh Fixes #646 This PR updates the background sync queue callbacks to address the issues brought up in #646. Here's what's changed: - renamed: `onResponse` => `replayDidSucceed` - renamed: `onRetryFailure ` => `replayDidFail` - added: `requestWillEnqueue` - added: `requestWillDequeue...
diff --git a/lib/deprecate.js b/lib/deprecate.js new file mode 100644 index 0000000000..d4ce14aa16 --- /dev/null +++ b/lib/deprecate.js @@ -0,0 +1,33 @@ +/* + Copyright 2017 Google Inc. All Rights Reserved. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in complianc...
5
4
1
[{"id": "G0", "claim": "Make the calls to deprecate conditional, so each one only runs when the corresponding old callback (onResponse / onRetryFailure) is actually set.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The @return JSDoc on getRequestF...
null
GoogleChrome__workbox__752
GoogleChrome/workbox
752
defect
4daf32ff7e06a4b27f94679d7b1047a8e8f527bc
dc4b1bbf1d93d1474a493ceb4959818b5210aced
No longer register a fetch handler for each Router by default
R: @addyosmani @gauntface CC: @jakearchibald @surma Fixes #721 This changes the default behavior of `Router`, as discussed in the proposal.
diff --git a/packages/workbox-precaching/test/static/routing-demo/sw.js b/packages/workbox-precaching/test/static/routing-demo/sw.js index c1485fb745..28a65fa427 100644 --- a/packages/workbox-precaching/test/static/routing-demo/sw.js +++ b/packages/workbox-precaching/test/static/routing-demo/sw.js @@ -26,6 +26,7 @@ con...
8
7
1
[{"id": "G0", "claim": "addFetchListener() does not guard against being called more than once and should detect an earlier call and warn/return early (the reviewers agreed it should prevent the listener being registered multiple times and report whether the call actually registered it).", "category": "correctness", "ve...
null
GoogleChrome__workbox__789
GoogleChrome/workbox
789
defect
012c028ee4af5a2e6fa4cad1e490215ef81ff3b8
a56ad1ceca1b6164ccab7e9983f9407ab94ca64e
Warn about options that are invalid for a given workbox-build mode
R: @addyosmani @gauntface Fixes #708 The decision reached in that issue was to log a warning, but not fail the build.
diff --git a/packages/workbox-build/src/lib/generate-file-manifest.js b/packages/workbox-build/src/lib/generate-file-manifest.js index d7d752c81e..75c2573f8a 100644 --- a/packages/workbox-build/src/lib/generate-file-manifest.js +++ b/packages/workbox-build/src/lib/generate-file-manifest.js @@ -1,8 +1,13 @@ 'use strict...
3
2
0
[{"id": "G0", "claim": "Use Array.prototype.includes() instead of blacklist.indexOf(configKey) !== -1 in the filter.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Rename the variable invalidConfig to invalidConfigKeys, which reads better in the l...
null
GoogleChrome__workbox__81
GoogleChrome/workbox
81
defect
879e12ea729e49abd30c0dcc2ac371b407f06775
aa0eadfe8610becca3adcf987c84061f474b8770
Adding the start of a CLI tool. No logic at the moment
R: @jeffposnick @addyosmani Super early and small PR for the CLI / Module piece. Has no logic other than showing help / version text. But comments on general structure and testing approach would be appreciated.
diff --git a/packages/sw-cli/.eslintrc b/packages/sw-cli/.eslintrc new file mode 100644 index 0000000000..c856b3552a --- /dev/null +++ b/packages/sw-cli/.eslintrc @@ -0,0 +1,5 @@ +{ + "parserOptions": { + "sourceType": "module", + } +} diff --git a/packages/sw-cli/build.js b/packages/sw-cli/build.js new file mode ...
2
2
0
[{"id": "G0", "claim": "Add an `engines` field to packages/sw-cli/package.json specifying the minimum node version required (at least 4.0), since the library uses Promises.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The handleCommand switch ap...
null
GoogleChrome__workbox__84
GoogleChrome/workbox
84
defect
564ba5f293b0dd797a88e34d5a5ad6a9df76e3e3
3e6257af61f06b1fb120af5e0d2002ceca4a1034
Adding matrix to travis
R: @jeffposnick @addyosmani This is the first step in fixing the remaining issues on: #48 > I believe we currently only display a single build status for our CI for the overall repo. I'd like to suggest we also include badges for individual projects in the README so folks can instantly tell what is green and what...
diff --git a/.travis.yml b/.travis.yml index ec3e91a247..733882c9af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,20 @@ language: node_js node_js: - 'stable' +env: + # Keep star at top so it runs first - it'll be the longest task + - PROJECT="*" + - PROJECT="sw-appcache-behavior" + - PROJECT="sw-backg...
2
2
0
[{"id": "G0", "claim": "Now that all individual projects are listed in the matrix, the `PROJECT=\"*\"` entry adds no value and means everything is run twice, so it should be removed.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Each project run sp...
null
GoogleChrome__workbox__847
GoogleChrome/workbox
847
defect
2ce5fdef2fae9ed5a18e3667da2c29da78c2274f
c834df5368ecb6fd342a0a90a03f50db5c788438
V3 integration test start
R: @jeffposnick @philipwalton Far from perfect, but a start. Just wanted early feedback at the moment.
diff --git a/gulp-tasks/test-integration.js b/gulp-tasks/test-integration.js new file mode 100644 index 0000000000..cd297c3048 --- /dev/null +++ b/gulp-tasks/test-integration.js @@ -0,0 +1,116 @@ +const gulp = require('gulp'); +const oneLine = require('common-tags').oneLine; +const glob = require('glob'); +const seleni...
2
1
0
[{"id": "G0", "claim": "The ['dev', 'production'] node-env list in runIntegrationForBrowser should be read from gulp-tasks/utils/constants.js so it cannot drift out of sync with the rest of the build.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"...
null
GoogleChrome__workbox__973
GoogleChrome/workbox
973
defect
7ea862d1f1701c4539289004b4fff316f217af7d
f64d72ea50b847598afb8d2b00c31ca5104ecb21
Make generateSW() copy a larger set of libraries
R: @addyosmani @gauntface This updates the `workbox-build.generateSW()` behavior so that when `importWorkboxFromCDN` is false, all(*) of the Workbox libraries (both `dev` and `prod` builds, including the sourcemaps) are copied over to the output directory, instead of just the `workbox-sw` library. There are some ...
diff --git a/packages/workbox-build/package-lock.json b/packages/workbox-build/package-lock.json index 878ffad3a1..2886c04056 100644 --- a/packages/workbox-build/package-lock.json +++ b/packages/workbox-build/package-lock.json @@ -187,11 +187,6 @@ "resolved": "https://registry.npmjs.org/universalify/-/universali...
7
6
0
[{"id": "G0", "claim": "generate-sw.js should not hardcode the workbox-sw filename (WORKBOX_SW_FILENAME); it should take the name from the workbox-sw package's package.json browser field.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tests should cover ...
null
GoogleCloudDataproc__hadoop-connectors__1103
GoogleCloudDataproc/hadoop-connectors
1,103
defect
7b1fc80a9467bd2d73320637aaeafc13e12eade0
b96fd31a88effa9098ce9015ece1e3a83330a8da
GCS Specific Metrics
Added GCS Connector Specific Metrics : 1. gcs_client_side_error_count : Counts the occurrence of client side error status code 2. gcs_server_side_error_count: Counts the occurrence of server side error status code 3. gcs_client_rate_limit_count: Counts the occurrence of 429 status code 4. gcs_total_request_count: C...
diff --git a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GhfsStatistic.java b/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GhfsStatistic.java index c9f264e7d8..888d703c4c 100644 --- a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GhfsStatistic.java +++ b/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/Ghfs...
2
1
0
[{"id": "G0", "claim": "The new private increment(GoogleCloudStorageStatistics) method should not return a value, since nothing uses the returned count.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "postOnException should not post a dummy exception to t...
null
GoogleCloudDataproc__hadoop-connectors__1294
GoogleCloudDataproc/hadoop-connectors
1,294
defect
d33694c3ffb81530a2fef9c691c2bbc329734e92
187531d46432d9f0f7f8b3f94ddaafdff5bdd403
Make {Read,Write}Options-parsing methods public
👋 I'm an Apache Beam user who recently contributed [this](https://github.com/apache/beam/pull/32769) PR to allow users to pass in custom StorageReadOptions to a Beam Pipeline. However, I don't have an easy way to construct these options from my `Configuration` objects. I'm proposing to make this method public in gcs-c...
diff --git a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemConfiguration.java b/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemConfiguration.java index 612df6c52f..4ab9c6ac88 100644 --- a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemConfiguratio...
2
2
2
[{"id": "G0", "claim": "Since these methods are now a public API, they should have a javadoc comment.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Explicit unit tests are required to validate the behavior of these two methods.", "category": "tes...
null
GoogleCloudDataproc__hadoop-connectors__1299
GoogleCloudDataproc/hadoop-connectors
1,299
defect
ebdc815dea4d9d07f072c82477e9cdae6e34051f
91958a49048f0cb8aa37e4824bb2c89b2410d2ac
Add support for tracking Hadoop and GCS API level metrics at a thread…
… level GCS APIs which are called from a thread different the thre which called the Hadoop API is not captured. This will be fixed in a later change
diff --git a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GhfsGlobalStorageStatistics.java b/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GhfsGlobalStorageStatistics.java index 915efe8bda..bfce618640 100644 --- a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GhfsGlobalStorageStatistics.java +++ b/gcs/src/mai...
9
6
0
[{"id": "G0", "claim": "The new import block in GhfsThreadLocalStatistics.java should not use a wildcard (`import java.util.*`).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "NAME could be set via getClass().getName() instead of the hard-coded ...
null
GoogleCloudDataproc__hadoop-connectors__1353
GoogleCloudDataproc/hadoop-connectors
1,353
defect
95f39f573c8edf1ac51c8f716c207e0b246e50cf
0ffb875e68a7ee2ec4fa8a8b8943ae6c20006c7c
Export logs to Cloud logging by enabling a flag
1. Create a new hadoop configuration flag `fs.gs.cloud.logging.enable` to export connector logs to Cloud logging. 2. Create a logging interceptor extending Handler which creates a Google cloud logging client using provided credentials, intercepts all logs, creates a log entry and published it to Google cloud logging. ...
diff --git a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystem.java b/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystem.java index cdd8ed45a9..c5215df54d 100644 --- a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystem.java +++ b/gcs/src/main/java/com/goog...
5
4
1
[{"id": "G0", "claim": "The fs.gs.cloud.logging.enable entry in the expected-configuration map should be placed in sorted order like the other config entries.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The gcs-connector log name prefix strin...
null
GoogleCloudDataproc__hadoop-connectors__1362
GoogleCloudDataproc/hadoop-connectors
1,362
defect
7f5f6bbb12eff18714dca88b511613819d832965
eb0246f33df9701b6ea7b5235c77c35e92a975a1
Prefix invocationId to logs to track connector request flow
Prefix invocationId to logs to track connector request flow across different components. - Create a thread local variable invocationId using uuid which is inherited by child threads. - Set this thread local variable at the start of connector API calls. - Same invocation Id is used in trace logs and HTTP requests ...
diff --git a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystem.java b/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystem.java index cdd8ed45a9..85aa418a65 100644 --- a/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystem.java +++ b/gcs/src/main/java/com/goog...
11
8
3
[{"id": "G0", "claim": "Public APIs call setInvocationId() directly even though trackDurationWithTracing already sets it, so the direct calls are redundant and should be removed, leaving the ID set only in trackDurationWithTracing.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}...
null
GoogleCloudDataproc__hadoop-connectors__1363
GoogleCloudDataproc/hadoop-connectors
1,363
defect
eb616754400d7870c4488f642ca096ca64f6cfb2
1766358063b8589815be6cccee52c7b44facbb04
Fix(gcs): Prevent Hadoop directory copy failures by correctly setting generation ID preconditions
Root Cause : In `gRPC` copy we have precontiion check for [generation matching](https://github.com/GoogleCloudDataproc/hadoop-connectors/blob/7f5f6bbb12eff18714dca88b511613819d832965/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageClientReadChannel.java#L581) while in JSON [`copy`](https://github.co...
diff --git a/gcs/src/test/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemJavaStorageClientIntegrationTest.java b/gcs/src/test/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemJavaStorageClientIntegrationTest.java index 17dfd73400..37c89c2f28 100644 --- a/gcs/src/test/java/com/google/cloud/hadoop/fs/...
5
4
2
[{"id": "G0", "claim": "Removing the @Ignore'd testRenameWithMoveOperation test is unrelated to this PR's purpose and should not be part of it.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The added tests only cover the gRPC read channel; tests for the...
null