diff --git a/src/controllers/krate/rev_deps.rs b/src/controllers/krate/rev_deps.rs index c0547026ea1..dfe0e543ab0 100644 --- a/src/controllers/krate/rev_deps.rs +++ b/src/controllers/krate/rev_deps.rs @@ -69,6 +69,7 @@ pub async fn list_reverse_dependencies( .inner_join(crates::table) .left_outer_join(users::table.left_join(oauth_github::table)) .select(<(Version, CrateName, Option)>::as_select()) + .order(versions::id) .load(&mut conn) .await?; diff --git a/src/tests/routes/crates/snapshots/integration__routes__crates__reverse_dependencies__reverse_dependencies_includes_published_by_user_when_present-2.snap b/src/tests/routes/crates/snapshots/integration__routes__crates__reverse_dependencies__reverse_dependencies_includes_published_by_user_when_present-2.snap index ae2fb60fc69..9d1949234d8 100644 --- a/src/tests/routes/crates/snapshots/integration__routes__crates__reverse_dependencies__reverse_dependencies_includes_published_by_user_when_present-2.snap +++ b/src/tests/routes/crates/snapshots/integration__routes__crates__reverse_dependencies__reverse_dependencies_includes_published_by_user_when_present-2.snap @@ -37,18 +37,18 @@ expression: response.json() "audit_actions": [], "bin_names": null, "checksum": "0000000000000000000000000000000000000000000000000000000000000000", - "crate": "c3", + "crate": "c2", "crate_size": 0, "created_at": "[datetime]", "description": null, - "dl_path": "/api/v1/crates/c3/3.0.0/download", + "dl_path": "/api/v1/crates/c2/2.0.0/download", "documentation": null, "downloads": 0, "edition": null, "features": {}, "has_lib": null, "homepage": null, - "id": 3, + "id": 2, "lib_links": null, "license": null, "linecounts": { @@ -57,20 +57,13 @@ expression: response.json() "total_comment_lines": 0 }, "links": { - "authors": "/api/v1/crates/c3/3.0.0/authors", - "dependencies": "/api/v1/crates/c3/3.0.0/dependencies", - "version_downloads": "/api/v1/crates/c3/3.0.0/downloads" - }, - "num": "3.0.0", - "published_by": { - "avatar": null, - "created_at": "[datetime]", - "id": 1, - "login": "foo", - "name": null, - "url": "https://github.com/foo" + "authors": "/api/v1/crates/c2/2.0.0/authors", + "dependencies": "/api/v1/crates/c2/2.0.0/dependencies", + "version_downloads": "/api/v1/crates/c2/2.0.0/downloads" }, - "readme_path": "/api/v1/crates/c3/3.0.0/readme", + "num": "2.0.0", + "published_by": null, + "readme_path": "/api/v1/crates/c2/2.0.0/readme", "repository": null, "rust_version": null, "trustpub_data": null, @@ -82,18 +75,18 @@ expression: response.json() "audit_actions": [], "bin_names": null, "checksum": "0000000000000000000000000000000000000000000000000000000000000000", - "crate": "c2", + "crate": "c3", "crate_size": 0, "created_at": "[datetime]", "description": null, - "dl_path": "/api/v1/crates/c2/2.0.0/download", + "dl_path": "/api/v1/crates/c3/3.0.0/download", "documentation": null, "downloads": 0, "edition": null, "features": {}, "has_lib": null, "homepage": null, - "id": 2, + "id": 3, "lib_links": null, "license": null, "linecounts": { @@ -102,13 +95,20 @@ expression: response.json() "total_comment_lines": 0 }, "links": { - "authors": "/api/v1/crates/c2/2.0.0/authors", - "dependencies": "/api/v1/crates/c2/2.0.0/dependencies", - "version_downloads": "/api/v1/crates/c2/2.0.0/downloads" + "authors": "/api/v1/crates/c3/3.0.0/authors", + "dependencies": "/api/v1/crates/c3/3.0.0/dependencies", + "version_downloads": "/api/v1/crates/c3/3.0.0/downloads" }, - "num": "2.0.0", - "published_by": null, - "readme_path": "/api/v1/crates/c2/2.0.0/readme", + "num": "3.0.0", + "published_by": { + "avatar": null, + "created_at": "[datetime]", + "id": 1, + "login": "foo", + "name": null, + "url": "https://github.com/foo" + }, + "readme_path": "/api/v1/crates/c3/3.0.0/readme", "repository": null, "rust_version": null, "trustpub_data": null,