Skip to content

Commit

Permalink
Fix internal name
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed May 1, 2024
1 parent 9152d56 commit 4199164
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion __tests__/no-base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("examples w/o base analysis", () => {
describe(`example ${example.name}`, () => {
const input: Options = {
analyzerDirectory: ".analyzer",
budgetPercentIncreaseRed: 20,
percentExtraAttention: 20,
includeExtensions: [".js", ".mjs", ".cjs"],
metafiles: ["out/meta.json"],
name: "test",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/with-base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("examples w/ base analysis", () => {

const input: Options = {
analyzerDirectory: ".analyzer",
budgetPercentIncreaseRed: 20,
percentExtraAttention: 20,
includeExtensions: [".js", ".mjs", ".cjs"],
metafiles,
name: "test",
Expand Down
10 changes: 5 additions & 5 deletions dist/index.mjs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ This analysis was generated by [esbuild-bundle-analyzer](https://github.com/exoe
});

if (hasAnyChange) {
output += markdownTable(comparison, input.budgetPercentIncreaseRed);
output += markdownTable(comparison, input.percentExtraAttention);

if (input.showDetails) {
output += `\n<details>
<summary>Details</summary>
<p>Next to the size is how much the size has increased or decreased compared with the base branch of this PR.</p>
<ul>
<li>‼️: Size increased by ${input.budgetPercentIncreaseRed}% or more. Special attention should be given to this.</li>
<li>⚠️: Size increased in acceptable range (lower than ${input.budgetPercentIncreaseRed}%).</li>
<li>‼️: Size increased by ${input.percentExtraAttention}% or more. Special attention should be given to this.</li>
<li>⚠️: Size increased in acceptable range (lower than ${input.percentExtraAttention}%).</li>
<li>✅: No change or even downsized.</li>
<li>🗑️: The out file is deleted: not found in base branch.</li>
<li>🆕: The out file is newly found: will be added to base branch.</li>
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getOptions(): Options {
throw new Error("name is not specified");
}
return {
budgetPercentIncreaseRed: Number.parseInt(
percentExtraAttention: Number.parseInt(
getInput("percent_extra_attention") || "20",
10,
),
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export interface Options {
metafiles: Array<string>;
includeExtensions: Array<string>;
analyzerDirectory: string;
budgetPercentIncreaseRed: number;
percentExtraAttention: number;
showDetails: boolean;
}

0 comments on commit 4199164

Please sign in to comment.