Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(service-worker): remove service-worker gatherer #15942

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ const defaultConfig = {
{id: 'OptimizedImages', gatherer: 'dobetterweb/optimized-images'},
{id: 'ResponseCompression', gatherer: 'dobetterweb/response-compression'},
{id: 'RobotsTxt', gatherer: 'seo/robots-txt'},
{id: 'ServiceWorker', gatherer: 'service-worker'},
{id: 'Scripts', gatherer: 'scripts'},
{id: 'SourceMaps', gatherer: 'source-maps'},
{id: 'Stacks', gatherer: 'stacks'},
Expand Down
52 changes: 0 additions & 52 deletions core/gather/driver/service-workers.js

This file was deleted.

32 changes: 0 additions & 32 deletions core/gather/gatherers/service-worker.js

This file was deleted.

2 changes: 1 addition & 1 deletion core/test/audits/mainthread-work-breakdown-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Performance: page execution timings audit', () => {
};
});

it('should compute the correct pageExecutionTiming values for the pwa trace', async () => {
it('should compute the correct pageExecutionTiming values for the trace', async () => {
const artifacts = {
traces: {defaultPass: acceptableTrace},
devtoolsLogs: {defaultPass: acceptableDevtoolsLog},
Expand Down
87 changes: 0 additions & 87 deletions core/test/gather/driver/service-workers-test.js

This file was deleted.

50 changes: 0 additions & 50 deletions core/test/gather/gatherers/service-worker-test.js

This file was deleted.

4 changes: 0 additions & 4 deletions core/test/results/artifacts/artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -12680,10 +12680,6 @@
}
}
},
"ServiceWorker": {
"versions": [],
"registrations": []
},
"Inputs": {
"inputs": [
{
Expand Down
5 changes: 0 additions & 5 deletions core/test/runner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ await td.replaceEsm('../lib/asset-saver.js', {
loadArtifacts: loadArtifactsSpy = jestMock.fn((...args) => assetSaver.loadArtifacts(...args)),
});

await td.replaceEsm('../gather/driver/service-workers.js', {
getServiceWorkerVersions: jestMock.fn().mockResolvedValue({versions: []}),
getServiceWorkerRegistrations: jestMock.fn().mockResolvedValue({registrations: []}),
});

// Some imports needs to be done dynamically, so that their dependencies will be mocked.
// https://github.com/GoogleChrome/lighthouse/blob/main/docs/hacking-tips.md#mocking-modules-with-testdouble
const {Runner} = await import('../runner.js');
Expand Down
1 change: 0 additions & 1 deletion core/test/scripts/run-mocha-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const testsToIsolate = new Set([
'core/test/user-flow-test.js',
'core/test/gather/driver/prepare-test.js',
'core/test/gather/gatherers/link-elements-test.js',
'core/test/gather/gatherers/service-worker-test.js',
'core/test/runner-test.js',

// grep -lRE --include='-test.js' 'mockDriverSubmodules|mockRunnerModule|mockDriverModule|mockDriverSubmodules|makeMocksForGatherRunner' --include='*-test.*' --exclude-dir=node_modules
Expand Down
2 changes: 1 addition & 1 deletion report/renderer/report-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class ReportRenderer {
* @return {!DocumentFragment[]}
*/
_renderScoreGauges(report, categoryRenderer, specificCategoryRenderers) {
// Group gauges in this order: default, pwa, plugins.
// Group gauges in this order: default, plugins.
const defaultGauges = [];
const pluginGauges = [];

Expand Down
2 changes: 1 addition & 1 deletion report/test/renderer/report-renderer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('ReportRenderer', () => {
assert.ok(output.querySelector('.lh-report'), 'has report body');
// 3 sets of gauges - one in sticky header, one in scores header, and one in each section.
// eslint-disable-next-line max-len
assert.equal(output.querySelectorAll('.lh-gauge__wrapper, .lh-gauge--pwa__wrapper, .lh-exp-gauge__wrapper').length,
assert.equal(output.querySelectorAll('.lh-gauge__wrapper, .lh-exp-gauge__wrapper').length,
Object.keys(sampleResults.categories).length * 3, 'renders category gauges');
});

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"core/test/gather/gatherers/offline-test.js",
"core/test/gather/gatherers/runtime-exceptions-test.js",
"core/test/gather/gatherers/seo/font-size-test.js",
"core/test/gather/gatherers/service-worker-test.js",
"core/test/gather/gatherers/source-maps-test.js",
"core/test/gather/gatherers/stack-collector-test.js",
"core/test/gather/gatherers/start-url-test.js",
Expand Down
2 changes: 0 additions & 2 deletions types/artifacts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
RobotsTxt: {status: number|null, content: string|null, errorMessage?: string};
/** The result of calling the shared trace engine root cause analysis. */
RootCauses: Artifacts.TraceEngineRootCauses;
/** Version information for all ServiceWorkers active after the first page load. */
ServiceWorker: {versions: Crdp.ServiceWorker.ServiceWorkerVersion[], registrations: Crdp.ServiceWorker.ServiceWorkerRegistration[]};
/** Source maps of scripts executed in the page. */
SourceMaps: Array<Artifacts.SourceMap>;
/** Information on detected tech stacks (e.g. JS libraries) used by the page. */
Expand Down
Loading