Skip to content

Commit

Permalink
Remove util.promisify in favor of fs.promises
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Jan 5, 2022
1 parent 5d1893d commit 60c0909
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/node-file-trace.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { NodeFileTraceOptions, NodeFileTraceResult, NodeFileTraceReasons, Stats } from './types';
import { basename, dirname, extname, relative, resolve, sep } from 'path';
import fs from 'graceful-fs';
import { promisify } from 'util'
import analyze, { AnalyzeResult } from './analyze';
import resolveDependency from './resolve-dependency';
import { isMatch } from 'micromatch';
import { sharedLibEmit } from './utils/sharedlib-emit';
import { join } from 'path';

const fsReadFile = promisify(fs.readFile)
const fsReadlink = promisify(fs.readlink)
const fsStat = promisify(fs.stat)
const fsReadFile = fs.promises.readFile;
const fsReadlink = fs.promises.readlink;
const fsStat = fs.promises.stat;

function inPath (path: string, parent: string) {
const pathWithSep = join(parent, sep);
Expand Down

0 comments on commit 60c0909

Please sign in to comment.