Skip to content

Commit 0c7bef7

Browse files
brendankennypaulirish
authored andcommitted
rename gatherer base class to gatherer
1 parent 35d0360 commit 0c7bef7

20 files changed

+45
-42
lines changed

lighthouse-core/gather/gatherers/accessibility.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/* global document, __returnResults */
2020

21-
const Gather = require('./gather');
21+
const Gatherer = require('./gatherer');
2222
const fs = require('fs');
2323
const axe = fs.readFileSync(
2424
require.resolve('axe-core/axe.min.js')
@@ -33,7 +33,7 @@ function runA11yChecks() {
3333
});
3434
}
3535

36-
class Accessibility extends Gather {
36+
class Accessibility extends Gatherer {
3737
static _errorAccessibility(errorString) {
3838
return {
3939
raw: undefined,

lighthouse-core/gather/gatherers/cache-contents.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/* global __returnResults, caches */
2020

21-
const Gather = require('./gather');
21+
const Gatherer = require('./gatherer');
2222

2323
// This is run in the page, not Lighthouse itself.
2424
/* istanbul ignore next */
@@ -47,7 +47,7 @@ function getCacheContents() {
4747
});
4848
}
4949

50-
class CacheContents extends Gather {
50+
class CacheContents extends Gatherer {
5151
static _error(errorString) {
5252
return {
5353
raw: undefined,

lighthouse-core/gather/gatherers/content-width.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
'use strict';
1818

19-
const Gather = require('./gather');
19+
const Gatherer = require('./gatherer');
2020

2121
/* global window, __returnResults */
2222

@@ -30,7 +30,7 @@ function getContentWidth() {
3030
});
3131
}
3232

33-
class ContentWidth extends Gather {
33+
class ContentWidth extends Gatherer {
3434

3535
afterPass(options) {
3636
const driver = options.driver;

lighthouse-core/gather/gatherers/critical-request-chains.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
'use strict';
1919

20-
const Gather = require('./gather');
20+
const Gatherer = require('./gatherer');
2121
const WebInspector = require('../../lib/web-inspector');
2222

2323
const includes = (arr, elm) => arr.indexOf(elm) > -1;
2424

25-
class CriticalRequestChains extends Gather {
25+
class CriticalRequestChains extends Gatherer {
2626

2727
/**
2828
* For now, we use network priorities as a proxy for "render-blocking"/critical-ness.

lighthouse-core/gather/gatherers/gather.js renamed to lighthouse-core/gather/gatherers/gatherer.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
*/
1717
'use strict';
1818

19-
class Gather {
19+
/**
20+
* Base class for all gatherers; defines pass lifecycle methods.
21+
*/
22+
class Gatherer {
2023

2124
constructor() {
2225
this.artifact = {};
@@ -45,4 +48,4 @@ class Gather {
4548

4649
}
4750

48-
module.exports = Gather;
51+
module.exports = Gatherer;

lighthouse-core/gather/gatherers/geolocation-on-start.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
'use strict';
1818

19-
const Gather = require('./gather');
19+
const Gatherer = require('./gatherer');
2020

2121
/**
2222
* @fileoverview Tests whether the page attempts to request geolocation on page load. This often
@@ -42,7 +42,7 @@ function collectGeoState() {
4242
__returnResults(window.__didNotCallGeo);
4343
}
4444

45-
class GeolocationOnStart extends Gather {
45+
class GeolocationOnStart extends Gatherer {
4646

4747
beforePass(options) {
4848
return options.driver.evaluateScriptOnLoad(`(${overrideGeo.toString()}())`);

lighthouse-core/gather/gatherers/html-without-javascript.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/* Note that this returns the innerText of the <body> element, not the HTML. */
2020

21-
const HTML = require('./html');
21+
const Gatherer = require('./gatherer');
2222

2323
/* global document, __returnResults */
2424

@@ -30,7 +30,7 @@ function getBodyText() {
3030
__returnResults(body ? body.innerText : '');
3131
}
3232

33-
class HTMLWithoutJavaScript extends HTML {
33+
class HTMLWithoutJavaScript extends Gatherer {
3434

3535
beforePass(options) {
3636
options.disableJavaScript = true;

lighthouse-core/gather/gatherers/html.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717
'use strict';
1818

19-
const Gather = require('./gather');
19+
const Gatherer = require('./gatherer');
2020

21-
class HTML extends Gather {
21+
class HTML extends Gatherer {
2222

2323
afterPass(options) {
2424
const driver = options.driver;

lighthouse-core/gather/gatherers/http-redirect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717
'use strict';
1818

19-
const Gather = require('./gather');
19+
const Gatherer = require('./gatherer');
2020

21-
class HTTPRedirect extends Gather {
21+
class HTTPRedirect extends Gatherer {
2222

2323
constructor() {
2424
super();

lighthouse-core/gather/gatherers/https.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717
'use strict';
1818

19-
const Gather = require('./gather');
19+
const Gatherer = require('./gatherer');
2020

21-
class HTTPS extends Gather {
21+
class HTTPS extends Gatherer {
2222

2323
constructor() {
2424
super();

0 commit comments

Comments
 (0)