Skip to content

Commit a2690eb

Browse files
committed
Update filesize.js dependency
Newer releases support ES modules. Also remove unneccessary eslint skip hint.
1 parent ec6940a commit a2690eb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

package-lock.json

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
"express": "^4.21.2",
133133
"express-rate-limit": "^5.1.3",
134134
"fast-json-patch": "^3.1.1",
135-
"filesize": "^6.1.0",
135+
"filesize": "^10.1.6",
136136
"http-proxy-middleware": "^2.0.7",
137137
"http-terminator": "^3.2.0",
138138
"isbot": "^5.1.22",

src/app/shared/utils/file-size-pipe.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import {
22
Pipe,
33
PipeTransform,
44
} from '@angular/core';
5-
// eslint-disable-next-line import/no-namespace
6-
import fileSize from 'filesize';
5+
import { filesize } from 'filesize';
76

87
/*
98
* Convert bytes into largest possible unit.
@@ -21,6 +20,6 @@ import fileSize from 'filesize';
2120
})
2221
export class FileSizePipe implements PipeTransform {
2322
transform(bytes: number = 0, precision: number = 2): string {
24-
return fileSize(bytes, { standard: 'jedec', round: precision });
23+
return filesize(bytes, { standard: 'jedec', round: precision });
2524
}
2625
}

0 commit comments

Comments
 (0)