File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ async function run(argv) {
2929 NODE_ENV : 'production' ,
3030 BABEL_ENV : bundle ,
3131 MUI_BUILD_VERBOSE : verbose ,
32- ...getVersionEnvVariables ( ) ,
32+ ...( await getVersionEnvVariables ( ) ) ,
3333 } ;
3434
3535 const babelConfigPath = path . resolve ( getWorkspaceRoot ( ) , 'babel.config.js' ) ;
Original file line number Diff line number Diff line change 11import path from 'path' ;
22import url from 'url' ;
3- import fs from 'fs' ;
3+ import fs from 'fs/promises ' ;
44
55/**
66 * Returns the full path of the root directory of this repository.
@@ -15,8 +15,8 @@ export function getWorkspaceRoot() {
1515/**
1616 * Returns the version and destructured values of the version as env variables to be replaced.
1717 */
18- export function getVersionEnvVariables ( ) {
19- const packageJsonData = fs . readFileSync ( path . resolve ( './package.json' ) , 'utf8' ) ;
18+ export async function getVersionEnvVariables ( ) {
19+ const packageJsonData = await fs . readFile ( path . resolve ( './package.json' ) , 'utf8' ) ;
2020 const { version = null } = JSON . parse ( packageJsonData ) ;
2121
2222 if ( ! version ) {
You can’t perform that action at this time.
0 commit comments