import fs from "fs" ; import path from "path" ; function loadPackageJson ( ) { const packageJSONPath = path . join ( __dirname , "../package.json" ) ; return JSON . parse ( fs . readFileSync ( packageJSONPath , { encoding : "utf8" } ) ) ; } export default function getVersion ( ) { return loadPackageJson ( ) . version ; } export function getRequiredNodeVersion ( ) { return loadPackageJson ( ) . engines . node ; }