diff options
-rw-r--r-- | Cargo.lock | 674 | ||||
-rw-r--r-- | cli/Cargo.toml | 49 | ||||
-rw-r--r-- | cli/file_watcher.rs | 10 | ||||
-rw-r--r-- | cli/lsp/capabilities.rs | 3 | ||||
-rw-r--r-- | cli/lsp/tsc.rs | 3 | ||||
-rw-r--r-- | cli/tokio_util.rs | 7 | ||||
-rw-r--r-- | cli/tools/repl.rs | 5 | ||||
-rw-r--r-- | core/Cargo.toml | 22 | ||||
-rw-r--r-- | op_crates/fetch/Cargo.toml | 9 | ||||
-rw-r--r-- | op_crates/fetch/lib.rs | 13 | ||||
-rw-r--r-- | op_crates/web/Cargo.toml | 2 | ||||
-rw-r--r-- | op_crates/websocket/Cargo.toml | 12 | ||||
-rw-r--r-- | runtime/Cargo.toml | 36 | ||||
-rw-r--r-- | runtime/inspector.rs | 11 | ||||
-rw-r--r-- | runtime/ops/fs.rs | 1 | ||||
-rw-r--r-- | runtime/ops/fs_events.rs | 2 | ||||
-rw-r--r-- | runtime/ops/net.rs | 47 | ||||
-rw-r--r-- | runtime/ops/net_unix.rs | 9 | ||||
-rw-r--r-- | runtime/ops/process.rs | 2 | ||||
-rw-r--r-- | runtime/ops/timers.rs | 2 | ||||
-rw-r--r-- | runtime/ops/tls.rs | 3 | ||||
-rw-r--r-- | runtime/tokio_util.rs | 7 | ||||
-rw-r--r-- | runtime/web_worker.rs | 2 | ||||
-rw-r--r-- | test_plugin/Cargo.toml | 2 | ||||
-rw-r--r-- | test_util/Cargo.toml | 18 |
25 files changed, 382 insertions, 569 deletions
diff --git a/Cargo.lock b/Cargo.lock index 031bedab5..a4c455966 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,15 +17,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] -name = "ahash" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" -dependencies = [ - "const-random", -] - -[[package]] name = "aho-corasick" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -60,9 +51,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.35" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0df63cb2955042487fad3aefd2c6e3ae7389ac5dc1beb28921de0b69f779d4" +checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "anymap" @@ -92,16 +83,16 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9021768bcce77296b64648cc7a7460e3df99979b97ed5c925c38d1cc83778d98" +checksum = "b72c1f1154e234325b50864a349b9c8e56939e266a4c307c0f159812df2f9537" dependencies = [ "brotli", - "bytes 0.5.6", "flate2", "futures-core", "memchr", - "pin-project-lite 0.1.7", + "pin-project-lite", + "tokio", ] [[package]] @@ -190,6 +181,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] +name = "bitvec" +version = "0.19.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ba35e9565969edb811639dbebfe34edc0368e472c5018474c8eb2543397f81" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -233,27 +236,15 @@ checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" [[package]] name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "bytes" -version = "0.6.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0dcbc35f504eb6fc275a6d20e4ebcda18cf50d40ba6fabff8c711fa16cb3b16" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "bytes" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "cargo_gn" @@ -281,13 +272,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.15" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ + "libc", "num-integer", "num-traits", "time", + "winapi 0.3.9", ] [[package]] @@ -315,26 +308,6 @@ dependencies = [ ] [[package]] -name = "const-random" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" -dependencies = [ - "const-random-macro", - "proc-macro-hack", -] - -[[package]] -name = "const-random-macro" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" -dependencies = [ - "getrandom 0.1.15", - "proc-macro-hack", -] - -[[package]] name = "cpuid-bool" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -416,17 +389,6 @@ dependencies = [ [[package]] name = "dashmap" -version = "3.11.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" -dependencies = [ - "ahash", - "cfg-if 0.1.10", - "num_cpus", -] - -[[package]] -name = "dashmap" version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b937cd1fbd1f194ac842196bd2529f21618088ee6d8bff6a46ece611451c96b" @@ -440,7 +402,7 @@ name = "deno" version = "1.6.3" dependencies = [ "atty", - "base64 0.12.3", + "base64 0.13.0", "byteorder", "chrono", "clap", @@ -473,7 +435,7 @@ dependencies = [ "ring", "rustyline", "rustyline-derive", - "semver-parser 0.9.0", + "semver-parser 0.10.2", "serde", "shell-escape", "sourcemap", @@ -483,8 +445,8 @@ dependencies = [ "tempfile", "termcolor", "test_util", - "tokio 0.2.22", - "tokio-rustls 0.14.1", + "tokio", + "tokio-rustls", "tower-test", "uuid", "walkdir", @@ -502,12 +464,12 @@ dependencies = [ "lazy_static", "libc", "log", - "pin-project 1.0.2", + "pin-project 1.0.4", "rusty_v8", "serde", "serde_json", "smallvec", - "tokio 0.3.5", + "tokio", "url", ] @@ -539,11 +501,13 @@ dependencies = [ name = "deno_fetch" version = "0.18.0" dependencies = [ - "bytes 0.5.6", + "bytes", "deno_core", "reqwest", "serde", - "tokio 0.2.22", + "tokio", + "tokio-stream", + "tokio-util", ] [[package]] @@ -580,7 +544,7 @@ dependencies = [ "filetime", "fwdansi", "http", - "hyper 0.13.9", + "hyper", "indexmap", "lazy_static", "libc", @@ -597,8 +561,8 @@ dependencies = [ "sys-info", "termcolor", "test_util", - "tokio 0.2.22", - "tokio-rustls 0.14.1", + "tokio", + "tokio-rustls", "uuid", "webpki", "webpki-roots", @@ -623,9 +587,9 @@ dependencies = [ "deno_core", "http", "serde", - "tokio 0.2.22", - "tokio-rustls 0.14.1", - "tokio-tungstenite 0.11.0", + "tokio", + "tokio-rustls", + "tokio-tungstenite", "webpki", "webpki-roots", ] @@ -719,12 +683,6 @@ dependencies = [ ] [[package]] -name = "dtoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" - -[[package]] name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -732,11 +690,11 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.24" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" +checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", ] [[package]] @@ -753,9 +711,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.7.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e" dependencies = [ "atty", "humantime", @@ -808,11 +766,11 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e" +checksum = "0c122a393ea57648015bf06fbd3d372378992e86b9ff5a7a497b076a28c79efe" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", "redox_syscall", "winapi 0.3.9", @@ -920,10 +878,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + +[[package]] name = "futures" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +checksum = "c70be434c505aee38639abccb918163b63158a4b4bb791b45b7023044bdc3c9c" dependencies = [ "futures-channel", "futures-core", @@ -936,9 +900,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +checksum = "f01c61843314e95f96cc9245702248733a3a3d744e43e2e755e3c7af8348a0a9" dependencies = [ "futures-core", "futures-sink", @@ -946,15 +910,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" +checksum = "db8d3b0917ff63a2a96173133c02818fac4a746b0a57569d3baca9ec0e945e08" [[package]] name = "futures-executor" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" +checksum = "9ee9ca2f7eb4475772cf39dd1cd06208dce2670ad38f4d9c7262b3e15f127068" dependencies = [ "futures-core", "futures-task", @@ -963,15 +927,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" +checksum = "e37c1a51b037b80922864b8eed90692c5cd8abd4c71ce49b77146caa47f3253b" [[package]] name = "futures-macro" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +checksum = "0f8719ca0e1f3c5e34f3efe4570ef2c0610ca6da85ae7990d472e9cbfba13664" dependencies = [ "proc-macro-hack", "proc-macro2 1.0.24", @@ -981,24 +945,24 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" +checksum = "f6adabac1290109cfa089f79192fb6244ad2c3f1cc2281f3e1dd987592b71feb" [[package]] name = "futures-task" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" +checksum = "a92a0843a2ff66823a8f7c77bffe9a09be2b64e533562c412d63075643ec0038" dependencies = [ "once_cell", ] [[package]] name = "futures-util" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" +checksum = "036a2107cdeb57f6d7322f1b6c363dad67cd63ca3b7d1b925bdf75bd5d96cda9" dependencies = [ "futures-channel", "futures-core", @@ -1007,7 +971,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project 1.0.2", + "pin-project-lite", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -1073,11 +1037,11 @@ dependencies = [ [[package]] name = "h2" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" +checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" dependencies = [ - "bytes 0.5.6", + "bytes", "fnv", "futures-core", "futures-sink", @@ -1085,9 +1049,10 @@ dependencies = [ "http", "indexmap", "slab", - "tokio 0.2.22", + "tokio", "tokio-util", "tracing", + "tracing-futures", ] [[package]] @@ -1116,32 +1081,22 @@ dependencies = [ [[package]] name = "http" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" dependencies = [ - "bytes 0.5.6", + "bytes", "fnv", "itoa", ] [[package]] name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes 0.5.6", - "http", -] - -[[package]] -name = "http-body" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" dependencies = [ - "bytes 1.0.0", + "bytes", "http", ] @@ -1159,36 +1114,9 @@ checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "hyper" -version = "0.13.9" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf" -dependencies = [ - "bytes 0.5.6", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body 0.3.1", - "httparse", - "httpdate", - "itoa", - "pin-project 1.0.2", - "socket2", - "tokio 0.2.22", - "tower-service", - "tracing", - "want", -] +checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a" [[package]] name = "hyper" @@ -1196,18 +1124,19 @@ version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" dependencies = [ - "bytes 1.0.0", + "bytes", "futures-channel", "futures-core", "futures-util", + "h2", "http", - "http-body 0.4.0", + "http-body", "httparse", "httpdate", "itoa", - "pin-project 1.0.2", + "pin-project 1.0.4", "socket2", - "tokio 1.0.1", + "tokio", "tower-service", "tracing", "want", @@ -1215,17 +1144,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "bytes 0.5.6", "futures-util", - "hyper 0.13.9", + "hyper", "log", - "rustls 0.18.1", - "tokio 0.2.22", - "tokio-rustls 0.14.1", + "rustls", + "tokio", + "tokio-rustls", "webpki", ] @@ -1284,20 +1212,11 @@ dependencies = [ [[package]] name = "input_buffer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" -dependencies = [ - "bytes 0.5.6", -] - -[[package]] -name = "input_buffer" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" dependencies = [ - "bytes 1.0.0", + "bytes", ] [[package]] @@ -1354,9 +1273,9 @@ dependencies = [ [[package]] name = "jsonc-parser" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce9b3e88481b91c43f37e742879a70dd5855e59f736bf3cac9b1383d68c1186" +checksum = "da59eeab742770775c0f85b0b7b847f247b540a5389b806301d71c697d62bd8b" [[package]] name = "kernel32-sys" @@ -1382,9 +1301,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.80" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" [[package]] name = "lock_api" @@ -1397,9 +1316,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" dependencies = [ "cfg-if 0.1.10", "serde", @@ -1407,9 +1326,9 @@ dependencies = [ [[package]] name = "lsp-types" -version = "0.85.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "857650f3e83fb62f89d15410414e0ed7d0735445020da398d37f65d20a5423b9" +checksum = "f2a5c40d566f2704dac30859bca152217583fc94fd5b178d8baba915e1abd382" dependencies = [ "base64 0.12.3", "bitflags", @@ -1421,14 +1340,14 @@ dependencies = [ [[package]] name = "lspower" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64106b17ca8f6f73cc21a3d1f39684ff65293a291aa96026aee85eaae02339a5" +checksum = "8cd189e0e81aa75b043a77f2861b6379042590e69c6e2c434a45ed412be8224d" dependencies = [ "async-trait", "auto_impl", - "bytes 0.5.6", - "dashmap 3.11.10", + "bytes", + "dashmap", "futures", "log", "lsp-types", @@ -1436,7 +1355,7 @@ dependencies = [ "nom", "serde", "serde_json", - "tokio 0.2.22", + "tokio", "tokio-util", "tower-service", ] @@ -1478,16 +1397,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - -[[package]] name = "miniz_oxide" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1542,29 +1451,6 @@ dependencies = [ ] [[package]] -name = "mio-named-pipes" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" -dependencies = [ - "log", - "mio 0.6.22", - "miow 0.3.6", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio 0.6.22", -] - -[[package]] name = "miow" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1605,31 +1491,32 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85db2feff6bf70ebc3a4793191517d5f0331100a2f10f9bf93b5e5214f32b7b7" +checksum = "b2ccba0cfe4fdf15982d1674c69b1fd80bad427d293849982668dfe454bd61f2" dependencies = [ "bitflags", "cc", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", ] [[package]] name = "nom" -version = "5.1.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "88034cfd6b4a0d54dd14f4a507eceee36c0b70e5a02236c4e4df571102be17f0" dependencies = [ + "bitvec", "memchr", "version_check", ] [[package]] name = "notify" -version = "5.0.0-pre.3" +version = "5.0.0-pre.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77d03607cf88b4b160ba0e9ed425fff3cee3b55ac813f0c685b3a3772da37d0e" +checksum = "a8b946889dfdad884379cd56367d93b6d0ce8889cc027d26a69a3a31c0a03bb5" dependencies = [ "anymap", "bitflags", @@ -1759,6 +1646,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] name = "petgraph" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1823,11 +1719,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" +checksum = "95b70b68509f17aa2857863b6fa00bf21fc93674c7a8893de2f469f6aa7ca2f2" dependencies = [ - "pin-project-internal 1.0.2", + "pin-project-internal 1.0.4", ] [[package]] @@ -1843,9 +1739,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" +checksum = "caa25a6393f22ce819b0f50e0be89287292fda8d425be38ee0ca14c4931d9e71" dependencies = [ "proc-macro2 1.0.24", "quote 1.0.7", @@ -1854,12 +1750,6 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" - -[[package]] -name = "pin-project-lite" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" @@ -1958,12 +1848,6 @@ dependencies = [ ] [[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] name = "quote" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1982,6 +1866,12 @@ dependencies = [ ] [[package]] +name = "radium" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" + +[[package]] name = "radix_fmt" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2086,9 +1976,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "regex" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" +checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" dependencies = [ "aho-corasick", "memchr", @@ -2098,9 +1988,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" +checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" [[package]] name = "relative-path" @@ -2119,33 +2009,33 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.8" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" +checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" dependencies = [ "async-compression", - "base64 0.12.3", - "bytes 0.5.6", + "base64 0.13.0", + "bytes", "encoding_rs", "futures-core", "futures-util", "http", - "http-body 0.3.1", - "hyper 0.13.9", + "http-body", + "hyper", "hyper-rustls", "ipnet", "js-sys", "lazy_static", "log", "mime", - "mime_guess", "percent-encoding", - "pin-project-lite 0.1.7", - "rustls 0.18.1", + "pin-project-lite", + "rustls", "serde", "serde_urlencoded", - "tokio 0.2.22", - "tokio-rustls 0.14.1", + "tokio", + "tokio-rustls", + "tokio-util", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -2186,19 +2076,6 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" -dependencies = [ - "base64 0.12.3", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustls" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" @@ -2308,9 +2185,12 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "semver-parser" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46e1121e8180c12ff69a742aabc4f310542b6ccb69f1691689ac17fdf8618aa" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] [[package]] name = "serde" @@ -2357,14 +2237,14 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" +checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" dependencies = [ - "dtoa", + "form_urlencoded", "itoa", + "ryu", "serde", - "url", ] [[package]] @@ -2410,9 +2290,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a55ca5f3b68e41c979bf8c46a6f1da892ca4db8f94023ce0bd32407573b1ac0" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" @@ -2685,7 +2565,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4cd5ff2818c8b4ac9ea6a5fe302bdf0dc6ddf7368a9d7a6ea44ecdda17bed36" dependencies = [ - "dashmap 4.0.1", + "dashmap", "fxhash", "indexmap", "log", @@ -2726,7 +2606,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b09b2ee4a06a5f884c1d3e3769c1922b492125141997081cf4a3206fd7f49e24" dependencies = [ - "dashmap 4.0.1", + "dashmap", "once_cell", "regex", "serde", @@ -2880,6 +2760,12 @@ dependencies = [ ] [[package]] +name = "tap" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36474e732d1affd3a6ed582781b3683df3d0563714c59c39591e8ff707cf078e" + +[[package]] name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2916,17 +2802,17 @@ name = "test_util" version = "0.1.0" dependencies = [ "async-stream", - "bytes 1.0.0", + "bytes", "futures", - "hyper 0.14.2", + "hyper", "lazy_static", "os_pipe", "pty", "regex", "tempfile", - "tokio 1.0.1", - "tokio-rustls 0.22.0", - "tokio-tungstenite 0.13.0", + "tokio", + "tokio-rustls", + "tokio-tungstenite", ] [[package]] @@ -2986,94 +2872,26 @@ checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" [[package]] name = "tokio" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "libc", - "memchr", - "mio 0.6.22", - "mio-named-pipes", - "mio-uds", - "num_cpus", - "pin-project-lite 0.1.7", - "signal-hook-registry", - "slab", - "tokio-macros 0.2.5", - "winapi 0.3.9", -] - -[[package]] -name = "tokio" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12a3eb39ee2c231be64487f1fcbe726c8f2514876a55480a5ab8559fc374252" -dependencies = [ - "autocfg", - "bytes 0.6.0", - "futures-core", - "lazy_static", - "libc", - "memchr", - "mio 0.7.6", - "num_cpus", - "parking_lot", - "pin-project-lite 0.2.0", - "signal-hook-registry", - "slab", - "tokio-macros 0.3.1", - "winapi 0.3.9", -] - -[[package]] -name = "tokio" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d258221f566b6c803c7b4714abadc080172b272090cdc5e244a6d4dd13c3a6bd" dependencies = [ "autocfg", - "bytes 1.0.0", + "bytes", "libc", "memchr", "mio 0.7.6", "num_cpus", "once_cell", "parking_lot", - "pin-project-lite 0.2.0", + "pin-project-lite", "signal-hook-registry", - "tokio-macros 1.0.0", + "tokio-macros", "winapi 0.3.9", ] [[package]] name = "tokio-macros" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.56", -] - -[[package]] -name = "tokio-macros" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d30fdbb5dc2d8f91049691aa1a9d4d4ae422a21c334ce8936e5886d30c5c45" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.56", -] - -[[package]] -name = "tokio-macros" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" @@ -3085,49 +2903,37 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" -dependencies = [ - "futures-core", - "rustls 0.18.1", - "tokio 0.2.22", - "webpki", -] - -[[package]] -name = "tokio-rustls" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "rustls 0.19.0", - "tokio 1.0.1", + "rustls", + "tokio", "webpki", ] [[package]] -name = "tokio-test" -version = "0.2.1" +name = "tokio-stream" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0049c119b6d505c4447f5c64873636c7af6c75ab0d45fd9f618d82acb8016d" +checksum = "e4cdeb73537e63f98adcd73138af75e3f368ccaecffaa29d7eb61b9f5a440457" dependencies = [ - "bytes 0.5.6", "futures-core", - "tokio 0.2.22", + "pin-project-lite", + "tokio", ] [[package]] -name = "tokio-tungstenite" -version = "0.11.0" +name = "tokio-test" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9e878ad426ca286e4dcae09cbd4e1973a7f8987d97570e2469703dd7f5720c" +checksum = "7c7d205f6f59b03f9e824ac86eaba635a98395f287756ecc8a06464779c399bf" dependencies = [ - "futures-util", - "log", - "pin-project 0.4.23", - "tokio 0.2.22", - "tungstenite 0.11.1", + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", ] [[package]] @@ -3138,23 +2944,24 @@ checksum = "e1a5f475f1b9d077ea1017ecbc60890fda8e54942d680ca0b1d2b47cfa2d861b" dependencies = [ "futures-util", "log", - "pin-project 1.0.2", - "tokio 1.0.1", - "tungstenite 0.12.0", + "pin-project 1.0.4", + "tokio", + "tungstenite", ] [[package]] name = "tokio-util" -version = "0.3.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +checksum = "36135b7e7da911f5f8b9331209f7fab4cc13498f3fff52f72a710c78187e3148" dependencies = [ - "bytes 0.5.6", + "bytes", "futures-core", "futures-sink", "log", - "pin-project-lite 0.1.7", - "tokio 0.2.22", + "pin-project-lite", + "tokio", + "tokio-stream", ] [[package]] @@ -3180,13 +2987,13 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tower-test" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba4bbc2c1e4a8543c30d4c13a4c8314ed72d6e07581910f665aa13fde0153c8" +checksum = "a4546773ffeab9e4ea02b8872faa49bb616a80a7da66afc2f32688943f97efa7" dependencies = [ "futures-util", - "pin-project 0.4.23", - "tokio 0.2.22", + "pin-project 1.0.4", + "tokio", "tokio-test", "tower-layer", "tower-service", @@ -3199,7 +3006,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" dependencies = [ "cfg-if 0.1.10", - "log", "tracing-core", ] @@ -3213,29 +3019,20 @@ dependencies = [ ] [[package]] -name = "try-lock" -version = "0.2.3" +name = "tracing-futures" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" +dependencies = [ + "pin-project 0.4.23", + "tracing", +] [[package]] -name = "tungstenite" -version = "0.11.1" +name = "try-lock" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" -dependencies = [ - "base64 0.12.3", - "byteorder", - "bytes 0.5.6", - "http", - "httparse", - "input_buffer 0.3.1", - "log", - "rand 0.7.3", - "sha-1", - "url", - "utf-8", -] +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" @@ -3245,10 +3042,10 @@ checksum = "8ada8297e8d70872fa9a551d93250a9f407beb9f37ef86494eb20012a2ff7c24" dependencies = [ "base64 0.13.0", "byteorder", - "bytes 1.0.0", + "bytes", "http", "httparse", - "input_buffer 0.4.0", + "input_buffer", "log", "rand 0.8.1", "sha-1", @@ -3263,13 +3060,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] -name = "unicase" -version = "2.6.0" +name = "ucd-trie" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "unicode-bidi" @@ -3346,11 +3140,11 @@ checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" [[package]] name = "uuid" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "rand 0.7.3", + "getrandom 0.2.1", ] [[package]] @@ -3478,9 +3272,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ "ring", "untrusted", @@ -3488,9 +3282,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" dependencies = [ "webpki", ] @@ -3575,3 +3369,9 @@ dependencies = [ "winapi 0.2.8", "winapi-build", ] + +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 79b579af3..2c0b466bc 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -18,7 +18,6 @@ path = "main.rs" name = "denort" path = "main_runtime.rs" - [[bench]] name = "deno_bench" harness = false @@ -29,12 +28,12 @@ deno_core = { path = "../core", version = "0.75.0" } deno_fetch = { path = "../op_crates/fetch", version = "0.18.0" } deno_web = { path = "../op_crates/web", version = "0.26.0" } deno_websocket = { path = "../op_crates/websocket", version = "0.1.0" } -regex = "1.3.9" +regex = "1.4.3" serde = { version = "1.0.116", features = ["derive"] } [target.'cfg(windows)'.build-dependencies] -winres = "0.1.11" winapi = "0.3.9" +winres = "0.1.11" [dependencies] deno_core = { path = "../core", version = "0.75.0" } @@ -43,28 +42,28 @@ deno_lint = "0.2.15" deno_runtime = { path = "../runtime", version = "0.5.0" } atty = "0.2.14" -base64 = "0.12.3" -byteorder = "1.3.4" +base64 = "0.13.0" +byteorder = "1.4.2" clap = "2.33.3" dissimilar = "1.0.2" dprint-plugin-typescript = "0.38.1" -encoding_rs = "0.8.24" -env_logger = "0.7.1" -filetime = "0.2.12" -http = "0.2.1" -indexmap = "1.6.0" -jsonc-parser = "0.14.0" +encoding_rs = "0.8.26" +env_logger = "0.8.2" +filetime = "0.2.13" +http = "0.2.3" +indexmap = "1.6.1" +jsonc-parser = "0.15.1" lazy_static = "1.4.0" -libc = "0.2.77" -log = { version = "0.4.11", features = ["serde"] } -lspower = "0.1.0" -notify = "5.0.0-pre.3" +libc = "0.2.82" +log = { version = "0.4.13", features = ["serde"] } +lspower = "0.3.0" +notify = "5.0.0-pre.4" percent-encoding = "2.1.0" -regex = "1.3.9" +regex = "1.4.3" ring = "0.16.19" rustyline = { version = "7.1.0", default-features = false } rustyline-derive = "0.4.0" -semver-parser = "0.9.0" +semver-parser = "0.10.2" serde = { version = "1.0.116", features = ["derive"] } shell-escape = "0.1.5" sourcemap = "6.0.1" @@ -72,25 +71,25 @@ swc_bundler = "0.19.2" swc_common = { version = "0.10.8", features = ["sourcemap"] } swc_ecmascript = { version = "0.17.1", features = ["codegen", "dep_graph", "parser", "proposal", "react", "transforms", "typescript", "visit"] } tempfile = "3.1.0" -termcolor = "1.1.0" -tokio = { version = "0.2.22", features = ["full"] } -tokio-rustls = "0.14.1" -uuid = { version = "0.8.1", features = ["v4"] } +termcolor = "1.1.2" +tokio = { version = "1.0.1", features = ["full"] } +tokio-rustls = "0.22.0" +uuid = { version = "0.8.2", features = ["v4"] } walkdir = "2.3.1" [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3.9", features = ["knownfolders", "mswsock", "objbase", "shlobj", "tlhelp32", "winbase", "winerror", "winsock2"] } fwdansi = "1.1.0" +winapi = { version = "0.3.9", features = ["knownfolders", "mswsock", "objbase", "shlobj", "tlhelp32", "winbase", "winerror", "winsock2"] } [target.'cfg(unix)'.dependencies] -nix = "0.19.0" +nix = "0.19.1" [dev-dependencies] # Used in benchmark -chrono = "0.4.15" +chrono = "0.4.19" os_pipe = "0.9.2" test_util = { path = "../test_util" } -tower-test = "0.3.0" +tower-test = "0.4.0" [target.'cfg(unix)'.dev-dependencies] exec = "0.3.1" # Used in test_raw_tty diff --git a/cli/file_watcher.rs b/cli/file_watcher.rs index 655cff534..699a27864 100644 --- a/cli/file_watcher.rs +++ b/cli/file_watcher.rs @@ -18,21 +18,21 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::time::Duration; use tokio::select; -use tokio::time::{delay_for, Delay}; +use tokio::time::sleep; const DEBOUNCE_INTERVAL_MS: Duration = Duration::from_millis(200); type FileWatcherFuture<T> = Pin<Box<dyn Future<Output = T>>>; struct Debounce { - delay: Delay, + sleep: Pin<Box<dyn Future<Output = ()>>>, event_detected: Arc<AtomicBool>, } impl Debounce { fn new() -> Self { Self { - delay: delay_for(DEBOUNCE_INTERVAL_MS), + sleep: sleep(DEBOUNCE_INTERVAL_MS).boxed_local(), event_detected: Arc::new(AtomicBool::new(false)), } } @@ -52,9 +52,9 @@ impl Stream for Debounce { inner.event_detected.store(false, Ordering::Relaxed); Poll::Ready(Some(())) } else { - match inner.delay.poll_unpin(cx) { + match inner.sleep.poll_unpin(cx) { Poll::Ready(_) => { - inner.delay = delay_for(DEBOUNCE_INTERVAL_MS); + inner.sleep = sleep(DEBOUNCE_INTERVAL_MS).boxed_local(); Poll::Pending } Poll::Pending => Poll::Pending, diff --git a/cli/lsp/capabilities.rs b/cli/lsp/capabilities.rs index 873d424e3..9c4cd317f 100644 --- a/cli/lsp/capabilities.rs +++ b/cli/lsp/capabilities.rs @@ -67,10 +67,11 @@ pub fn server_capabilities( color_provider: None, execute_command_provider: None, call_hierarchy_provider: None, - on_type_rename_provider: None, semantic_highlighting: None, semantic_tokens_provider: None, workspace: None, experimental: None, + linked_editing_range_provider: None, + moniker_provider: None, } } diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index c9780ca27..67d6afcc5 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -53,7 +53,7 @@ impl TsServer { // the language server... let mut ts_runtime = start(false).expect("could not start tsc"); - let mut runtime = create_basic_runtime(); + let runtime = create_basic_runtime(); runtime.block_on(async { while let Some((req, state_snapshot, tx)) = rx.recv().await { let value = request(&mut ts_runtime, state_snapshot, req); @@ -482,6 +482,7 @@ impl RenameLocations { } Ok(lsp_types::WorkspaceEdit { + change_annotations: None, changes: None, document_changes: Some(lsp_types::DocumentChanges::Edits( text_document_edit_map.values().cloned().collect(), diff --git a/cli/tokio_util.rs b/cli/tokio_util.rs index ef0ba5be3..5ee45325d 100644 --- a/cli/tokio_util.rs +++ b/cli/tokio_util.rs @@ -1,8 +1,7 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. pub fn create_basic_runtime() -> tokio::runtime::Runtime { - tokio::runtime::Builder::new() - .basic_scheduler() + tokio::runtime::Builder::new_current_thread() .enable_io() .enable_time() // This limits the number of threads for blocking operations (like for @@ -10,7 +9,7 @@ pub fn create_basic_runtime() -> tokio::runtime::Runtime { // parallel for deno fmt. // The default value is 512, which is an unhelpfully large thread pool. We // don't ever want to have more than a couple dozen threads. - .max_threads(32) + .max_blocking_threads(32) .build() .unwrap() } @@ -20,6 +19,6 @@ pub fn run_basic<F, R>(future: F) -> R where F: std::future::Future<Output = R>, { - let mut rt = create_basic_runtime(); + let rt = create_basic_runtime(); rt.block_on(future) } diff --git a/cli/tools/repl.rs b/cli/tools/repl.rs index e59fd57a8..cf5c0e983 100644 --- a/cli/tools/repl.rs +++ b/cli/tools/repl.rs @@ -6,6 +6,7 @@ use crate::colors; use crate::media_type::MediaType; use crate::program_state::ProgramState; use deno_core::error::AnyError; +use deno_core::futures::FutureExt; use deno_core::serde_json::json; use deno_core::serde_json::Value; use deno_runtime::inspector::InspectorSession; @@ -277,7 +278,7 @@ async fn post_message_and_poll( // A zero delay is long enough to yield the thread in order to prevent the loop from // running hot for messages that are taking longer to resolve like for example an // evaluation of top level await. - tokio::time::delay_for(tokio::time::Duration::from_millis(0)).await; + tokio::time::sleep(tokio::time::Duration::from_millis(0)).await; } } } @@ -305,7 +306,7 @@ async fn read_line_and_poll( // Because an inspector websocket client may choose to connect at anytime when we have an // inspector server we need to keep polling the worker to pick up new connections. let mut timeout = - tokio::time::delay_for(tokio::time::Duration::from_millis(100)); + tokio::time::sleep(tokio::time::Duration::from_millis(100)).boxed_local(); tokio::select! { result = &mut line => { diff --git a/core/Cargo.toml b/core/Cargo.toml index 096293020..6c48c8680 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -13,18 +13,18 @@ repository = "https://github.com/denoland/deno" path = "lib.rs" [dependencies] -anyhow = "1.0.32" -futures = "0.3.8" -indexmap = "1.6.0" +anyhow = "1.0.38" +futures = "0.3.9" +indexmap = "1.6.1" lazy_static = "1.4.0" -libc = "0.2.77" -log = "0.4.11" +libc = "0.2.82" +log = "0.4.13" +pin-project = "1.0.4" rusty_v8 = "0.15.0" -serde_json = { version = "1.0", features = ["preserve_order"] } -serde = { version = "1.0", features = ["derive"] } -smallvec = "1.4.2" -url = { version = "2.2", features = ["serde"] } -pin-project = "1.0.2" +serde = { version = "1.0.116", features = ["derive"] } +serde_json = { version = "1.0.61", features = ["preserve_order"] } +smallvec = "1.6.1" +url = { version = "2.2.0", features = ["serde"] } [[example]] name = "http_bench_bin_ops" @@ -36,4 +36,4 @@ path = "examples/http_bench_json_ops.rs" # These dependencies are only used for the 'http_bench_*_ops' examples. [dev-dependencies] -tokio = { version = "0.3.5", features = ["full"] } +tokio = { version = "1.0.1", features = ["full"] } diff --git a/op_crates/fetch/Cargo.toml b/op_crates/fetch/Cargo.toml index 6916685fb..9c088ac60 100644 --- a/op_crates/fetch/Cargo.toml +++ b/op_crates/fetch/Cargo.toml @@ -14,9 +14,10 @@ repository = "https://github.com/denoland/deno" path = "lib.rs" [dependencies] +bytes = "1.0.1" deno_core = { version = "0.75.0", path = "../../core" } - -bytes = "0.5.6" -reqwest = { version = "0.10.8", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] } +reqwest = { version = "0.11.0", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] } serde = { version = "1.0.116", features = ["derive"] } -tokio = { version = "0.2.22", features = ["full"] }
\ No newline at end of file +tokio = { version = "1.0.1", features = ["full"] } +tokio-stream = "0.1.1" +tokio-util = "0.6.0" diff --git a/op_crates/fetch/lib.rs b/op_crates/fetch/lib.rs index b47039b08..f882736f5 100644 --- a/op_crates/fetch/lib.rs +++ b/op_crates/fetch/lib.rs @@ -16,6 +16,7 @@ use deno_core::AsyncRefCell; use deno_core::BufVec; use deno_core::CancelFuture; use deno_core::CancelHandle; +use deno_core::CancelTryFuture; use deno_core::JsRuntime; use deno_core::OpState; use deno_core::RcRef; @@ -38,10 +39,10 @@ use std::io::Read; use std::path::PathBuf; use std::pin::Pin; use std::rc::Rc; -use tokio::io::stream_reader; use tokio::io::AsyncReadExt; -use tokio::io::StreamReader; use tokio::sync::mpsc; +use tokio_stream::wrappers::ReceiverStream; +use tokio_util::io::StreamReader; pub use reqwest; // Re-export reqwest @@ -157,7 +158,7 @@ where 0 => { // If no body is passed, we return a writer for streaming the body. let (tx, rx) = mpsc::channel::<std::io::Result<Vec<u8>>>(1); - request = request.body(Body::wrap_stream(rx)); + request = request.body(Body::wrap_stream(ReceiverStream::new(rx))); let request_body_rid = state.resource_table.add(FetchRequestBodyResource { @@ -247,7 +248,7 @@ pub async fn op_fetch_send( let stream: BytesStream = Box::pin(res.bytes_stream().map(|r| { r.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err)) })); - let stream_reader = stream_reader(stream); + let stream_reader = StreamReader::new(stream); let rid = state .borrow_mut() .resource_table @@ -288,7 +289,7 @@ pub async fn op_fetch_request_write( .resource_table .get::<FetchRequestBodyResource>(rid as u32) .ok_or_else(bad_resource_id)?; - let mut body = RcRef::map(&resource, |r| &r.body).borrow_mut().await; + let body = RcRef::map(&resource, |r| &r.body).borrow_mut().await; let cancel = RcRef::map(resource, |r| &r.cancel); body.send(Ok(buf)).or_cancel(cancel).await??; @@ -321,7 +322,7 @@ pub async fn op_fetch_response_read( let mut reader = RcRef::map(&resource, |r| &r.reader).borrow_mut().await; let cancel = RcRef::map(resource, |r| &r.cancel); let mut buf = data[0].clone(); - let read = reader.read(&mut buf).or_cancel(cancel).await??; + let read = reader.read(&mut buf).try_or_cancel(cancel).await?; Ok(json!({ "read": read })) } diff --git a/op_crates/web/Cargo.toml b/op_crates/web/Cargo.toml index 279bdd47f..7ac50deb8 100644 --- a/op_crates/web/Cargo.toml +++ b/op_crates/web/Cargo.toml @@ -19,4 +19,4 @@ idna = "0.2.0" serde = { version = "1.0.116", features = ["derive"] } [dev-dependencies] -futures = "0.3.8" +futures = "0.3.9" diff --git a/op_crates/websocket/Cargo.toml b/op_crates/websocket/Cargo.toml index c4d9a27ec..1965c6957 100644 --- a/op_crates/websocket/Cargo.toml +++ b/op_crates/websocket/Cargo.toml @@ -15,10 +15,10 @@ path = "lib.rs" [dependencies] deno_core = { version = "0.75.0", path = "../../core" } -http = "0.2.1" -tokio = { version = "0.2.22", features = ["full"] } -tokio-rustls = "0.14.1" -tokio-tungstenite = "0.11.0" +http = "0.2.3" serde = { version = "1.0.116", features = ["derive"] } -webpki = "0.21.3" -webpki-roots = "=0.19.0" # Pinned to v0.19.0 to match 'reqwest'. +tokio = { version = "1.0.1", features = ["full"] } +tokio-rustls = "0.22.0" +tokio-tungstenite = "0.13.0" +webpki = "0.21.4" +webpki-roots = "0.21.0" diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 1c75aaff1..127fd6241 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -37,37 +37,37 @@ deno_websocket = { path = "../op_crates/websocket", version = "0.1.0" } atty = "0.2.14" dlopen = "0.1.8" -encoding_rs = "0.8.24" -env_logger = "0.7.1" -filetime = "0.2.12" -http = "0.2.1" -indexmap = "1.6.0" +encoding_rs = "0.8.26" +env_logger = "0.8.2" +filetime = "0.2.13" +http = "0.2.3" +hyper = { version = "0.14.2", features = ["server"] } +indexmap = "1.6.1" lazy_static = "1.4.0" -libc = "0.2.77" -log = "0.4.11" -notify = "5.0.0-pre.3" +libc = "0.2.82" +log = "0.4.13" +notify = "5.0.0-pre.4" percent-encoding = "2.1.0" -regex = "1.3.9" +regex = "1.4.3" ring = "0.16.19" rustyline = { version = "7.1.0", default-features = false } rustyline-derive = "0.4.0" serde = { version = "1.0.116", features = ["derive"] } shell-escape = "0.1.5" sys-info = "0.7.0" -termcolor = "1.1.0" -tokio = { version = "0.2.22", features = ["full"] } -tokio-rustls = "0.14.1" -uuid = { version = "0.8.1", features = ["v4"] } -hyper = "0.13.9" -webpki = "0.21.3" -webpki-roots = "=0.19.0" # Pinned to v0.19.0 to match 'reqwest'. +termcolor = "1.1.2" +tokio = { version = "1.0.1", features = ["full"] } +tokio-rustls = "0.22.0" +uuid = { version = "0.8.2", features = ["v4"] } +webpki = "0.21.4" +webpki-roots = "0.21.0" [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3.9", features = ["knownfolders", "mswsock", "objbase", "shlobj", "tlhelp32", "winbase", "winerror", "winsock2"] } fwdansi = "1.1.0" +winapi = { version = "0.3.9", features = ["knownfolders", "mswsock", "objbase", "shlobj", "tlhelp32", "winbase", "winerror", "winsock2"] } [target.'cfg(unix)'.dependencies] -nix = "0.19.0" +nix = "0.19.1" [dev-dependencies] # Used in benchmark diff --git a/runtime/inspector.rs b/runtime/inspector.rs index 80beec0ec..0a2a236f2 100644 --- a/runtime/inspector.rs +++ b/runtime/inspector.rs @@ -16,6 +16,7 @@ use deno_core::futures::pin_mut; use deno_core::futures::prelude::*; use deno_core::futures::select; use deno_core::futures::stream::FuturesUnordered; +use deno_core::futures::stream::StreamExt; use deno_core::futures::task; use deno_core::futures::task::Context; use deno_core::futures::task::Poll; @@ -58,10 +59,10 @@ impl InspectorServer { let (shutdown_server_tx, shutdown_server_rx) = oneshot::channel(); let thread_handle = thread::spawn(move || { - let mut rt = crate::tokio_util::create_basic_runtime(); + let rt = crate::tokio_util::create_basic_runtime(); let local = tokio::task::LocalSet::new(); local.block_on( - &mut rt, + &rt, server(host, register_inspector_rx, shutdown_server_rx, name), ) }); @@ -182,9 +183,13 @@ fn handle_ws_request( .status(http::StatusCode::BAD_REQUEST) .body("Not a valid Websocket Request".into()), }); + + let (parts, _) = req.into_parts(); + let req = http::Request::from_parts(parts, body); + if resp.is_ok() { tokio::task::spawn_local(async move { - let upgraded = body.on_upgrade().await.unwrap(); + let upgraded = hyper::upgrade::on(req).await.unwrap(); let websocket = deno_websocket::tokio_tungstenite::WebSocketStream::from_raw_socket( upgraded, diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs index 3b0c02083..d1a2489ba 100644 --- a/runtime/ops/fs.rs +++ b/runtime/ops/fs.rs @@ -27,6 +27,7 @@ use std::path::{Path, PathBuf}; use std::rc::Rc; use std::time::SystemTime; use std::time::UNIX_EPOCH; +use tokio::io::AsyncSeekExt; #[cfg(not(unix))] use deno_core::error::generic_error; diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index c97ba0af4..6f6ba04bd 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -99,7 +99,7 @@ fn op_fs_events_open( let mut watcher: RecommendedWatcher = Watcher::new_immediate(move |res: Result<NotifyEvent, NotifyError>| { let res2 = res.map(FsEvent::from).map_err(AnyError::from); - let mut sender = sender.lock().unwrap(); + let sender = sender.lock().unwrap(); // Ignore result, if send failed it means that watcher was already closed, // but not all messages have been flushed. let _ = sender.try_send(res2); diff --git a/runtime/ops/net.rs b/runtime/ops/net.rs index 6b7e05771..dea7ffe51 100644 --- a/runtime/ops/net.rs +++ b/runtime/ops/net.rs @@ -1,6 +1,5 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -use crate::ops::io::FullDuplexResource; use crate::ops::io::TcpStreamResource; use crate::permissions::Permissions; use crate::resolve_addr::resolve_addr; @@ -28,7 +27,7 @@ use std::cell::RefCell; use std::net::Shutdown; use std::net::SocketAddr; use std::rc::Rc; -use tokio::net::udp; +use tokio::io::AsyncWriteExt; use tokio::net::TcpListener; use tokio::net::TcpStream; use tokio::net::UdpSocket; @@ -67,7 +66,7 @@ async fn accept_tcp( .resource_table .get::<TcpListenerResource>(rid) .ok_or_else(|| bad_resource("Listener has been closed"))?; - let mut listener = RcRef::map(&resource, |r| &r.listener) + let listener = RcRef::map(&resource, |r| &r.listener) .try_borrow_mut() .ok_or_else(|| custom_error("Busy", "Another accept task is ongoing"))?; let cancel = RcRef::map(resource, |r| &r.cancel); @@ -140,11 +139,11 @@ async fn receive_udp( .resource_table .get::<UdpSocketResource>(rid) .ok_or_else(|| bad_resource("Socket has been closed"))?; - let (size, remote_addr) = resource - .rd_borrow_mut() - .await + let socket = RcRef::map(&resource, |r| &r.socket).borrow().await; + let cancel_handle = RcRef::map(&resource, |r| &r.cancel); + let (size, remote_addr) = socket .recv_from(&mut zero_copy) - .try_or_cancel(resource.cancel_handle()) + .try_or_cancel(cancel_handle) .await?; Ok(json!({ "size": size, @@ -212,11 +211,8 @@ async fn op_datagram_send( .resource_table .get::<UdpSocketResource>(rid as u32) .ok_or_else(|| bad_resource("Socket has been closed"))?; - let byte_length = resource - .wr_borrow_mut() - .await - .send_to(&zero_copy, &addr) - .await?; + let socket = RcRef::map(&resource, |r| &r.socket).borrow().await; + let byte_length = socket.send_to(&zero_copy, &addr).await?; Ok(json!(byte_length)) } #[cfg(unix)] @@ -237,7 +233,7 @@ async fn op_datagram_send( .ok_or_else(|| { custom_error("NotConnected", "Socket has been closed") })?; - let mut socket = RcRef::map(&resource, |r| &r.socket) + let socket = RcRef::map(&resource, |r| &r.socket) .try_borrow_mut() .ok_or_else(|| custom_error("Busy", "Socket already in use"))?; let byte_length = socket.send_to(&zero_copy, address_path).await?; @@ -350,7 +346,8 @@ async fn op_shutdown( let rid = args.rid as u32; let how = args.how; - let shutdown_mode = match how { + // TODO(bartlomieju): no longer needed after Tokio 1.0 upgrade + let _shutdown_mode = match how { 0 => Shutdown::Read, // TODO: nonsense, remove me. 1 => Shutdown::Write, _ => unimplemented!(), @@ -362,18 +359,18 @@ async fn op_shutdown( .get_any(rid) .ok_or_else(bad_resource_id)?; if let Some(stream) = resource.downcast_rc::<TcpStreamResource>() { - let wr = stream.wr_borrow_mut().await; - TcpStream::shutdown((*wr).as_ref(), shutdown_mode)?; + let mut wr = stream.wr_borrow_mut().await; + wr.shutdown().await?; return Ok(json!({})); } #[cfg(unix)] if let Some(stream) = resource.downcast_rc::<StreamResource>() { if stream.unix_stream.is_some() { - let wr = RcRef::map(stream, |r| r.unix_stream.as_ref().unwrap()) + let mut wr = RcRef::map(stream, |r| r.unix_stream.as_ref().unwrap()) .borrow_mut() .await; - net_unix::UnixStream::shutdown(&*wr, shutdown_mode)?; + wr.shutdown().await?; return Ok(json!({})); } } @@ -396,7 +393,10 @@ impl Resource for TcpListenerResource { } } -type UdpSocketResource = FullDuplexResource<udp::RecvHalf, udp::SendHalf>; +struct UdpSocketResource { + socket: AsyncRefCell<UdpSocket>, + cancel: CancelHandle, +} impl Resource for UdpSocketResource { fn name(&self) -> Cow<str> { @@ -404,7 +404,7 @@ impl Resource for UdpSocketResource { } fn close(self: Rc<Self>) { - self.cancel_read_ops() + self.cancel.cancel() } } @@ -434,6 +434,7 @@ fn listen_tcp( addr: SocketAddr, ) -> Result<(u32, SocketAddr), AnyError> { let std_listener = std::net::TcpListener::bind(&addr)?; + std_listener.set_nonblocking(true)?; let listener = TcpListener::from_std(std_listener)?; let local_addr = listener.local_addr()?; let listener_resource = TcpListenerResource { @@ -450,9 +451,13 @@ fn listen_udp( addr: SocketAddr, ) -> Result<(u32, SocketAddr), AnyError> { let std_socket = std::net::UdpSocket::bind(&addr)?; + std_socket.set_nonblocking(true)?; let socket = UdpSocket::from_std(std_socket)?; let local_addr = socket.local_addr()?; - let socket_resource = UdpSocketResource::new(socket.split()); + let socket_resource = UdpSocketResource { + socket: AsyncRefCell::new(socket), + cancel: Default::default(), + }; let rid = state.resource_table.add(socket_resource); Ok((rid, local_addr)) diff --git a/runtime/ops/net_unix.rs b/runtime/ops/net_unix.rs index ace66425c..1177d071c 100644 --- a/runtime/ops/net_unix.rs +++ b/runtime/ops/net_unix.rs @@ -19,7 +19,6 @@ use serde::Deserialize; use std::borrow::Cow; use std::cell::RefCell; use std::fs::remove_file; -use std::os::unix; use std::path::Path; use std::rc::Rc; use tokio::net::UnixDatagram; @@ -73,7 +72,7 @@ pub(crate) async fn accept_unix( .resource_table .get::<UnixListenerResource>(rid) .ok_or_else(|| bad_resource("Listener has been closed"))?; - let mut listener = RcRef::map(&resource, |r| &r.listener) + let listener = RcRef::map(&resource, |r| &r.listener) .try_borrow_mut() .ok_or_else(|| custom_error("Busy", "Listener already in use"))?; let cancel = RcRef::map(resource, |r| &r.cancel); @@ -113,7 +112,7 @@ pub(crate) async fn receive_unix_packet( .resource_table .get::<UnixDatagramResource>(rid) .ok_or_else(|| bad_resource("Socket has been closed"))?; - let mut socket = RcRef::map(&resource, |r| &r.socket) + let socket = RcRef::map(&resource, |r| &r.socket) .try_borrow_mut() .ok_or_else(|| custom_error("Busy", "Socket already in use"))?; let cancel = RcRef::map(resource, |r| &r.cancel); @@ -131,7 +130,7 @@ pub(crate) async fn receive_unix_packet( pub fn listen_unix( state: &mut OpState, addr: &Path, -) -> Result<(u32, unix::net::SocketAddr), AnyError> { +) -> Result<(u32, tokio::net::unix::SocketAddr), AnyError> { if addr.exists() { remove_file(&addr).unwrap(); } @@ -149,7 +148,7 @@ pub fn listen_unix( pub fn listen_unix_packet( state: &mut OpState, addr: &Path, -) -> Result<(u32, unix::net::SocketAddr), AnyError> { +) -> Result<(u32, tokio::net::unix::SocketAddr), AnyError> { if addr.exists() { remove_file(&addr).unwrap(); } diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index e0a9a0795..63e22b601 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -199,7 +199,7 @@ async fn op_run_status( .get::<ChildResource>(rid) .ok_or_else(bad_resource_id)?; let mut child = resource.borrow_mut().await; - let run_status = (&mut *child).await?; + let run_status = child.wait().await?; let code = run_status.code(); #[cfg(unix)] diff --git a/runtime/ops/timers.rs b/runtime/ops/timers.rs index 940a96a8e..d53a0c971 100644 --- a/runtime/ops/timers.rs +++ b/runtime/ops/timers.rs @@ -60,7 +60,7 @@ impl GlobalTimer { let (tx, rx) = oneshot::channel(); self.tx = Some(tx); - let delay = tokio::time::delay_until(deadline.into()); + let delay = tokio::time::sleep_until(deadline.into()).boxed_local(); let rx = rx .map_err(|err| panic!("Unexpected error in receiving channel {:?}", err)); diff --git a/runtime/ops/tls.rs b/runtime/ops/tls.rs index 9c4c9f422..05d432e1c 100644 --- a/runtime/ops/tls.rs +++ b/runtime/ops/tls.rs @@ -303,6 +303,7 @@ fn op_listen_tls( .next() .ok_or_else(|| generic_error("No resolved address found"))?; let std_listener = std::net::TcpListener::bind(&addr)?; + std_listener.set_nonblocking(true)?; let listener = TcpListener::from_std(std_listener)?; let local_addr = listener.local_addr()?; let tls_listener_resource = TlsListenerResource { @@ -341,7 +342,7 @@ async fn op_accept_tls( .resource_table .get::<TlsListenerResource>(rid) .ok_or_else(|| bad_resource("Listener has been closed"))?; - let mut listener = RcRef::map(&resource, |r| &r.listener) + let listener = RcRef::map(&resource, |r| &r.listener) .try_borrow_mut() .ok_or_else(|| custom_error("Busy", "Another accept task is ongoing"))?; let cancel = RcRef::map(resource, |r| &r.cancel); diff --git a/runtime/tokio_util.rs b/runtime/tokio_util.rs index ef0ba5be3..5ee45325d 100644 --- a/runtime/tokio_util.rs +++ b/runtime/tokio_util.rs @@ -1,8 +1,7 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. pub fn create_basic_runtime() -> tokio::runtime::Runtime { - tokio::runtime::Builder::new() - .basic_scheduler() + tokio::runtime::Builder::new_current_thread() .enable_io() .enable_time() // This limits the number of threads for blocking operations (like for @@ -10,7 +9,7 @@ pub fn create_basic_runtime() -> tokio::runtime::Runtime { // parallel for deno fmt. // The default value is 512, which is an unhelpfully large thread pool. We // don't ever want to have more than a couple dozen threads. - .max_threads(32) + .max_blocking_threads(32) .build() .unwrap() } @@ -20,6 +19,6 @@ pub fn run_basic<F, R>(future: F) -> R where F: std::future::Future<Output = R>, { - let mut rt = create_basic_runtime(); + let rt = create_basic_runtime(); rt.block_on(future) } diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 87487e499..0efb547f4 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -430,7 +430,7 @@ pub fn run_web_worker( ) -> Result<(), AnyError> { let name = worker.name.to_string(); - let mut rt = create_basic_runtime(); + let rt = create_basic_runtime(); // TODO(bartlomieju): run following block using "select!" // with terminate diff --git a/test_plugin/Cargo.toml b/test_plugin/Cargo.toml index 0d7d49e9f..6830f33fe 100644 --- a/test_plugin/Cargo.toml +++ b/test_plugin/Cargo.toml @@ -11,8 +11,8 @@ publish = false crate-type = ["cdylib"] [dependencies] -futures = "0.3.8" deno_core = { path = "../core" } +futures = "0.3.9" [dev-dependencies] test_util = { path = "../test_util" } diff --git a/test_util/Cargo.toml b/test_util/Cargo.toml index 0e8099cec..e41f9a01d 100644 --- a/test_util/Cargo.toml +++ b/test_util/Cargo.toml @@ -12,17 +12,17 @@ name = "test_server" path = "src/test_server.rs" [dependencies] -tokio = { version = "1.0", features = ["full"] } -futures = "0.3" -bytes = "1" +async-stream = "0.3.0" +bytes = "1.0.1" +futures = "0.3.9" +hyper = { version = "0.14.2", features = ["server", "http1", "runtime"] } lazy_static = "1.4.0" -os_pipe = "0.9" -regex = "1.3.9" +os_pipe = "0.9.2" +regex = "1.4.3" tempfile = "3.1.0" -hyper = { version = "0.14.2", features = ["server", "http1", "runtime"] } -tokio-tungstenite = "0.13" -tokio-rustls = "0.22" -async-stream = "0.3.0" +tokio = { version = "1.0.1", features = ["full"] } +tokio-rustls = "0.22.0" +tokio-tungstenite = "0.13.0" [target.'cfg(unix)'.dependencies] pty = "0.2.2" |