protected function getInstalledPackages(string $location) : array
    {
        if(isset($this->installedPackages[$location])){
            return $this->installedPackages[$location];
        }

        $installedFile = $location . 'installed.json';
        if(!file_exists($installedFile)){
            return [];
        }

        return $this->installedPackages[$location] = $this->loadJsonFile($installedFile);
    }