Skip to content

Commit

Permalink
Adjust how async readFile is loaded
Browse files Browse the repository at this point in the history
`fs/promises` isn't available in node 12
  • Loading branch information
xt0rted committed Apr 28, 2021
1 parent ee94d96 commit 055cb23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dotnet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFile } from "fs/promises";
import { promises } from "fs";
import { resolve } from "path";

import {
Expand All @@ -14,6 +14,8 @@ import { getPullRequestFiles } from "./files";

import type { DotNetFormatVersion } from "./version";

const { readFile } = promises;

export type FormatFunction = (options: FormatOptions) => Promise<boolean>;

export interface FormatOptions {
Expand Down

0 comments on commit 055cb23

Please sign in to comment.