Skip to content

Commit 06a5f21

Browse files
Move bytes to ESM variant
1 parent c08fa7c commit 06a5f21

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"dependencies": {
3535
"@kristoferbaxter/async": "1.0.0",
3636
"@kristoferbaxter/kleur": "4.0.2",
37-
"bytes": "3.1.0",
37+
"@kristoferbaxter/bytes": "0.1.2",
3838
"fast-glob": "3.2.5",
3939
"mri": "1.1.6"
4040
},
@@ -43,7 +43,6 @@
4343
"@rollup/plugin-commonjs": "17.1.0",
4444
"@rollup/plugin-node-resolve": "11.1.1",
4545
"@rollup/plugin-typescript": "8.1.1",
46-
"@types/bytes": "3.1.0",
4746
"@types/mri": "1.1.0",
4847
"@types/node": "14.14.25",
4948
"@types/tap": "14.10.2",

src/log/helpers/bytes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
const bytes = require('bytes');
17+
import bytes from '@kristoferbaxter/bytes';
1818

1919
/**
2020
* Format size into more human readable string.

src/validation/File.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import { Compression, Context, SizeMapValue, SizeMapValueIndex } from './Condition';
1818
import { resolve, isAbsolute } from 'path';
1919
import { isFile } from '../helpers/fs';
20-
import bytes from 'bytes';
20+
import bytes from '@kristoferbaxter/bytes';
2121

2222
/**
2323
* Format input string to a known Compression Enum Value.

0 commit comments

Comments
 (0)