Skip to content

Commit

Permalink
fix: use fs.promises instead of fs/promises (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: 鏄庢樇 <zhaolang@cai-inc.com>
  • Loading branch information
zlyyyy and 鏄庢樇 committed Jul 19, 2021
1 parent 8b20c83 commit 8dd5446
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite-plugin-checker/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chalk from 'chalk'
import { readFile } from 'fs/promises'
import fs from 'fs'
import os from 'os'
import strip from 'strip-ansi'
import { URI } from 'vscode-uri'
Expand Down Expand Up @@ -221,6 +221,7 @@ export async function normalizePublishDiagnosticParams(
): Promise<NormalizedDiagnostic[]> {
const diagnostics = publishDiagnostics.diagnostics
const absFilePath = uriToAbsPath(publishDiagnostics.uri)
const { readFile } = fs.promises
const fileText = await readFile(absFilePath, 'utf-8')

const res = diagnostics.map((d) => {
Expand Down

0 comments on commit 8dd5446

Please sign in to comment.