async _upgradeInfoFile(file, installed) {
    let info = await fs.readJson(this.localThemeInfoFile, { throws: false });
    if (!info || !info.themes) {
      info = { themes: [] };
    }
    installed.forEach((item) => {
      if (item.isDefault) {
        return;
      }
      info.themes.push(item);
    });
    await fs.writeJson(file, info);
  }
/**
   * Upgrades original theme info file structure to v1.
   *
   * This function checks for already installed themes that are not default themes
   * and adds it to the list of newly created file.
   *
   * @param {String} file Theme info (installed) file location.
   * @param {Array<Object>} installed List of currently installed packages.
   * @return {Promise}
   */
Upgrades original theme info file structure to v1.
This function checks for already installed themes that are not default themes
and adds it to the list of newly created file.

@param {String} file Theme info (installed) file location.
@param {Array} installed List of currently installed packages.
@return {Promise}
Upgrades original theme info file structure to v1 . This function checks for already installed themes that are not default themes and adds it to the list of newly created file . @param { String } file Theme info ( installed ) file location . @param { Array } installed List of currently installed packages . @return { Promise }
async _upgradeInfoFile(file, installed) {
    let info = await fs.readJson(this.localThemeInfoFile, { throws: false });
    if (!info || !info.themes) {
      info = { themes: [] };
    }
    installed.forEach((item) => {
      if (item.isDefault) {
        return;
      }
      info.themes.push(item);
    });
    await fs.writeJson(file, info);
  }
async _upgradeInfoFile ( file , installed ) { let info = await fs . readJson ( this . localThemeInfoFile , { throws : false } ) ; if ( ! info || ! info . themes ) { info = { themes : [ ] } ; } installed . forEach ( ( item ) => { if ( item . isDefault ) { return ; } info . themes . push ( item ) ; } ) ; await fs . writeJson ( file , info ) ; }
Upgrades original theme info file structure to v1.
Upgrades original theme info file structure to v1 .