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: remove fraggle-rock directory #14377

Merged
merged 6 commits into from
Sep 21, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
run: bash $GITHUB_WORKSPACE/core/scripts/download-chrome.sh && mv chrome-linux chrome-linux-tot

- run: sudo apt-get install xvfb
- name: yarn smoke --fraggle-rock
- name: yarn smoke --legacy-navigation
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive by

run: xvfb-run --auto-servernum yarn smoke --debug --legacy-navigation -j=2 --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL

# Fail if any changes were written to source files.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ accept your pull requests.

## Tracking Errors

We track our errors in the wild with Sentry. In general, do not worry about wrapping your audits or gatherers in try/catch blocks and reporting every error that could possibly occur; `core/runner.js` and `core/fraggle-rock/gather/*-runner.js` already catch and report any errors that occur while running a gatherer or audit, including errors fatal to the entire run. However, there are some situations when you might want to explicitly handle an error and report it to Sentry or wrap it to avoid reporting. Generally, you can interact with Sentry simply by requiring the `core/lib/sentry.js` file and call its methods. The module exports a delegate that will correctly handle the error reporting based on the user's opt-in preference and will simply no-op if they haven't so you don't need to check.
We track our errors in the wild with Sentry. In general, do not worry about wrapping your audits or gatherers in try/catch blocks and reporting every error that could possibly occur; `core/runner.js` and `core/gather/*-runner.js` already catch and report any errors that occur while running a gatherer or audit, including errors fatal to the entire run. However, there are some situations when you might want to explicitly handle an error and report it to Sentry or wrap it to avoid reporting. Generally, you can interact with Sentry simply by requiring the `core/lib/sentry.js` file and call its methods. The module exports a delegate that will correctly handle the error reporting based on the user's opt-in preference and will simply no-op if they haven't so you don't need to check.


#### If you have an expected error that is recoverable but want to track how frequently it happens, *use Sentry.captureException*.
Expand Down
2 changes: 1 addition & 1 deletion cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {generateConfig, generateLegacyConfig} from '../core/index.js';
import {askPermission} from './sentry-prompt.js';
import {LH_ROOT} from '../root.js';
import {Sentry} from '../core/lib/sentry.js';
import {getConfigDisplayString} from '../core/fraggle-rock/config/config.js';
import {getConfigDisplayString} from '../core/config/config.js';

const pkg = JSON.parse(fs.readFileSync(LH_ROOT + '/package.json', 'utf-8'));

Expand Down
2 changes: 1 addition & 1 deletion clients/devtools/devtools-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Buffer} from 'buffer';
import log from 'lighthouse-logger';

import lighthouse, {legacyNavigation} from '../../core/index.js';
import {navigation, startTimespan, snapshot} from '../../core/fraggle-rock/api.js';
import {navigation, startTimespan, snapshot} from '../../core/api.js';
import {RawConnection} from '../../core/legacy/gather/connections/raw.js';
import {lookupLocale} from '../../core/lib/i18n/i18n.js';
import {registerLocaleData, getCanonicalLocales} from '../../shared/localization/format.js';
Expand Down
4 changes: 2 additions & 2 deletions core/fraggle-rock/api.js → core/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {UserFlow, auditGatherSteps} from './user-flow.js';
import {snapshotGather} from './gather/snapshot-runner.js';
adamraine marked this conversation as resolved.
Show resolved Hide resolved
import {startTimespanGather} from './gather/timespan-runner.js';
import {navigationGather} from './gather/navigation-runner.js';
import {ReportGenerator} from '../../report/generator/report-generator.js';
import {Runner} from '../runner.js';
import {ReportGenerator} from '../report/generator/report-generator.js';
import {Runner} from './runner.js';

/**
* @param {LH.Puppeteer.Page} page
Expand Down
2 changes: 1 addition & 1 deletion core/config/config-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {Budget} from './budget.js';
import ConfigPlugin from './config-plugin.js';
import {Runner} from '../runner.js';
import * as i18n from '../lib/i18n/i18n.js';
import * as validation from '../fraggle-rock/config/validation.js';
import * as validation from './validation.js';
import {getModuleDirectory} from '../../esm-utils.js';

const require = createRequire(import.meta.url);
Expand Down
12 changes: 6 additions & 6 deletions core/fraggle-rock/config/config.js → core/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import path from 'path';

import log from 'lighthouse-logger';

import {Runner} from '../../runner.js';
import defaultConfig from '../../config/default-config.js';
import {defaultNavigationConfig, nonSimulatedPassConfigOverrides} from '../../config/constants.js'; // eslint-disable-line max-len
import {Runner} from '../runner.js';
import defaultConfig from './default-config.js';
import {defaultNavigationConfig, nonSimulatedPassConfigOverrides} from './constants.js'; // eslint-disable-line max-len
import {
isFRGathererDefn,
throwInvalidDependencyOrder,
Expand All @@ -28,9 +28,9 @@ import {
mergePlugins,
mergeConfigFragment,
mergeConfigFragmentArrayByKey,
} from '../../config/config-helpers.js';
import {getModuleDirectory} from '../../../esm-utils.js';
import * as format from '../../../shared/localization/format.js';
} from './config-helpers.js';
import {getModuleDirectory} from '../../esm-utils.js';
import * as format from '../../shared/localization/format.js';

const defaultConfigPath = path.join(
getModuleDirectory(import.meta),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import log from 'lighthouse-logger';

import {Audit} from '../../audits/audit.js';
import {Audit} from '../audits/audit.js';

/** @type {Record<keyof LH.FRBaseArtifacts, string>} */
const baseArtifactKeySource = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import {Audit} from '../../audits/audit.js';
import {Audit} from '../audits/audit.js';
import BaseFRGatherer from '../gather/base-gatherer.js';
import * as i18n from '../../lib/i18n/i18n.js';
import * as i18n from '../lib/i18n/i18n.js';

/**
* @param {LH.Config.GathererDefn | LH.Config.AnyFRGathererDefn} gathererDefn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import isDeepEqual from 'lodash/isEqual.js';

import {
getBrowserVersion, getBenchmarkIndex, getEnvironmentWarnings,
} from '../../gather/driver/environment.js';
} from './driver/environment.js';

/**
* @param {LH.Config.FRConfig} config
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions core/fraggle-rock/gather/driver.js → core/gather/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import log from 'lighthouse-logger';

import {ExecutionContext} from '../../gather/driver/execution-context.js';
import {TargetManager} from '../../gather/driver/target-manager.js';
import {Fetcher} from '../../gather/fetcher.js';
import {ExecutionContext} from './driver/execution-context.js';
import {TargetManager} from './driver/target-manager.js';
import {Fetcher} from './fetcher.js';

/** @return {*} */
const throwNotConnectedFn = () => {
Expand Down
2 changes: 1 addition & 1 deletion core/gather/driver/target-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import EventEmitter from 'events';

import log from 'lighthouse-logger';

import {ProtocolSession} from '../../fraggle-rock/gather/session.js';
import {ProtocolSession} from '../session.js';

/**
* @typedef {{
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* global window, document, getNodeDetails */

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {axeSource} from '../../lib/axe.js';
import {pageFunctions} from '../../lib/page-functions.js';

Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/anchor-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* global getNodeDetails */

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {pageFunctions} from '../../lib/page-functions.js';
import {resolveDevtoolsNodePathToObjectId} from '../driver/dom.js';

Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/cache-contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* global caches */

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

/**
* @return {Promise<Array<string>>}
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/console-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/


import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

/**
* @param {LH.Crdp.Runtime.RemoteObject} obj
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/css-usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import log from 'lighthouse-logger';

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {Sentry} from '../../lib/sentry.js';

class CSSUsage extends FRGatherer {
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/devtools-log-compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

import DevtoolsLogGatherer from './devtools-log.js';
import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

/** @implements {LH.Gatherer.FRGathererInstance<'DevtoolsLog'>} */
class DevtoolsLogCompat extends FRGatherer {
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/devtools-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* This protocol log can be used to recreate the network records using lib/network-recorder.js.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

class DevtoolsLog extends FRGatherer {
static symbol = Symbol('DevtoolsLog');
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/dobetterweb/doctype.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';

/* global document */

Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/dobetterweb/domstats.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/* global getNodeDetails document */


import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';
import {pageFunctions} from '../../../lib/page-functions.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/dobetterweb/optimized-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import log from 'lighthouse-logger';

import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';
import UrlUtils from '../../../lib/url-utils.js';
import {NetworkRequest} from '../../../lib/network-request.js';
import {Sentry} from '../../../lib/sentry.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* global document ClipboardEvent getNodeDetails */

import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';
import {pageFunctions} from '../../../lib/page-functions.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/dobetterweb/response-compression.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import {Buffer} from 'buffer';
import {gzip} from 'zlib';

import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';
import UrlUtils from '../../../lib/url-utils.js';
import {Sentry} from '../../../lib/sentry.js';
import {NetworkRequest} from '../../../lib/network-request.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import {NetworkRecords} from '../../../computed/network-records.js';
import DevtoolsLog from '../devtools-log.js';
import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';

/* global document, window, HTMLLinkElement, SVGScriptElement */

Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/full-page-screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* globals window document getBoundingClientRect requestAnimationFrame */

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import * as emulation from '../../lib/emulation.js';
import {pageFunctions} from '../../lib/page-functions.js';
import {NetworkMonitor} from '../driver/network-monitor.js';
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/global-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* around page unload, but this can be expanded in the future.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

class GlobalListeners extends FRGatherer {
/** @type {LH.Gatherer.GathererMeta} */
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/iframe-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* global getNodeDetails */

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {pageFunctions} from '../../lib/page-functions.js';

/* eslint-env browser, node */
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/image-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import log from 'lighthouse-logger';

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {pageFunctions} from '../../lib/page-functions.js';
import * as FontSize from './seo/font-size.js';

Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* global getNodeDetails */

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {pageFunctions} from '../../lib/page-functions.js';

/* eslint-env browser, node */
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/inspector-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/


import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {NetworkRecords} from '../../computed/network-records.js';
import DevtoolsLog from './devtools-log.js';

Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/installability-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import log from 'lighthouse-logger';

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

class InstallabilityErrors extends FRGatherer {
/** @type {LH.Gatherer.GathererMeta} */
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/js-usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

/**
* @fileoverview Tracks unused JavaScript
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/link-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import LinkHeader from 'http-link-header';

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {pageFunctions} from '../../lib/page-functions.js';
import DevtoolsLog from './devtools-log.js';
import {MainResource} from '../../computed/main-resource.js';
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/main-document-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import DevtoolsLog from './devtools-log.js';
import {fetchResponseBodyFromCache} from '../driver/network.js';
import {MainResource} from '../../computed/main-resource.js';
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/meta-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {pageFunctions} from '../../lib/page-functions.js';

/* globals getElementsInDocument getNodeDetails */
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/network-user-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import DevtoolsLogGatherer from './devtools-log.js';

/** @implements {LH.Gatherer.FRGathererInstance<'DevtoolsLog'>} */
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/script-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';
import {NetworkRecords} from '../../computed/network-records.js';
import {NetworkRequest} from '../../lib/network-request.js';
import {pageFunctions} from '../../lib/page-functions.js';
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import FRGatherer from '../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../base-gatherer.js';

/**
* @template T, U
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/seo/embedded-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* globals getElementsInDocument getNodeDetails */

import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';
import {pageFunctions} from '../../../lib/page-functions.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion core/gather/gatherers/seo/font-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* This gatherer collects stylesheet metadata by itself, instead of relying on the styles gatherer which is slow (because it parses the stylesheet content).
*/

import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
import FRGatherer from '../../base-gatherer.js';

const FONT_SIZE_PROPERTY_NAME = 'font-size';
const MINIMAL_LEGIBLE_FONT_SIZE_PX = 12;
Expand Down
Loading