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) {
31
31
NODE_ENV : 'production' ,
32
32
BABEL_ENV : bundle ,
33
33
MUI_BUILD_VERBOSE : verbose ,
34
- ...getVersionEnvVariables ( ) ,
34
+ ...( await getVersionEnvVariables ( ) ) ,
35
35
} ;
36
36
37
37
const babelConfigPath = path . resolve ( getWorkspaceRoot ( ) , 'babel.config.js' ) ;
Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
2
import url from 'url' ;
3
- import fs from 'fs' ;
3
+ import fs from 'fs/promises ' ;
4
4
5
5
/**
6
6
* Returns the full path of the root directory of this repository.
@@ -15,8 +15,8 @@ export function getWorkspaceRoot() {
15
15
/**
16
16
* Returns the version and destructured values of the version as env variables to be replaced.
17
17
*/
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' ) ;
20
20
const { version = null } = JSON . parse ( packageJsonData ) ;
21
21
22
22
if ( ! version ) {
You can’t perform that action at this time.
0 commit comments