message: Changes order of commands for upgrading SPFx projects. Closes
diff: @@ -637,14 +637,8 @@ ${f.resolution}
  packagesDepUn: string[], packagesDevUn: string[]): string[] {
  const commandsToExecute: string[] = [];
  - if (packagesDepExact.length > 0) {
  - commandsToExecute.push(`${this.getPackageManagerCommand('install')} ${packagesDepExact.join(' ')}`);
  - }
  -
  - if (packagesDevExact.length > 0) {
  - commandsToExecute.push(`${this.getPackageManagerCommand('installDev')} ${packagesDevExact.join(' ')}`);
  - }
  -
  + // uninstall commands must come first otherwise there is a chance that
  + // whatever we recommended to install, will be immediately uninstalled
  if (packagesDepUn.length > 0) {
  commandsToExecute.push(`${this.getPackageManagerCommand('uninstall')} ${packagesDepUn.join(' ')}`);
  }
  @@ -653,6 +647,14 @@ ${f.resolution}
  commandsToExecute.push(`${this.getPackageManagerCommand('uninstallDev')} ${packagesDevUn.join(' ')}`);
  }
  + if (packagesDepExact.length > 0) {
  + commandsToExecute.push(`${this.getPackageManagerCommand('install')} ${packagesDepExact.join(' ')}`);
  + }
  +
  + if (packagesDevExact.length > 0) {
  + commandsToExecute.push(`${this.getPackageManagerCommand('installDev')} ${packagesDevExact.join(' ')}`);
  + }
  +
  return commandsToExecute;
  }
  