Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 908e766

Browse files
committed
if handler sizes are the same, comment "no changes"
1 parent b16c6dd commit 908e766

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@sls-next/next-aws-cloudfront": "link:./packages/compat-layers/lambda-at-edge-compat",
4949
"@types/fs-extra": "^9.0.1",
5050
"@types/jest": "^26.0.23",
51+
"@types/lodash": "^4.14.170",
5152
"@types/node": "^15.12.5",
5253
"@types/node-fetch": "^2.5.10",
5354
"@types/react": "^17.0.9",
@@ -121,6 +122,7 @@
121122
},
122123
"dependencies": {
123124
"opencollective-postinstall": "^2.0.3",
125+
"lodash": "^4.17.21",
124126
"node-fetch": "^2.6.1"
125127
},
126128
"collective": {
@@ -137,6 +139,6 @@
137139
},
138140
"resolutions": {
139141
"which": "^2.0.1",
140-
"lodash": "^4.17.19"
142+
"lodash": "^4.17.21"
141143
}
142144
}

scripts/comment-handler-sizes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import fetch from "node-fetch";
44
import { calculateHandlerSizes } from "./handler-size-utils";
55
import { Octokit } from "@octokit/rest";
6+
import * as _ from "lodash";
67

78
/**
89
* Get sizes that were calculated from existing commit SHA
@@ -91,6 +92,11 @@ const main = async (): Promise<void> => {
9192
const newSizes: Record<string, any> = calculateHandlerSizes();
9293

9394
let output = "# Handler Size Report\n";
95+
96+
if (_.isEqual(baseSizes, newSizes)) {
97+
output += "No changes to handler sizes.\n";
98+
}
99+
94100
output += `### Base Handler Sizes (kB) (commit ${GITHUB_BASE_SHA})\n`;
95101
output += "```ts\n";
96102
output += JSON.stringify(baseSizes, null, 4) + "\n";

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,7 @@
34893489
dependencies:
34903490
"@types/node" "*"
34913491

3492-
"@types/lodash@^4.14.123":
3492+
"@types/lodash@^4.14.123", "@types/lodash@^4.14.170":
34933493
version "4.14.170"
34943494
resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.170.tgz#0d67711d4bf7f4ca5147e9091b847479b87925d6"
34953495
integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q==

0 commit comments

Comments
 (0)