11import { dirname as pDirname , join as pJoin , resolve as pResolve } from 'node:path' ;
22import { fileURLToPath } from 'node:url' ;
33
4- import { readJSONSync , writeJsonSync } from '. /fs-utils.mjs ' ;
4+ import { readJsonSync , writeJsonSync } from '@gc-utils /fs-extra ' ;
55
66const __filename = fileURLToPath ( import . meta. url ) ;
77const __dirname = pDirname ( __filename ) ;
@@ -12,8 +12,8 @@ const projectRootPath = pJoin(__dirname, '../');
1212 * with current version from "package.json" root into "dist/package.json"
1313 */
1414( async function main ( ) {
15- const mainPkg = readJSONSync ( pJoin ( projectRootPath , 'package.json' ) ) ;
16- const distPkg = readJSONSync ( pJoin ( projectRootPath , 'dist' , 'package.json' ) ) ;
15+ const mainPkg = readJsonSync ( pJoin ( projectRootPath , 'package.json' ) ) ;
16+ const distPkg = readJsonSync ( pJoin ( projectRootPath , 'dist' , 'package.json' ) ) ;
1717
1818 // replace all workspace protocol with current version from "package.json" root into "dist/package.json"
1919 console . log ( '-------------------------------------------------------------------------------------' ) ;
@@ -26,7 +26,7 @@ const projectRootPath = pJoin(__dirname, '../');
2626 if ( depName . startsWith ( '@slickgrid-universal/' ) || depVersion . startsWith ( 'workspace:' ) ) {
2727 // we need to get each package version
2828 const depPkgName = depName . replace ( '@slickgrid-universal' , '' ) ;
29- const depPkg = readJSONSync ( pJoin ( projectRootPath , '../../packages/' , depPkgName , 'package.json' ) ) ;
29+ const depPkg = readJsonSync ( pJoin ( projectRootPath , '../../packages/' , depPkgName , 'package.json' ) ) ;
3030 console . log ( `update dependency { "${ depName } ": "${ depPkg . version } " }` ) ;
3131 distPkg . dependencies [ depName ] = depPkg . version ;
3232 }
0 commit comments