mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-10 02:48:33 +00:00
Fixed the version ordering for libs.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -130,7 +130,7 @@ export namespace Port {
|
||||
}
|
||||
if (isOSX) {
|
||||
// Example: `/dev/cu.usbmodem14401`
|
||||
if (/(tty|cu)\..*/.test(address.substring('/dev/'.length))) {
|
||||
if (/(tty|cu)\..*/.test(address.substring('/dev/'.length))) {
|
||||
return [
|
||||
'/dev/cu.MALS',
|
||||
'/dev/cu.SOC',
|
||||
@@ -170,12 +170,6 @@ export interface BoardPackage extends ArduinoComponent {
|
||||
id: string;
|
||||
boards: Board[];
|
||||
}
|
||||
export namespace BoardPackage {
|
||||
/**
|
||||
* Most recent version comes first, then the previous versions. (`1.8.1`, `1.6.3`, `1.6.2`, `1.6.1` and so on.)
|
||||
*/
|
||||
export const VERSION_COMPARATOR = (left: string, right: string) => naturalCompare(right, left);
|
||||
}
|
||||
|
||||
export interface Board {
|
||||
name: string
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const naturalCompare: (left: string, right: string) => number = require('string-natural-compare').caseInsensitive;
|
||||
import { ArduinoComponent } from './arduino-component';
|
||||
|
||||
export interface Installable<T extends ArduinoComponent> {
|
||||
@@ -8,4 +9,10 @@ export interface Installable<T extends ArduinoComponent> {
|
||||
}
|
||||
export namespace Installable {
|
||||
export type Version = string;
|
||||
export namespace Version {
|
||||
/**
|
||||
* Most recent version comes first, then the previous versions. (`1.8.1`, `1.6.3`, `1.6.2`, `1.6.1` and so on.)
|
||||
*/
|
||||
export const COMPARATOR = (left: Version, right: Version) => naturalCompare(right, left);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user