@jsenv/file-size-impact 14.1.1 → 14.1.3

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.
@@ -1,9 +1,9 @@
1
- import { assertAndNormalizeDirectoryUrl } from "@jsenv/filesystem"
2
- import { commentGitHubPullRequestImpact } from "@jsenv/github-pull-request-impact"
3
- import { importOneExportFromFile } from "@jsenv/dynamic-import-worker"
1
+ import { assertAndNormalizeDirectoryUrl } from "@jsenv/filesystem";
2
+ import { commentGitHubPullRequestImpact } from "@jsenv/github-pull-request-impact";
3
+ import { importOneExportFromFile } from "@jsenv/dynamic-import-worker";
4
4
 
5
- import { formatComment } from "./internal/formatComment.js"
6
- import { jsenvCommentParameters } from "./internal/jsenvCommentParameters.js"
5
+ import { formatComment } from "./internal/formatComment.js";
6
+ import { jsenvCommentParameters } from "./internal/jsenvCommentParameters.js";
7
7
 
8
8
  export const reportFileSizeImpactInGitHubPullRequest = async ({
9
9
  logLevel,
@@ -36,14 +36,14 @@ export const reportFileSizeImpactInGitHubPullRequest = async ({
36
36
  runLink,
37
37
  commitInGeneratedByInfo,
38
38
  }) => {
39
- rootDirectoryUrl = assertAndNormalizeDirectoryUrl(rootDirectoryUrl)
39
+ rootDirectoryUrl = assertAndNormalizeDirectoryUrl(rootDirectoryUrl);
40
40
  if (fileSizeReportUrl === "string") {
41
- fileSizeReportUrl = new URL(fileSizeReportUrl, rootDirectoryUrl).href
41
+ fileSizeReportUrl = new URL(fileSizeReportUrl, rootDirectoryUrl).href;
42
42
  } else if (fileSizeReportUrl instanceof URL) {
43
43
  } else {
44
44
  throw new TypeError(
45
45
  `fileSizeReportUrl must be a string or an url but received ${fileSizeReportUrl}`,
46
- )
46
+ );
47
47
  }
48
48
 
49
49
  if (installCommand === null) {
@@ -51,7 +51,7 @@ export const reportFileSizeImpactInGitHubPullRequest = async ({
51
51
  } else if (typeof installCommand !== "string") {
52
52
  throw new TypeError(
53
53
  `installCommand must be a string but received ${installCommand}`,
54
- )
54
+ );
55
55
  }
56
56
 
57
57
  if (buildCommand === null) {
@@ -59,7 +59,7 @@ export const reportFileSizeImpactInGitHubPullRequest = async ({
59
59
  } else if (typeof buildCommand !== "string") {
60
60
  throw new TypeError(
61
61
  `buildCommand must be a string but received ${buildCommand}`,
62
- )
62
+ );
63
63
  }
64
64
 
65
65
  return commentGitHubPullRequestImpact({
@@ -75,10 +75,10 @@ export const reportFileSizeImpactInGitHubPullRequest = async ({
75
75
  pullRequestNumber,
76
76
 
77
77
  collectInfo: async ({ execCommandInRootDirectory }) => {
78
- if (installCommand) await execCommandInRootDirectory(installCommand)
79
- if (buildCommand) await execCommandInRootDirectory(buildCommand)
80
- const fileSizeReport = await importOneExportFromFile(fileSizeReportUrl)
81
- return { version: 1, data: fileSizeReport }
78
+ if (installCommand) await execCommandInRootDirectory(installCommand);
79
+ if (buildCommand) await execCommandInRootDirectory(buildCommand);
80
+ const fileSizeReport = await importOneExportFromFile(fileSizeReportUrl);
81
+ return { version: 1, data: fileSizeReport };
82
82
  },
83
83
  commentIdentifier: `<!-- Generated by @jsenv/file-size-impact -->`,
84
84
  createCommentForComparison: ({
@@ -103,7 +103,7 @@ export const reportFileSizeImpactInGitHubPullRequest = async ({
103
103
  formatFileSizeImpactCell,
104
104
  formatEmojiCell,
105
105
  shouldOpenGroupByDefault,
106
- })
106
+ });
107
107
  },
108
108
  generatedByLink: {
109
109
  url: "https://github.com/jsenv/workflow/tree/main/packages/file-size-impact",
@@ -112,5 +112,5 @@ export const reportFileSizeImpactInGitHubPullRequest = async ({
112
112
  runLink,
113
113
  commitInGeneratedByInfo,
114
114
  catchError,
115
- })
116
- }
115
+ });
116
+ };