Skip to content

Commit

Permalink
Merge pull request #7 from Surnet/changes
Browse files Browse the repository at this point in the history
Use readfile promise
  • Loading branch information
chdanielmueller authored Jun 13, 2023
2 parents 6abf100 + b225d1e commit 1c00396
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
13 changes: 11 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/get-matrix.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {readFileSync} from 'fs'
import {readFile} from 'fs/promises'

export async function getMatrix(
filePath: string
): Promise<{include: {key: string; value: unknown}[]}> {
const object = JSON.parse(readFileSync(filePath).toString())
const fileContent = await readFile(filePath)
const object = JSON.parse(fileContent.toString())
const matrix = {
include: [] as {key: string; value: unknown}[]
}
Expand Down

0 comments on commit 1c00396

Please sign in to comment.