Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav authored and github-actions[bot] committed Oct 7, 2024
1 parent f4699bc commit 7433e48
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/utils/calculate-bundlesize.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from "node:fs";
import * as fsp from "node:fs/promises";
import * as path from "node:path";
import * as zlib from 'node:zlib';
import * as zlib from "node:zlib";
import { build } from "esbuild";
import { fileURLToPath } from "url";
import { PACKAGES_DIR } from "./utils.js";
Expand All @@ -13,10 +13,11 @@ export type Bundlesize = { min: number; gzip: number };

export async function gzipSize(input: zlib.InputType): Promise<number> {
return new Promise((res, rej) => {
zlib.gzip(input, (err, val) =>
err ? rej(err) : res(val.length - 20) // around 20 bytes of gzip header
)
})
zlib.gzip(
input,
(err, val) => (err ? rej(err) : res(val.length - 20)), // around 20 bytes of gzip header
);
});
}

export const getPackageBundlesize = async (
Expand Down

0 comments on commit 7433e48

Please sign in to comment.