Skip to content

Commit

Permalink
fix: add missing promise.all for writing
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 5, 2024
1 parent 66aaf8a commit dc5e551
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export async function minifyFiles(files: string[], hasComment = false): Promise<
// fallback to jasonminify due to missing ARM64 binaries
// eslint-disable-next-line @typescript-eslint/no-var-requires
const jsonminify = require("jsonminify")
files.map(async (file) => {
await Promise.all(files.map(async (file) => {
const jsonString = await readFile(file, "utf8")
const minifiedJsonString = jsonminify(jsonString) as string
await writeFile(file, minifiedJsonString)
})
}))
return
}

Expand Down

0 comments on commit dc5e551

Please sign in to comment.