fix: build

This commit is contained in:
2023-03-14 18:04:29 +01:00
parent 3792a14e90
commit fd740b3091
185 changed files with 21932 additions and 71486 deletions

View File

@@ -14,7 +14,7 @@
*/
import {existsSync, PathLike} from 'fs';
import path from 'path';
import {readFilePromisified} from '../common';
import {readFile} from 'fs/promises';
/**
* Get used version of a dependency of a project referenced by a path
@@ -27,7 +27,7 @@ export async function getUsedVersion(directoryPath: PathLike, dependency: string
throw new Error(`'package.json' does not exist in '${directoryPath}'. Not a Node.js project?`);
}
const buffer = await readFilePromisified(path.join(directoryPath.toString(), 'package.json'));
const buffer = await readFile(path.join(directoryPath.toString(), 'package.json'));
const content = buffer.toString();
const packageJson = JSON.parse(content);