[go: nahoru, domu]

Skip to content

Commit

Permalink
misc: adopt minimal license headers (#15456)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Sep 15, 2023
1 parent 9152513 commit a615ea8
Show file tree
Hide file tree
Showing 1,114 changed files with 3,302 additions and 3,502 deletions.
6 changes: 3 additions & 3 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
'use strict';

Expand Down
6 changes: 3 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
'use strict';

Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/bump-nightly-version.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

##
# @license Copyright 2020 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# 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.
# @license
# Copyright 2020 Google LLC
# SPDX-License-Identifier: Apache-2.0
##

set -euxo pipefail
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/generate-devtools-hash.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

##
# @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# 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.
# @license
# Copyright 2021 Google LLC
# SPDX-License-Identifier: Apache-2.0
##

# Prints to stdout text that, when it changes, indicates that the devtools tests
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/git-get-shared-history.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

##
# @license Copyright 2020 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# 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.
# @license
# Copyright 2020 Google LLC
# SPDX-License-Identifier: Apache-2.0
##

set -euxo pipefail
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/print-devtools-relevant-commits.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

##
# @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# 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.
# @license
# Copyright 2021 Google LLC
# SPDX-License-Identifier: Apache-2.0
##

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/test-retry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Ex: bash test-retry.sh yarn test-viewer

##
# @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# 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.
# @license
# Copyright 2021 Google LLC
# SPDX-License-Identifier: Apache-2.0
##

set -euxo pipefail
Expand Down
9 changes: 0 additions & 9 deletions AUTHORS

This file was deleted.

8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ If you have a contribution for our [documentation](https://developer.chrome.com/
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/main/AUTHORS) in the root of the repo to be recognized for your contributions!

## Audit PRs

If proposing a new audit for Lighthouse, see the [new audit proposal guide](./docs/new-audits.md) and open an issue for discussion before starting.
Expand Down Expand Up @@ -96,6 +94,7 @@ If there is an error in one of the proto tests (`proto-test.js` or `psi-test.js`
## Adding Images to a Readme

If you are adding an image to a readme use the absolute path to the image for the specific commit hash where the image was introduced. This requires multiple commits.

1. Make the commit to introduce the image.
1. Get the [absolute path](https://help.github.com/articles/getting-permanent-links-to-files/) to the image with the commit hash e.g. `https://raw.githubusercontent.com/GoogleChrome/lighthouse/e7997b3db01de3553d8cb208a40f3d4fd350195c/assets/example_dev_tools.png`
1. Add to readme as an absolute reference to that image.
Expand Down Expand Up @@ -130,8 +129,7 @@ accept your pull requests.

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*.
#### If you have an expected error that is recoverable but want to track how frequently it happens, *use Sentry.captureException*

```js
const Sentry = require('./core/lib/sentry');
Expand All @@ -147,7 +145,7 @@ try {
}
```

#### If you need to track a code path that doesn't necessarily mean an error occurred, *use Sentry.captureMessage*.
#### If you need to track a code path that doesn't necessarily mean an error occurred, *use Sentry.captureMessage*

NOTE: If the message you're capturing is dynamic/based on user data or you need a stack trace, then create a fake error instead and use `Sentry.captureException` so that the instances will be grouped together in Sentry.

Expand Down
13 changes: 9 additions & 4 deletions build/build-bundle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2018 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

/**
Expand Down Expand Up @@ -58,6 +58,7 @@ const today = (() => {
const day = new Intl.DateTimeFormat('en', {day: '2-digit'}).format(date);
return `${month} ${day} ${year}`;
})();
/* eslint-disable max-len */
const pkg = readJson(`${LH_ROOT}/package.json`);
const banner = `
/**
Expand All @@ -66,10 +67,14 @@ const banner = `
* ${pkg.description}
*
* @homepage ${pkg.homepage}
* @author ${pkg.author}
* @author Copyright 2023 ${pkg.author}
* @license ${pkg.license}
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
*/
`.trim();
/* eslint-enable max-len */

/**
* Bundle starting at entryPath, writing the minified result to distPath.
Expand Down
6 changes: 3 additions & 3 deletions build/build-cdt-lib.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2020 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

/* eslint-disable no-console */
Expand Down
6 changes: 3 additions & 3 deletions build/build-cdt-strings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2022 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import fs from 'fs';
Expand Down
6 changes: 3 additions & 3 deletions build/build-dt-report-resources.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2019 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import fs from 'fs';
Expand Down
6 changes: 3 additions & 3 deletions build/build-extension.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2018 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import fs from 'fs';
Expand Down
6 changes: 3 additions & 3 deletions build/build-lightrider-bundles.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2019 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import fs from 'fs';
Expand Down
6 changes: 3 additions & 3 deletions build/build-report-components.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

/**
Expand Down
6 changes: 3 additions & 3 deletions build/build-report.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import esbuild from 'esbuild';
Expand Down
6 changes: 3 additions & 3 deletions build/build-sample-reports.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node
/**
* @license Copyright 2019 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

/* eslint-disable no-console */
Expand Down
6 changes: 3 additions & 3 deletions build/build-smokehouse-bundle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2020 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import esbuild from 'esbuild';
Expand Down
6 changes: 3 additions & 3 deletions build/build-treemap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2020 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import {createRequire} from 'module';
Expand Down
6 changes: 3 additions & 3 deletions build/build-viewer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2018 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

import {createRequire} from 'module';
Expand Down
6 changes: 3 additions & 3 deletions build/changelog-generator/index.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
'use strict';

Expand Down
6 changes: 3 additions & 3 deletions build/changelog-generator/templates/commit.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{!--
/**
* @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* 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.
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
--}}
* {{#if scope}}{{scope}}: {{/if~}}
Expand Down
Loading

0 comments on commit a615ea8

Please sign in to comment.