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 @@ -31,7 +31,7 @@ async function run(argv) {
3131 NODE_ENV : 'production' ,
3232 BABEL_ENV : bundle ,
3333 MUI_BUILD_VERBOSE : verbose ,
34- ...getVersionEnvVariables ( ) ,
34+ ...( await getVersionEnvVariables ( ) ) ,
3535 } ;
3636
3737 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