mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-15 03:02:11 +00:00
fix: build
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user