madskristensen / Packman

A client-side package manager
Other
28 stars 7 forks source link

Better sorting of version numbers #24

Closed beruic closed 8 years ago

beruic commented 8 years ago

Installed product versions

Version numbers are sorted wrongly.

Steps to recreate

  1. Change the extension to use CDNJS
  2. Add the package bootstrap-markdown
  3. Add the version property
  4. Enter 2 so intellisense is activated

    Current behavior

Two things are wrong with the list that is shown:

  1. The list is sorted alphabetically. This means that version 2.10.0 appears in the middle of the list, even though it is the highest version (see the below screenshot). packman_version_bug
  2. It is ordered lowest to highest. Usually you want the newest version, so the order should be highest to lowest.

    Expected behavior

I'd expect it to sort newest version to oldest. Versions are usually The .NET Version class could be useful for sorting correctly, However I'm not shure how it parses beta numbers and such.

madskristensen commented 8 years ago

Unfortunately, property value Intellisense entries are sorted by the JSON editor regardless of how this extension sorts them. @mlorbetske do you know if this has been fixed?