@@ -9,15 +9,23 @@ const execAsync = promisify(exec);
99const __filename = fileURLToPath ( import . meta. url ) ;
1010const __dirname = dirname ( __filename ) ;
1111
12+ interface PackageJson {
13+ config ?: {
14+ aztecVersion ?: string ;
15+ } ;
16+ }
17+
1218/**
1319 * Check if the installed Aztec CLI version matches the expected version in package.json
1420 */
15- async function checkAztecVersion ( ) {
21+ async function checkAztecVersion ( ) : Promise < void > {
1622 console . log ( "🔍 Checking Aztec CLI version" ) ;
1723
1824 // Read expected version from package.json
1925 const packageJsonPath = join ( __dirname , ".." , "package.json" ) ;
20- const packageJson = JSON . parse ( readFileSync ( packageJsonPath , "utf8" ) ) ;
26+ const packageJson : PackageJson = JSON . parse (
27+ readFileSync ( packageJsonPath , "utf8" ) ,
28+ ) ;
2129 const expectedVersion = packageJson . config ?. aztecVersion ;
2230
2331 if ( ! expectedVersion ) {
@@ -26,15 +34,15 @@ async function checkAztecVersion() {
2634
2735 console . log ( `📋 Expected Aztec version: ${ expectedVersion } ` ) ;
2836
29- let installedVersion ;
37+ let installedVersion : string ;
3038
3139 try {
3240 // Check if aztec CLI is installed and get version
3341 const { stdout } = await execAsync ( "aztec --version" ) ;
3442 installedVersion = stdout . trim ( ) ;
3543
3644 console . log ( "✅ Aztec CLI version check passed" ) ;
37- } catch ( error ) {
45+ } catch ( error : any ) {
3846 if ( error . code === "ENOENT" ) {
3947 throw new Error (
4048 `❌ Aztec CLI not found!\n` +
0 commit comments