Skip to content

Commit

Permalink
Use fs instead of fs-extra
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Aug 8, 2024
1 parent 464a34b commit 8ac5388
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/utils.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import url from 'url';
import fse from 'fs-extra';
import fs from 'fs';

/**
* Returns the full path of the root directory of this repository.
Expand All @@ -15,8 +15,8 @@ export function getWorkspaceRoot() {
/**
* Returns the version and destructured values of the version as env variables to be replaced.
*/
export async function getVersionEnvVariables() {
const packageJsonData = await fse.readFile(path.resolve('./package.json'), 'utf8');
export function getVersionEnvVariables() {
const packageJsonData = fs.readFileSync(path.resolve('./package.json'), 'utf8');
const { version = null } = JSON.parse(packageJsonData);

if (!version) {
Expand Down

0 comments on commit 8ac5388

Please sign in to comment.