diff --git a/Cargo.lock b/Cargo.lock index 463d2f92ef0833..6e929168f5313a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,6 +128,19 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "ammonia" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab99eae5ee58501ab236beb6f20f6ca39be615267b014899c89b2f0bc18a459" +dependencies = [ + "html5ever", + "maplit", + "once_cell", + "tendril", + "url", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -267,7 +280,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -303,7 +316,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -314,7 +327,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -338,7 +351,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -347,6 +360,53 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "axum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", +] + [[package]] name = "backtrace" version = "0.3.73" @@ -446,13 +506,13 @@ dependencies = [ "clang-sys", "itertools 0.13.0", "log", - "prettyplease 0.2.17", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -530,6 +590,16 @@ dependencies = [ "generic-array", ] +[[package]] +name = "boxed_error" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69aae56aaf59d1994b902ed5c0c79024012bdc2426741def75a635999a030e7e" +dependencies = [ + "quote", + "syn 2.0.87", +] + [[package]] name = "brotli" version = "6.0.0" @@ -825,9 +895,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comrak" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c93ab3577cca16b4a1d80a88c2e0cd8b6e969e51696f0bbb0d1dcb0157109832" +checksum = "d8c32ff8b21372fab0e9ecc4e42536055702dc5faa418362bffd1544f9d12637" dependencies = [ "caseless", "derive_builder", @@ -1039,7 +1109,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1074,7 +1144,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1085,7 +1155,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1095,7 +1165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", @@ -1131,7 +1201,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.0.6" +version = "2.1.1" dependencies = [ "anstream", "async-trait", @@ -1162,6 +1232,7 @@ dependencies = [ "deno_resolver", "deno_runtime", "deno_semver", + "deno_sqlformat", "deno_task_shell", "deno_terminal 0.2.0", "deno_tower_lsp", @@ -1184,7 +1255,7 @@ dependencies = [ "http-body-util", "hyper-util", "import_map", - "indexmap", + "indexmap 2.3.0", "jsonc-parser", "junction", "lazy-regex", @@ -1251,7 +1322,7 @@ checksum = "05d59a1cfd445fd86f63616127a434aabca000e03d963b01b03ce813520565b9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1300,7 +1371,7 @@ dependencies = [ [[package]] name = "deno_bench_util" -version = "0.171.0" +version = "0.173.0" dependencies = [ "bencher", "deno_core", @@ -1309,7 +1380,7 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" -version = "0.171.0" +version = "0.173.0" dependencies = [ "async-trait", "deno_core", @@ -1320,7 +1391,7 @@ dependencies = [ [[package]] name = "deno_cache" -version = "0.109.0" +version = "0.111.0" dependencies = [ "async-trait", "deno_core", @@ -1340,7 +1411,7 @@ dependencies = [ "base32", "deno_media_type", "deno_path_util", - "indexmap", + "indexmap 2.3.0", "log", "once_cell", "parking_lot", @@ -1353,7 +1424,7 @@ dependencies = [ [[package]] name = "deno_canvas" -version = "0.46.0" +version = "0.48.0" dependencies = [ "deno_core", "deno_webgpu", @@ -1364,9 +1435,9 @@ dependencies = [ [[package]] name = "deno_config" -version = "0.38.2" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966825073480a6ac7e01977a3879d13edc8d6ea2d65ea164b37156a5fb206e9a" +checksum = "38fb809500238be2b10eee42944a47b3ac38974e1edbb47f73afcfca7df143bf" dependencies = [ "anyhow", "deno_package_json", @@ -1375,7 +1446,7 @@ dependencies = [ "glob", "ignore", "import_map", - "indexmap", + "indexmap 2.3.0", "jsonc-parser", "log", "percent-encoding", @@ -1388,14 +1459,16 @@ dependencies = [ [[package]] name = "deno_console" -version = "0.177.0" +version = "0.179.0" dependencies = [ "deno_core", ] [[package]] name = "deno_core" -version = "0.319.0" +version = "0.322.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f593ef2b8acab8cd3ace9d50052edc65a3654fdbde808070cfa5da5cf7aaae6" dependencies = [ "anyhow", "bincode", @@ -1404,10 +1477,10 @@ dependencies = [ "bytes", "cooked-waker", "deno_core_icudata", - "deno_js_error", "deno_ops", "deno_unsync", "futures", + "indexmap 2.3.0", "libc", "memoffset", "parking_lot", @@ -1419,10 +1492,10 @@ dependencies = [ "smallvec", "sourcemap 8.0.1", "static_assertions", - "thiserror", "tokio", "url", "v8", + "wasm_dep_analyzer", ] [[package]] @@ -1433,7 +1506,7 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" [[package]] name = "deno_cron" -version = "0.57.0" +version = "0.59.0" dependencies = [ "anyhow", "async-trait", @@ -1446,7 +1519,7 @@ dependencies = [ [[package]] name = "deno_crypto" -version = "0.191.0" +version = "0.193.0" dependencies = [ "aes", "aes-gcm", @@ -1483,32 +1556,38 @@ dependencies = [ [[package]] name = "deno_doc" -version = "0.156.0" +version = "0.160.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2585b98d6ad76dae30bf2d7b6d71b8363cae041158b8780d14a2f4fe17590a61" +checksum = "db2baa33e5d1ed235209c2990f5fe9644bac6b9e7bcb789dd92894f907b09ad7" dependencies = [ + "ammonia", "anyhow", "cfg-if", "comrak", "deno_ast", "deno_graph", + "deno_path_util", "futures", "handlebars", "html-escape", "import_map", - "indexmap", + "indexmap 2.3.0", "itoa", + "js-sys", "lazy_static", + "percent-encoding", "regex", "serde", + "serde-wasm-bindgen", "serde_json", - "syntect", "termcolor", + "url", + "wasm-bindgen", ] [[package]] name = "deno_fetch" -version = "0.201.0" +version = "0.203.0" dependencies = [ "base64 0.21.7", "bytes", @@ -1519,6 +1598,7 @@ dependencies = [ "dyn-clone", "error_reporter", "fast-socks5", + "hickory-resolver", "http 1.1.0", "http-body-util", "hyper 1.4.1", @@ -1541,7 +1621,7 @@ dependencies = [ [[package]] name = "deno_ffi" -version = "0.164.0" +version = "0.166.0" dependencies = [ "deno_core", "deno_permissions", @@ -1561,10 +1641,11 @@ dependencies = [ [[package]] name = "deno_fs" -version = "0.87.0" +version = "0.89.0" dependencies = [ "async-trait", "base32", + "boxed_error", "deno_core", "deno_io", "deno_path_util", @@ -1583,9 +1664,9 @@ dependencies = [ [[package]] name = "deno_graph" -version = "0.84.1" +version = "0.85.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4f4a14aa069087be41c2998077b0453f0191747898f96e6343f700abfc2c18" +checksum = "9d097305aba3f119781fe82b4d5a85a1ad10c586a388ee4d754e5bf82901cc5c" dependencies = [ "anyhow", "async-trait", @@ -1596,7 +1677,7 @@ dependencies = [ "encoding_rs", "futures", "import_map", - "indexmap", + "indexmap 2.3.0", "log", "monch", "once_cell", @@ -1608,11 +1689,12 @@ dependencies = [ "thiserror", "twox-hash", "url", + "wasm_dep_analyzer", ] [[package]] name = "deno_http" -version = "0.175.0" +version = "0.177.0" dependencies = [ "async-compression", "async-trait", @@ -1651,7 +1733,7 @@ dependencies = [ [[package]] name = "deno_io" -version = "0.87.0" +version = "0.89.0" dependencies = [ "async-trait", "deno_core", @@ -1670,25 +1752,14 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "deno_js_error" -version = "0.1.0" -dependencies = [ - "proc-macro-rules", - "proc-macro2", - "quote", - "strum", - "strum_macros", - "syn 2.0.72", -] - [[package]] name = "deno_kv" -version = "0.85.0" +version = "0.87.0" dependencies = [ "anyhow", "async-trait", "base64 0.21.7", + "boxed_error", "bytes", "chrono", "deno_core", @@ -1756,7 +1827,7 @@ dependencies = [ [[package]] name = "deno_napi" -version = "0.108.0" +version = "0.110.0" dependencies = [ "deno_core", "deno_permissions", @@ -1784,7 +1855,7 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.169.0" +version = "0.171.0" dependencies = [ "deno_core", "deno_permissions", @@ -1801,13 +1872,14 @@ dependencies = [ [[package]] name = "deno_node" -version = "0.114.0" +version = "0.116.0" dependencies = [ "aead-gcm-stream", "aes", "async-trait", "base64 0.21.7", "blake2", + "boxed_error", "brotli", "bytes", "cbc", @@ -1839,8 +1911,8 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-util", - "idna 0.3.0", - "indexmap", + "idna 1.0.3", + "indexmap 2.3.0", "ipnetwork", "k256", "lazy-regex", @@ -1880,6 +1952,7 @@ dependencies = [ "stable_deref_trait", "thiserror", "tokio", + "tokio-eld", "url", "webpki-root-certs", "winapi", @@ -1910,14 +1983,17 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.195.0" +version = "0.198.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870826735cd9aa0376d2aadca14365b753e830e3cc16891efb9232845a6982a4" dependencies = [ "proc-macro-rules", "proc-macro2", "quote", + "stringcase", "strum", "strum_macros", - "syn 2.0.72", + "syn 2.0.87", "thiserror", ] @@ -1928,7 +2004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cbc4c4d3eb0960b58e8f43f9fc2d3f620fcac9a03cd85203e08db5b04e83c1f" dependencies = [ "deno_semver", - "indexmap", + "indexmap 2.3.0", "serde", "serde_json", "thiserror", @@ -1948,7 +2024,7 @@ dependencies = [ [[package]] name = "deno_permissions" -version = "0.37.0" +version = "0.39.0" dependencies = [ "deno_core", "deno_path_util", @@ -1966,10 +2042,13 @@ dependencies = [ [[package]] name = "deno_resolver" -version = "0.9.0" +version = "0.11.0" dependencies = [ "anyhow", "base32", + "boxed_error", + "dashmap", + "deno_config", "deno_media_type", "deno_package_json", "deno_path_util", @@ -1982,8 +2061,9 @@ dependencies = [ [[package]] name = "deno_runtime" -version = "0.186.0" +version = "0.188.0" dependencies = [ + "async-trait", "color-print", "deno_ast", "deno_broadcast_channel", @@ -2029,7 +2109,13 @@ dependencies = [ "notify", "ntapi", "once_cell", + "opentelemetry", + "opentelemetry-http", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", + "opentelemetry_sdk", "percent-encoding", + "pin-project", "regex", "rustyline", "same-file", @@ -2061,6 +2147,18 @@ dependencies = [ "url", ] +[[package]] +name = "deno_sqlformat" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e196799ec0cc240fac1fb5c5bf813ef92a9602740a059cfcbb20593b2deee52" +dependencies = [ + "nom 7.1.3", + "once_cell", + "regex", + "unicode_categories", +] + [[package]] name = "deno_task_shell" version = "0.18.1" @@ -2100,7 +2198,7 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.164.0" +version = "0.166.0" dependencies = [ "deno_core", "deno_native_certs", @@ -2149,7 +2247,7 @@ dependencies = [ [[package]] name = "deno_url" -version = "0.177.0" +version = "0.179.0" dependencies = [ "deno_bench_util", "deno_console", @@ -2161,7 +2259,7 @@ dependencies = [ [[package]] name = "deno_web" -version = "0.208.0" +version = "0.210.0" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -2183,7 +2281,7 @@ dependencies = [ [[package]] name = "deno_webgpu" -version = "0.144.0" +version = "0.146.0" dependencies = [ "deno_core", "raw-window-handle", @@ -2196,7 +2294,7 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.177.0" +version = "0.179.0" dependencies = [ "deno_bench_util", "deno_core", @@ -2204,7 +2302,7 @@ dependencies = [ [[package]] name = "deno_websocket" -version = "0.182.0" +version = "0.184.0" dependencies = [ "bytes", "deno_core", @@ -2226,7 +2324,7 @@ dependencies = [ [[package]] name = "deno_webstorage" -version = "0.172.0" +version = "0.174.0" dependencies = [ "deno_core", "deno_web", @@ -2246,9 +2344,9 @@ dependencies = [ [[package]] name = "denokv_proto" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f629c77d2bf59e2e2a07fd7b14bfffae352a3813fbdcb801e72205741fb7625c" +checksum = "f7ba1f99ed11a9c11e868a8521b1f71a7e1aba785d7f42ea9ecbdc01146c89ec" dependencies = [ "anyhow", "async-trait", @@ -2262,9 +2360,9 @@ dependencies = [ [[package]] name = "denokv_remote" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d57717b5123e8d1ec5f52973a67f98e3621274d362d18b245038967b402082df" +checksum = "08ed833073189e8f6d03155fe3b05a024e75e29d8a28a4c2e9ec3b5c925e727b" dependencies = [ "anyhow", "async-stream", @@ -2287,9 +2385,9 @@ dependencies = [ [[package]] name = "denokv_sqlite" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c4f5719e2bf698ec4f39fe29d91b62ff06a4b4a37ee481ffb8658d140fed986" +checksum = "9b790f01d1302d53a0c3cbd27de88a06b3abd64ec8ab8673924e490541c7c713" dependencies = [ "anyhow", "async-stream", @@ -2344,7 +2442,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2364,7 +2462,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2385,7 +2483,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2395,7 +2493,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2480,7 +2578,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2509,7 +2607,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2535,8 +2633,8 @@ checksum = "f3ab0dd2bedc109d25f0d21afb09b7d329f6c6fa83b095daf31d2d967e091548" dependencies = [ "anyhow", "bumpalo", - "hashbrown", - "indexmap", + "hashbrown 0.14.5", + "indexmap 2.3.0", "rustc-hash 1.1.0", "serde", "unicode-width", @@ -2742,7 +2840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48cede2bb1b07dd598d269f973792c43e0cd92686d3b452bd6e01d7a8eb01211" dependencies = [ "debug-ignore", - "indexmap", + "indexmap 2.3.0", "log", "thiserror", "zerocopy", @@ -2808,7 +2906,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2988,9 +3086,9 @@ checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "file_test_runner" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b23dcc1b671771c6f59fdace6da685735c925f859733e8fd07fba6cae6462a" +checksum = "cf50901549edf2241e33d1715aec0575adc5510a09724877a1e0afe7ffafb0fb" dependencies = [ "anyhow", "crossbeam-channel", @@ -3092,7 +3190,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3124,7 +3222,7 @@ checksum = "fdc9cc75639b041067353b9bce2450d6847e547276c6fbe4487d7407980e07db" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3163,6 +3261,16 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +[[package]] +name = "futf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +dependencies = [ + "mac", + "new_debug_unreachable", +] + [[package]] name = "futures" version = "0.3.30" @@ -3219,7 +3327,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3379,7 +3487,7 @@ checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" dependencies = [ "bitflags 2.6.0", "gpu-descriptor-types", - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -3423,7 +3531,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap", + "indexmap 2.3.0", "slab", "tokio", "tokio-util", @@ -3442,7 +3550,7 @@ dependencies = [ "futures-sink", "futures-util", "http 1.1.0", - "indexmap", + "indexmap 2.3.0", "slab", "tokio", "tokio-util", @@ -3455,7 +3563,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8588661a8607108a5ca69cab034063441a0413a0b041c13618a7dd348021ef6f" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "serde", ] @@ -3474,6 +3582,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" @@ -3490,7 +3604,21 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", +] + +[[package]] +name = "hdrhistogram" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +dependencies = [ + "base64 0.21.7", + "byteorder", + "crossbeam-channel", + "flate2", + "nom 7.1.3", + "num-traits", ] [[package]] @@ -3653,7 +3781,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a9de2bdef6354361892492bab5e316b2d78a0ee9971db4d36da9b1eb0e11999" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "new_debug_unreachable", "once_cell", "phf", @@ -3670,6 +3798,20 @@ dependencies = [ "utf8-width", ] +[[package]] +name = "html5ever" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" +dependencies = [ + "log", + "mac", + "markup5ever", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "http" version = "0.2.12" @@ -3807,6 +3949,19 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "hyper-timeout" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +dependencies = [ + "hyper 1.4.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.7" @@ -3827,6 +3982,124 @@ dependencies = [ "tracing", ] +[[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.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -3835,9 +4108,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -3845,12 +4118,23 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +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]] @@ -3895,7 +4179,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "351a787decc56f38d65d16d32687265045d6d6a4531b4a0e1b649def3590354e" dependencies = [ - "indexmap", + "indexmap 2.3.0", "log", "percent-encoding", "serde", @@ -3904,6 +4188,16 @@ dependencies = [ "url", ] +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.3.0" @@ -3911,7 +4205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", "serde", ] @@ -3990,7 +4284,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -4088,10 +4382,23 @@ dependencies = [ ] [[package]] -name = "k256" -version = "0.13.3" +name = "jupyter-serde" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "dd71aa17c4fa65e6d7536ab2728881a41f8feb2ee5841c2240516c3c3d65d8b3" +dependencies = [ + "anyhow", + "serde", + "serde_json", + "thiserror", + "uuid", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", @@ -4167,7 +4474,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -4299,6 +4606,12 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "litrs" version = "0.4.1" @@ -4346,6 +4659,12 @@ dependencies = [ "serde_repr", ] +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + [[package]] name = "malloc_buf" version = "0.0.6" @@ -4368,11 +4687,31 @@ dependencies = [ "tiny_pretty", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "markup5ever" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45" +dependencies = [ + "log", + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", + "tendril", +] + [[package]] name = "markup_fmt" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebae65c91eab3d42231232bf48107f351e5a8d511454927218c53aeb68bbdb6f" +checksum = "f303c36143671ac6c54112eb5aa95649b169dae783fdb6ead2c0e88b408c425c" dependencies = [ "aho-corasick", "css_dataset", @@ -4387,6 +4726,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "md-5" version = "0.10.6" @@ -4514,7 +4859,7 @@ dependencies = [ "bitflags 2.6.0", "codespan-reporting", "hexf-parse", - "indexmap", + "indexmap 2.3.0", "log", "num-traits", "rustc-hash 1.1.0", @@ -4542,12 +4887,12 @@ dependencies = [ [[package]] name = "napi_sym" -version = "0.107.0" +version = "0.109.0" dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -4597,10 +4942,11 @@ dependencies = [ [[package]] name = "node_resolver" -version = "0.16.0" +version = "0.18.0" dependencies = [ "anyhow", "async-trait", + "boxed_error", "deno_media_type", "deno_package_json", "deno_path_util", @@ -4773,28 +5119,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "onig" -version = "6.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" -dependencies = [ - "bitflags 1.3.2", - "libc", - "once_cell", - "onig_sys", -] - -[[package]] -name = "onig_sys" -version = "69.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" -dependencies = [ - "cc", - "pkg-config", -] - [[package]] name = "opaque-debug" version = "0.3.1" @@ -4818,6 +5142,93 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "opentelemetry" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3cebff57f7dbd1255b44d8bddc2cebeb0ea677dbaa2e25a3070a91b318f660" +dependencies = [ + "futures-core", + "futures-sink", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", +] + +[[package]] +name = "opentelemetry-http" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a8a7f5f6ba7c1b286c2fbca0454eaba116f63bbe69ed250b642d36fbb04d80" +dependencies = [ + "async-trait", + "bytes", + "http 1.1.0", + "opentelemetry", +] + +[[package]] +name = "opentelemetry-otlp" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cf61a1868dacc576bf2b2a1c3e9ab150af7272909e80085c3173384fe11f76" +dependencies = [ + "async-trait", + "futures-core", + "http 1.1.0", + "opentelemetry", + "opentelemetry-http", + "opentelemetry-proto", + "opentelemetry_sdk", + "prost", + "serde_json", + "thiserror", + "tokio", + "tonic", + "tracing", +] + +[[package]] +name = "opentelemetry-proto" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6e05acbfada5ec79023c85368af14abd0b307c015e9064d249b2a950ef459a6" +dependencies = [ + "hex", + "opentelemetry", + "opentelemetry_sdk", + "prost", + "serde", + "tonic", +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc1b6902ff63b32ef6c489e8048c5e253e2e4a803ea3ea7e783914536eb15c52" + +[[package]] +name = "opentelemetry_sdk" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b742c1cae4693792cc564e58d75a2a0ba29421a34a85b50da92efa89ecb2bc" +dependencies = [ + "async-trait", + "futures-channel", + "futures-executor", + "futures-util", + "glob", + "once_cell", + "opentelemetry", + "percent-encoding", + "rand", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -5022,7 +5433,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -5043,7 +5454,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 2.3.0", ] [[package]] @@ -5053,7 +5464,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", - "phf_shared", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +dependencies = [ + "phf_generator 0.11.2", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand", ] [[package]] @@ -5062,7 +5493,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared", + "phf_shared 0.11.2", "rand", ] @@ -5072,11 +5503,20 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.2", + "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", ] [[package]] @@ -5105,7 +5545,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -5201,6 +5641,12 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + [[package]] name = "pretty_assertions" version = "1.4.0" @@ -5222,16 +5668,6 @@ dependencies = [ "yaml_parser", ] -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "prettyplease" version = "0.2.17" @@ -5239,7 +5675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -5283,7 +5719,7 @@ checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" dependencies = [ "proc-macro-rules-macros", "proc-macro2", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -5295,7 +5731,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -5315,9 +5751,9 @@ checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" [[package]] name = "prost" -version = "0.11.9" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -5325,44 +5761,43 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.11.9" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", - "heck 0.4.1", - "itertools 0.10.5", - "lazy_static", + "heck 0.5.0", + "itertools 0.13.0", "log", "multimap", + "once_cell", "petgraph", - "prettyplease 0.1.25", + "prettyplease", "prost", "prost-types", "regex", - "syn 1.0.109", + "syn 2.0.87", "tempfile", - "which 4.4.2", ] [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.13.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] name = "prost-types" -version = "0.11.9" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] @@ -5420,7 +5855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1a341ae463320e9f8f34adda49c8a85d81d4e8f34cce4397fb0350481552224" dependencies = [ "chrono", - "indexmap", + "indexmap 2.3.0", "quick-xml", "strip-ansi-escapes", "thiserror", @@ -5485,9 +5920,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -5532,7 +5967,7 @@ checksum = "4fdb50eb5bf734fa5a770680a61876a6ec77b99c1e0e52d1f18ad6ebfa85759f" dependencies = [ "heck 0.5.0", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -5634,7 +6069,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -5782,7 +6217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49" dependencies = [ "countme", - "hashbrown", + "hashbrown 0.14.5", "memoffset", "rustc-hash 1.1.0", "text-size", @@ -5810,9 +6245,9 @@ dependencies = [ [[package]] name = "runtimelib" -version = "0.14.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3d817764e3971867351e6103955b17d808f5330e9ef63aaaaab55bf8c664c1" +checksum = "fe23ba9967355bbb1be2fb9a8e51bd239ffdf9c791fad5a9b765122ee2bde2e4" dependencies = [ "anyhow", "base64 0.22.1", @@ -5822,6 +6257,7 @@ dependencies = [ "dirs", "futures", "glob", + "jupyter-serde", "rand", "ring", "serde", @@ -6161,6 +6597,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -6178,7 +6625,7 @@ checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -6187,7 +6634,7 @@ version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ - "indexmap", + "indexmap 2.3.0", "itoa", "memchr", "ryu", @@ -6202,7 +6649,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -6219,7 +6666,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.228.0" +version = "0.231.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a0c48b8842ebae21c52da1d978fba5c2be5991680bddfdc1a36ee0ccbc60114" dependencies = [ "num-bigint", "serde", @@ -6520,6 +6969,32 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot", + "phf_shared 0.10.0", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro2", + "quote", +] + [[package]] name = "string_enum" version = "0.4.4" @@ -6529,9 +7004,15 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.87", ] +[[package]] +name = "stringcase" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04028eeb851ed08af6aba5caa29f2d59a13ed168cee4d6bd753aeefcf1d636b0" + [[package]] name = "strip-ansi-escapes" version = "0.2.0" @@ -6566,7 +7047,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -6582,7 +7063,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc8bd3075d1c6964010333fae9ddcd91ad422a4f8eb8b3206a9b2b6afb4209e" dependencies = [ "bumpalo", - "hashbrown", + "hashbrown 0.14.5", "ptr_meta", "rustc-hash 1.1.0", "triomphe", @@ -6608,7 +7089,7 @@ checksum = "c77c112c218a09635d99a45802a81b4f341d6c28c81076aa2c29ba3bcd9151a9" dependencies = [ "anyhow", "crc", - "indexmap", + "indexmap 2.3.0", "is-macro", "once_cell", "parking_lot", @@ -6678,7 +7159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4740e53eaf68b101203c1df0937d5161a29f3c13bceed0836ddfe245b72dd000" dependencies = [ "anyhow", - "indexmap", + "indexmap 2.3.0", "serde", "serde_json", "swc_cached", @@ -6694,7 +7175,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -6743,7 +7224,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -6790,7 +7271,7 @@ checksum = "65f21494e75d0bd8ef42010b47cabab9caaed8f2207570e809f6f4eb51a710d1" dependencies = [ "better_scoped_tls", "bitflags 2.6.0", - "indexmap", + "indexmap 2.3.0", "once_cell", "phf", "rustc-hash 1.1.0", @@ -6828,7 +7309,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -6838,7 +7319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98d8447ea20ef76958a8240feef95743702485a84331e6df5bdbe7e383c87838" dependencies = [ "dashmap", - "indexmap", + "indexmap 2.3.0", "once_cell", "petgraph", "rustc-hash 1.1.0", @@ -6883,7 +7364,7 @@ checksum = "76c76d8b9792ce51401d38da0fa62158d61f6d80d16d68fe5b03ce4bf5fba383" dependencies = [ "base64 0.21.7", "dashmap", - "indexmap", + "indexmap 2.3.0", "once_cell", "serde", "sha1", @@ -6923,7 +7404,7 @@ version = "0.134.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029eec7dd485923a75b5a45befd04510288870250270292fc2c1b3a9e7547408" dependencies = [ - "indexmap", + "indexmap 2.3.0", "num_cpus", "once_cell", "rustc-hash 1.1.0", @@ -6959,7 +7440,7 @@ checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -6968,7 +7449,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357e2c97bb51431d65080f25b436bc4e2fc1a7f64a643bc21a8353e478dc799f" dependencies = [ - "indexmap", + "indexmap 2.3.0", "petgraph", "rustc-hash 1.1.0", "swc_common", @@ -6995,7 +7476,7 @@ checksum = "f486687bfb7b5c560868f69ed2d458b880cebc9babebcb67e49f31b55c5bf847" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -7018,7 +7499,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -7034,9 +7515,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -7069,27 +7550,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", -] - -[[package]] -name = "syntect" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" -dependencies = [ - "bincode", - "bitflags 1.3.2", - "flate2", - "fnv", - "once_cell", - "onig", - "regex-syntax", - "serde", - "serde_derive", - "serde_json", - "thiserror", - "walkdir", + "syn 2.0.87", ] [[package]] @@ -7121,6 +7582,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "tendril" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +dependencies = [ + "futf", + "mac", + "utf-8", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -7240,7 +7712,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -7299,6 +7771,16 @@ dependencies = [ "unicode-width", ] +[[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.6.0" @@ -7333,6 +7815,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "tokio-eld" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9166030f05d6bc5642bdb8f8c2be31eb3c02cd465d662bcdc2df82d4aa41a584" +dependencies = [ + "hdrhistogram", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.2.0" @@ -7341,7 +7833,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -7381,9 +7873,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -7401,7 +7893,7 @@ dependencies = [ "futures-io", "futures-sink", "futures-util", - "hashbrown", + "hashbrown 0.14.5", "pin-project-lite", "slab", "tokio", @@ -7417,6 +7909,36 @@ dependencies = [ "serde", ] +[[package]] +name = "tonic" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.22.1", + "bytes", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.4.1", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "prost", + "socket2", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower" version = "0.4.13" @@ -7425,11 +7947,16 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", + "indexmap 1.9.3", "pin-project", "pin-project-lite", + "rand", + "slab", "tokio", + "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -7484,7 +8011,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -7666,12 +8193,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 1.0.3", "percent-encoding", "serde", ] @@ -7694,12 +8221,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 = "utf8parse" version = "0.2.1" @@ -7742,7 +8281,7 @@ checksum = "97599c400fc79925922b58303e98fcb8fa88f573379a08ddb652e72cbd2e70f6" dependencies = [ "bitflags 2.6.0", "encoding_rs", - "indexmap", + "indexmap 2.3.0", "num-bigint", "serde", "thiserror", @@ -7853,7 +8392,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -7887,7 +8426,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7911,6 +8450,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm_dep_analyzer" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f270206a91783fd90625c8bb0d8fbd459d0b1d1bf209b656f713f01ae7c04b8" +dependencies = [ + "thiserror", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -7951,7 +8499,7 @@ dependencies = [ "cfg_aliases", "codespan-reporting", "document-features", - "indexmap", + "indexmap 2.3.0", "log", "naga", "once_cell", @@ -8299,6 +8847,18 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[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 = "wtf8" version = "0.1.0" @@ -8396,7 +8956,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "synstructure 0.13.1", ] @@ -8418,7 +8978,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -8438,7 +8998,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "synstructure 0.13.1", ] @@ -8459,14 +9019,14 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "zeromq" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0560d00172817b7f7c2265060783519c475702ae290b154115ca75e976d4d0" +checksum = "6a4528179201f6eecf211961a7d3276faa61554c82651ecc66387f68fc3004bd" dependencies = [ "async-trait", "asynchronous-codec", @@ -8489,6 +9049,28 @@ dependencies = [ "uuid", ] +[[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.87", +] + [[package]] name = "zip" version = "2.1.6" @@ -8500,7 +9082,7 @@ dependencies = [ "crossbeam-utils", "displaydoc", "flate2", - "indexmap", + "indexmap 2.3.0", "memchr", "thiserror", ] @@ -8533,7 +9115,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[patch.unused]] -name = "v8" -version = "0.89.0" diff --git a/Cargo.toml b/Cargo.toml index 3e45864552bd07..c96600af2a938c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,52 +46,53 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "=0.43.3", features = ["transpiling"] } -deno_core = { version = "0.319.0" } +deno_core = { version = "0.322.0" } -deno_bench_util = { version = "0.171.0", path = "./bench_util" } +deno_bench_util = { version = "0.173.0", path = "./bench_util" } +deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.2.0", features = ["module_specifier"] } deno_npm = "=0.25.4" deno_path_util = "=0.2.1" -deno_permissions = { version = "0.37.0", path = "./runtime/permissions" } -deno_runtime = { version = "0.186.0", path = "./runtime" } +deno_permissions = { version = "0.39.0", path = "./runtime/permissions" } +deno_runtime = { version = "0.188.0", path = "./runtime" } deno_semver = "=0.5.16" deno_terminal = "0.2.0" -napi_sym = { version = "0.107.0", path = "./ext/napi/sym" } +napi_sym = { version = "0.109.0", path = "./ext/napi/sym" } test_util = { package = "test_server", path = "./tests/util/server" } -denokv_proto = "0.8.1" -denokv_remote = "0.8.1" +denokv_proto = "0.8.4" +denokv_remote = "0.8.4" # denokv_sqlite brings in bundled sqlite if we don't disable the default features -denokv_sqlite = { default-features = false, version = "0.8.2" } +denokv_sqlite = { default-features = false, version = "0.8.4" } # exts -deno_broadcast_channel = { version = "0.171.0", path = "./ext/broadcast_channel" } -deno_cache = { version = "0.109.0", path = "./ext/cache" } -deno_canvas = { version = "0.46.0", path = "./ext/canvas" } -deno_console = { version = "0.177.0", path = "./ext/console" } -deno_cron = { version = "0.57.0", path = "./ext/cron" } -deno_crypto = { version = "0.191.0", path = "./ext/crypto" } -deno_fetch = { version = "0.201.0", path = "./ext/fetch" } -deno_ffi = { version = "0.164.0", path = "./ext/ffi" } -deno_fs = { version = "0.87.0", path = "./ext/fs" } -deno_http = { version = "0.175.0", path = "./ext/http" } -deno_io = { version = "0.87.0", path = "./ext/io" } -deno_kv = { version = "0.85.0", path = "./ext/kv" } -deno_napi = { version = "0.108.0", path = "./ext/napi" } -deno_net = { version = "0.169.0", path = "./ext/net" } -deno_node = { version = "0.114.0", path = "./ext/node" } -deno_tls = { version = "0.164.0", path = "./ext/tls" } -deno_url = { version = "0.177.0", path = "./ext/url" } -deno_web = { version = "0.208.0", path = "./ext/web" } -deno_webgpu = { version = "0.144.0", path = "./ext/webgpu" } -deno_webidl = { version = "0.177.0", path = "./ext/webidl" } -deno_websocket = { version = "0.182.0", path = "./ext/websocket" } -deno_webstorage = { version = "0.172.0", path = "./ext/webstorage" } +deno_broadcast_channel = { version = "0.173.0", path = "./ext/broadcast_channel" } +deno_cache = { version = "0.111.0", path = "./ext/cache" } +deno_canvas = { version = "0.48.0", path = "./ext/canvas" } +deno_console = { version = "0.179.0", path = "./ext/console" } +deno_cron = { version = "0.59.0", path = "./ext/cron" } +deno_crypto = { version = "0.193.0", path = "./ext/crypto" } +deno_fetch = { version = "0.203.0", path = "./ext/fetch" } +deno_ffi = { version = "0.166.0", path = "./ext/ffi" } +deno_fs = { version = "0.89.0", path = "./ext/fs" } +deno_http = { version = "0.177.0", path = "./ext/http" } +deno_io = { version = "0.89.0", path = "./ext/io" } +deno_kv = { version = "0.87.0", path = "./ext/kv" } +deno_napi = { version = "0.110.0", path = "./ext/napi" } +deno_net = { version = "0.171.0", path = "./ext/net" } +deno_node = { version = "0.116.0", path = "./ext/node" } +deno_tls = { version = "0.166.0", path = "./ext/tls" } +deno_url = { version = "0.179.0", path = "./ext/url" } +deno_web = { version = "0.210.0", path = "./ext/web" } +deno_webgpu = { version = "0.146.0", path = "./ext/webgpu" } +deno_webidl = { version = "0.179.0", path = "./ext/webidl" } +deno_websocket = { version = "0.184.0", path = "./ext/websocket" } +deno_webstorage = { version = "0.174.0", path = "./ext/webstorage" } # resolvers -deno_resolver = { version = "0.9.0", path = "./resolvers/deno" } -node_resolver = { version = "0.16.0", path = "./resolvers/node" } +deno_resolver = { version = "0.11.0", path = "./resolvers/deno" } +node_resolver = { version = "0.18.0", path = "./resolvers/node" } aes = "=0.8.3" anyhow = "1.0.57" @@ -99,6 +100,7 @@ async-trait = "0.1.73" base32 = "=0.5.1" base64 = "0.21.7" bencher = "0.1" +boxed_error = "0.2.2" brotli = "6.0.0" bytes = "1.4.0" cache_control = "=0.2.0" @@ -126,6 +128,7 @@ fs3 = "0.5.0" futures = "0.3.21" glob = "0.3.1" h2 = "0.4.4" +hickory-resolver = { version = "0.24", features = ["tokio-runtime", "serde-config"] } http = "1.0" http-body = "1.0" http-body-util = "0.1.2" @@ -141,7 +144,7 @@ jsonc-parser = { version = "=0.26.2", features = ["serde"] } lazy-regex = "3" libc = "0.2.126" libz-sys = { version = "1.1.20", default-features = false } -log = "0.4.20" +log = { version = "0.4.20", features = ["kv"] } lsp-types = "=0.97.0" # used by tower-lsp and "proposed" feature is unstable in patch releases memmem = "0.1.1" monch = "=0.5.0" @@ -157,8 +160,8 @@ percent-encoding = "2.3.0" phf = { version = "0.11", features = ["macros"] } pin-project = "1.0.11" # don't pin because they yank crates from cargo pretty_assertions = "=1.4.0" -prost = "0.11" -prost-build = "0.11" +prost = "0.13" +prost-build = "0.13" rand = "=0.8.5" regex = "^1.7.0" reqwest = { version = "=0.12.5", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli", "socks", "json", "http2"] } # pinned because of https://github.com/seanmonstar/reqwest/pull/1955 @@ -197,16 +200,21 @@ tower-http = { version = "0.6.1", features = ["decompression-br", "decompression tower-lsp = { package = "deno_tower_lsp", version = "0.1.0", features = ["proposed"] } tower-service = "0.3.2" twox-hash = "=1.6.3" -# Upgrading past 2.4.1 may cause WPT failures -url = { version = "< 2.5.0", features = ["serde", "expose_internals"] } +url = { version = "2.5", features = ["serde", "expose_internals"] } uuid = { version = "1.3.0", features = ["v4"] } webpki-root-certs = "0.26.5" webpki-roots = "0.26" which = "4.2.5" yoke = { version = "0.7.4", features = ["derive"] } -zeromq = { version = "=0.4.0", default-features = false, features = ["tcp-transport", "tokio-runtime"] } +zeromq = { version = "=0.4.1", default-features = false, features = ["tcp-transport", "tokio-runtime"] } zstd = "=0.12.4" +opentelemetry = "0.27.0" +opentelemetry-http = "0.27.0" +opentelemetry-otlp = { version = "0.27.0", features = ["logs", "http-proto", "http-json"] } +opentelemetry-semantic-conventions = { version = "0.27.0", features = ["semconv_experimental"] } +opentelemetry_sdk = "0.27.0" + # crypto hkdf = "0.12.3" rsa = { version = "0.9.3", default-features = false, features = ["std", "pem", "hazmat"] } # hazmat needed for PrehashSigner in ext/node diff --git a/ext/cache/sqlite.rs b/ext/cache/sqlite.rs index 2c7287ba692278..d96832555ab302 100644 --- a/ext/cache/sqlite.rs +++ b/ext/cache/sqlite.rs @@ -44,7 +44,13 @@ impl SqliteBackedCache { pub fn new(cache_storage_dir: PathBuf) -> Result { { std::fs::create_dir_all(&cache_storage_dir) - .expect("failed to create cache dir"); + .with_context(|| { + format!( + "Failed to create cache storage directory {}", + cache_storage_dir.display() + ) + }) + .map_err(CacheError::Other)?; let path = cache_storage_dir.join("cache_metadata.db"); let connection = rusqlite::Connection::open(&path).unwrap_or_else(|_| { panic!("failed to open cache db at {}", path.display()) diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index e843dbc6bc0b95..85b1728eb38104 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -18,6 +18,7 @@ use crate::FsPermissions; use crate::OpenOptions; use deno_core::error::JsNativeError; use deno_core::error::ResourceError; +use boxed_error::Boxed; use deno_core::op2; use deno_core::CancelFuture; use deno_core::CancelHandle; @@ -34,8 +35,11 @@ use rand::thread_rng; use rand::Rng; use serde::Serialize; +#[derive(Debug, Boxed, deno_core::JsError)] +pub struct FsOpsError(pub Box); + #[derive(Debug, thiserror::Error, deno_core::JsError)] -pub enum FsOpsError { +pub enum FsOpsErrorKind { #[class(inherit)] #[error("{0}")] Io(#[source] #[inherit] std::io::Error), @@ -89,13 +93,14 @@ pub enum FsOpsError { impl From for FsOpsError { fn from(err: FsError) -> Self { match err { - FsError::Io(err) => FsOpsError::Io(err), - FsError::FileBusy => FsOpsError::Resource(ResourceError::Unavailable), + FsError::Io(err) => FsOpsErrorKind::Io(err), + FsError::FileBusy => FsOpsErrorKind::Resource(ResourceError::Unavailable), FsError::NotSupported => { - FsOpsError::Other(JsNativeError::not_supported()) + FsOpsErrorKind::Other(JsNativeError::not_supported()) } - FsError::NotCapable(err) => FsOpsError::NotCapable(err), + FsError::NotCapable(err) => FsOpsErrorKind::NotCapable(err), } + .into_box() } } @@ -141,11 +146,12 @@ fn map_permission_error( (path.as_str(), "") }; - FsOpsError::NotCapableAccess { + FsOpsErrorKind::NotCapableAccess { standalone: deno_permissions::is_standalone(), err, path: format!("{path}{truncated}"), } + .into_box() } err => Err::<(), _>(err) .context_path(operation, path) @@ -154,7 +160,7 @@ fn map_permission_error( } } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_cwd

(state: &mut OpState) -> Result where @@ -169,7 +175,7 @@ where Ok(path_str) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_chdir

( state: &mut OpState, #[string] directory: &str, @@ -196,7 +202,7 @@ where state.borrow::().umask(mask).context("umask") } -#[op2] +#[op2(stack_trace)] #[smi] pub fn op_fs_open_sync

( state: &mut OpState, @@ -223,7 +229,7 @@ where Ok(rid) } -#[op2(async)] +#[op2(async, stack_trace)] #[smi] pub async fn op_fs_open_async

( state: Rc>, @@ -251,7 +257,7 @@ where Ok(rid) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_mkdir_sync

( state: &mut OpState, #[string] path: String, @@ -274,7 +280,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_mkdir_async

( state: Rc>, #[string] path: String, @@ -299,7 +305,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_chmod_sync

( state: &mut OpState, #[string] path: String, @@ -316,7 +322,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_chmod_async

( state: Rc>, #[string] path: String, @@ -336,7 +342,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_chown_sync

( state: &mut OpState, #[string] path: String, @@ -355,7 +361,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_chown_async

( state: Rc>, #[string] path: String, @@ -376,7 +382,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_remove_sync

( state: &mut OpState, #[string] path: &str, @@ -396,7 +402,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_remove_async

( state: Rc>, #[string] path: String, @@ -427,7 +433,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_copy_file_sync

( state: &mut OpState, #[string] from: &str, @@ -447,7 +453,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_copy_file_async

( state: Rc>, #[string] from: String, @@ -471,7 +477,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_stat_sync

( state: &mut OpState, #[string] path: String, @@ -490,7 +496,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_stat_async

( state: Rc>, @@ -512,7 +518,7 @@ where Ok(SerializableStat::from(stat)) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_lstat_sync

( state: &mut OpState, #[string] path: String, @@ -531,7 +537,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_lstat_async

( state: Rc>, @@ -553,7 +559,7 @@ where Ok(SerializableStat::from(stat)) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_realpath_sync

( state: &mut OpState, @@ -576,7 +582,7 @@ where Ok(path_string) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_realpath_async

( state: Rc>, @@ -604,7 +610,7 @@ where Ok(path_string) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_fs_read_dir_sync

( state: &mut OpState, @@ -623,7 +629,7 @@ where Ok(entries) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_read_dir_async

( state: Rc>, @@ -648,7 +654,7 @@ where Ok(entries) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_rename_sync

( state: &mut OpState, #[string] oldpath: String, @@ -669,7 +675,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_rename_async

( state: Rc>, #[string] oldpath: String, @@ -694,7 +700,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_link_sync

( state: &mut OpState, #[string] oldpath: &str, @@ -716,7 +722,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_link_async

( state: Rc>, #[string] oldpath: String, @@ -742,7 +748,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_symlink_sync

( state: &mut OpState, #[string] oldpath: &str, @@ -766,7 +772,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_symlink_async

( state: Rc>, #[string] oldpath: String, @@ -794,7 +800,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_read_link_sync

( state: &mut OpState, @@ -814,7 +820,7 @@ where Ok(target_string) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_read_link_async

( state: Rc>, @@ -839,7 +845,7 @@ where Ok(target_string) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_truncate_sync

( state: &mut OpState, #[string] path: &str, @@ -859,7 +865,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_truncate_async

( state: Rc>, #[string] path: String, @@ -883,7 +889,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_utime_sync

( state: &mut OpState, #[string] path: &str, @@ -904,7 +910,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_utime_async

( state: Rc>, #[string] path: String, @@ -935,7 +941,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_make_temp_dir_sync

( state: &mut OpState, @@ -977,7 +983,7 @@ where .context("tmpdir") } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_make_temp_dir_async

( state: Rc>, @@ -1023,7 +1029,7 @@ where .context("tmpdir") } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_make_temp_file_sync

( state: &mut OpState, @@ -1071,7 +1077,7 @@ where .context("tmpfile") } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_make_temp_file_async

( state: Rc>, @@ -1190,7 +1196,9 @@ fn validate_temporary_filename_component( ) -> Result<(), FsOpsError> { // Ban ASCII and Unicode control characters: these will often fail if let Some(c) = component.matches(|c: char| c.is_control()).next() { - return Err(FsOpsError::InvalidControlCharacter(c.to_string())); + return Err( + FsOpsErrorKind::InvalidControlCharacter(c.to_string()).into_box(), + ); } // Windows has the most restrictive filenames. As temp files aren't normal files, we just // use this set of banned characters for all platforms because wildcard-like files can also @@ -1206,13 +1214,13 @@ fn validate_temporary_filename_component( .matches(|c: char| "<>:\"/\\|?*".contains(c)) .next() { - return Err(FsOpsError::InvalidCharacter(c.to_string())); + return Err(FsOpsErrorKind::InvalidCharacter(c.to_string()).into_box()); } // This check is only for Windows #[cfg(windows)] if suffix && component.ends_with(|c: char| ". ".contains(c)) { - return Err(FsOpsError::InvalidTrailingCharacter); + return Err(FsOpsErrorKind::InvalidTrailingCharacter.into_box()); } Ok(()) @@ -1241,7 +1249,7 @@ fn tmp_name( Ok(path) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_write_file_sync

( state: &mut OpState, #[string] path: String, @@ -1267,7 +1275,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[allow(clippy::too_many_arguments)] pub async fn op_fs_write_file_async

( state: Rc>, @@ -1321,7 +1329,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_fs_read_file_sync

( state: &mut OpState, @@ -1342,7 +1350,7 @@ where Ok(buf.into()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_read_file_async

( state: Rc>, @@ -1384,7 +1392,7 @@ where Ok(buf.into()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_read_file_text_sync

( state: &mut OpState, @@ -1405,7 +1413,7 @@ where Ok(str) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_read_file_text_async

( state: Rc>, @@ -1454,7 +1462,7 @@ fn to_seek_from(offset: i64, whence: i32) -> Result { 1 => SeekFrom::Current(offset), 2 => SeekFrom::End(offset), _ => { - return Err(FsOpsError::InvalidSeekMode(whence)); + return Err(FsOpsErrorKind::InvalidSeekMode(whence).into_box()); } }; Ok(seek_from) @@ -1469,7 +1477,8 @@ pub fn op_fs_seek_sync( #[smi] whence: i32, ) -> Result { let pos = to_seek_from(offset, whence)?; - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; let cursor = file.seek_sync(pos)?; Ok(cursor) } @@ -1483,7 +1492,8 @@ pub async fn op_fs_seek_async( #[smi] whence: i32, ) -> Result { let pos = to_seek_from(offset, whence)?; - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; let cursor = file.seek_async(pos).await?; Ok(cursor) } @@ -1493,7 +1503,8 @@ pub fn op_fs_file_sync_data_sync( state: &mut OpState, #[smi] rid: ResourceId, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; file.datasync_sync()?; Ok(()) } @@ -1503,7 +1514,8 @@ pub async fn op_fs_file_sync_data_async( state: Rc>, #[smi] rid: ResourceId, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; file.datasync_async().await?; Ok(()) } @@ -1513,7 +1525,8 @@ pub fn op_fs_file_sync_sync( state: &mut OpState, #[smi] rid: ResourceId, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; file.sync_sync()?; Ok(()) } @@ -1523,7 +1536,8 @@ pub async fn op_fs_file_sync_async( state: Rc>, #[smi] rid: ResourceId, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; file.sync_async().await?; Ok(()) } @@ -1534,7 +1548,8 @@ pub fn op_fs_file_stat_sync( #[smi] rid: ResourceId, #[buffer] stat_out_buf: &mut [u32], ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; let stat = file.stat_sync()?; let serializable_stat = SerializableStat::from(stat); serializable_stat.write(stat_out_buf); @@ -1547,7 +1562,8 @@ pub async fn op_fs_file_stat_async( state: Rc>, #[smi] rid: ResourceId, ) -> Result { - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; let stat = file.stat_async().await?; Ok(stat.into()) } @@ -1558,7 +1574,8 @@ pub fn op_fs_flock_sync( #[smi] rid: ResourceId, exclusive: bool, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; file.lock_sync(exclusive)?; Ok(()) } @@ -1569,7 +1586,8 @@ pub async fn op_fs_flock_async( #[smi] rid: ResourceId, exclusive: bool, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; file.lock_async(exclusive).await?; Ok(()) } @@ -1579,7 +1597,8 @@ pub fn op_fs_funlock_sync( state: &mut OpState, #[smi] rid: ResourceId, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; file.unlock_sync()?; Ok(()) } @@ -1589,7 +1608,8 @@ pub async fn op_fs_funlock_async( state: Rc>, #[smi] rid: ResourceId, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; file.unlock_async().await?; Ok(()) } @@ -1600,7 +1620,8 @@ pub fn op_fs_ftruncate_sync( #[smi] rid: ResourceId, #[number] len: u64, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; file.truncate_sync(len)?; Ok(()) } @@ -1611,7 +1632,8 @@ pub async fn op_fs_file_truncate_async( #[smi] rid: ResourceId, #[number] len: u64, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; file.truncate_async(len).await?; Ok(()) } @@ -1625,7 +1647,8 @@ pub fn op_fs_futime_sync( #[number] mtime_secs: i64, #[smi] mtime_nanos: u32, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(state, rid)?; + let file = + FileResource::get_file(state, rid).map_err(FsOpsErrorKind::Resource)?; file.utime_sync(atime_secs, atime_nanos, mtime_secs, mtime_nanos)?; Ok(()) } @@ -1639,7 +1662,8 @@ pub async fn op_fs_futime_async( #[number] mtime_secs: i64, #[smi] mtime_nanos: u32, ) -> Result<(), FsOpsError> { - let file = FileResource::get_file(&state.borrow(), rid)?; + let file = FileResource::get_file(&state.borrow(), rid) + .map_err(FsOpsErrorKind::Resource)?; file .utime_async(atime_secs, atime_nanos, mtime_secs, mtime_nanos) .await?; @@ -1717,7 +1741,7 @@ impl MapErrContext for Result { where F: FnOnce(FsError) -> OperationError, { - self.map_err(|err| FsOpsError::OperationError(f(err))) + self.map_err(|err| FsOpsErrorKind::OperationError(f(err)).into_box()) } fn context(self, operation: &'static str) -> Self::R { @@ -1754,7 +1778,8 @@ impl MapErrContext for Result { } fn path_into_string(s: std::ffi::OsString) -> Result { - s.into_string().map_err(FsOpsError::InvalidUtf8) + s.into_string() + .map_err(|e| FsOpsErrorKind::InvalidUtf8(e).into_box()) } macro_rules! create_struct_writer { @@ -1795,6 +1820,8 @@ create_struct_writer! { atime: u64, birthtime_set: bool, birthtime: u64, + ctime_set: bool, + ctime: u64, // Following are only valid under Unix. dev: u64, ino: u64, @@ -1826,6 +1853,8 @@ impl From for SerializableStat { atime: stat.atime.unwrap_or(0), birthtime_set: stat.birthtime.is_some(), birthtime: stat.birthtime.unwrap_or(0), + ctime_set: stat.ctime.is_some(), + ctime: stat.ctime.unwrap_or(0), dev: stat.dev, ino: stat.ino, diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs index e390a3b23b4862..1f63d57bbcb11a 100644 --- a/ext/kv/lib.rs +++ b/ext/kv/lib.rs @@ -14,6 +14,7 @@ use std::time::Duration; use base64::prelude::BASE64_URL_SAFE; use base64::Engine; +use boxed_error::Boxed; use chrono::DateTime; use chrono::Utc; use deno_core::error::JsErrorClass; @@ -115,8 +116,11 @@ impl Resource for DatabaseWatcherResource { } } +#[derive(Debug, Boxed, deno_core::JsError)] +pub struct KvError(pub Box); + #[derive(Debug, thiserror::Error, deno_core::JsError)] -pub enum KvError { +pub enum KvErrorKind { #[class(inherit)] #[error(transparent)] DatabaseHandler( #[inherit] JsNativeError), @@ -203,7 +207,7 @@ pub enum KvError { InvalidRange, } -#[op2(async)] +#[op2(async, stack_trace)] #[smi] async fn op_kv_database_open( state: Rc>, @@ -222,7 +226,7 @@ where let db = handler .open(state.clone(), path) .await - .map_err(KvError::DatabaseHandler)?; + .map_err(KvErrorKind::DatabaseHandler)?; let rid = state.borrow_mut().resource_table.add(DatabaseResource { db, cancel_handle: CancelHandle::new_rc(), @@ -355,8 +359,10 @@ where { let db = { let state = state.borrow(); - let resource = - state.resource_table.get::>(rid)?; + let resource = state + .resource_table + .get::>(rid) + .map_err(KvErrorKind::Resource)?; resource.db.clone() }; @@ -366,7 +372,7 @@ where }; if ranges.len() > config.max_read_ranges { - return Err(KvError::TooManyRanges(config.max_read_ranges)); + return Err(KvErrorKind::TooManyRanges(config.max_read_ranges).into_box()); } let mut total_entries = 0usize; @@ -385,14 +391,16 @@ where Ok(ReadRange { start, end, - limit: NonZeroU32::new(limit).ok_or(KvError::InvalidLimit)?, + limit: NonZeroU32::new(limit).ok_or(KvErrorKind::InvalidLimit)?, reverse, }) }) .collect::, KvError>>()?; if total_entries > config.max_read_entries { - return Err(KvError::TooManyEntries(config.max_read_entries)); + return Err( + KvErrorKind::TooManyEntries(config.max_read_entries).into_box(), + ); } let opts = SnapshotReadOptions { @@ -401,7 +409,7 @@ where let output_ranges = db .snapshot_read(read_ranges, opts) .await - .map_err(KvError::Kv)?; + .map_err(KvErrorKind::Kv)?; let output_ranges = output_ranges .into_iter() .map(|x| { @@ -442,7 +450,7 @@ where if err.get_class() == "BadResource" { return Ok(None); } else { - return Err(KvError::Resource(err)); + return Err(KvErrorKind::Resource(err).into_box()); } } }; @@ -450,11 +458,11 @@ where }; let Some(mut handle) = - db.dequeue_next_message().await.map_err(KvError::Kv)? + db.dequeue_next_message().await.map_err(KvErrorKind::Kv)? else { return Ok(None); }; - let payload = handle.take_payload().await.map_err(KvError::Kv)?.into(); + let payload = handle.take_payload().await.map_err(KvErrorKind::Kv)?.into(); let handle_rid = { let mut state = state.borrow_mut(); state.resource_table.add(QueueMessageResource { handle }) @@ -472,11 +480,14 @@ fn op_kv_watch( where DBH: DatabaseHandler + 'static, { - let resource = state.resource_table.get::>(rid)?; + let resource = state + .resource_table + .get::>(rid) + .map_err(KvErrorKind::Resource)?; let config = state.borrow::>().clone(); if keys.len() > config.max_watched_keys { - return Err(KvError::TooManyKeys(config.max_watched_keys)); + return Err(KvErrorKind::TooManyKeys(config.max_watched_keys).into_box()); } let keys: Vec> = keys @@ -514,7 +525,10 @@ async fn op_kv_watch_next( ) -> Result>, KvError> { let resource = { let state = state.borrow(); - let resource = state.resource_table.get::(rid)?; + let resource = state + .resource_table + .get::(rid) + .map_err(KvErrorKind::Resource)?; resource.clone() }; @@ -540,7 +554,7 @@ async fn op_kv_watch_next( return Ok(None); }; - let entries = res.map_err(KvError::Kv)?; + let entries = res.map_err(KvErrorKind::Kv)?; let entries = entries .into_iter() .map(|entry| { @@ -570,9 +584,9 @@ where let handle = state .resource_table .take::::DB as Database>::QMH>>(handle_rid) - .map_err(|_| KvError::QueueMessageNotFound)?; + .map_err(|_| KvErrorKind::QueueMessageNotFound)?; Rc::try_unwrap(handle) - .map_err(|_| KvError::QueueMessageNotFound)? + .map_err(|_| KvErrorKind::QueueMessageNotFound)? .handle }; // if we fail to finish the message, there is not much we can do and the @@ -719,7 +733,7 @@ impl RawSelector { }), (Some(prefix), Some(start), None) => { if !start.starts_with(&prefix) || start.len() == prefix.len() { - return Err(KvError::StartKeyNotInKeyspace); + return Err(KvErrorKind::StartKeyNotInKeyspace.into_box()); } Ok(Self::Prefixed { prefix, @@ -729,7 +743,7 @@ impl RawSelector { } (Some(prefix), None, Some(end)) => { if !end.starts_with(&prefix) || end.len() == prefix.len() { - return Err(KvError::EndKeyNotInKeyspace); + return Err(KvErrorKind::EndKeyNotInKeyspace.into_box()); } Ok(Self::Prefixed { prefix, @@ -739,7 +753,7 @@ impl RawSelector { } (None, Some(start), Some(end)) => { if start > end { - return Err(KvError::StartKeyGreaterThanEndKey); + return Err(KvErrorKind::StartKeyGreaterThanEndKey.into_box()); } Ok(Self::Range { start, end }) } @@ -747,7 +761,7 @@ impl RawSelector { let end = start.iter().copied().chain(Some(0)).collect(); Ok(Self::Range { start, end }) } - _ => Err(KvError::InvalidRange), + _ => Err(KvErrorKind::InvalidRange.into_box()), } } @@ -809,7 +823,7 @@ fn encode_cursor( ) -> Result { let common_prefix = selector.common_prefix(); if !boundary_key.starts_with(common_prefix) { - return Err(KvError::InvalidBoundaryKey); + return Err(KvErrorKind::InvalidBoundaryKey.into_box()); } Ok(BASE64_URL_SAFE.encode(&boundary_key[common_prefix.len()..])) } @@ -826,7 +840,7 @@ fn decode_selector_and_cursor( let common_prefix = selector.common_prefix(); let cursor = BASE64_URL_SAFE .decode(cursor) - .map_err(|_| KvError::InvalidCursor)?; + .map_err(|_| KvErrorKind::InvalidCursor)?; let first_key: Vec; let last_key: Vec; @@ -851,13 +865,13 @@ fn decode_selector_and_cursor( // Defend against out-of-bounds reading if let Some(start) = selector.start() { if &first_key[..] < start { - return Err(KvError::CursorOutOfBounds); + return Err(KvErrorKind::CursorOutOfBounds.into_box()); } } if let Some(end) = selector.end() { if &last_key[..] > end { - return Err(KvError::CursorOutOfBounds); + return Err(KvErrorKind::CursorOutOfBounds.into_box()); } } @@ -879,8 +893,10 @@ where let current_timestamp = chrono::Utc::now(); let db = { let state = state.borrow(); - let resource = - state.resource_table.get::>(rid)?; + let resource = state + .resource_table + .get::>(rid) + .map_err(KvErrorKind::Resource)?; resource.db.clone() }; @@ -890,28 +906,28 @@ where }; if checks.len() > config.max_checks { - return Err(KvError::TooManyChecks(config.max_checks)); + return Err(KvErrorKind::TooManyChecks(config.max_checks).into_box()); } if mutations.len() + enqueues.len() > config.max_mutations { - return Err(KvError::TooManyMutations(config.max_mutations)); + return Err(KvErrorKind::TooManyMutations(config.max_mutations).into_box()); } let checks = checks .into_iter() .map(check_from_v8) .collect::, KvCheckError>>() - .map_err(KvError::InvalidCheck)?; + .map_err(KvErrorKind::InvalidCheck)?; let mutations = mutations .into_iter() .map(|mutation| mutation_from_v8((mutation, current_timestamp))) .collect::, KvMutationError>>() - .map_err(KvError::InvalidMutation)?; + .map_err(KvErrorKind::InvalidMutation)?; let enqueues = enqueues .into_iter() .map(|e| enqueue_from_v8(e, current_timestamp)) .collect::, std::io::Error>>() - .map_err(KvError::InvalidEnqueue)?; + .map_err(KvErrorKind::InvalidEnqueue)?; let mut total_payload_size = 0usize; let mut total_key_size = 0usize; @@ -922,7 +938,7 @@ where .chain(mutations.iter().map(|m| &m.key)) { if key.is_empty() { - return Err(KvError::EmptyKey); + return Err(KvErrorKind::EmptyKey.into_box()); } total_payload_size += check_write_key_size(key, &config)?; @@ -946,13 +962,16 @@ where } if total_payload_size > config.max_total_mutation_size_bytes { - return Err(KvError::TotalMutationTooLarge( - config.max_total_mutation_size_bytes, - )); + return Err( + KvErrorKind::TotalMutationTooLarge(config.max_total_mutation_size_bytes) + .into_box(), + ); } if total_key_size > config.max_total_key_size_bytes { - return Err(KvError::TotalKeyTooLarge(config.max_total_key_size_bytes)); + return Err( + KvErrorKind::TotalKeyTooLarge(config.max_total_key_size_bytes).into_box(), + ); } let atomic_write = AtomicWrite { @@ -961,7 +980,10 @@ where enqueues, }; - let result = db.atomic_write(atomic_write).await.map_err(KvError::Kv)?; + let result = db + .atomic_write(atomic_write) + .await + .map_err(KvErrorKind::Kv)?; Ok(result.map(|res| faster_hex::hex_string(&res.versionstamp))) } @@ -983,7 +1005,9 @@ fn op_kv_encode_cursor( fn check_read_key_size(key: &[u8], config: &KvConfig) -> Result<(), KvError> { if key.len() > config.max_read_key_size_bytes { - Err(KvError::KeyTooLargeToRead(config.max_read_key_size_bytes)) + Err( + KvErrorKind::KeyTooLargeToRead(config.max_read_key_size_bytes).into_box(), + ) } else { Ok(()) } @@ -994,7 +1018,10 @@ fn check_write_key_size( config: &KvConfig, ) -> Result { if key.len() > config.max_write_key_size_bytes { - Err(KvError::KeyTooLargeToWrite(config.max_write_key_size_bytes)) + Err( + KvErrorKind::KeyTooLargeToWrite(config.max_write_key_size_bytes) + .into_box(), + ) } else { Ok(key.len()) } @@ -1011,7 +1038,7 @@ fn check_value_size( }; if payload.len() > config.max_value_size_bytes { - Err(KvError::ValueTooLarge(config.max_value_size_bytes)) + Err(KvErrorKind::ValueTooLarge(config.max_value_size_bytes).into_box()) } else { Ok(payload.len()) } @@ -1022,7 +1049,10 @@ fn check_enqueue_payload_size( config: &KvConfig, ) -> Result { if payload.len() > config.max_value_size_bytes { - Err(KvError::EnqueuePayloadTooLarge(config.max_value_size_bytes)) + Err( + KvErrorKind::EnqueuePayloadTooLarge(config.max_value_size_bytes) + .into_box(), + ) } else { Ok(payload.len()) } diff --git a/ext/node/lib.rs b/ext/node/lib.rs index f8e64e0d374525..1c5d561e6f1877 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -14,7 +14,8 @@ use deno_core::url::Url; #[allow(unused_imports)] use deno_core::v8; use deno_core::v8::ExternalReference; -use node_resolver::NpmResolverRc; +use node_resolver::errors::ClosestPkgJsonError; +use node_resolver::NpmPackageFolderResolverRc; use once_cell::sync::Lazy; extern crate libz_sys as zlib; @@ -157,6 +158,10 @@ pub trait NodeRequireLoader { ) -> Result, PermissionCheckError>; fn load_text_file_lossy(&self, path: &Path) -> Result; + + /// Get if the module kind is maybe CJS and loading should determine + /// if its CJS or ESM. + fn is_maybe_cjs(&self, specifier: &Url) -> Result; } pub static NODE_ENV_VAR_ALLOWLIST: Lazy> = Lazy::new(|| { @@ -178,7 +183,7 @@ fn op_node_build_os() -> String { pub struct NodeExtInitServices { pub node_require_loader: NodeRequireLoaderRc, pub node_resolver: NodeResolverRc, - pub npm_resolver: NpmResolverRc, + pub npm_resolver: NpmPackageFolderResolverRc, pub pkg_json_resolver: PackageJsonResolverRc, } @@ -345,6 +350,7 @@ deno_core::extension!(deno_node, ops::zlib::op_zlib_write, ops::zlib::op_zlib_init, ops::zlib::op_zlib_reset, + ops::zlib::op_zlib_crc32, ops::zlib::brotli::op_brotli_compress, ops::zlib::brotli::op_brotli_compress_async, ops::zlib::brotli::op_create_brotli_compress, @@ -384,6 +390,7 @@ deno_core::extension!(deno_node, ops::require::op_require_proxy_path, ops::require::op_require_is_deno_dir_package, ops::require::op_require_resolve_deno_dir, + ops::require::op_require_is_maybe_cjs, ops::require::op_require_is_request_relative, ops::require::op_require_resolve_lookup_paths, ops::require::op_require_try_self_parent_path

, @@ -397,7 +404,6 @@ deno_core::extension!(deno_node, ops::require::op_require_read_file

, ops::require::op_require_as_file_path, ops::require::op_require_resolve_exports

, - ops::require::op_require_read_closest_package_json

, ops::require::op_require_read_package_scope

, ops::require::op_require_package_imports_resolve

, ops::require::op_require_break_on_next_statement, @@ -421,6 +427,9 @@ deno_core::extension!(deno_node, ops::inspector::op_inspector_emit_protocol_event, ops::inspector::op_inspector_enabled, ], + objects = [ + ops::perf_hooks::EldHistogram + ], esm_entry_point = "ext:deno_node/02_init.js", esm = [ dir "polyfills", diff --git a/ext/node/ops/inspector.rs b/ext/node/ops/inspector.rs index d6034d4a9acc91..78a57ea4e3dc79 100644 --- a/ext/node/ops/inspector.rs +++ b/ext/node/ops/inspector.rs @@ -19,7 +19,7 @@ pub fn op_inspector_enabled() -> bool { false } -#[op2] +#[op2(stack_trace)] pub fn op_inspector_open

( _state: &mut OpState, _port: Option, @@ -94,7 +94,7 @@ pub enum InspectorConnectError { ConnectToMainThreadUnsupported, } -#[op2] +#[op2(stack_trace)] #[cppgc] pub fn op_inspector_connect<'s, P>( isolate: *mut v8::Isolate, diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index 44d25e157fa293..6f458021a0dd3c 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -1,16 +1,19 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +use boxed_error::Boxed; +use deno_core::error::AnyError; use deno_core::op2; use deno_core::url::Url; use deno_core::v8; use deno_core::JsRuntimeInspector; -use deno_core::ModuleSpecifier; use deno_core::OpState; use deno_fs::FileSystemRc; +use deno_package_json::NodeModuleKind; use deno_package_json::PackageJsonRc; use deno_path_util::normalize_path; +use deno_path_util::url_from_file_path; use deno_path_util::url_to_file_path; -use node_resolver::NodeModuleKind; +use node_resolver::errors::ClosestPkgJsonError; use node_resolver::NodeResolutionMode; use node_resolver::REQUIRE_CONDITIONS; use std::borrow::Cow; @@ -23,7 +26,7 @@ use deno_permissions::PermissionCheckError; use crate::NodePermissions; use crate::NodeRequireLoaderRc; use crate::NodeResolverRc; -use crate::NpmResolverRc; +use crate::NpmPackageFolderResolverRc; use crate::PackageJsonResolverRc; #[must_use = "the resolved return value to mitigate time-of-check to time-of-use issues"] @@ -39,8 +42,11 @@ where loader.ensure_read_permission(permissions, file_path) } +#[derive(Debug, Boxed, deno_core::JsError)] +pub struct RequireError(pub Box); + #[derive(Debug, thiserror::Error, deno_core::JsError)] -pub enum RequireError { +pub enum RequireErrorKind { #[class(inherit)] #[error(transparent)] UrlParse(#[from] #[inherit] url::ParseError), @@ -131,7 +137,7 @@ pub fn op_require_init_paths() -> Vec { vec![] } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_require_node_module_paths

( state: &mut OpState, @@ -145,7 +151,7 @@ where let from = if from.starts_with("file:///") { url_to_file_path(&Url::parse(&from)?)? } else { - let current_dir = &fs.cwd().map_err(RequireError::UnableToGetCwd)?; + let current_dir = &fs.cwd().map_err(RequireErrorKind::UnableToGetCwd)?; normalize_path(current_dir.join(from)) }; @@ -229,17 +235,17 @@ pub fn op_require_resolve_deno_dir( state: &mut OpState, #[string] request: String, #[string] parent_filename: String, -) -> Option { - let resolver = state.borrow::(); - resolver - .resolve_package_folder_from_package( - &request, - &ModuleSpecifier::from_file_path(&parent_filename).unwrap_or_else(|_| { - panic!("Url::from_file_path: [{:?}]", parent_filename) - }), - ) - .ok() - .map(|p| p.to_string_lossy().into_owned()) +) -> Result, AnyError> { + let resolver = state.borrow::(); + Ok( + resolver + .resolve_package_folder_from_package( + &request, + &url_from_file_path(&PathBuf::from(parent_filename))?, + ) + .ok() + .map(|p| p.to_string_lossy().into_owned()), + ) } #[op2(fast)] @@ -301,7 +307,7 @@ pub fn op_require_path_is_absolute(#[string] p: String) -> bool { PathBuf::from(p).is_absolute() } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_require_stat

( state: &mut OpState, #[string] path: String, @@ -323,7 +329,7 @@ where Ok(-1) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_real_path

( state: &mut OpState, @@ -334,7 +340,7 @@ where { let path = PathBuf::from(request); let path = ensure_read_permission::

(state, &path) - ?; + .map_err(RequireErrorKind::Permission)?; let fs = state.borrow::(); let canonicalized_path = deno_path_util::strip_unc_prefix(fs.realpath_sync(&path)?); @@ -387,7 +393,7 @@ pub fn op_require_path_basename( } } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_try_self_parent_path

( state: &mut OpState, @@ -418,7 +424,7 @@ where Ok(None) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_try_self

( state: &mut OpState, @@ -482,7 +488,7 @@ where } } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_read_file

( state: &mut OpState, @@ -494,11 +500,11 @@ where let file_path = PathBuf::from(file_path); // todo(dsherret): there's multiple borrows to NodeRequireLoaderRc here let file_path = ensure_read_permission::

(state, &file_path) - ?; + .map_err(RequireErrorKind::Permission)?; let loader = state.borrow::(); loader .load_text_file_lossy(&file_path) - .map_err(RequireError::ReadModule) + .map_err(|e| RequireErrorKind::ReadModule(e).into_box()) } #[op2] @@ -513,7 +519,7 @@ pub fn op_require_as_file_path(#[string] file_or_url: String) -> String { file_or_url } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_resolve_exports

( state: &mut OpState, @@ -578,22 +584,20 @@ where deno_core::js_error_wrapper!(node_resolver::errors::ClosestPkgJsonError, JsClosestPkgJsonError, "Error"); -#[op2] -#[serde] -pub fn op_require_read_closest_package_json

( +#[op2(fast)] +pub fn op_require_is_maybe_cjs( state: &mut OpState, #[string] filename: String, -) -> Result, JsClosestPkgJsonError> -where - P: NodePermissions + 'static, -{ +) -> Result { let filename = PathBuf::from(filename); - // permissions: allow reading the closest package.json files - let pkg_json_resolver = state.borrow::(); - pkg_json_resolver.get_closest_package_json_from_path(&filename).map_err(Into::into) + let Ok(url) = url_from_file_path(&filename) else { + return Ok(false); + }; + let loader = state.borrow::(); + loader.is_maybe_cjs(&url).map_err(Into::into) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_require_read_package_scope

( state: &mut OpState, @@ -614,7 +618,7 @@ where .flatten() } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_package_imports_resolve

( state: &mut OpState, @@ -626,7 +630,7 @@ where { let referrer_path = PathBuf::from(&referrer_filename); let referrer_path = ensure_read_permission::

(state, &referrer_path) - ?; + .map_err(RequireErrorKind::Permission)?; let pkg_json_resolver = state.borrow::(); let Some(pkg) = pkg_json_resolver.get_closest_package_json_from_path(&referrer_path)? diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index 928c8c2746407e..b2092781e48a4f 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -793,14 +793,17 @@ fn check_run_permission( if !env_var_names.is_empty() { // we don't allow users to launch subprocesses with any LD_ or DYLD_* // env vars set because this allows executing code (ex. LD_PRELOAD) - return Err(CheckRunPermissionError::Other(JsNativeError::new( - "NotCapable", - format!( - "Requires --allow-all permissions to spawn subprocess with {} environment variable{}.", - env_var_names.join(", "), - if env_var_names.len() != 1 { "s" } else { "" } - ) - ))); + return Err(CheckRunPermissionError::Other( + JsNativeError::new( + "NotCapable", + format!( + "Requires --allow-run permissions to spawn subprocess with {0} environment variable{1}. Alternatively, spawn with {2} environment variable{1} unset.", + env_var_names.join(", "), + if env_var_names.len() != 1 { "s" } else { "" }, + if env_var_names.len() != 1 { "these" } else { "the" } + ), + ), + )); } permissions.check_run(cmd, api_name)?; } @@ -836,7 +839,7 @@ fn get_requires_allow_all_env_vars(env: &RunEnv) -> Vec<&str> { found_envs } -#[op2] +#[op2(stack_trace)] #[serde] fn op_spawn_child( state: &mut OpState, @@ -878,7 +881,7 @@ async fn op_spawn_wait( Ok(result) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_spawn_sync( state: &mut OpState, @@ -962,7 +965,7 @@ mod deprecated { stderr_rid: Option, } - #[op2] + #[op2(stack_trace)] #[serde] pub fn op_run( state: &mut OpState, @@ -1163,7 +1166,7 @@ mod deprecated { } } - #[op2(fast)] + #[op2(fast, stack_trace)] pub fn op_kill( state: &mut OpState, #[smi] pid: i32, diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index e36f830ec8aff9..5bccbc94e4878e 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -356,6 +356,8 @@ pub struct WebWorkerOptions { pub extensions: Vec, pub startup_snapshot: Option<&'static [u8]>, pub unsafely_ignore_certificate_errors: Option>, + /// Optional isolate creation parameters, such as heap limits. + pub create_params: Option, pub seed: Option, pub create_web_worker_cb: Arc, pub format_js_error_fn: Option>, @@ -365,6 +367,7 @@ pub struct WebWorkerOptions { pub strace_ops: Option>, pub close_on_idle: bool, pub maybe_worker_metadata: Option, + pub enable_stack_trace_arg_in_ops: bool, } /// This struct is an implementation of `Worker` Web API @@ -387,6 +390,13 @@ pub struct WebWorker { maybe_worker_metadata: Option, } +impl Drop for WebWorker { + fn drop(&mut self) { + // clean up the package.json thread local cache + node_resolver::PackageJsonThreadLocalCache::clear(); + } +} + impl WebWorker { pub fn bootstrap_from_options( services: WebWorkerServiceOptions, @@ -482,7 +492,9 @@ impl WebWorker { ), deno_cron::deno_cron::init_ops_and_esm(LocalCronHandler::new()), deno_napi::deno_napi::init_ops_and_esm::(), - deno_http::deno_http::init_ops_and_esm::(), + deno_http::deno_http::init_ops_and_esm::( + deno_http::Options::default(), + ), deno_io::deno_io::init_ops_and_esm(Some(options.stdio)), deno_fs::deno_fs::init_ops_and_esm::( services.fs.clone(), @@ -499,6 +511,7 @@ impl WebWorker { ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os_worker::init_ops_and_esm(), + ops::otel::deno_otel::init_ops_and_esm(), ops::permissions::deno_permissions::init_ops_and_esm(), ops::process::deno_process::init_ops_and_esm( services.npm_process_state_provider, @@ -549,6 +562,7 @@ impl WebWorker { let mut js_runtime = JsRuntime::new(RuntimeOptions { module_loader: Some(services.module_loader), startup_snapshot: options.startup_snapshot, + create_params: options.create_params, shared_array_buffer_store: services.shared_array_buffer_store, compiled_wasm_module_store: services.compiled_wasm_module_store, extensions, @@ -565,6 +579,13 @@ impl WebWorker { validate_import_attributes_callback, )), import_assertions_support: deno_core::ImportAssertionsSupport::Error, + maybe_op_stack_trace_callback: if options.enable_stack_trace_arg_in_ops { + Some(Box::new(|stack| { + deno_permissions::prompter::set_current_stacktrace(stack) + })) + } else { + None + }, ..Default::default() }); @@ -814,13 +835,12 @@ impl WebWorker { // TODO(mmastrac): we don't want to test this w/classic workers because // WPT triggers a failure here. This is only exposed via --enable-testing-features-do-not-use. - #[allow(clippy::print_stderr)] if self.worker_type == WebWorkerType::Module { panic!( "coding error: either js is polling or the worker is terminated" ); } else { - eprintln!("classic worker terminated unexpectedly"); + log::error!("classic worker terminated unexpectedly"); Poll::Ready(Ok(())) } } @@ -888,7 +908,6 @@ impl WebWorker { } } -#[allow(clippy::print_stderr)] fn print_worker_error( error: &CoreError, name: &str, @@ -901,7 +920,7 @@ fn print_worker_error( }, None => error.to_string(), }; - eprintln!( + log::error!( "{}: Uncaught (in worker \"{}\") {}", colors::red_bold("error"), name,