diff --git a/Cargo.lock b/Cargo.lock index 1fcfb8b9b24aaa..e322d63d16cc2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -555,10 +555,8 @@ checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", - "js-sys", "num-traits", "serde", - "wasm-bindgen", "windows-targets", ] @@ -937,7 +935,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "lock_api", "once_cell", "parking_lot_core 0.9.8", @@ -962,7 +960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ "serde", - "uuid 1.4.1", + "uuid 1.5.0", ] [[package]] @@ -1017,7 +1015,7 @@ dependencies = [ "hyper 0.14.27", "import_map", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.0.2", "jsonc-parser", "junction", "lazy-regex", @@ -1050,13 +1048,13 @@ dependencies = [ "text_lines", "thiserror", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "tower-lsp", "trust-dns-client", "trust-dns-server", "twox-hash", "typed-arena", - "uuid 1.4.1", + "uuid 1.5.0", "walkdir", "winapi", "winres", @@ -1144,7 +1142,7 @@ dependencies = [ "async-trait", "deno_core", "tokio", - "uuid 1.4.1", + "uuid 1.5.0", ] [[package]] @@ -1161,13 +1159,13 @@ dependencies = [ [[package]] name = "deno_cache_dir" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "026d622a8251c427bdb506798b003926b059640a247d524e1f773751cce9f0bf" +checksum = "2bbb245d9a3719b5eb2b5195aaaa25108c3c93d1762b181a20fb1af1c7703eaf" dependencies = [ "anyhow", "deno_media_type", - "indexmap 2.0.0", + "indexmap 2.0.2", "log", "once_cell", "parking_lot 0.12.1", @@ -1185,7 +1183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed704bc09eb4f88b26b16c75f87795d1ea1e658e26867fe684cef91c55543f1" dependencies = [ "anyhow", - "indexmap 2.0.0", + "indexmap 2.0.2", "jsonc-parser", "log", "percent-encoding", @@ -1213,7 +1211,7 @@ dependencies = [ "deno_ops", "deno_unsync 0.3.0", "futures", - "indexmap 2.0.0", + "indexmap 2.0.2", "libc", "log", "once_cell", @@ -1259,7 +1257,7 @@ dependencies = [ "signature 1.6.4", "spki 0.6.0", "tokio", - "uuid 1.4.1", + "uuid 1.5.0", "x25519-dalek", ] @@ -1312,7 +1310,7 @@ dependencies = [ "reqwest", "serde", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", ] [[package]] @@ -1362,7 +1360,7 @@ dependencies = [ "deno_semver", "futures", "import_map", - "indexmap 2.0.0", + "indexmap 2.0.2", "monch", "once_cell", "parking_lot 0.12.1", @@ -1407,7 +1405,7 @@ dependencies = [ "smallvec", "thiserror", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", ] [[package]] @@ -1447,7 +1445,7 @@ dependencies = [ "termcolor", "tokio", "url", - "uuid 1.4.1", + "uuid 1.5.0", ] [[package]] @@ -1469,9 +1467,9 @@ dependencies = [ [[package]] name = "deno_lockfile" -version = "0.17.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7673d66847223bd4115075a96b0699da71b1755524aeb3956f0a3edf3af3217" +checksum = "8cd29f62e6dec60e585f579df3e9c2fc562aadf881319152974bc442a9042077" dependencies = [ "ring", "serde", @@ -1539,7 +1537,7 @@ dependencies = [ "hkdf", "http", "idna 0.3.0", - "indexmap 2.0.0", + "indexmap 2.0.2", "lazy-regex", "libc", "libz-sys", @@ -1662,7 +1660,7 @@ dependencies = [ "test_util", "tokio", "tokio-metrics", - "uuid 1.4.1", + "uuid 1.5.0", "which", "winapi", "winres", @@ -1683,9 +1681,9 @@ dependencies = [ [[package]] name = "deno_task_shell" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dbbad0a7ba06a961df3cd638ab117f5d67787607f627defa65629a4ef29d576" +checksum = "a94a6fd5d889087748f4794887f28756a01b718dae92a316db0951222231325a" dependencies = [ "anyhow", "futures", @@ -1694,7 +1692,7 @@ dependencies = [ "os_pipe", "path-dedot", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", ] [[package]] @@ -1757,7 +1755,7 @@ dependencies = [ "futures", "serde", "tokio", - "uuid 1.4.1", + "uuid 1.5.0", "windows-sys", ] @@ -2441,9 +2439,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -2456,9 +2454,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -2466,15 +2464,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -2483,15 +2481,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2 1.0.67", "quote 1.0.33", @@ -2500,21 +2498,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -2648,7 +2646,7 @@ dependencies = [ "indexmap 1.9.3", "slab", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "tracing", ] @@ -2660,9 +2658,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ "ahash 0.8.3", "allocator-api2", @@ -2674,7 +2672,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.2", ] [[package]] @@ -2929,12 +2927,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "serde", ] @@ -3120,7 +3118,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin", + "spin 0.5.2", ] [[package]] @@ -3802,7 +3800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.0.2", ] [[package]] @@ -4129,23 +4127,24 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quick-junit" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf780b59d590c25f8c59b44c124166a2a93587868b619fb8f5b47fb15e9ed6d" +checksum = "1b9599bffc2cd7511355996e0cfd979266b2cfa3f3ff5247d07a3a6e1ded6158" dependencies = [ "chrono", - "indexmap 2.0.0", + "indexmap 2.0.2", "nextest-workspace-hack", "quick-xml", + "strip-ansi-escapes", "thiserror", - "uuid 1.4.1", + "uuid 1.5.0", ] [[package]] name = "quick-xml" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" dependencies = [ "memchr", ] @@ -4340,7 +4339,7 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-socks", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "tower-service", "url", "wasm-bindgen", @@ -4384,17 +4383,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.20" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "911b295d2d302948838c8ac142da1ee09fa7863163b44e6715bc9357905878b8" dependencies = [ "cc", + "getrandom 0.2.10", "libc", - "once_cell", - "spin", + "spin 0.9.8", "untrusted", - "web-sys", - "winapi", + "windows-sys", ] [[package]] @@ -4495,9 +4493,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", "ring", @@ -4528,9 +4526,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.6" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ "ring", "untrusted", @@ -4640,9 +4638,9 @@ dependencies = [ [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", @@ -4784,7 +4782,7 @@ version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "itoa", "ryu", "serde", @@ -4993,6 +4991,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.6.0" @@ -5083,6 +5087,15 @@ dependencies = [ "syn 2.0.37", ] +[[package]] +name = "strip-ansi-escapes" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ff8ef943b384c414f54aefa961dd2bd853add74ec75e7ac74cf91dba62bcfa" +dependencies = [ + "vte", +] + [[package]] name = "strsim" version = "0.10.0" @@ -5701,18 +5714,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2 1.0.67", "quote 1.0.33", @@ -5863,9 +5876,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -5896,7 +5909,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "toml_datetime", "winnow", ] @@ -5938,7 +5951,7 @@ dependencies = [ "serde", "serde_json", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "tower", "tower-lsp-macros", "tracing", @@ -6104,7 +6117,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", "rand 0.8.5", "static_assertions", ] @@ -6234,9 +6247,9 @@ dependencies = [ [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" @@ -6286,9 +6299,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom 0.2.10", "serde", diff --git a/Cargo.toml b/Cargo.toml index 81e0f388c85df9..77f229e04d62f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ deno_runtime = { version = "0.129.0", path = "./runtime" } napi_sym = { version = "0.51.0", path = "./cli/napi/sym" } deno_bench_util = { version = "0.115.0", path = "./bench_util" } test_util = { path = "./test_util" } -deno_lockfile = "0.17.1" +deno_lockfile = "0.17.2" deno_media_type = { version = "0.1.1", features = ["module_specifier"] } # exts @@ -118,9 +118,9 @@ rand = "=0.8.5" regex = "^1.7.0" lazy-regex = "3" reqwest = { version = "0.11.20", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli", "socks", "json"] } -ring = "=0.16.20" +ring = "^0.17.0" rusqlite = { version = "=0.29.0", features = ["unlock_notify", "bundled"] } -rustls = "0.21.0" +rustls = "0.21.8" rustls-pemfile = "1.0.0" rustls-webpki = "0.101.4" rustls-native-certs = "0.6.2" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index b6547c2b3d4860..de51163507c5bb 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -46,7 +46,7 @@ winres.workspace = true [dependencies] deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] } -deno_cache_dir = "=0.6.0" +deno_cache_dir = "=0.6.1" deno_config = "=0.4.0" deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_doc = "=0.70.0" @@ -57,7 +57,7 @@ deno_lockfile.workspace = true deno_npm = "0.15.2" deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "exclude_runtime_main_js", "include_js_files_for_snapshotting"] } deno_semver = "0.5.1" -deno_task_shell = "=0.13.2" +deno_task_shell = "=0.14.0" eszip = "=0.55.2" napi_sym.workspace = true @@ -103,7 +103,7 @@ once_cell.workspace = true os_pipe.workspace = true percent-encoding.workspace = true pin-project.workspace = true -quick-junit = "^0.3.3" +quick-junit = "^0.3.5" rand = { workspace = true, features = ["small_rng"] } regex.workspace = true ring.workspace = true diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 588f75dbbd427f..6e8b00cabc2d21 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1123,9 +1123,9 @@ Unless --reload is specified, this command will not re-download already cached d fn compile_subcommand() -> Command { Command::new("compile") - .about("UNSTABLE: Compile the script into a self contained executable") + .about("Compile the script into a self contained executable") .long_about( - "UNSTABLE: Compiles the given script into a self contained executable. + "Compiles the given script into a self contained executable. deno compile -A https://deno.land/std/http/file_server.ts deno compile --output color_util https://deno.land/std/examples/colors.ts @@ -1152,7 +1152,7 @@ supported in canary. .arg( Arg::new("include") .long("include") - .help("UNSTABLE: Additional module to include in the module graph") + .help("Additional module to include in the module graph") .long_help( "Includes an additional module in the compiled executable's module graph. Use this flag if a dynamically imported module or a web worker main diff --git a/cli/tests/integration/flags_tests.rs b/cli/tests/integration/flags_tests.rs index 55a83594b420a0..695283aca2ba3f 100644 --- a/cli/tests/integration/flags_tests.rs +++ b/cli/tests/integration/flags_tests.rs @@ -34,7 +34,7 @@ fn help_output() { "Bundle module and dependencies into single file", "Cache the dependencies", "Type-check the dependencies", - "UNSTABLE: Compile the script into a self contained executable", + "Compile the script into a self contained executable", "Generate shell completions", "Print coverage reports", "Show documentation for a module", diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 6784ee0529b884..e51e9736a9e5c7 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -5911,7 +5911,7 @@ declare namespace Deno { * * @category HTTP Server */ - export interface Server { + export interface HttpServer { /** A promise that resolves once server finishes - eg. when aborted using * the signal passed to {@linkcode ServeOptions.signal}. */ @@ -5929,6 +5929,12 @@ declare namespace Deno { unref(): void; } + /** + * @category HTTP Server + * @deprecated Use {@linkcode HttpServer} instead. + */ + export type Server = HttpServer; + /** Serves HTTP requests with the given handler. * * The below example serves with the port `8000` on hostname `"127.0.0.1"`. @@ -5939,7 +5945,7 @@ declare namespace Deno { * * @category HTTP Server */ - export function serve(handler: ServeHandler): Server; + export function serve(handler: ServeHandler): HttpServer; /** Serves HTTP requests with the given option bag and handler. * * You can specify an object with a port and hostname option, which is the @@ -5999,7 +6005,7 @@ declare namespace Deno { export function serve( options: ServeOptions | ServeTlsOptions, handler: ServeHandler, - ): Server; + ): HttpServer; /** Serves HTTP requests with the given option bag. * * You can specify an object with a port and hostname option, which is the @@ -6027,5 +6033,5 @@ declare namespace Deno { */ export function serve( options: ServeInit & (ServeOptions | ServeTlsOptions), - ): Server; + ): HttpServer; } diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 76e8ef49bc1326..56188f3b8ab592 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -1941,7 +1941,7 @@ declare namespace Deno { * * @category HTTP Server */ - export interface Server { + export interface HttpServer { /** Gracefully close the server. No more new connections will be accepted, * while pending requests will be allowed to finish. */ diff --git a/ext/crypto/generate_key.rs b/ext/crypto/generate_key.rs index abe7ef1ee5e60d..bda3d3226f2124 100644 --- a/ext/crypto/generate_key.rs +++ b/ext/crypto/generate_key.rs @@ -136,7 +136,7 @@ fn generate_key_hmac( length } else { - hash.digest_algorithm().block_len + hash.digest_algorithm().block_len() }; let rng = ring::rand::SystemRandom::new(); diff --git a/ext/crypto/import_key.rs b/ext/crypto/import_key.rs index 0a864d68cd8cec..8ef73a8c44c1e9 100644 --- a/ext/crypto/import_key.rs +++ b/ext/crypto/import_key.rs @@ -556,10 +556,12 @@ fn import_key_ec_jwk( } }; + let rng = ring::rand::SystemRandom::new(); let _key_pair = EcdsaKeyPair::from_private_key_and_public_key( key_alg, private_d.as_bytes(), point_bytes.as_ref(), + &rng, ); Ok(ImportKeyResult::Ec { @@ -658,8 +660,9 @@ fn import_key_ec( } }; + let rng = ring::rand::SystemRandom::new(); // deserialize pkcs8 using ring crate, to VALIDATE public key - let _private_key = EcdsaKeyPair::from_pkcs8(signing_alg, &data)?; + let _private_key = EcdsaKeyPair::from_pkcs8(signing_alg, &data, &rng)?; // 11. if named_curve != pk_named_curve { diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs index 3be6bcc3db8743..87b9702ce06e9b 100644 --- a/ext/crypto/lib.rs +++ b/ext/crypto/lib.rs @@ -266,7 +266,8 @@ pub async fn op_crypto_sign_key( let curve: &EcdsaSigningAlgorithm = args.named_curve.ok_or_else(not_supported)?.try_into()?; - let key_pair = EcdsaKeyPair::from_pkcs8(curve, &args.key.data)?; + let rng = RingRand::SystemRandom::new(); + let key_pair = EcdsaKeyPair::from_pkcs8(curve, &args.key.data, &rng)?; // We only support P256-SHA256 & P384-SHA384. These are recommended signature pairs. // https://briansmith.org/rustdoc/ring/signature/index.html#statics if let Some(hash) = args.hash { @@ -276,7 +277,6 @@ pub async fn op_crypto_sign_key( } }; - let rng = RingRand::SystemRandom::new(); let signature = key_pair.sign(&rng, data)?; // Signature data as buffer. @@ -388,7 +388,9 @@ pub async fn op_crypto_verify_key( let public_key_bytes = match args.key.r#type { KeyType::Private => { - private_key = EcdsaKeyPair::from_pkcs8(signing_alg, &args.key.data)?; + let rng = RingRand::SystemRandom::new(); + private_key = + EcdsaKeyPair::from_pkcs8(signing_alg, &args.key.data, &rng)?; private_key.public_key().as_ref() } diff --git a/ext/ffi/repr.rs b/ext/ffi/repr.rs index 201df343e05559..426affdb578efc 100644 --- a/ext/ffi/repr.rs +++ b/ext/ffi/repr.rs @@ -177,7 +177,7 @@ pub fn op_ffi_buf_copy_into( state: &mut OpState, src: *mut c_void, #[number] offset: isize, - #[buffer] dst: &mut [u8], + #[anybuffer] dst: &mut [u8], #[number] len: usize, ) -> Result<(), AnyError> where diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js index 2e0c62fefa940a..17a67814bbecf3 100644 --- a/ext/http/00_serve.js +++ b/ext/http/00_serve.js @@ -435,8 +435,6 @@ function fastSyncResponseOrStream(req, respBody, status) { */ function mapToCallback(context, callback, onError) { const signal = context.abortController.signal; - const hasCallback = callback.length > 0; - const hasOneCallback = callback.length === 1; return async function (req) { // Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback @@ -444,20 +442,11 @@ function mapToCallback(context, callback, onError) { let innerRequest; let response; try { - if (hasCallback) { - innerRequest = new InnerRequest(req, context); - const request = fromInnerRequest(innerRequest, signal, "immutable"); - if (hasOneCallback) { - response = await callback(request); - } else { - response = await callback( - request, - new ServeHandlerInfo(innerRequest), - ); - } - } else { - response = await callback(); - } + innerRequest = new InnerRequest(req, context); + response = await callback( + fromInnerRequest(innerRequest, signal, "immutable"), + new ServeHandlerInfo(innerRequest), + ); } catch (error) { try { response = await onError(error); diff --git a/ext/node/ops/crypto/mod.rs b/ext/node/ops/crypto/mod.rs index 372f7dcb50ef90..bf7a99ba04d901 100644 --- a/ext/node/ops/crypto/mod.rs +++ b/ext/node/ops/crypto/mod.rs @@ -715,7 +715,7 @@ fn ec_generate( let pkcs8 = EcdsaKeyPair::generate_pkcs8(curve, &rng) .map_err(|_| type_error("Failed to generate EC key"))?; - let public_key = EcdsaKeyPair::from_pkcs8(curve, pkcs8.as_ref()) + let public_key = EcdsaKeyPair::from_pkcs8(curve, pkcs8.as_ref(), &rng) .map_err(|_| type_error("Failed to generate EC key"))? .public_key() .as_ref() diff --git a/runtime/ops/tty.rs b/runtime/ops/tty.rs index 8157a4517ca59e..bf85c757e95a56 100644 --- a/runtime/ops/tty.rs +++ b/runtime/ops/tty.rs @@ -1,12 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. use std::io::Error; -use std::io::IsTerminal; use deno_core::error::AnyError; use deno_core::op2; use deno_core::OpState; -use deno_core::ResourceHandle; #[cfg(unix)] use deno_core::ResourceId; @@ -167,24 +165,7 @@ fn op_stdin_set_raw( #[op2(fast)] fn op_isatty(state: &mut OpState, rid: u32) -> Result { let handle = state.resource_table.get_handle(rid)?; - // TODO(mmastrac): this can migrate to the deno_core implementation when it lands - Ok(match handle { - ResourceHandle::Fd(fd) if handle.is_valid() => { - #[cfg(windows)] - { - // SAFETY: The resource remains open for the for the duration of borrow_raw - unsafe { - std::os::windows::io::BorrowedHandle::borrow_raw(fd).is_terminal() - } - } - #[cfg(unix)] - { - // SAFETY: The resource remains open for the for the duration of borrow_raw - unsafe { std::os::fd::BorrowedFd::borrow_raw(fd).is_terminal() } - } - } - _ => false, - }) + Ok(handle.is_terminal()) } #[op2(fast)] diff --git a/test_ffi/tests/test.js b/test_ffi/tests/test.js index 80c5663980d456..cb0ea71abbecbd 100644 --- a/test_ffi/tests/test.js +++ b/test_ffi/tests/test.js @@ -327,6 +327,8 @@ const into2 = new Uint8Array(3); const into2ptr = Deno.UnsafePointer.of(into2); const into2ptrView = new Deno.UnsafePointerView(into2ptr); const into3 = new Uint8Array(3); +const into4 = new Uint16Array(3); +ptrView.copyInto(into4); ptrView.copyInto(into); console.log([...into]); ptrView.copyInto(into2, 3);