madskristensen / PackageInstaller

A Visual Studio extension
Other
67 stars 15 forks source link

Wrong sorting of version numbers? #31

Open UweKeim opened 5 years ago

UweKeim commented 5 years ago

Installed product versions

Description

Sorting seems to be alphabetially only, not numerically.

Steps to recreate

  1. Use Quick Install Package to add "sweetalert2" from npm to a project
  2. Open the Version drop down list
  3. See the wrong ordered version numbers

Current behavior

The sorting of the package version to select seems to be by done alphabetically only.

This results in e.g. "8.17.1" being considered as lower than e.g. "8.2.0".

image

image

Expected behavior

The sorting should aknowledge that there can be 2-digit minor version components, not only 1-digit version components, too and e.g. treat "17" as being larger than "2".

More information

I do think it might be related to the code in this line 91 but I'm not quite sure.