return the closest parent or current directory that contains a package.json