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: finalize master => main branch rename #14409

Merged
merged 10 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from 8 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/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ about: Suggest an idea to us!

<!-- Before creating an feature request please make sure you are using the latest version. -->

<!-- If this is a new audit please review the audit doc https://github.com/GoogleChrome/lighthouse/blob/master/docs/new-audits.md -->
<!-- If this is a new audit please review the audit doc https://github.com/GoogleChrome/lighthouse/blob/main/docs/new-audits.md -->

**Feature request summary**
<!-- Describe what you want to be added -->
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ body:
id: faq
attributes:
label: FAQ
description: Please double check that this isn't one of our most common questions already answered by [documentation]((https://github.com/GoogleChrome/lighthouse/blob/master/docs).
description: Please double check that this isn't one of our most common questions already answered by [documentation]((https://github.com/GoogleChrome/lighthouse/blob/main/docs).
options:
- label: Yes, my issue is not about [variability](https://github.com/GoogleChrome/lighthouse/blob/master/docs/variability.md) or [throttling](https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md).
- label: Yes, my issue is not about [variability](https://github.com/GoogleChrome/lighthouse/blob/main/docs/variability.md) or [throttling](https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md).
required: true
- label: Yes, my issue is not about a specific accessibility audit (file with [axe-core](https://github.com/dequelabs/axe-core) instead).
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
Thank you for submitting a pull request!
See CONTRIBUTING.MD for help in getting a change landed.
https://github.com/GoogleChrome/lighthouse/blob/master/CONTRIBUTING.md
https://github.com/GoogleChrome/lighthouse/blob/main/CONTRIBUTING.md
-->

**Summary**
Expand Down
12 changes: 6 additions & 6 deletions .github/scripts/git-get-shared-history.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -euxo pipefail

# Overview:
# - build-tracker (https://lh-build-tracker.herokuapp.com/) relies on a common commit that's shared between HEAD and master.
# - build-tracker (https://lh-build-tracker.herokuapp.com/) relies on a common commit that's shared between HEAD and main.
# - Lighthouse runs on pull_request, not push, so the checkout is not the branch with shared history, but the result of a merge.
# - checkout@v2 uses a merge remote (eg. remotes/pull/9605/merge) that often has just a single commit.
# - This script creates a new branch that matches the current checkout, but does have a shared history.
Expand All @@ -27,11 +27,11 @@ fi
git -c protocol.version=2 fetch --deepen=100
echo "History is deepened."

if git merge-base HEAD origin/master > /dev/null; then
echo "We have a common commit w/ origin/master. Skipping this script…";
if git merge-base HEAD origin/main > /dev/null; then
echo "We have a common commit w/ origin/main. Skipping this script…";
exit 0
else
echo "We don't have a common commit w/ origin/master. We'll checkout the associated branch, merge master, and then we'll be good"
echo "We don't have a common commit w/ origin/main. We'll checkout the associated branch, merge main, and then we'll be good"
fi

# get the human readable remote name
Expand Down Expand Up @@ -63,7 +63,7 @@ git checkout -b "$mergebranch_name"

# Merge 'n commit
git -c "user.name=LH GH Action bot" -c "user.email=ghbot@lighthouse.repo" merge --no-verify \
-m "Merge remote-tracking branch 'origin/master' into $mergebranch_name" origin/master
-m "Merge remote-tracking branch 'origin/main' into $mergebranch_name" origin/main

# If there's a diff aginst where we started.. we fucked up
if git --no-pager diff --color=always --exit-code "$checkout_name" > /dev/null; then
Expand All @@ -74,7 +74,7 @@ else
fi

# Lastly, now we should definitely have a merge-base.
if git merge-base HEAD origin/master > /dev/null; then
if git merge-base HEAD origin/main > /dev/null; then
echo "Merge-base found. Perfect. 👌"
else
echo "No diff, but still no merge-base. Very unexpected. 🤔"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [master]
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: DevTools

on:
push:
branches: [master]
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: package-test

on:
push:
branches: [master]
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: smoke

on:
push:
branches: [master]
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: unit

on:
push:
branches: [master]
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

jobs:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you have a contribution for our [documentation](https://web.dev/learn/#lighth
1. Ensure that your code adheres to the existing style in the sample to which you are contributing.
1. Submit a pull request.

If you've submitted a number of significant patches, feel free to add yourself in a PR to the project's `AUTHORS` [file](https://github.com/GoogleChrome/lighthouse/blob/master/AUTHORS) in the root of the repo to be recognized for your contributions!
If you've submitted a number of significant patches, feel free to add yourself in a PR to the project's `AUTHORS` [file](https://github.com/GoogleChrome/lighthouse/blob/main/AUTHORS) in the root of the repo to be recognized for your contributions!

## Audit PRs

Expand Down Expand Up @@ -108,7 +108,7 @@ We're using [conventional-commit](https://conventionalcommits.org/) for our comm

> type(scope): message subject

* The `type` must be one of: `new_audit` `core` `tests` `i18n`, `docs` `deps` `report` `cli` `clients` `misc`. (See [`.cz-config`](https://github.com/GoogleChrome/lighthouse/blob/master/.cz-config.js#L13))
* The `type` must be one of: `new_audit` `core` `tests` `i18n`, `docs` `deps` `report` `cli` `clients` `misc`. (See [`.cz-config`](https://github.com/GoogleChrome/lighthouse/blob/main/.cz-config.js#L13))
* The `scope` is optional, but recommended. Any string is allowed; it should indicate what the change affects.
* The `message subject` should be pithy and direct.

Expand Down
4 changes: 2 additions & 2 deletions build/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Lighthouse is built into browser-friendly bundles for two clients:
* Chrome DevTools Audits Panel
* Lightrider, the backend of PageSpeed Insights

Additionally, there are build processes for:
Additionally, there are build processes for:

* [The Lighthouse report viewer](../viewer/)
* The chrome extension (as of Nov 2019 is a thin-client that defers to the viewer)
Expand Down Expand Up @@ -40,7 +40,7 @@ dist

`LighthouseService` uses `self.runLighthouse`, the main export of `lighthouse-dt-bundle.js`.

`LighthousePanel` uses `new LighthouseReportRenderer(dom)`, which overrides `LighthouseReport.ReportRenderer`, ([defined here](https://github.com/GoogleChrome/lighthouse/blob/master/report/renderer/report-renderer.js)) which is exported by `report.js`. This renderer takes a Lighthouse result and a `rootEl` DOM element - it then renders the report to the target element. The CSS used by the report is embedded inside `bundle.esm.js` and is injected by the `ReportRenderer` via a call to `dom.createComponent('styles')`.
`LighthousePanel` uses `new LighthouseReportRenderer(dom)`, which overrides `LighthouseReport.ReportRenderer`, ([defined here](https://github.com/GoogleChrome/lighthouse/blob/main/report/renderer/report-renderer.js)) which is exported by `report.js`. This renderer takes a Lighthouse result and a `rootEl` DOM element - it then renders the report to the target element. The CSS used by the report is embedded inside `bundle.esm.js` and is injected by the `ReportRenderer` via a call to `dom.createComponent('styles')`.

A Lighthouse report (including what is shown within the Lighthouse panel) can also Export as HTML. Normally the report just uses `documentElement.outerHTML`, but from DevTools we get quine-y and use `Lighthouse.ReportGenerator`. This generator is defined in `report-generator.js`.

Expand Down
14 changes: 7 additions & 7 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ We expect this release to ship in the DevTools of [Chrome 100](https://chromiumd

## Notable Changes

* Allow auditing of navigations triggered by user interactions in user flows. See our [user flow docs](https://github.com/GoogleChrome/lighthouse/blob/master/docs/user-flows.md) for more info. ([#13496](https://github.com/GoogleChrome/lighthouse/pull/13496))
* Allow auditing of navigations triggered by user interactions in user flows. See our [user flow docs](https://github.com/GoogleChrome/lighthouse/blob/main/docs/user-flows.md) for more info. ([#13496](https://github.com/GoogleChrome/lighthouse/pull/13496))

## Core

Expand Down Expand Up @@ -935,9 +935,9 @@ We expect this release to ship in the DevTools of [Chrome 93](https://chromiumda
- CLS has been updated to its new, windowed
definition ([#12554](https://github.com/GoogleChrome/lighthouse/pull/12554))

See the [v8.0 Performance FAQ](https://github.com/GoogleChrome/lighthouse/blob/master/docs/v8-perf-faq.md) for more detail.
See the [v8.0 Performance FAQ](https://github.com/GoogleChrome/lighthouse/blob/main/docs/v8-perf-faq.md) for more detail.

<a href="https://github.com/GoogleChrome/lighthouse/blob/master/docs/v8-perf-faq.md"><img width="500" alt="the new metric weightings in the Lighthouse score calculator" src="https://user-images.githubusercontent.com/39191/120410971-de337100-c308-11eb-9fb6-368a33c0855e.png"></a>
<a href="https://github.com/GoogleChrome/lighthouse/blob/main/docs/v8-perf-faq.md"><img width="500" alt="the new metric weightings in the Lighthouse score calculator" src="https://user-images.githubusercontent.com/39191/120410971-de337100-c308-11eb-9fb6-368a33c0855e.png"></a>


* The report includes a new metric filter. Pick a metric to focus on the opportunities and diagnostics most relevant to improving just that metric:
Expand Down Expand Up @@ -1465,7 +1465,7 @@ This release is expected to ship in the DevTools of [Chrome 89](https://chromium
- The _Fast and reliable_ group has evaporated into thin air. 🌬 Now that revamped "installability requirements" audit includes offline-capability checking, we've removed the dedicated audits for checking if the current page and `start_url` respond with 200 when offline. Separately, the "Page load is fast enough on mobile network" audit was removed—while it's no longer part of the PWA section, we encourage folks building a PWA to consult the Performance category to ensure their web app is speedy and delightful.
* A **nightly Lighthouse build** is now available as [`lighthouse@next`](https://www.npmjs.com/package/lighthouse?activeTab=versions) on npm. Note that while automated tests pass before publishing, it's expected that this version will be more unstable than the regular releases ([#11792](https://github.com/GoogleChrome/lighthouse/pull/11792), [#11805](https://github.com/GoogleChrome/lighthouse/pull/11805), [#11810](https://github.com/GoogleChrome/lighthouse/pull/11810))
* The accessibility-testing library **`axe-core`** has been updated to the latest 4.1.1 release. The accessibility audits are now faster, more robust, and include multiple new checks ([#11661](https://github.com/GoogleChrome/lighthouse/pull/11661))
* Lighthouse runs a small benchmark at startup, and will now include a warning if the [test machine appears underpowered](https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#cpu-throttling) and may be affecting the accuracy of the Lighthouse metrics ([#11350](https://github.com/GoogleChrome/lighthouse/pull/11350))
* Lighthouse runs a small benchmark at startup, and will now include a warning if the [test machine appears underpowered](https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md#cpu-throttling) and may be affecting the accuracy of the Lighthouse metrics ([#11350](https://github.com/GoogleChrome/lighthouse/pull/11350))
* Joomla and October CMS detection has been added, so pages on those platforms will now get customized advice on some Lighthouse audits ([#11788](https://github.com/GoogleChrome/lighthouse/pull/11788))

## New contributors
Expand Down Expand Up @@ -1498,7 +1498,7 @@ These changes are unlikely to affect end users, but may be important if you are
* `ConsoleMessages` is a [new artifact](https://github.com/GoogleChrome/lighthouse/blob/a6738e0033e7e5ca308b97c1c36f298b7d399402/types/artifacts.d.ts#L753-L802) that is a combination of the old `ConsoleMessages` and `RuntimeExceptions` artifacts, with some expanded data on items logged to the console. `RuntimeExceptions` has been removed ([#11663](https://github.com/GoogleChrome/lighthouse/pull/11663))
* DOM "node details" data formerly spread throughout existing artifacts are now gathered in a [`NodeDetails`](https://github.com/GoogleChrome/lighthouse/blob/a6738e0033e7e5ca308b97c1c36f298b7d399402/types/artifacts.d.ts#L150-L157) property on each element ([#11474](https://github.com/GoogleChrome/lighthouse/pull/11474), [#11695](https://github.com/GoogleChrome/lighthouse/pull/11695), [#11752](https://github.com/GoogleChrome/lighthouse/pull/11752))
* The [`ImageElements` artifact](https://github.com/GoogleChrome/lighthouse/blob/a6738e0033e7e5ca308b97c1c36f298b7d399402/types/artifacts.d.ts#L395-L440) has been [streamlined](https://github.com/GoogleChrome/lighthouse/issues/11642) to better represent the data collected and how it's used ([#11703](https://github.com/GoogleChrome/lighthouse/pull/11703), [#11707](https://github.com/GoogleChrome/lighthouse/pull/11707), [#11733](https://github.com/GoogleChrome/lighthouse/pull/11733))
* Previously, `extends: true` was allowed as an alias for `extends: 'lighthouse:default'` to [extend a config](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md#config-extension) from the default Lighthouse config file. The boolean option has been removed to prepare the way for extending from any valid config file ([#11835](https://github.com/GoogleChrome/lighthouse/pull/11835))
* Previously, `extends: true` was allowed as an alias for `extends: 'lighthouse:default'` to [extend a config](https://github.com/GoogleChrome/lighthouse/blob/main/docs/configuration.md#config-extension) from the default Lighthouse config file. The boolean option has been removed to prepare the way for extending from any valid config file ([#11835](https://github.com/GoogleChrome/lighthouse/pull/11835))
* A never-used feature to pass options from the config to gatherers has been removed to be compatible with future changes ([#11743](https://github.com/GoogleChrome/lighthouse/pull/11743))

## 🧱 Core
Expand Down Expand Up @@ -4540,10 +4540,10 @@ Thanks to @sanjsanj, @dennismartensson, @daannijkamp, @crimeminister!
* `errors-in-console` best practice audit (#2836)
* `no-vulnerable-libraries` best practice audit (#2372)

### New audits in [full-config](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/full-config.js)
### New audits in [full-config](https://github.com/GoogleChrome/lighthouse/blob/main/lighthouse-core/config/full-config.js)
* `unused-javascript` coverage audit (#3085)

### New audits in new [SEO config](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/seo.js) (#2999)
### New audits in new [SEO config](https://github.com/GoogleChrome/lighthouse/blob/main/lighthouse-core/config/seo.js) (#2999)
* `meta-description` SEO audit (#3227)
* `http-status-code` SEO audit (#3311)

Expand Down
2 changes: 1 addition & 1 deletion cli/cli-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function getYargsParser(manualArgv) {
},
'enable-error-reporting': {
type: 'boolean',
describe: 'Enables error reporting, overriding any saved preference. --no-enable-error-reporting will do the opposite. More: https://github.com/GoogleChrome/lighthouse/blob/master/docs/error-reporting.md',
describe: 'Enables error reporting, overriding any saved preference. --no-enable-error-reporting will do the opposite. More: https://github.com/GoogleChrome/lighthouse/blob/main/docs/error-reporting.md',
},
'gather-mode': {
alias: 'G',
Expand Down
2 changes: 1 addition & 1 deletion cli/sentry-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const MAXIMUM_WAIT_TIME = 20 * 1000;

// eslint-disable-next-line max-len
const MESSAGE = `${log.reset}We're constantly trying to improve Lighthouse and its reliability.\n ` +
`${log.reset}Learn more: https://github.com/GoogleChrome/lighthouse/blob/master/docs/error-reporting.md \n ` +
`${log.reset}Learn more: https://github.com/GoogleChrome/lighthouse/blob/main/docs/error-reporting.md \n ` +
` ${log.bold}May we anonymously report runtime exceptions to improve the tool over time?${log.reset} `; // eslint-disable-line max-len

/**
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ By default this is done using the Lighthouse CLI (to exercise the full pipeline)

## Options

See [`SmokehouseOptions`](https://github.com/GoogleChrome/lighthouse/blob/master/cli/test/smokehouse/smokehouse.js#L23).
See [`SmokehouseOptions`](https://github.com/GoogleChrome/lighthouse/blob/main/cli/test/smokehouse/smokehouse.js#L23).

## Test definitions

Expand Down
4 changes: 2 additions & 2 deletions core/config/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,15 @@ function assertValidCategories(categories, audits, groups) {
*/
function assertValidSettings(settings) {
if (!settings.formFactor) {
throw new Error(`\`settings.formFactor\` must be defined as 'mobile' or 'desktop'. See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md`);
throw new Error(`\`settings.formFactor\` must be defined as 'mobile' or 'desktop'. See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md`);
}

if (!settings.screenEmulation.disabled) {
// formFactor doesn't control emulation. So we don't want a mismatch:
// Bad mismatch A: user wants mobile emulation but scoring is configured for desktop
// Bad mismtach B: user wants everything desktop and set formFactor, but accidentally not screenEmulation
if (settings.screenEmulation.mobile !== (settings.formFactor === 'mobile')) {
throw new Error(`Screen emulation mobile setting (${settings.screenEmulation.mobile}) does not match formFactor setting (${settings.formFactor}). See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md`);
throw new Error(`Screen emulation mobile setting (${settings.screenEmulation.mobile}) does not match formFactor setting (${settings.formFactor}). See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md`);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions core/gather/driver/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const UIStrings = {
*/
warningSlowHostCpu: 'The tested device appears to have a slower CPU than ' +
'Lighthouse expects. This can negatively affect your performance score. Learn more about ' +
'[calibrating an appropriate CPU slowdown multiplier](https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#cpu-throttling).',
'[calibrating an appropriate CPU slowdown multiplier](https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md#cpu-throttling).',
};

/**
Expand Down Expand Up @@ -80,7 +80,7 @@ function getSlowHostCpuWarning(context) {
if (!isThrottledMethod || !isDefaultMultiplier) return;

// Only warn if the device didn't meet the threshold.
// See https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#cpu-throttling
// See https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md#cpu-throttling
if (baseArtifacts.BenchmarkIndex > SLOW_CPU_BENCHMARK_INDEX_THRESHOLD) return;

return str_(UIStrings.warningSlowHostCpu);
Expand Down
2 changes: 1 addition & 1 deletion core/legacy/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function assertValidFlags(flags) {

// @ts-expect-error Checking for removed flags
if (flags.emulatedFormFactor || flags.internalDisableDeviceScreenEmulation) {
throw new Error('Invalid emulation flag. Emulation configuration changed in LH 7.0. See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md');
throw new Error('Invalid emulation flag. Emulation configuration changed in LH 7.0. See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md');
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/lib/cdt/Platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

// Functions manually copied from:
// https://github.com/ChromeDevTools/devtools-frontend/blob/master/front_end/core/platform/array-utilities.ts#L125
// https://github.com/ChromeDevTools/devtools-frontend/blob/main/front_end/core/platform/array-utilities.ts#L125

/**
* @param {any[]} array
Expand Down
Loading