Skip to content

Commit

Permalink
fix: update deno_doc (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats authored Dec 19, 2024
1 parent 34603e9 commit 998ffec
Show file tree
Hide file tree
Showing 21 changed files with 548 additions and 224 deletions.
466 changes: 378 additions & 88 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"
url = "2"
url = "2.5.4"
uuid = { version = "1", features = ["v4", "serde"] }
clap = { version = "4", default-features = false, features = [
"derive",
Expand All @@ -74,13 +74,13 @@ opentelemetry = { version = "0.19", features = [
] }
opentelemetry-otlp = "0.12"
opentelemetry-gcloud-trace = "0.5.0"
deno_semver = "0.5.2"
deno_semver = "0.6.0"
flate2 = "1"
thiserror = "1"
thiserror = "2"
async-tar = "0.4.2"
deno_graph = "0.85.1"
deno_ast = { version = "0.43.3", features = ["view"] }
deno_doc = { version = "0.161.0", features = ["comrak"] }
deno_graph = "0.86.3"
deno_ast = { version = "0.44.0", features = ["view"] }
deno_doc = { version = "0.162.1", features = ["comrak"] }
comrak = { version = "0.29.0", default-features = false }
ammonia = "4.0.0"
async-trait = "0.1.73"
Expand All @@ -92,7 +92,7 @@ regex = "1.10.2"
postmark = { version = "=0.10.0", features = ["reqwest-rustls-tls"] }
handlebars = "5.0.0"
jsonc-parser = { version = "0.23", features = ["serde"] }
deno_npm = "0.25.0"
deno_npm = "0.26.0"
sha1 = "0.10.6"
infer = "0.15.0"
x509-parser = { version = "0.15.1", features = ["verify"] }
Expand All @@ -114,5 +114,5 @@ lazy_static = "1.5.0"

[dev-dependencies]
flate2 = "1"
deno_semver = "0.5.1"
deno_semver = "0.6.0"
pretty_assertions = "1.4.0"
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile is adapted from https://whitfin.io/blog/speeding-up-rust-docker-builds/

FROM rust:1.77 as build
FROM rust:1.83 as build

# create a new empty shell project
RUN USER=root cargo new --bin registry_api
Expand Down
10 changes: 5 additions & 5 deletions api/src/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl deno_graph::source::Resolver for JsrResolver {
&self,
specifier_text: &str,
referrer_range: &deno_graph::Range,
_mode: deno_graph::source::ResolutionMode,
_kind: deno_graph::source::ResolutionKind,
) -> Result<ModuleSpecifier, deno_graph::source::ResolveError> {
if let Ok(package_ref) = JsrPackageReqReference::from_str(specifier_text) {
if self.member.name == package_ref.req().name
Expand Down Expand Up @@ -454,7 +454,7 @@ struct SyncLoader<'a> {
files: &'a HashMap<PackagePath, Vec<u8>>,
}

impl<'a> SyncLoader<'a> {
impl SyncLoader<'_> {
fn load_sync(
&self,
specifier: &ModuleSpecifier,
Expand Down Expand Up @@ -484,7 +484,7 @@ impl<'a> SyncLoader<'a> {
}
}

impl<'a> deno_graph::source::Loader for SyncLoader<'a> {
impl deno_graph::source::Loader for SyncLoader<'_> {
fn load(
&self,
specifier: &ModuleSpecifier,
Expand Down Expand Up @@ -628,7 +628,7 @@ struct GcsLoader<'a> {
version: &'a Version,
}

impl<'a> GcsLoader<'a> {
impl GcsLoader<'_> {
fn load_inner(
&self,
specifier: &ModuleSpecifier,
Expand Down Expand Up @@ -669,7 +669,7 @@ impl<'a> GcsLoader<'a> {
}
}

impl<'a> deno_graph::source::Loader for GcsLoader<'a> {
impl deno_graph::source::Loader for GcsLoader<'_> {
fn load(
&self,
specifier: &ModuleSpecifier,
Expand Down
10 changes: 5 additions & 5 deletions api/src/api/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub async fn update_user(mut req: Request<Body>) -> ApiResult<ApiFullUser> {
iam.check_admin_access()?;

let user_id = req.param_uuid("user_id")?;
Span::current().record("user_id", &field::display(&user_id));
Span::current().record("user_id", field::display(&user_id));
let ApiAdminUpdateUserRequest {
is_staff,
is_blocked,
Expand Down Expand Up @@ -172,7 +172,7 @@ pub async fn patch_scopes(mut req: Request<Body>) -> ApiResult<ApiFullScope> {
iam.check_admin_access()?;

let scope = req.param_scope()?;
Span::current().record("scope", &field::display(&scope));
Span::current().record("scope", field::display(&scope));

let ApiAdminUpdateScopeRequest {
package_limit,
Expand Down Expand Up @@ -214,8 +214,8 @@ pub async fn assign_scope(mut req: Request<Body>) -> ApiResult<ApiScope> {
iam.check_admin_access()?;

let ApiAssignScopeRequest { scope, user_id } = decode_json(&mut req).await?;
Span::current().record("scope", &field::display(&scope));
Span::current().record("user_id", &field::display(&user_id));
Span::current().record("scope", field::display(&scope));
Span::current().record("user_id", field::display(&user_id));

let db = req.data::<Database>().unwrap();

Expand Down Expand Up @@ -268,7 +268,7 @@ pub async fn requeue_publishing_tasks(req: Request<Body>) -> ApiResult<()> {

let publishing_task_id = req.param_uuid("publishing_task")?;
Span::current()
.record("publishing_task", &field::display(&publishing_task_id));
.record("publishing_task", field::display(&publishing_task_id));

let db = req.data::<Database>().unwrap().clone();
let task = db
Expand Down
8 changes: 4 additions & 4 deletions api/src/api/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ mod tests {

async fn details(t: &mut TestSetup, code: &str) -> Response<Body> {
t.http()
.get(&format!("/api/authorizations/details/{}", code))
.get(format!("/api/authorizations/details/{}", code))
.call()
.await
.unwrap()
Expand Down Expand Up @@ -335,7 +335,7 @@ mod tests {

let mut resp = t
.http()
.post(&format!("/api/authorizations/approve/{}", auth.code))
.post(format!("/api/authorizations/approve/{}", auth.code))
.call()
.await
.unwrap();
Expand Down Expand Up @@ -399,7 +399,7 @@ mod tests {

let mut resp = t
.http()
.post(&format!("/api/authorizations/approve/{}", auth.code))
.post(format!("/api/authorizations/approve/{}", auth.code))
.call()
.await
.unwrap();
Expand Down Expand Up @@ -454,7 +454,7 @@ mod tests {

let mut resp = t
.http()
.post(&format!("/api/authorizations/deny/{}", auth.code))
.post(format!("/api/authorizations/deny/{}", auth.code))
.call()
.await
.unwrap();
Expand Down
Loading

0 comments on commit 998ffec

Please sign in to comment.