@jsenv/lighthouse-impact 4.1.5 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +6 -11
- package/src/generate/generate_lighthouse_report.js +6 -7
- package/src/main.js +1 -2
- package/src/pr_impact/{createLighthouseImpactComment.js → create_lighthouse_impact_comment.js} +1 -1
- package/src/pr_impact/{patchOrPostGists.js → patch_or_post_gists.js} +1 -1
- package/src/report_lighthouse_impact_in_github_pr.js +4 -5
- /package/src/pr_impact/{formatNumericDiff.js → format_numeric_diff.js} +0 -0
- /package/src/pr_impact/{jsenvCommentParameters.js → jsenv_comment_parameters.js} +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# Lighthouse impact
|
|
1
|
+
# Lighthouse impact
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@jsenv/lighthouse-impact)
|
|
2
4
|
|
|
3
5
|
`@jsenv/lighthouse-impact` analyses a pull request impact on lighthouse score. This analysis is posted in a comment of the pull request on GitHub.
|
|
4
6
|
|
package/package.json
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/lighthouse-impact",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Package description",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "dmail",
|
|
8
|
-
"email": "dmaillard06@gmail.com",
|
|
9
|
-
"url": "https://twitter.com/damienmaillard"
|
|
10
|
-
},
|
|
11
6
|
"repository": {
|
|
12
7
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/jsenv/
|
|
14
|
-
"directory": "packages/lighthouse-impact"
|
|
8
|
+
"url": "https://github.com/jsenv/core",
|
|
9
|
+
"directory": "packages/independent/workflow/lighthouse-impact"
|
|
15
10
|
},
|
|
16
11
|
"engines": {
|
|
17
|
-
"node": ">=
|
|
12
|
+
"node": ">=20.0.0"
|
|
18
13
|
},
|
|
19
14
|
"publishConfig": {
|
|
20
15
|
"access": "public"
|
|
@@ -38,8 +33,8 @@
|
|
|
38
33
|
"@jsenv/abort": "4.3.0",
|
|
39
34
|
"@jsenv/dynamic-import-worker": "1.2.1",
|
|
40
35
|
"@jsenv/filesystem": "4.10.2",
|
|
41
|
-
"@jsenv/github-pull-request-impact": "1.
|
|
42
|
-
"@jsenv/
|
|
36
|
+
"@jsenv/github-pull-request-impact": "1.8.0",
|
|
37
|
+
"@jsenv/humanize": "1.2.8",
|
|
43
38
|
"lighthouse": "12.2.0"
|
|
44
39
|
}
|
|
45
40
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// https://github.com/GoogleChrome/lighthouse/blob/5a14deb5c4e0ec4e8e58f50ff72b53851b021bcf/docs/readme.md#using-programmatically
|
|
2
2
|
|
|
3
|
-
import { assertAndNormalizeFileUrl, writeFileSync } from "@jsenv/filesystem";
|
|
4
|
-
import { createLogger } from "@jsenv/log";
|
|
5
3
|
import { Abort, raceProcessTeardownEvents } from "@jsenv/abort";
|
|
6
|
-
|
|
4
|
+
import { assertAndNormalizeFileUrl, writeFileSync } from "@jsenv/filesystem";
|
|
5
|
+
import { createLogger } from "@jsenv/humanize";
|
|
7
6
|
import {
|
|
8
|
-
runLighthouse,
|
|
9
|
-
reduceToMedianReport,
|
|
10
|
-
formatReportAsSummaryText,
|
|
11
|
-
formatReportAsJson,
|
|
12
7
|
formatReportAsHtml,
|
|
8
|
+
formatReportAsJson,
|
|
9
|
+
formatReportAsSummaryText,
|
|
10
|
+
reduceToMedianReport,
|
|
11
|
+
runLighthouse,
|
|
13
12
|
} from "./lighthouse_api.js";
|
|
14
13
|
|
|
15
14
|
export const generateLighthouseReport = async (
|
package/src/main.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { readGitHubWorkflowEnv } from "@jsenv/github-pull-request-impact";
|
|
2
|
-
|
|
3
|
-
export { runLighthouseOnPlaywrightPage } from "./run_lighthouse_on_playwright_page.js";
|
|
4
2
|
export { reportLighthouseImpactInGithubPullRequest } from "./report_lighthouse_impact_in_github_pr.js";
|
|
3
|
+
export { runLighthouseOnPlaywrightPage } from "./run_lighthouse_on_playwright_page.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as githubRESTAPI from "@jsenv/github-pull-request-impact/src/internal/github_rest_api.js";
|
|
2
|
-
import { createDetailedMessage } from "@jsenv/
|
|
2
|
+
import { createDetailedMessage } from "@jsenv/humanize";
|
|
3
3
|
|
|
4
4
|
// https://developer.github.com/v3/gists/#create-a-gist
|
|
5
5
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { importOneExportFromFile } from "@jsenv/dynamic-import-worker";
|
|
1
2
|
import { assertAndNormalizeDirectoryUrl } from "@jsenv/filesystem";
|
|
2
3
|
import { commentGitHubPullRequestImpact } from "@jsenv/github-pull-request-impact";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { patchOrPostGists } from "./pr_impact/patchOrPostGists.js";
|
|
6
|
-
import { createLighthouseImpactComment } from "./pr_impact/createLighthouseImpactComment.js";
|
|
4
|
+
import { createLighthouseImpactComment } from "./pr_impact/create_lighthouse_impact_comment.js";
|
|
5
|
+
import { patchOrPostGists } from "./pr_impact/patch_or_post_gists.js";
|
|
7
6
|
|
|
8
7
|
export const reportLighthouseImpactInGithubPullRequest = async ({
|
|
9
8
|
logLevel,
|
|
@@ -108,7 +107,7 @@ export const reportLighthouseImpactInGithubPullRequest = async ({
|
|
|
108
107
|
};
|
|
109
108
|
},
|
|
110
109
|
generatedByLink: {
|
|
111
|
-
url: "https://github.com/jsenv/
|
|
110
|
+
url: "https://github.com/jsenv/core/tree/main/packages/independent/workflow/lighthouse-impact",
|
|
112
111
|
text: "@jsenv/lighthouse-impact",
|
|
113
112
|
},
|
|
114
113
|
runLink,
|
|
File without changes
|
|
File without changes
|