mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-20 07:39:28 +00:00
Fixed the version ordering for libs.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -244,7 +244,7 @@ export class BoardsServiceImpl implements BoardsService {
|
||||
const pkg = packages.get(id);
|
||||
if (pkg) {
|
||||
pkg.availableVersions.push(platform.getLatest());
|
||||
pkg.availableVersions.sort(BoardPackage.VERSION_COMPARATOR);
|
||||
pkg.availableVersions.sort(Installable.Version.COMPARATOR);
|
||||
} else {
|
||||
packages.set(id, toPackage(platform));
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export class LibraryServiceImpl implements LibraryService {
|
||||
.slice(0, 50)
|
||||
.map(item => {
|
||||
// TODO: This seems to contain only the latest item instead of all of the items.
|
||||
const availableVersions = item.getReleasesMap().getEntryList().map(([key, _]) => key);
|
||||
const availableVersions = item.getReleasesMap().getEntryList().map(([key, _]) => key).sort(Installable.Version.COMPARATOR);
|
||||
let installedVersion: string | undefined;
|
||||
const installed = installedLibsIdx.get(item.getName());
|
||||
if (installed) {
|
||||
|
||||
Reference in New Issue
Block a user