File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 28
28
steps :
29
29
- name : Checkout repository
30
30
uses : actions/checkout@v4
31
+ with :
32
+ fetch-depth : 0
31
33
- name : Create Diff
32
34
uses : e18e/action-dependency-diff@main
33
35
` ` `
Original file line number Diff line number Diff line change @@ -24198,8 +24198,8 @@ async function calculateTotalDependencySizeIncrease(newVersions) {
24198
24198
// src/main.ts
24199
24199
function formatBytes(bytes) {
24200
24200
if (bytes === 0) return "0 B";
24201
- const k = 1024 ;
24202
- const sizes = ["B", "KB ", "MB", "GB"];
24201
+ const k = 1e3 ;
24202
+ const sizes = ["B", "kB ", "MB", "GB"];
24203
24203
const i = Math.floor(Math.log(bytes) / Math.log(k));
24204
24204
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${sizes[i]}`;
24205
24205
}
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import {calculateTotalDependencySizeIncrease} from './npm.js';
7
7
8
8
function formatBytes ( bytes : number ) : string {
9
9
if ( bytes === 0 ) return '0 B' ;
10
- const k = 1024 ;
11
- const sizes = [ 'B' , 'KB ' , 'MB' , 'GB' ] ;
10
+ const k = 1000 ;
11
+ const sizes = [ 'B' , 'kB ' , 'MB' , 'GB' ] ;
12
12
const i = Math . floor ( Math . log ( bytes ) / Math . log ( k ) ) ;
13
13
return `${ parseFloat ( ( bytes / Math . pow ( k , i ) ) . toFixed ( 1 ) ) } ${ sizes [ i ] } ` ;
14
14
}
You can’t perform that action at this time.
0 commit comments