async getPackageFiles(basePath = this.nodeModulesPath) {
    try {
      // Declare file list
      const files = []

      // Get files
      const dirents = await fs.readdir(basePath, { withFileTypes: true });
      const validFiles = dirents.filter(d => d.name.toLowerCase() == 'package.json').map(d => path.join(basePath, d.name));
      files.push(...validFiles);

      // For each directory entry
      for (const dirent of dirents) {
        if (dirent.isDirectory()) {
          const subFiles = await this.getPackageFiles(path.join(basePath, dirent.name));
          files.push(...subFiles);
        }
      }
      return files;
    } catch (e) {
      throw `Failed to get package.json files in ${this.nodeModulesPath} with error: ${e}`;
    }
  }
Returns an array of `package.json` files under the given path and subdirectories.
@param {String} [basePath] The base path for recursive directory search.