diff --git a/editors/code/src/dependencies_provider.ts b/editors/code/src/dependencies_provider.ts index 74fbacbb3cd..8900aa9a5f3 100644 --- a/editors/code/src/dependencies_provider.ts +++ b/editors/code/src/dependencies_provider.ts @@ -85,11 +85,15 @@ export class RustDependenciesProvider ); const crates = dependenciesResult.crates; - return crates.map((crate) => { - const dep = this.toDep(crate.name || "unknown", crate.version || "", crate.path); - this.dependenciesMap[dep.dependencyPath.toLowerCase()] = dep; - return dep; - }); + return crates + .map((crate) => { + const dep = this.toDep(crate.name || "unknown", crate.version || "", crate.path); + this.dependenciesMap[dep.dependencyPath.toLowerCase()] = dep; + return dep; + }) + .sort((a, b) => { + return a.label.localeCompare(b.label); + }); } private toDep(moduleName: string, version: string, path: string): Dependency {