diff --git a/Cargo.lock b/Cargo.lock index 4e5ecebb..61472235 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -122,7 +122,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror", + "thiserror 1.0.63", "time", ] @@ -135,7 +135,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -158,7 +158,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -301,7 +301,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -332,7 +332,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -621,7 +621,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -786,7 +786,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -797,7 +797,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -837,11 +837,12 @@ dependencies = [ [[package]] name = "deno_ast" -version = "0.43.3" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d00b724e06d2081a141ec1155756a0b465d413d8e2a7515221f61d482eb2ee" +checksum = "eebc7aaabfdb3ddcad32aee1b62d250149dc8b35dfbdccbb125df2bdc62da952" dependencies = [ "base64 0.21.7", + "deno_error", "deno_media_type", "deno_terminal", "dprint-swc-ext", @@ -871,16 +872,16 @@ dependencies = [ "swc_visit", "swc_visit_macros", "text_lines", - "thiserror", + "thiserror 2.0.4", "unicode-width", "url", ] [[package]] name = "deno_doc" -version = "0.161.0" +version = "0.162.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "994f95dddc99d7757772ca8f97c9dc7cca6e34a3d354fa77783041edf1366453" +checksum = "5e581acf5f25677ead79a7ff5e54019773b09ef91aa131939610b5b99c82e918" dependencies = [ "anyhow", "cfg-if", @@ -905,11 +906,32 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "deno_error" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "199c66ffd17ee1a948904d33f3d3f364573951c1f9fb3f859bfe7770bf33862a" +dependencies = [ + "deno_error_macro", + "libc", +] + +[[package]] +name = "deno_error_macro" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd99df6ae75443907e1f959fc42ec6dcea67a7bd083e76cf23a117102c9a2ce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "deno_graph" -version = "0.85.1" +version = "0.86.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c11027d9b4e9ff4f8bcb8316a1a5dd5241dc267380507e177457bc491696189" +checksum = "fc78ed0b4bbcb4197300f0d6e7d1edc2d2c5019cdb9dedba7ff229158441885b" dependencies = [ "anyhow", "async-trait", @@ -929,7 +951,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror", + "thiserror 2.0.4", "twox-hash", "url", "wasm_dep_analyzer", @@ -937,14 +959,14 @@ dependencies = [ [[package]] name = "deno_lockfile" -version = "0.23.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb68a4a666c69eabd8fe505d6fdc4ed4a2d962fe1680dbfa8b0c8a2975d58ed0" +checksum = "559c19feb00af0c34f0bd4a20e56e12463fafd5c5069d6005f3ce33008027eea" dependencies = [ "deno_semver", "serde", "serde_json", - "thiserror", + "thiserror 2.0.4", ] [[package]] @@ -960,9 +982,9 @@ dependencies = [ [[package]] name = "deno_npm" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb2dd7efaf478d780a6ca43e6127667d5329ed9a5ff89f42cec0dc21ee58342" +checksum = "f2f125a5dba7839c46394a0a9c835da9fe60f5f412587ab4956a76492a1cc6a8" dependencies = [ "anyhow", "async-trait", @@ -973,7 +995,7 @@ dependencies = [ "monch", "serde", "serde_json", - "thiserror", + "thiserror 2.0.4", "url", ] @@ -984,28 +1006,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff25f6e08e7a0214bbacdd6f7195c7f1ebcd850c87a624e4ff06326b68b42d99" dependencies = [ "percent-encoding", - "thiserror", + "thiserror 1.0.63", "url", ] [[package]] name = "deno_semver" -version = "0.5.13" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6657fecb9ac6a7a71f552c95e8cc492466a75f5660224577e2226bcf30db9768" +checksum = "4756be7351289726087408984db18b9eb5e0186907673f39f858d119d0162071" dependencies = [ + "deno_error", "monch", "once_cell", "serde", - "thiserror", + "thiserror 2.0.4", "url", ] [[package]] name = "deno_terminal" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6337d4e7f375f8b986409a76fbeecfa4bd8a1343e63355729ae4befa058eaf" +checksum = "daef12499e89ee99e51ad6000a91f600d3937fb028ad4918af76810c5bc9e0d5" dependencies = [ "once_cell", "termcolor", @@ -1073,7 +1096,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1083,7 +1106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" dependencies = [ "derive_builder_core", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1118,7 +1141,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1284,7 +1307,7 @@ checksum = "32016f1242eb82af5474752d00fd8ebcd9004bd69b462b1c91de833972d08ed4" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1383,7 +1406,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1426,7 +1449,7 @@ dependencies = [ "hyper", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tokio", "tracing", ] @@ -1530,7 +1553,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -1545,7 +1568,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -1667,7 +1690,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1777,6 +1800,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1785,12 +1926,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1810,7 +1962,7 @@ dependencies = [ "percent-encoding", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "url", ] @@ -1868,7 +2020,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -1891,9 +2043,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" @@ -1926,7 +2078,7 @@ dependencies = [ "num-bigint", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "yasna", "zeroize", ] @@ -2003,6 +2155,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" @@ -2244,7 +2402,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "sha2", - "thiserror", + "thiserror 1.0.63", "url", ] @@ -2322,7 +2480,7 @@ dependencies = [ "opentelemetry", "opentelemetry-proto", "prost 0.11.9", - "thiserror", + "thiserror 1.0.63", "tokio", "tonic 0.8.3", ] @@ -2361,7 +2519,7 @@ dependencies = [ "indexmap 1.9.3", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.63", "urlencoding", ] @@ -2382,7 +2540,7 @@ dependencies = [ "opentelemetry_api", "percent-encoding", "rand", - "thiserror", + "thiserror 1.0.63", "tokio", "tokio-stream", ] @@ -2471,7 +2629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.63", "ucd-trie", ] @@ -2495,7 +2653,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -2559,7 +2717,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -2617,7 +2775,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -2697,7 +2855,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "typed-builder", "url", ] @@ -2735,9 +2893,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2785,7 +2943,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -2995,7 +3153,7 @@ dependencies = [ "sitemap-rs", "sqlx", "tar", - "thiserror", + "thiserror 2.0.4", "tokio", "tokio-stream", "tracing", @@ -3383,7 +3541,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -3488,7 +3646,7 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint", "num-traits", - "thiserror", + "thiserror 1.0.63", "time", ] @@ -3657,7 +3815,7 @@ dependencies = [ "sha2", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.63", "tokio", "tokio-stream", "tracing", @@ -3743,7 +3901,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.63", "tracing", "uuid", "whoami", @@ -3784,7 +3942,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.63", "tracing", "uuid", "whoami", @@ -3875,7 +4033,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -3990,7 +4148,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4039,7 +4197,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4124,7 +4282,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4231,7 +4389,7 @@ checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4242,7 +4400,7 @@ checksum = "f486687bfb7b5c560868f69ed2d458b880cebc9babebcb67e49f31b55c5bf847" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4265,7 +4423,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4281,9 +4439,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -4308,6 +4466,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -4394,7 +4563,16 @@ version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.63", +] + +[[package]] +name = "thiserror" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" +dependencies = [ + "thiserror-impl 2.0.4", ] [[package]] @@ -4405,7 +4583,18 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] @@ -4449,6 +4638,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -4500,7 +4699,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4665,7 +4864,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -4793,7 +4992,7 @@ checksum = "eaca0fe34fa96eec6aaa8e63308dbe1bafe65a6317487c287f93938959b21907" dependencies = [ "lazy_static", "regex", - "thiserror", + "thiserror 1.0.63", "tree-sitter", ] @@ -4927,7 +5126,7 @@ checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", ] [[package]] @@ -5028,9 +5227,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -5050,12 +5249,24 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.10.0" @@ -5133,7 +5344,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -5167,7 +5378,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5197,7 +5408,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f270206a91783fd90625c8bb0d8fbd459d0b1d1bf209b656f713f01ae7c04b8" dependencies = [ - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -5424,6 +5635,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -5447,7 +5670,7 @@ dependencies = [ "oid-registry", "ring 0.16.20", "rusticata-macros", - "thiserror", + "thiserror 1.0.63", "time", ] @@ -5492,6 +5715,30 @@ dependencies = [ "num-bigint", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure 0.13.1", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -5510,7 +5757,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure 0.13.1", ] [[package]] @@ -5530,5 +5798,27 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.90", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", ] diff --git a/api/Cargo.toml b/api/Cargo.toml index 1a0bff5f..33d5e36e 100644 --- a/api/Cargo.toml +++ b/api/Cargo.toml @@ -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", @@ -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" @@ -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"] } @@ -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" diff --git a/api/Dockerfile b/api/Dockerfile index a2bdfc20..c3db06ef 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -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 diff --git a/api/src/analysis.rs b/api/src/analysis.rs index 930cd65d..fd5bfa9c 100644 --- a/api/src/analysis.rs +++ b/api/src/analysis.rs @@ -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 { if let Ok(package_ref) = JsrPackageReqReference::from_str(specifier_text) { if self.member.name == package_ref.req().name @@ -454,7 +454,7 @@ struct SyncLoader<'a> { files: &'a HashMap>, } -impl<'a> SyncLoader<'a> { +impl SyncLoader<'_> { fn load_sync( &self, specifier: &ModuleSpecifier, @@ -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, @@ -628,7 +628,7 @@ struct GcsLoader<'a> { version: &'a Version, } -impl<'a> GcsLoader<'a> { +impl GcsLoader<'_> { fn load_inner( &self, specifier: &ModuleSpecifier, @@ -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, diff --git a/api/src/api/admin.rs b/api/src/api/admin.rs index b6ba0a01..61d766bd 100644 --- a/api/src/api/admin.rs +++ b/api/src/api/admin.rs @@ -114,7 +114,7 @@ pub async fn update_user(mut req: Request) -> ApiResult { 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, @@ -172,7 +172,7 @@ pub async fn patch_scopes(mut req: Request) -> ApiResult { 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, @@ -214,8 +214,8 @@ pub async fn assign_scope(mut req: Request) -> ApiResult { 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::().unwrap(); @@ -268,7 +268,7 @@ pub async fn requeue_publishing_tasks(req: Request) -> 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::().unwrap().clone(); let task = db diff --git a/api/src/api/authorization.rs b/api/src/api/authorization.rs index b2a3b627..0c29510f 100644 --- a/api/src/api/authorization.rs +++ b/api/src/api/authorization.rs @@ -302,7 +302,7 @@ mod tests { async fn details(t: &mut TestSetup, code: &str) -> Response { t.http() - .get(&format!("/api/authorizations/details/{}", code)) + .get(format!("/api/authorizations/details/{}", code)) .call() .await .unwrap() @@ -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(); @@ -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(); @@ -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(); diff --git a/api/src/api/package.rs b/api/src/api/package.rs index 8e857fb0..008b5069 100644 --- a/api/src/api/package.rs +++ b/api/src/api/package.rs @@ -223,7 +223,7 @@ pub async fn list_handler( req: Request, ) -> ApiResult> { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let (start, limit) = pagination(&req); @@ -250,12 +250,12 @@ pub async fn list_handler( )] pub async fn create_handler(mut req: Request) -> ApiResult { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let ApiCreatePackageRequest { package: package_name, } = decode_json(&mut req).await?; - Span::current().record("package", &field::display(&package_name)); + Span::current().record("package", field::display(&package_name)); let iam = req.iam(); iam.check_scope_write_access(&scope).await?; @@ -298,8 +298,8 @@ pub async fn get_handler(req: Request) -> ApiResult { let scope = req.param_scope()?; let package = req.param_package()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); let db = req.data::().unwrap(); let package = db @@ -540,8 +540,8 @@ pub async fn list_versions_handler( let scope = req.param_scope()?; let package = req.param_package()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); let db = req.data::().unwrap(); @@ -608,9 +608,9 @@ pub async fn get_version_handler( let scope = req.param_scope()?; let package = req.param_package()?; let version = req.param_version_or_latest()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); - Span::current().record("version", &field::display(&version)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); + Span::current().record("version", field::display(&version)); let db = req.data::().unwrap(); let _ = db @@ -645,9 +645,9 @@ pub async fn version_publish_handler( let package_scope = req.param_scope()?; let package_name = req.param_package()?; let package_version = req.param_version()?; - Span::current().record("scope", &field::display(&package_scope)); - Span::current().record("package", &field::display(&package_name)); - Span::current().record("version", &field::display(&package_version)); + Span::current().record("scope", field::display(&package_scope)); + Span::current().record("package", field::display(&package_name)); + Span::current().record("version", field::display(&package_version)); let config_file = PackagePath::try_from(&**req.query("config").ok_or_else(|| { let msg = "Missing query parameter 'config'".into(); @@ -813,9 +813,9 @@ pub async fn version_provenance_statements_handler( let package = req.param_package()?; let version = req.param_version()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); - Span::current().record("version", &field::display(&version)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); + Span::current().record("version", field::display(&version)); let body: ApiProvenanceStatementRequest = decode_json(&mut req).await?; @@ -835,7 +835,7 @@ pub async fn version_provenance_statements_handler( let (package, _, meta) = db .get_package(&scope, &package) .await? - .ok_or_else(|| ApiError::InternalServerError)?; + .ok_or(ApiError::InternalServerError)?; orama_client.upsert_package(&package, &meta); } @@ -859,9 +859,9 @@ pub async fn version_update_handler( let scope = req.param_scope()?; let package = req.param_package()?; let version = req.param_version()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); - Span::current().record("version", &field::display(&version)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); + Span::current().record("version", field::display(&version)); // WARNING: if an additional option gets added, then yanked time rendering needs to be changed in package/versions.tsx let body: ApiUpdatePackageVersionRequest = decode_json(&mut req).await?; @@ -933,17 +933,17 @@ pub async fn get_docs_handler( let scope = req.param_scope()?; let package_name = req.param_package()?; let version_or_latest = req.param_version_or_latest()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package_name)); - Span::current().record("version", &field::display(&version_or_latest)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package_name)); + Span::current().record("version", field::display(&version_or_latest)); let all_symbols = req.query("all_symbols").is_some(); - Span::current().record("all_symbols", &field::display(&all_symbols)); + Span::current().record("all_symbols", field::display(&all_symbols)); let entrypoint = req.query("entrypoint").and_then(|s| match s.as_str() { "" => None, s => Some(s), }); Span::current() - .record("entrypoint", &field::display(&entrypoint.unwrap_or(""))); + .record("entrypoint", field::display(&entrypoint.unwrap_or(""))); let symbol = req .query("symbol") @@ -953,7 +953,7 @@ pub async fn get_docs_handler( }) .transpose()?; Span::current() - .record("symbol", &field::display(&symbol.as_deref().unwrap_or(""))); + .record("symbol", field::display(&symbol.as_deref().unwrap_or(""))); if all_symbols && (entrypoint.is_some() || symbol.is_some()) { return Err(ApiError::MalformedRequest { @@ -1087,9 +1087,9 @@ pub async fn get_docs_search_handler( let scope = req.param_scope()?; let package_name = req.param_package()?; let version_or_latest = req.param_version_or_latest()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package_name)); - Span::current().record("version", &field::display(&version_or_latest)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package_name)); + Span::current().record("version", field::display(&version_or_latest)); let db = req.data::().unwrap(); let buckets = req.data::().unwrap(); @@ -1158,9 +1158,9 @@ pub async fn get_docs_search_html_handler( let scope = req.param_scope()?; let package_name = req.param_package()?; let version_or_latest = req.param_version_or_latest()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package_name)); - Span::current().record("version", &field::display(&version_or_latest)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package_name)); + Span::current().record("version", field::display(&version_or_latest)); let db = req.data::().unwrap(); let buckets = req.data::().unwrap(); @@ -1240,10 +1240,10 @@ pub async fn get_source_handler( let version_or_latest = req.param_version_or_latest()?; let path = req.query("path").cloned().unwrap_or("/".to_string()); - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); - Span::current().record("version", &field::display(&version_or_latest)); - Span::current().record("path", &field::display(&path)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); + Span::current().record("version", field::display(&version_or_latest)); + Span::current().record("path", field::display(&path)); let db = req.data::().unwrap(); let buckets = req.data::().unwrap(); @@ -1397,8 +1397,8 @@ pub async fn list_dependents_handler( ) -> ApiResult> { let scope = req.param_scope()?; let package = req.param_package()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); let (start, limit) = pagination(&req); let versions_per_package_limit = req @@ -1440,8 +1440,8 @@ pub async fn get_downloads_handler( ) -> ApiResult { let scope = req.param_scope()?; let package = req.param_package()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); let db = req.data::().unwrap(); db.get_package(&scope, &package) @@ -1499,9 +1499,9 @@ pub async fn list_dependencies_handler( let scope = req.param_scope()?; let package = req.param_package()?; let version = req.param_version()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); - Span::current().record("version", &field::display(&version)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); + Span::current().record("version", field::display(&version)); let db = req.data::().unwrap(); @@ -1531,8 +1531,8 @@ pub async fn list_publishing_tasks_handler( ) -> ApiResult> { let scope = req.param_scope()?; let package = req.param_package()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); let db = req.data::().unwrap(); @@ -1562,8 +1562,8 @@ pub async fn get_score_handler( ) -> ApiResult { let scope = req.param_scope()?; let package = req.param_package()?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("package", &field::display(&package)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("package", field::display(&package)); let db = req.data::().unwrap(); let (pkg, _, meta) = db @@ -3359,7 +3359,7 @@ ggHohNAjhbzDaY2iBW/m3NC5dehGUP4T2GBo/cwGhg== assert_eq!(tasks.len(), 1); t.http() - .delete(&format!( + .delete(format!( "/api/scopes/{}/packages/{}", scope_name, package_name )) diff --git a/api/src/api/publishing_task.rs b/api/src/api/publishing_task.rs index 84dfbbd6..11ff68fc 100644 --- a/api/src/api/publishing_task.rs +++ b/api/src/api/publishing_task.rs @@ -31,7 +31,7 @@ pub fn publishing_task_router() -> Router { pub async fn get_handler(req: Request) -> ApiResult { let publishing_task_id = req.param_uuid("publishing_task_id")?; Span::current() - .record("publishing_task_id", &field::display(&publishing_task_id)); + .record("publishing_task_id", field::display(&publishing_task_id)); let db = req.data::().unwrap(); diff --git a/api/src/api/scope.rs b/api/src/api/scope.rs index bdb40ce3..89ac6a2b 100644 --- a/api/src/api/scope.rs +++ b/api/src/api/scope.rs @@ -64,7 +64,7 @@ static RESERVED_SCOPES: OnceLock> = #[instrument(name = "POST /api/scopes", skip(req), err, fields(scope))] async fn create_handler(mut req: Request) -> ApiResult { let ApiCreateScopeRequest { scope } = decode_json(&mut req).await?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let db = req.data::().unwrap(); @@ -104,7 +104,7 @@ async fn create_handler(mut req: Request) -> ApiResult { #[instrument(name = "GET /api/scopes/:scope", skip(req), err, fields(scope))] async fn get_handler(req: Request) -> ApiResult { let scope_name = req.param_scope()?; - Span::current().record("scope", &field::display(&scope_name)); + Span::current().record("scope", field::display(&scope_name)); let db = req.data::().unwrap(); let scope = db @@ -130,7 +130,7 @@ async fn update_handler( mut req: Request, ) -> ApiResult { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let update_req: ApiUpdateScopeRequest = decode_json(&mut req).await?; @@ -202,7 +202,7 @@ async fn list_members_handler( req: Request, ) -> ApiResult> { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let db = req.data::().unwrap(); let scope_members = db.list_scope_members(&scope).await?; @@ -228,7 +228,7 @@ async fn invite_member_handler( mut req: Request, ) -> ApiResult { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let invite = decode_json::(&mut req).await?; @@ -313,8 +313,8 @@ async fn invite_member_handler( async fn get_member_handler(req: Request) -> ApiResult { let scope = req.param_scope()?; let member_id = req.param_uuid("member")?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("member", &field::display(&member_id)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("member", field::display(&member_id)); let db = req.data::().unwrap(); @@ -341,8 +341,8 @@ async fn update_member_handler( ) -> ApiResult { let scope = req.param_scope()?; let member_id = req.param_uuid("member")?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("member", &field::display(&member_id)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("member", field::display(&member_id)); let ApiUpdateScopeMemberRequest { is_admin } = decode_json(&mut req).await?; @@ -389,8 +389,8 @@ pub async fn delete_member_handler( ) -> ApiResult> { let scope = req.param_scope()?; let member_id = req.param_uuid("member")?; - Span::current().record("scope", &field::display(&scope)); - Span::current().record("member", &field::display(&member_id)); + Span::current().record("scope", field::display(&scope)); + Span::current().record("member", field::display(&member_id)); let db = req.data::().unwrap(); @@ -432,7 +432,7 @@ pub async fn list_invites_handler( req: Request, ) -> ApiResult> { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let db = req.data::().unwrap(); @@ -462,8 +462,8 @@ pub async fn delete_invite_handler( ) -> ApiResult> { let scope = req.param_scope()?; let user_id = req.param_uuid("user_id")?; - 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::().unwrap(); diff --git a/api/src/api/self_user.rs b/api/src/api/self_user.rs index 633d1464..c30d6115 100644 --- a/api/src/api/self_user.rs +++ b/api/src/api/self_user.rs @@ -82,7 +82,7 @@ pub async fn get_member_handler( req: Request, ) -> ApiResult { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let iam = req.iam(); let current_user = iam.check_current_user_access()?; @@ -126,7 +126,7 @@ pub async fn accept_invite_handler( req: Request, ) -> ApiResult { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let iam = req.iam(); let current_user = iam.check_current_user_access()?.to_owned(); @@ -151,7 +151,7 @@ pub async fn decline_invite_handler( req: Request, ) -> ApiResult> { let scope = req.param_scope()?; - Span::current().record("scope", &field::display(&scope)); + Span::current().record("scope", field::display(&scope)); let iam = req.iam(); let current_user = iam.check_current_user_access()?; @@ -423,7 +423,7 @@ mod tests { .await; t.http() - .delete(&format!("/api/user/tokens/{}", token.id)) + .delete(format!("/api/user/tokens/{}", token.id)) .call() .await .unwrap() @@ -448,7 +448,7 @@ mod tests { // can't delete the token again t.http() - .delete(&format!("/api/user/tokens/{}", token.id)) + .delete(format!("/api/user/tokens/{}", token.id)) .call() .await .unwrap() diff --git a/api/src/api/users.rs b/api/src/api/users.rs index 9947b49f..975cfb4a 100644 --- a/api/src/api/users.rs +++ b/api/src/api/users.rs @@ -27,7 +27,7 @@ pub fn users_router() -> Router { #[instrument(name = "GET /api/users/:id", skip(req), err, fields(id))] pub async fn get_handler(req: Request) -> ApiResult { let id = req.param_uuid("id")?; - Span::current().record("id", &field::display(id)); + Span::current().record("id", field::display(id)); let db = req.data::().unwrap(); let user = db @@ -43,7 +43,7 @@ pub async fn get_scopes_handler( req: Request, ) -> ApiResult> { let id = req.param_uuid("id")?; - Span::current().record("id", &field::display(id)); + Span::current().record("id", field::display(id)); let db = req.data::().unwrap(); db.get_user_public(id) diff --git a/api/src/docs.rs b/api/src/docs.rs index 2fd418b1..ec64d461 100644 --- a/api/src/docs.rs +++ b/api/src/docs.rs @@ -102,7 +102,7 @@ lazy_static::lazy_static! { struct AmmoniaRelativeUrlEvaluator(); -impl<'b> ammonia::UrlRelativeEvaluate<'b> for AmmoniaRelativeUrlEvaluator { +impl ammonia::UrlRelativeEvaluate<'_> for AmmoniaRelativeUrlEvaluator { fn evaluate<'a>(&self, url: &'a str) -> Option> { URL_REWRITER.with(|url_rewriter| { let rewriter = url_rewriter.borrow(); @@ -270,21 +270,19 @@ pub fn generate_docs( graph: &deno_graph::ModuleGraph, analyzer: &deno_graph::CapturingModuleAnalyzer, ) -> Result { + source_files.sort(); + let parser = deno_doc::DocParser::new( graph, analyzer, + &source_files, deno_doc::DocParserOptions { diagnostics: false, private: false, }, )?; - source_files.sort(); - let mut doc_nodes_by_url = IndexMap::with_capacity(source_files.len()); - for source_file in &source_files { - let nodes = parser.parse_with_reexports(source_file)?; - doc_nodes_by_url.insert(source_file.to_owned(), nodes); - } + let doc_nodes_by_url = parser.parse()?; Ok(doc_nodes_by_url) } @@ -563,6 +561,7 @@ pub fn generate_docs_html( let partitions_by_kind = deno_doc::html::partition::partition_nodes_by_entrypoint( + &ctx, all_doc_nodes, true, ); @@ -748,14 +747,23 @@ fn generate_symbol_page( let doc_nodes = 'outer: loop { let next_part = name_parts.next()?; - let nodes = doc_nodes + let mut nodes = doc_nodes .iter() .filter(|node| { !(matches!(node.kind(), DocNodeKind::ModuleDoc | DocNodeKind::Import) || node.declaration_kind == deno_doc::node::DeclarationKind::Private) && node.get_name() == next_part }) - .cloned() + .flat_map(|node| { + if let Some(reference) = node.reference_def() { + ctx + .resolve_reference(node.parent.as_deref(), &reference.target) + .map(|node| node.into_owned()) + .collect::>() + } else { + vec![node.clone()] + } + }) .collect::>(); if name_parts.peek().is_some() { @@ -936,7 +944,8 @@ fn generate_symbol_page( | DocNodeKind::Enum | DocNodeKind::ModuleDoc | DocNodeKind::Function - | DocNodeKind::Namespace => None, + | DocNodeKind::Namespace + | DocNodeKind::Reference => None, }; if let Some(drilldown_node) = drilldown_node { @@ -945,6 +954,20 @@ fn generate_symbol_page( } } + nodes = nodes + .into_iter() + .flat_map(|node| { + if let Some(reference) = node.reference_def() { + ctx + .resolve_reference(node.parent.as_deref(), &reference.target) + .map(|node| node.into_owned()) + .collect::>() + } else { + vec![node] + } + }) + .collect::>(); + if name_parts.peek().is_none() { break nodes; } @@ -954,16 +977,24 @@ fn generate_symbol_page( .find(|node| matches!(node.kind(), DocNodeKind::Namespace)) { namespace_paths.push(next_part.to_string()); - - let namespace = namespace_node.namespace_def().unwrap(); - - let parts: Rc<[String]> = namespace_paths.clone().into(); - - doc_nodes = namespace - .elements - .iter() - .map(|element| { - namespace_node.create_namespace_child(element.clone(), parts.clone()) + doc_nodes = namespace_node + .namespace_children + .clone() + .unwrap() + .into_iter() + .flat_map(|node| { + if let Some(reference_def) = node.reference_def() { + ctx + .resolve_reference(Some(namespace_node), &reference_def.target) + .map(|node| { + let x = node.into_owned(); + dbg!(x.get_qualified_name()); + x + }) + .collect() + } else { + vec![node] + } }) .collect(); } else { @@ -1140,6 +1171,7 @@ impl deno_doc::html::UsageComposer for DocUsageComposer { false } + #[allow(clippy::nonminimal_bool)] fn compose( &self, current_resolve: UrlResolveKind, diff --git a/api/src/gcp.rs b/api/src/gcp.rs index c4415b68..7dffbbd9 100644 --- a/api/src/gcp.rs +++ b/api/src/gcp.rs @@ -587,7 +587,7 @@ impl FakeGcsTester { println!("starting fake gcs server: {}", p); let mut proc = std::process::Command::new(p) - .arg(&format!("-port={}", self.port)) + .arg(format!("-port={}", self.port)) .arg("-scheme=http") .arg("-backend=memory") .process_group(0) diff --git a/api/src/npm/import_transform.rs b/api/src/npm/import_transform.rs index 64f65c5a..1669b1c4 100644 --- a/api/src/npm/import_transform.rs +++ b/api/src/npm/import_transform.rs @@ -20,7 +20,7 @@ pub struct ImportRewriteTransformer<'a> { pub kind: RewriteKind, } -impl<'a> VisitMut for ImportRewriteTransformer<'a> { +impl VisitMut for ImportRewriteTransformer<'_> { fn visit_mut_import_decl(&mut self, node: &mut ImportDecl) { node.visit_mut_children_with(self); diff --git a/api/src/npm/specifiers.rs b/api/src/npm/specifiers.rs index 5a28ef3d..c1efb727 100644 --- a/api/src/npm/specifiers.rs +++ b/api/src/npm/specifiers.rs @@ -27,7 +27,7 @@ pub struct SpecifierRewriter<'a> { pub dependencies: &'a IndexMap, } -impl<'a> SpecifierRewriter<'a> { +impl SpecifierRewriter<'_> { pub fn rewrite(&self, specifier: &str, kind: RewriteKind) -> Option { let source_text_specifier = specifier; let dep = self.dependencies.get(specifier)?; diff --git a/api/src/npm/tarball.rs b/api/src/npm/tarball.rs index 06444b2f..dc3e2290 100644 --- a/api/src/npm/tarball.rs +++ b/api/src/npm/tarball.rs @@ -475,14 +475,14 @@ fn rewrite_specifiers( add_text_change(&mut text_changes, specifier, &s.range); } } - deno_graph::TypeScriptReference::Types(s) => { + deno_graph::TypeScriptReference::Types { specifier, .. } => { match kind { RewriteKind::Source => { // Type reference comments in JS are a Deno specific concept, and // are thus not relevant for the tarball. We remove them. let start_pos = source_text_info.range().start; - let start = s.range.start.as_source_pos(source_text_info); + let start = specifier.range.start.as_source_pos(source_text_info); let start = source_text_info.line_and_column_index(start); let line_start = source_text_info.line_start(start.line_index); @@ -504,10 +504,14 @@ fn rewrite_specifiers( }); } RewriteKind::Declaration => { - if let Some(specifier) = - specifier_rewriter.rewrite(&s.text, RewriteKind::Declaration) + if let Some(rewritten_specifier) = specifier_rewriter + .rewrite(&specifier.text, RewriteKind::Declaration) { - add_text_change(&mut text_changes, specifier, &s.range); + add_text_change( + &mut text_changes, + rewritten_specifier, + &specifier.range, + ); } } } @@ -517,9 +521,9 @@ fn rewrite_specifiers( for s in &module_info.jsdoc_imports { if let Some(specifier) = - specifier_rewriter.rewrite(&s.text, RewriteKind::Declaration) + specifier_rewriter.rewrite(&s.specifier.text, RewriteKind::Declaration) { - add_text_change(&mut text_changes, specifier, &s.range); + add_text_change(&mut text_changes, specifier, &s.specifier.range); } } diff --git a/api/src/publish.rs b/api/src/publish.rs index 00fa18bc..e2df5d91 100644 --- a/api/src/publish.rs +++ b/api/src/publish.rs @@ -142,7 +142,7 @@ pub async fn publish_task( &publishing_task.package_name, ) .await? - .ok_or_else(|| ApiError::InternalServerError)?; + .ok_or(ApiError::InternalServerError)?; orama_client.upsert_package(&package, &meta); } return Ok(()); diff --git a/api/src/tasks.rs b/api/src/tasks.rs index 2438164d..c6c83864 100644 --- a/api/src/tasks.rs +++ b/api/src/tasks.rs @@ -107,7 +107,7 @@ pub async fn npm_tarball_build_handler( let version = db .get_package_version(&job.scope, &job.name, &job.version) .await? - .ok_or_else(|| ApiError::PackageVersionNotFound)?; + .ok_or(ApiError::PackageVersionNotFound)?; let dependencies = db .list_package_version_dependencies(&job.scope, &job.name, &job.version) .await?; @@ -211,10 +211,7 @@ pub async fn npm_tarball_enqueue_handler(req: Request) -> ApiResult<()> { let db = req.data::().unwrap().clone(); let queue = req.data::().unwrap(); - let queue = queue - .0 - .as_ref() - .ok_or_else(|| ApiError::InternalServerError)?; + let queue = queue.0.as_ref().ok_or(ApiError::InternalServerError)?; let missing_tarballs = db .list_missing_npm_tarballs(NPM_TARBALL_REVISION as i32) diff --git a/api/src/util.rs b/api/src/util.rs index 2c5522c6..228b7675 100644 --- a/api/src/util.rs +++ b/api/src/util.rs @@ -156,7 +156,7 @@ pub async fn auth_middleware(req: Request) -> ApiResult> { let iam_info = match token { Some((AuthorizationToken::Bearer(token), sudo)) => { - span.record("token.kind", &field::display("bearer")); + span.record("token.kind", field::display("bearer")); if let Some(token) = db.get_token_by_hash(&crate::token::hash(token)).await? { @@ -167,7 +167,7 @@ pub async fn auth_middleware(req: Request) -> ApiResult> { } let user = db.get_user(token.user_id).await?.unwrap(); - span.record("user.id", &field::display(user.id)); + span.record("user.id", field::display(user.id)); if user.is_blocked { return Err(ApiError::Blocked); @@ -179,10 +179,10 @@ pub async fn auth_middleware(req: Request) -> ApiResult> { } } Some((AuthorizationToken::GithubOIDC(token), _)) => { - span.record("token.kind", &field::display("githuboidc")); + span.record("token.kind", field::display("githuboidc")); let claims = verify_oidc_token(token).await?; - span.record("repo.id", &field::display(claims.repository_id)); + span.record("repo.id", field::display(claims.repository_id)); let aud: GithubOidcTokenAud = serde_json::from_str(&claims.aud) .map_err(|err| ApiError::InvalidOidcToken { @@ -191,7 +191,7 @@ pub async fn auth_middleware(req: Request) -> ApiResult> { let user = db.get_user_by_github_id(claims.actor_id).await?; if let Some(user) = &user { - span.record("user.id", &field::display(user.id)); + span.record("user.id", field::display(user.id)); } IamInfo::from((claims.repository_id, aud, user)) @@ -659,7 +659,7 @@ pub mod test { auth: Option<&'t str>, } - impl<'s, 't> TestHttpClient<'s, 't> { + impl<'s> TestHttpClient<'s, '_> { pub fn get>(&'s mut self, uri: U) -> TestHttpCall<'s> { TestHttpCall::new( self.service, diff --git a/frontend/deno.lock b/frontend/deno.lock index 67295a47..12cb3c09 100644 --- a/frontend/deno.lock +++ b/frontend/deno.lock @@ -33,6 +33,7 @@ "npm:@oramacloud/client@1": "1.3.20", "npm:@preact/signals@1.2.1": "1.2.1_preact@10.24.3", "npm:@preact/signals@^1.2.3": "1.3.0_preact@10.24.3", + "npm:@types/node@*": "22.5.4", "npm:autoprefixer@10.4.17": "10.4.17_postcss@8.4.35", "npm:cssnano@6.0.3": "6.0.3_postcss@8.4.35", "npm:esbuild-wasm@0.23.1": "0.23.1", diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 87493917..80afd2d3 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.79.0" +channel = "1.83.0" components = ["rustfmt", "clippy"]