1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options

This commit is contained in:
Nayeem Rahman 2024-12-06 02:28:36 +00:00
commit 871750aaae
81 changed files with 702 additions and 252 deletions

View file

@ -5,7 +5,7 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify";
// Bump this number when you want to purge the cache.
// Note: the tools/release/01_bump_crate_versions.ts script will update this version
// automatically via regex, so ensure that this line maintains this format.
const cacheVersion = 28;
const cacheVersion = 29;
const ubuntuX86Runner = "ubuntu-24.04";
const ubuntuX86XlRunner = "ubuntu-24.04-xl";

View file

@ -361,8 +361,8 @@ jobs:
path: |-
~/.cargo/registry/index
~/.cargo/registry/cache
key: '28-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '28-cargo-home-${{ matrix.os }}-${{ matrix.arch }}'
key: '29-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '29-cargo-home-${{ matrix.os }}-${{ matrix.arch }}'
if: '!(matrix.skip)'
- name: Restore cache build output (PR)
uses: actions/cache/restore@v4
@ -375,7 +375,7 @@ jobs:
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '28-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-'
restore-keys: '29-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-'
- name: Apply and update mtime cache
if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))'
uses: ./.github/mtime_cache
@ -685,7 +685,7 @@ jobs:
!./target/*/*.zip
!./target/*/*.sha256sum
!./target/*/*.tar.gz
key: '28-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
key: '29-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
publish-canary:
name: publish canary
runs-on: ubuntu-24.04

270
Cargo.lock generated
View file

@ -284,6 +284,17 @@ dependencies = [
"tokio",
]
[[package]]
name = "async-recursion"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.87",
]
[[package]]
name = "async-stream"
version = "0.3.5"
@ -806,6 +817,7 @@ dependencies = [
"file_test_runner",
"flaky_test",
"hickory-client",
"hickory-proto",
"hickory-server",
"http 1.1.0",
"http-body-util",
@ -1194,7 +1206,7 @@ dependencies = [
[[package]]
name = "deno"
version = "2.1.2"
version = "2.1.3"
dependencies = [
"anstream",
"async-trait",
@ -1293,7 +1305,7 @@ dependencies = [
"test_server",
"text-size",
"text_lines",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"tokio-util",
"tracing",
@ -1367,7 +1379,7 @@ dependencies = [
[[package]]
name = "deno_bench_util"
version = "0.174.0"
version = "0.175.0"
dependencies = [
"bencher",
"deno_core",
@ -1376,25 +1388,25 @@ dependencies = [
[[package]]
name = "deno_broadcast_channel"
version = "0.174.0"
version = "0.175.0"
dependencies = [
"async-trait",
"deno_core",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"uuid",
]
[[package]]
name = "deno_cache"
version = "0.112.0"
version = "0.113.0"
dependencies = [
"async-trait",
"deno_core",
"rusqlite",
"serde",
"sha2",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
]
@ -1420,13 +1432,13 @@ dependencies = [
[[package]]
name = "deno_canvas"
version = "0.49.0"
version = "0.50.0"
dependencies = [
"deno_core",
"deno_webgpu",
"image",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
]
[[package]]
@ -1454,16 +1466,16 @@ dependencies = [
[[package]]
name = "deno_console"
version = "0.180.0"
version = "0.181.0"
dependencies = [
"deno_core",
]
[[package]]
name = "deno_core"
version = "0.323.0"
version = "0.324.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a781bcfe1b5211b8497f45bf5b3dba73036b8d5d1533c1f05d26ccf0afb25a78"
checksum = "24503eda646f246aa6eb0f794909f9a857c8f05095fed66f36e0eaef92edce23"
dependencies = [
"anyhow",
"az",
@ -1502,20 +1514,20 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695"
[[package]]
name = "deno_cron"
version = "0.60.0"
version = "0.61.0"
dependencies = [
"anyhow",
"async-trait",
"chrono",
"deno_core",
"saffron",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
]
[[package]]
name = "deno_crypto"
version = "0.194.0"
version = "0.195.0"
dependencies = [
"aes",
"aes-gcm",
@ -1544,7 +1556,7 @@ dependencies = [
"sha2",
"signature",
"spki",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"uuid",
"x25519-dalek",
@ -1604,7 +1616,7 @@ dependencies = [
[[package]]
name = "deno_fetch"
version = "0.204.0"
version = "0.205.0"
dependencies = [
"base64 0.21.7",
"bytes",
@ -1626,7 +1638,7 @@ dependencies = [
"rustls-webpki",
"serde",
"serde_json",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"tokio-rustls",
"tokio-socks",
@ -1638,7 +1650,7 @@ dependencies = [
[[package]]
name = "deno_ffi"
version = "0.167.0"
version = "0.168.0"
dependencies = [
"deno_core",
"deno_permissions",
@ -1651,14 +1663,14 @@ dependencies = [
"serde",
"serde-value",
"serde_json",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"winapi",
]
[[package]]
name = "deno_fs"
version = "0.90.0"
version = "0.91.0"
dependencies = [
"async-trait",
"base32",
@ -1674,7 +1686,7 @@ dependencies = [
"rand",
"rayon",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"winapi",
"windows-sys 0.59.0",
]
@ -1711,7 +1723,7 @@ dependencies = [
[[package]]
name = "deno_http"
version = "0.178.0"
version = "0.179.0"
dependencies = [
"async-compression",
"async-trait",
@ -1743,14 +1755,14 @@ dependencies = [
"scopeguard",
"serde",
"smallvec",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"tokio-util",
]
[[package]]
name = "deno_io"
version = "0.90.0"
version = "0.91.0"
dependencies = [
"async-trait",
"deno_core",
@ -1771,7 +1783,7 @@ dependencies = [
[[package]]
name = "deno_kv"
version = "0.88.0"
version = "0.89.0"
dependencies = [
"anyhow",
"async-trait",
@ -1797,7 +1809,7 @@ dependencies = [
"rand",
"rusqlite",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"url",
]
@ -1844,7 +1856,7 @@ dependencies = [
[[package]]
name = "deno_napi"
version = "0.111.0"
version = "0.112.0"
dependencies = [
"deno_core",
"deno_permissions",
@ -1853,7 +1865,7 @@ dependencies = [
"libuv-sys-lite",
"log",
"napi_sym",
"thiserror 1.0.64",
"thiserror 2.0.3",
"windows-sys 0.59.0",
]
@ -1872,7 +1884,7 @@ dependencies = [
[[package]]
name = "deno_net"
version = "0.172.0"
version = "0.173.0"
dependencies = [
"deno_core",
"deno_permissions",
@ -1883,13 +1895,13 @@ dependencies = [
"rustls-tokio-stream",
"serde",
"socket2",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
]
[[package]]
name = "deno_node"
version = "0.117.0"
version = "0.118.0"
dependencies = [
"aead-gcm-stream",
"aes",
@ -1928,7 +1940,7 @@ dependencies = [
"http-body-util",
"hyper 1.4.1",
"hyper-util",
"idna 1.0.3",
"idna",
"indexmap 2.3.0",
"ipnetwork",
"k256",
@ -1967,7 +1979,7 @@ dependencies = [
"sm3",
"spki",
"stable_deref_trait",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"tokio-eld",
"url",
@ -2000,7 +2012,7 @@ dependencies = [
[[package]]
name = "deno_npm_cache"
version = "0.0.1"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
@ -2023,15 +2035,15 @@ dependencies = [
"serde_json",
"tar",
"tempfile",
"thiserror 1.0.64",
"thiserror 2.0.3",
"url",
]
[[package]]
name = "deno_ops"
version = "0.199.0"
version = "0.200.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a24a1f3e22029a57d3094b32070b8328eac793920b5a022027d360f085e6b245"
checksum = "03a529a2c488cd3042f12f35666569ebe5b3cf89d2b7d1cafc1a652f6d7bcc8f"
dependencies = [
"proc-macro-rules",
"proc-macro2",
@ -2072,7 +2084,7 @@ dependencies = [
[[package]]
name = "deno_permissions"
version = "0.40.0"
version = "0.41.0"
dependencies = [
"deno_core",
"deno_path_util",
@ -2083,14 +2095,14 @@ dependencies = [
"once_cell",
"percent-encoding",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"which 4.4.2",
"winapi",
]
[[package]]
name = "deno_resolver"
version = "0.12.0"
version = "0.13.0"
dependencies = [
"anyhow",
"base32",
@ -2103,13 +2115,13 @@ dependencies = [
"deno_semver",
"node_resolver",
"test_server",
"thiserror 1.0.64",
"thiserror 2.0.3",
"url",
]
[[package]]
name = "deno_runtime"
version = "0.189.0"
version = "0.190.0"
dependencies = [
"color-print",
"deno_ast",
@ -2166,7 +2178,7 @@ dependencies = [
"signal-hook-registry",
"tempfile",
"test_server",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"tokio-metrics",
"twox-hash",
@ -2210,7 +2222,7 @@ dependencies = [
[[package]]
name = "deno_telemetry"
version = "0.2.0"
version = "0.3.0"
dependencies = [
"async-trait",
"deno_core",
@ -2251,7 +2263,7 @@ dependencies = [
[[package]]
name = "deno_tls"
version = "0.167.0"
version = "0.168.0"
dependencies = [
"deno_core",
"deno_native_certs",
@ -2260,7 +2272,7 @@ dependencies = [
"rustls-tokio-stream",
"rustls-webpki",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"webpki-roots",
]
@ -2301,19 +2313,19 @@ dependencies = [
[[package]]
name = "deno_url"
version = "0.180.0"
version = "0.181.0"
dependencies = [
"deno_bench_util",
"deno_console",
"deno_core",
"deno_webidl",
"thiserror 1.0.64",
"thiserror 2.0.3",
"urlpattern",
]
[[package]]
name = "deno_web"
version = "0.211.0"
version = "0.212.0"
dependencies = [
"async-trait",
"base64-simd 0.8.0",
@ -2328,19 +2340,19 @@ dependencies = [
"flate2",
"futures",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"uuid",
]
[[package]]
name = "deno_webgpu"
version = "0.147.0"
version = "0.148.0"
dependencies = [
"deno_core",
"raw-window-handle",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"wgpu-core",
"wgpu-types",
@ -2348,7 +2360,7 @@ dependencies = [
[[package]]
name = "deno_webidl"
version = "0.180.0"
version = "0.181.0"
dependencies = [
"deno_bench_util",
"deno_core",
@ -2356,7 +2368,7 @@ dependencies = [
[[package]]
name = "deno_websocket"
version = "0.185.0"
version = "0.186.0"
dependencies = [
"bytes",
"deno_core",
@ -2372,18 +2384,18 @@ dependencies = [
"once_cell",
"rustls-tokio-stream",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
]
[[package]]
name = "deno_webstorage"
version = "0.175.0"
version = "0.176.0"
dependencies = [
"deno_core",
"deno_web",
"rusqlite",
"thiserror 1.0.64",
"thiserror 2.0.3",
]
[[package]]
@ -3697,9 +3709,9 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
[[package]]
name = "hickory-client"
version = "0.24.1"
version = "0.25.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bab9683b08d8f8957a857b0236455d80e1886eaa8c6178af556aa7871fb61b55"
checksum = "83536dab9a159b2b5cf2c20c47ecf188cee35316f96be028e63e8e1340d2724d"
dependencies = [
"cfg-if",
"data-encoding",
@ -3709,17 +3721,18 @@ dependencies = [
"once_cell",
"radix_trie",
"rand",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"tracing",
]
[[package]]
name = "hickory-proto"
version = "0.24.1"
version = "0.25.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512"
checksum = "d063c0692ee669aa6d261988aa19ca5510f1cc40e4f211024f50c888499a35d7"
dependencies = [
"async-recursion",
"async-trait",
"cfg-if",
"data-encoding",
@ -3727,12 +3740,12 @@ dependencies = [
"futures-channel",
"futures-io",
"futures-util",
"idna 0.4.0",
"idna",
"ipnet",
"once_cell",
"rand",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tinyvec",
"tokio",
"tracing",
@ -3741,40 +3754,43 @@ dependencies = [
[[package]]
name = "hickory-resolver"
version = "0.24.1"
version = "0.25.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243"
checksum = "42bc352e4412fb657e795f79b4efcf2bd60b59ee5ca0187f3554194cd1107a27"
dependencies = [
"cfg-if",
"futures-util",
"hickory-proto",
"ipconfig",
"lru-cache",
"moka",
"once_cell",
"parking_lot",
"rand",
"resolv-conf",
"serde",
"smallvec",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"tracing",
]
[[package]]
name = "hickory-server"
version = "0.24.1"
version = "0.25.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9be0e43c556b9b3fdb6c7c71a9a32153a2275d02419e3de809e520bfcfe40c37"
checksum = "aa7154e905d5c8a79c15427881e479b2ba749c55412804f0dc87723a531e45bd"
dependencies = [
"async-trait",
"bytes",
"cfg-if",
"data-encoding",
"enum-as-inner",
"futures-util",
"hickory-proto",
"ipnet",
"prefix-trie",
"serde",
"thiserror 1.0.64",
"thiserror 2.0.3",
"time",
"tokio",
"tokio-util",
@ -4136,16 +4152,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
dependencies = [
"unicode-bidi",
"unicode-normalization",
]
[[package]]
name = "idna"
version = "1.0.3"
@ -4286,6 +4292,9 @@ name = "ipnet"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
dependencies = [
"serde",
]
[[package]]
name = "ipnetwork"
@ -4624,12 +4633,6 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "linked-hash-map"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "linux-raw-sys"
version = "0.4.13"
@ -4667,15 +4670,6 @@ dependencies = [
"serde",
]
[[package]]
name = "lru-cache"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
dependencies = [
"linked-hash-map",
]
[[package]]
name = "lsp-types"
version = "0.97.0"
@ -4840,6 +4834,26 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "moka"
version = "0.12.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e0d88686dc561d743b40de8269b26eaf0dc58781bde087b0984646602021d08"
dependencies = [
"crossbeam-channel",
"crossbeam-epoch",
"crossbeam-utils",
"once_cell",
"parking_lot",
"quanta",
"rustc_version 0.4.0",
"smallvec",
"tagptr",
"thiserror 1.0.64",
"triomphe",
"uuid",
]
[[package]]
name = "monch"
version = "0.5.0"
@ -4891,7 +4905,7 @@ dependencies = [
[[package]]
name = "napi_sym"
version = "0.110.0"
version = "0.111.0"
dependencies = [
"quote",
"serde",
@ -4946,7 +4960,7 @@ dependencies = [
[[package]]
name = "node_resolver"
version = "0.19.0"
version = "0.20.0"
dependencies = [
"anyhow",
"async-trait",
@ -4960,7 +4974,7 @@ dependencies = [
"path-clean",
"regex",
"serde_json",
"thiserror 1.0.64",
"thiserror 2.0.3",
"tokio",
"url",
]
@ -5119,9 +5133,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.19.0"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "opaque-debug"
@ -5616,6 +5630,16 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "prefix-trie"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4defc8f5ac7522968431b7592a34432215d80cceb1cf7e0c06287087bca4f046"
dependencies = [
"ipnet",
"num-traits",
]
[[package]]
name = "pretty_assertions"
version = "1.4.0"
@ -5811,6 +5835,21 @@ dependencies = [
"unicase",
]
[[package]]
name = "quanta"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5"
dependencies = [
"crossbeam-utils",
"libc",
"once_cell",
"raw-cpuid",
"wasi",
"web-sys",
"winapi",
]
[[package]]
name = "quick-error"
version = "1.2.3"
@ -5975,6 +6014,15 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab"
[[package]]
name = "raw-cpuid"
version = "11.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0"
dependencies = [
"bitflags 2.6.0",
]
[[package]]
name = "raw-window-handle"
version = "0.6.1"
@ -6635,9 +6683,9 @@ dependencies = [
[[package]]
name = "serde_v8"
version = "0.232.0"
version = "0.233.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c9feae92f7293fcc1a32a86be1a399859c0637e55dad8991d5258c43f7ff4d2"
checksum = "307f176b7475480cee690c34c7118f96fe564d1f2a974bf990294b8310ae4983"
dependencies = [
"num-bigint",
"serde",
@ -7508,6 +7556,12 @@ dependencies = [
"syn 2.0.87",
]
[[package]]
name = "tagptr"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417"
[[package]]
name = "tap"
version = "1.0.1"
@ -8082,12 +8136,6 @@ dependencies = [
"version_check",
]
[[package]]
name = "unicode-bidi"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
[[package]]
name = "unicode-id"
version = "0.3.4"
@ -8162,7 +8210,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada"
dependencies = [
"form_urlencoded",
"idna 1.0.3",
"idna",
"percent-encoding",
"serde",
]

View file

@ -48,20 +48,20 @@ repository = "https://github.com/denoland/deno"
[workspace.dependencies]
deno_ast = { version = "=0.44.0", features = ["transpiling"] }
deno_core = { version = "0.323.0" }
deno_core = { version = "0.324.0" }
deno_bench_util = { version = "0.174.0", path = "./bench_util" }
deno_bench_util = { version = "0.175.0", path = "./bench_util" }
# TODO(nayeemrmn): Use proper version when https://github.com/denoland/deno_config/pull/143 lands!
deno_config = { git = "https://github.com/denoland/deno_config.git", rev = "81d8e844624a8f6b3961213d1480dcc923d08b11", features = ["workspace", "sync"] }
deno_lockfile = "=0.23.2"
deno_media_type = { version = "0.2.0", features = ["module_specifier"] }
deno_npm = "=0.26.0"
deno_path_util = "=0.2.1"
deno_permissions = { version = "0.40.0", path = "./runtime/permissions" }
deno_runtime = { version = "0.189.0", path = "./runtime" }
deno_permissions = { version = "0.41.0", path = "./runtime/permissions" }
deno_runtime = { version = "0.190.0", path = "./runtime" }
deno_semver = "=0.6.0"
deno_terminal = "0.2.0"
napi_sym = { version = "0.110.0", path = "./ext/napi/sym" }
napi_sym = { version = "0.111.0", path = "./ext/napi/sym" }
test_util = { package = "test_server", path = "./tests/util/server" }
denokv_proto = "0.8.4"
@ -70,34 +70,34 @@ denokv_remote = "0.8.4"
denokv_sqlite = { default-features = false, version = "0.8.4" }
# exts
deno_broadcast_channel = { version = "0.174.0", path = "./ext/broadcast_channel" }
deno_cache = { version = "0.112.0", path = "./ext/cache" }
deno_canvas = { version = "0.49.0", path = "./ext/canvas" }
deno_console = { version = "0.180.0", path = "./ext/console" }
deno_cron = { version = "0.60.0", path = "./ext/cron" }
deno_crypto = { version = "0.194.0", path = "./ext/crypto" }
deno_fetch = { version = "0.204.0", path = "./ext/fetch" }
deno_ffi = { version = "0.167.0", path = "./ext/ffi" }
deno_fs = { version = "0.90.0", path = "./ext/fs" }
deno_http = { version = "0.178.0", path = "./ext/http" }
deno_io = { version = "0.90.0", path = "./ext/io" }
deno_kv = { version = "0.88.0", path = "./ext/kv" }
deno_napi = { version = "0.111.0", path = "./ext/napi" }
deno_net = { version = "0.172.0", path = "./ext/net" }
deno_node = { version = "0.117.0", path = "./ext/node" }
deno_telemetry = { version = "0.2.0", path = "./ext/telemetry" }
deno_tls = { version = "0.167.0", path = "./ext/tls" }
deno_url = { version = "0.180.0", path = "./ext/url" }
deno_web = { version = "0.211.0", path = "./ext/web" }
deno_webgpu = { version = "0.147.0", path = "./ext/webgpu" }
deno_webidl = { version = "0.180.0", path = "./ext/webidl" }
deno_websocket = { version = "0.185.0", path = "./ext/websocket" }
deno_webstorage = { version = "0.175.0", path = "./ext/webstorage" }
deno_broadcast_channel = { version = "0.175.0", path = "./ext/broadcast_channel" }
deno_cache = { version = "0.113.0", path = "./ext/cache" }
deno_canvas = { version = "0.50.0", path = "./ext/canvas" }
deno_console = { version = "0.181.0", path = "./ext/console" }
deno_cron = { version = "0.61.0", path = "./ext/cron" }
deno_crypto = { version = "0.195.0", path = "./ext/crypto" }
deno_fetch = { version = "0.205.0", path = "./ext/fetch" }
deno_ffi = { version = "0.168.0", path = "./ext/ffi" }
deno_fs = { version = "0.91.0", path = "./ext/fs" }
deno_http = { version = "0.179.0", path = "./ext/http" }
deno_io = { version = "0.91.0", path = "./ext/io" }
deno_kv = { version = "0.89.0", path = "./ext/kv" }
deno_napi = { version = "0.112.0", path = "./ext/napi" }
deno_net = { version = "0.173.0", path = "./ext/net" }
deno_node = { version = "0.118.0", path = "./ext/node" }
deno_telemetry = { version = "0.3.0", path = "./ext/telemetry" }
deno_tls = { version = "0.168.0", path = "./ext/tls" }
deno_url = { version = "0.181.0", path = "./ext/url" }
deno_web = { version = "0.212.0", path = "./ext/web" }
deno_webgpu = { version = "0.148.0", path = "./ext/webgpu" }
deno_webidl = { version = "0.181.0", path = "./ext/webidl" }
deno_websocket = { version = "0.186.0", path = "./ext/websocket" }
deno_webstorage = { version = "0.176.0", path = "./ext/webstorage" }
# resolvers
deno_npm_cache = { version = "0.0.1", path = "./resolvers/npm_cache" }
deno_resolver = { version = "0.12.0", path = "./resolvers/deno" }
node_resolver = { version = "0.19.0", path = "./resolvers/node" }
deno_npm_cache = { version = "0.1.0", path = "./resolvers/npm_cache" }
deno_resolver = { version = "0.13.0", path = "./resolvers/deno" }
node_resolver = { version = "0.20.0", path = "./resolvers/node" }
aes = "=0.8.3"
anyhow = "1.0.57"
@ -134,7 +134,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"] }
hickory-resolver = { version = "0.25.0-alpha.4", features = ["tokio-runtime", "serde"] }
http = "1.0"
http-body = "1.0"
http-body-util = "0.1.2"
@ -195,7 +195,7 @@ spki = "0.7.2"
tar = "=0.4.40"
tempfile = "3.4.0"
termcolor = "1.1.3"
thiserror = "1.0.61"
thiserror = "2.0.3"
tokio = { version = "1.36.0", features = ["full"] }
tokio-metrics = { version = "0.3.0", features = ["rt"] }
tokio-rustls = { version = "0.26.0", default-features = false, features = ["ring", "tls12"] }

View file

@ -6,6 +6,26 @@ https://github.com/denoland/deno/releases
We also have one-line install commands at:
https://github.com/denoland/deno_install
### 2.1.3 / 2024.12.05
- feat(unstable): add metrics to otel (#27143)
- fix(fmt): stable formatting of HTML files with JS (#27164)
- fix(install): use locked version of jsr package when fetching exports (#27237)
- fix(node/fs): support `recursive` option in readdir (#27179)
- fix(node/worker_threads): data url not encoded properly with eval (#27184)
- fix(outdated): allow `--latest` without `--update` (#27227)
- fix(task): `--recursive` option not working (#27183)
- fix(task): don't panic with filter on missing task argument (#27180)
- fix(task): forward signals to spawned sub-processes on unix (#27141)
- fix(task): kill descendants when killing task process on Windows (#27163)
- fix(task): only pass args to root task (#27213)
- fix(unstable): otel context with multiple keys (#27230)
- fix(unstable/temporal): respect locale in `Duration.prototype.toLocaleString`
(#27000)
- fix: clear dep analysis when module loading is done (#27204)
- fix: improve auto-imports for npm packages (#27224)
- fix: support `workspace:^` and `workspace:~` version constraints (#27096)
### 2.1.2 / 2024.11.28
- feat(unstable): Instrument Deno.serve (#26964)

View file

@ -2,7 +2,7 @@
[package]
name = "deno_bench_util"
version = "0.174.0"
version = "0.175.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno"
version = "2.1.2"
version = "2.1.3"
authors.workspace = true
default-run = "deno"
edition.workspace = true

View file

@ -5277,8 +5277,15 @@ fn task_parse(
unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionAndRuntime);
node_modules_arg_parse(flags, matches);
let filter = matches.remove_one::<String>("filter");
let recursive = matches.get_flag("recursive") || filter.is_some();
let mut recursive = matches.get_flag("recursive");
let filter = if let Some(filter) = matches.remove_one::<String>("filter") {
recursive = false;
Some(filter)
} else if recursive {
Some("*".to_string())
} else {
None
};
let mut task_flags = TaskFlags {
cwd: matches.remove_one::<String>("cwd"),
@ -10538,7 +10545,7 @@ mod tests {
cwd: None,
task: Some("build".to_string()),
is_run: false,
recursive: true,
recursive: false,
filter: Some("*".to_string()),
eval: false,
}),
@ -10555,7 +10562,7 @@ mod tests {
task: Some("build".to_string()),
is_run: false,
recursive: true,
filter: None,
filter: Some("*".to_string()),
eval: false,
}),
..Flags::default()
@ -10571,7 +10578,7 @@ mod tests {
task: Some("build".to_string()),
is_run: false,
recursive: true,
filter: None,
filter: Some("*".to_string()),
eval: false,
}),
..Flags::default()

View file

@ -95,11 +95,21 @@ impl ParsedSourceCache {
self.sources.lock().remove(specifier);
}
/// Fress all parsed sources from memory.
pub fn free_all(&self) {
self.sources.lock().clear();
}
/// Creates a parser that will reuse a ParsedSource from the store
/// if it exists, or else parse.
pub fn as_capturing_parser(&self) -> CapturingEsParser {
CapturingEsParser::new(None, self)
}
#[cfg(test)]
pub fn len(&self) -> usize {
self.sources.lock().len()
}
}
/// It's ok that this is racy since in non-LSP situations

View file

@ -109,6 +109,25 @@ pub fn graph_valid(
}
}
pub fn fill_graph_from_lockfile(
graph: &mut ModuleGraph,
lockfile: &deno_lockfile::Lockfile,
) {
graph.fill_from_lockfile(FillFromLockfileOptions {
redirects: lockfile
.content
.redirects
.iter()
.map(|(from, to)| (from.as_str(), to.as_str())),
package_specifiers: lockfile
.content
.packages
.specifiers
.iter()
.map(|(dep, id)| (dep, id.as_str())),
});
}
#[derive(Clone)]
pub struct GraphWalkErrorsOptions {
pub check_js: bool,
@ -604,19 +623,7 @@ impl ModuleGraphBuilder {
// populate the information from the lockfile
if let Some(lockfile) = &self.lockfile {
let lockfile = lockfile.lock();
graph.fill_from_lockfile(FillFromLockfileOptions {
redirects: lockfile
.content
.redirects
.iter()
.map(|(from, to)| (from.as_str(), to.as_str())),
package_specifiers: lockfile
.content
.packages
.specifiers
.iter()
.map(|(dep, id)| (dep, id.as_str())),
});
fill_graph_from_lockfile(graph, &lockfile);
}
}

View file

@ -7,6 +7,8 @@ use std::path::PathBuf;
use std::pin::Pin;
use std::rc::Rc;
use std::str;
use std::sync::atomic::AtomicU16;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use crate::args::jsr_url;
@ -50,6 +52,7 @@ use deno_core::error::generic_error;
use deno_core::error::AnyError;
use deno_core::futures::future::FutureExt;
use deno_core::futures::Future;
use deno_core::parking_lot::Mutex;
use deno_core::resolve_url;
use deno_core::ModuleCodeString;
use deno_core::ModuleLoader;
@ -223,6 +226,42 @@ struct SharedCliModuleLoaderState {
npm_module_loader: NpmModuleLoader,
parsed_source_cache: Arc<ParsedSourceCache>,
resolver: Arc<CliResolver>,
in_flight_loads_tracker: InFlightModuleLoadsTracker,
}
struct InFlightModuleLoadsTracker {
loads_number: Arc<AtomicU16>,
cleanup_task_timeout: u64,
cleanup_task_handle: Arc<Mutex<Option<tokio::task::JoinHandle<()>>>>,
}
impl InFlightModuleLoadsTracker {
pub fn increase(&self) {
self.loads_number.fetch_add(1, Ordering::Relaxed);
if let Some(task) = self.cleanup_task_handle.lock().take() {
task.abort();
}
}
pub fn decrease(&self, parsed_source_cache: &Arc<ParsedSourceCache>) {
let prev = self.loads_number.fetch_sub(1, Ordering::Relaxed);
if prev == 1 {
let parsed_source_cache = parsed_source_cache.clone();
let timeout = self.cleanup_task_timeout;
let task_handle = tokio::spawn(async move {
// We use a timeout here, which is defined to 10s,
// so that in situations when dynamic imports are loaded after the startup,
// we don't need to recompute and analyze multiple modules.
tokio::time::sleep(std::time::Duration::from_millis(timeout)).await;
parsed_source_cache.free_all();
});
let maybe_prev_task =
self.cleanup_task_handle.lock().replace(task_handle);
if let Some(prev_task) = maybe_prev_task {
prev_task.abort();
}
}
}
}
pub struct CliModuleLoaderFactory {
@ -273,6 +312,11 @@ impl CliModuleLoaderFactory {
npm_module_loader,
parsed_source_cache,
resolver,
in_flight_loads_tracker: InFlightModuleLoadsTracker {
loads_number: Arc::new(AtomicU16::new(0)),
cleanup_task_timeout: 10_000,
cleanup_task_handle: Arc::new(Mutex::new(None)),
},
}),
}
}
@ -868,6 +912,7 @@ impl<TGraphContainer: ModuleGraphContainer> ModuleLoader
_maybe_referrer: Option<String>,
is_dynamic: bool,
) -> Pin<Box<dyn Future<Output = Result<(), AnyError>>>> {
self.0.shared.in_flight_loads_tracker.increase();
if self.0.shared.in_npm_pkg_checker.in_npm_package(specifier) {
return Box::pin(deno_core::futures::future::ready(Ok(())));
}
@ -922,6 +967,14 @@ impl<TGraphContainer: ModuleGraphContainer> ModuleLoader
.boxed_local()
}
fn finish_load(&self) {
self
.0
.shared
.in_flight_loads_tracker
.decrease(&self.0.shared.parsed_source_cache);
}
fn code_cache_ready(
&self,
specifier: ModuleSpecifier,
@ -1104,3 +1157,44 @@ impl<TGraphContainer: ModuleGraphContainer> NodeRequireLoader
self.cjs_tracker.is_maybe_cjs(specifier, media_type)
}
}
#[cfg(test)]
mod tests {
use super::*;
use deno_graph::ParsedSourceStore;
#[tokio::test]
async fn test_inflight_module_loads_tracker() {
let tracker = InFlightModuleLoadsTracker {
loads_number: Default::default(),
cleanup_task_timeout: 10,
cleanup_task_handle: Default::default(),
};
let specifier = ModuleSpecifier::parse("file:///a.js").unwrap();
let source = "const a = 'hello';";
let parsed_source_cache = Arc::new(ParsedSourceCache::default());
let parsed_source = parsed_source_cache
.remove_or_parse_module(&specifier, source.into(), MediaType::JavaScript)
.unwrap();
parsed_source_cache.set_parsed_source(specifier, parsed_source);
assert_eq!(parsed_source_cache.len(), 1);
assert!(tracker.cleanup_task_handle.lock().is_none());
tracker.increase();
tracker.increase();
assert!(tracker.cleanup_task_handle.lock().is_none());
tracker.decrease(&parsed_source_cache);
assert!(tracker.cleanup_task_handle.lock().is_none());
tracker.decrease(&parsed_source_cache);
assert!(tracker.cleanup_task_handle.lock().is_some());
assert_eq!(parsed_source_cache.len(), 1);
tracker.increase();
assert!(tracker.cleanup_task_handle.lock().is_none());
assert_eq!(parsed_source_cache.len(), 1);
tracker.decrease(&parsed_source_cache);
// Rather long timeout, but to make sure CI is not flaking on it.
tokio::time::sleep(std::time::Duration::from_millis(500)).await;
assert_eq!(parsed_source_cache.len(), 0);
}
}

View file

@ -1,5 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
use std::borrow::Cow;
use std::sync::Arc;
use crate::factory::CliFactory;
@ -37,6 +38,16 @@ pub async fn cache_top_level_deps(
factory.file_fetcher()?.clone(),
))
};
let mut graph_permit = factory
.main_module_graph_container()
.await?
.acquire_update_permit()
.await;
let graph = graph_permit.graph_mut();
if let Some(lockfile) = cli_options.maybe_lockfile() {
let lockfile = lockfile.lock();
crate::graph_util::fill_graph_from_lockfile(graph, &lockfile);
}
let mut roots = Vec::new();
@ -67,13 +78,16 @@ pub async fn cache_top_level_deps(
if !seen_reqs.insert(req.req().clone()) {
continue;
}
let resolved_req = graph.packages.mappings().get(req.req());
let jsr_resolver = jsr_resolver.clone();
info_futures.push(async move {
if let Some(nv) = jsr_resolver.req_to_nv(req.req()).await {
if let Some(info) = jsr_resolver.package_version_info(&nv).await
{
return Some((specifier.clone(), info));
}
let nv = if let Some(req) = resolved_req {
Cow::Borrowed(req)
} else {
Cow::Owned(jsr_resolver.req_to_nv(req.req()).await?)
};
if let Some(info) = jsr_resolver.package_version_info(&nv).await {
return Some((specifier.clone(), info));
}
None
});
@ -106,12 +120,8 @@ pub async fn cache_top_level_deps(
}
}
}
let mut graph_permit = factory
.main_module_graph_container()
.await?
.acquire_update_permit()
.await;
let graph = graph_permit.graph_mut();
drop(info_futures);
factory
.module_load_preparer()
.await?

View file

@ -18,7 +18,6 @@ use deno_core::futures::stream::FuturesUnordered;
use deno_core::futures::FutureExt;
use deno_core::futures::StreamExt;
use deno_core::serde_json;
use deno_graph::FillFromLockfileOptions;
use deno_package_json::PackageJsonDepsMap;
use deno_package_json::PackageJsonRc;
use deno_runtime::deno_permissions::PermissionsContainer;
@ -533,19 +532,8 @@ impl DepManager {
// populate the information from the lockfile
if let Some(lockfile) = &self.lockfile {
let lockfile = lockfile.lock();
graph.fill_from_lockfile(FillFromLockfileOptions {
redirects: lockfile
.content
.redirects
.iter()
.map(|(from, to)| (from.as_str(), to.as_str())),
package_specifiers: lockfile
.content
.packages
.specifiers
.iter()
.map(|(dep, id)| (dep, id.as_str())),
});
crate::graph_util::fill_graph_from_lockfile(graph, &lockfile);
}
let npm_resolver = self.npm_resolver.as_managed().unwrap();

View file

@ -88,6 +88,7 @@ pub async fn execute_script(
&package_regex,
filter,
force_use_pkg_json,
task_flags.recursive,
)?;
return Ok(0);
@ -97,7 +98,9 @@ pub async fn execute_script(
let mut packages_task_info: Vec<PackageTaskInfo> = vec![];
for folder in workspace.config_folders() {
if !matches_package(folder.1, force_use_pkg_json, &package_regex) {
if !task_flags.recursive
&& !matches_package(folder.1, force_use_pkg_json, &package_regex)
{
continue;
}
@ -700,12 +703,15 @@ fn print_available_tasks_workspace(
package_regex: &Regex,
filter: &str,
force_use_pkg_json: bool,
recursive: bool,
) -> Result<(), AnyError> {
let workspace = cli_options.workspace();
let mut matched = false;
for folder in workspace.config_folders() {
if !matches_package(folder.1, force_use_pkg_json, package_regex) {
if !recursive
&& !matches_package(folder.1, force_use_pkg_json, package_regex)
{
continue;
}
matched = true;

View file

@ -2,7 +2,7 @@
[package]
name = "deno_broadcast_channel"
version = "0.174.0"
version = "0.175.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_cache"
version = "0.112.0"
version = "0.113.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_canvas"
version = "0.49.0"
version = "0.50.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_console"
version = "0.180.0"
version = "0.181.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_cron"
version = "0.60.0"
version = "0.61.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_crypto"
version = "0.194.0"
version = "0.195.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_fetch"
version = "0.204.0"
version = "0.205.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -7,10 +7,7 @@ use std::task::Poll;
use std::task::{self};
use std::vec;
use hickory_resolver::error::ResolveError;
use hickory_resolver::name_server::GenericConnector;
use hickory_resolver::name_server::TokioRuntimeProvider;
use hickory_resolver::AsyncResolver;
use hickory_resolver::name_server::TokioConnectionProvider;
use hyper_util::client::legacy::connect::dns::GaiResolver;
use hyper_util::client::legacy::connect::dns::Name;
use tokio::task::JoinHandle;
@ -21,7 +18,7 @@ pub enum Resolver {
/// A resolver using blocking `getaddrinfo` calls in a threadpool.
Gai(GaiResolver),
/// hickory-resolver's userspace resolver.
Hickory(AsyncResolver<GenericConnector<TokioRuntimeProvider>>),
Hickory(hickory_resolver::Resolver<TokioConnectionProvider>),
}
impl Default for Resolver {
@ -36,14 +33,14 @@ impl Resolver {
}
/// Create a [`AsyncResolver`] from system conf.
pub fn hickory() -> Result<Self, ResolveError> {
pub fn hickory() -> Result<Self, hickory_resolver::ResolveError> {
Ok(Self::Hickory(
hickory_resolver::AsyncResolver::tokio_from_system_conf()?,
hickory_resolver::Resolver::tokio_from_system_conf()?,
))
}
pub fn hickory_from_async_resolver(
resolver: AsyncResolver<GenericConnector<TokioRuntimeProvider>>,
pub fn hickory_from_resolver(
resolver: hickory_resolver::Resolver<TokioConnectionProvider>,
) -> Self {
Self::Hickory(resolver)
}

View file

@ -41,7 +41,7 @@ fn test_userspace_resolver() {
// use `localhost` to ensure dns step happens.
let addr = format!("localhost:{}", src_addr.port());
let hickory = hickory_resolver::AsyncResolver::tokio(
let hickory = hickory_resolver::Resolver::tokio(
Default::default(),
Default::default(),
);
@ -52,7 +52,7 @@ fn test_userspace_resolver() {
addr.clone(),
"https",
http::Version::HTTP_2,
dns::Resolver::hickory_from_async_resolver(hickory),
dns::Resolver::hickory_from_resolver(hickory),
)
.await;
assert_eq!(thread_counter.load(SeqCst), 0, "userspace resolver shouldn't spawn new threads.");

View file

@ -2,7 +2,7 @@
[package]
name = "deno_ffi"
version = "0.167.0"
version = "0.168.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_fs"
version = "0.90.0"
version = "0.91.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_http"
version = "0.178.0"
version = "0.179.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_io"
version = "0.90.0"
version = "0.91.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_kv"
version = "0.88.0"
version = "0.89.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_napi"
version = "0.111.0"
version = "0.112.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "napi_sym"
version = "0.110.0"
version = "0.111.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_net"
version = "0.172.0"
version = "0.173.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
@ -17,7 +17,7 @@ path = "lib.rs"
deno_core.workspace = true
deno_permissions.workspace = true
deno_tls.workspace = true
hickory-proto = "0.24"
hickory-proto = "0.25.0-alpha.4"
hickory-resolver.workspace = true
pin-project.workspace = true
rustls-tokio-stream.workspace = true

View file

@ -21,13 +21,14 @@ use deno_core::ResourceId;
use hickory_proto::rr::rdata::caa::Value;
use hickory_proto::rr::record_data::RData;
use hickory_proto::rr::record_type::RecordType;
use hickory_proto::ProtoError;
use hickory_proto::ProtoErrorKind;
use hickory_resolver::config::NameServerConfigGroup;
use hickory_resolver::config::ResolverConfig;
use hickory_resolver::config::ResolverOpts;
use hickory_resolver::error::ResolveError;
use hickory_resolver::error::ResolveErrorKind;
use hickory_resolver::system_conf;
use hickory_resolver::AsyncResolver;
use hickory_resolver::ResolveError;
use hickory_resolver::ResolveErrorKind;
use serde::Deserialize;
use serde::Serialize;
use socket2::Domain;
@ -646,7 +647,7 @@ where
}
}
let resolver = AsyncResolver::tokio(config, opts);
let resolver = hickory_resolver::Resolver::tokio(config, opts);
let lookup_fut = resolver.lookup(query, record_type);
@ -674,11 +675,21 @@ where
lookup
.map_err(|e| match e.kind() {
ResolveErrorKind::NoRecordsFound { .. } => NetError::DnsNotFound(e),
ResolveErrorKind::Message("No connections available") => {
ResolveErrorKind::Proto(ProtoError { kind, .. })
if matches!(**kind, ProtoErrorKind::NoRecordsFound { .. }) =>
{
NetError::DnsNotFound(e)
}
ResolveErrorKind::Proto(ProtoError { kind, .. })
if matches!(**kind, ProtoErrorKind::NoConnections { .. }) =>
{
NetError::DnsNotConnected(e)
}
ResolveErrorKind::Timeout => NetError::DnsTimedOut(e),
ResolveErrorKind::Proto(ProtoError { kind, .. })
if matches!(**kind, ProtoErrorKind::Timeout { .. }) =>
{
NetError::DnsTimedOut(e)
}
_ => NetError::Dns(e),
})?
.iter()

View file

@ -2,7 +2,7 @@
[package]
name = "deno_node"
version = "0.117.0"
version = "0.118.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -42,6 +42,7 @@ const {
SafeWeakMap,
SafeMap,
TypeError,
encodeURIComponent,
} = primordials;
const debugWorkerThreads = false;
@ -123,7 +124,11 @@ class NodeWorker extends EventEmitter {
);
}
if (options?.eval) {
specifier = `data:text/javascript,${specifier}`;
const code = typeof specifier === "string"
? encodeURIComponent(specifier)
// deno-lint-ignore prefer-primordials
: specifier.toString();
specifier = `data:text/javascript,${code}`;
} else if (
!(typeof specifier === "object" && specifier.protocol === "data:")
) {

View file

@ -2,7 +2,7 @@
[package]
name = "deno_telemetry"
version = "0.2.0"
version = "0.3.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_tls"
version = "0.167.0"
version = "0.168.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_url"
version = "0.180.0"
version = "0.181.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_web"
version = "0.211.0"
version = "0.212.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_webgpu"
version = "0.147.0"
version = "0.148.0"
authors = ["the Deno authors"]
edition.workspace = true
license = "MIT"

View file

@ -2,7 +2,7 @@
[package]
name = "deno_webidl"
version = "0.180.0"
version = "0.181.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_websocket"
version = "0.185.0"
version = "0.186.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_webstorage"
version = "0.175.0"
version = "0.176.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_resolver"
version = "0.12.0"
version = "0.13.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "node_resolver"
version = "0.19.0"
version = "0.20.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_npm_cache"
version = "0.0.1"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -2,7 +2,7 @@
[package]
name = "deno_runtime"
version = "0.189.0"
version = "0.190.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -37,6 +37,7 @@ const {
ObjectHasOwn,
ObjectKeys,
ObjectGetOwnPropertyDescriptor,
ObjectGetOwnPropertyDescriptors,
ObjectPrototypeIsPrototypeOf,
ObjectSetPrototypeOf,
PromisePrototypeThen,
@ -45,6 +46,7 @@ const {
Symbol,
SymbolIterator,
TypeError,
uncurryThis,
} = primordials;
const {
isNativeError,
@ -459,6 +461,51 @@ function exposeUnstableFeaturesForWindowOrWorkerGlobalScope(unstableFeatures) {
}
}
function shimTemporalDurationToLocaleString() {
const DurationFormat = Intl.DurationFormat;
if (!DurationFormat) {
// Intl.DurationFormat can be disabled with --v8-flags=--no-harmony-intl-duration-format
return;
}
const DurationFormatPrototype = DurationFormat.prototype;
const formatDuration = uncurryThis(DurationFormatPrototype.format);
const Duration = Temporal.Duration;
const DurationPrototype = Duration.prototype;
const desc = ObjectGetOwnPropertyDescriptors(DurationPrototype);
const assertDuration = uncurryThis(desc.toLocaleString.value);
const getYears = uncurryThis(desc.years.get);
const getMonths = uncurryThis(desc.months.get);
const getWeeks = uncurryThis(desc.weeks.get);
const getDays = uncurryThis(desc.days.get);
const getHours = uncurryThis(desc.hours.get);
const getMinutes = uncurryThis(desc.minutes.get);
const getSeconds = uncurryThis(desc.seconds.get);
const getMilliseconds = uncurryThis(desc.milliseconds.get);
const getMicroseconds = uncurryThis(desc.microseconds.get);
const getNanoseconds = uncurryThis(desc.nanoseconds.get);
ObjectAssign(DurationPrototype, {
toLocaleString(locales = undefined, options) {
assertDuration(this);
const durationFormat = new DurationFormat(locales, options);
const duration = {
years: getYears(this),
months: getMonths(this),
weeks: getWeeks(this),
days: getDays(this),
hours: getHours(this),
minutes: getMinutes(this),
seconds: getSeconds(this),
milliseconds: getMilliseconds(this),
microseconds: getMicroseconds(this),
nanoseconds: getNanoseconds(this),
};
return formatDuration(durationFormat, duration);
},
});
}
// NOTE(bartlomieju): remove all the ops that have already been imported using
// "virtual op module" (`ext:core/ops`).
const NOT_IMPORTED_OPS = [
@ -821,6 +868,12 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
});
delete globalThis.Temporal.Now.timeZone;
}
// deno-lint-ignore prefer-primordials
if (new Temporal.Duration().toLocaleString("en-US") !== "PT0S") {
throw "V8 supports Temporal.Duration.prototype.toLocaleString now, no need to shim it";
}
shimTemporalDurationToLocaleString();
}
// Setup `Deno` global - we're actually overriding already existing global
@ -1024,6 +1077,8 @@ function bootstrapWorkerRuntime(
});
delete globalThis.Temporal.Now.timeZone;
}
shimTemporalDurationToLocaleString();
}
// Setup `Deno` global - we're actually overriding already existing global

View file

@ -2,7 +2,7 @@
[package]
name = "deno_permissions"
version = "0.40.0"
version = "0.41.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -47,8 +47,9 @@ deno_tls.workspace = true
fastwebsockets = { workspace = true, features = ["upgrade", "unstable-split"] }
file_test_runner = "0.7.3"
flaky_test = "=0.2.2"
hickory-client = "=0.24"
hickory-server = "=0.24"
hickory-client = "0.25.0-alpha.4"
hickory-proto = "0.25.0-alpha.4"
hickory-server = "0.25.0-alpha.4"
http.workspace = true
http-body-util.workspace = true
hyper.workspace = true

View file

@ -16,7 +16,8 @@ use deno_tls::rustls;
use deno_tls::rustls::ClientConnection;
use deno_tls::rustls_pemfile;
use deno_tls::TlsStream;
use hickory_client::serialize::txt::Parser;
use hickory_proto::serialize::txt::Parser;
use hickory_server::authority::AuthorityObject;
use pretty_assertions::assert_eq;
use test_util as util;
use test_util::itest;
@ -2245,10 +2246,10 @@ async fn test_resolve_dns() {
panic!("failed to parse: {:?}", records.err())
}
let (origin, records) = records.unwrap();
let authority = Box::new(Arc::new(
let authority: Vec<Arc<dyn AuthorityObject>> = vec![Arc::new(
InMemoryAuthority::new(origin, records, ZoneType::Primary, false)
.unwrap(),
));
)];
let mut catalog: Catalog = Catalog::new();
catalog.upsert(Name::root().into(), authority);

View file

@ -0,0 +1 @@
export * from "jsr:@denotest/add@1";

View file

@ -0,0 +1,3 @@
{
"a": 1
}

View file

@ -0,0 +1 @@
export * from "jsr:@denotest/subtract@1";

View file

@ -0,0 +1,7 @@
{
"exports": {
"./add": "./add.ts",
"./subtract": "./subtract.ts",
"./data-json": "./data.json"
}
}

View file

@ -0,0 +1 @@
export * from "jsr:@denotest/add@1";

View file

@ -0,0 +1,3 @@
{
"a": 1
}

View file

@ -0,0 +1,3 @@
export function multiply(a: number, b: number): number {
return a * b;
}

View file

@ -0,0 +1 @@
export * from "jsr:@denotest/subtract@1";

View file

@ -0,0 +1,8 @@
{
"exports": {
"./add": "./add.ts",
"./subtract": "./subtract.ts",
"./data-json": "./data.json",
"./multiply": "./multiply.ts"
}
}

View file

@ -1,6 +1,8 @@
{
"versions": {
"1.0.0": {},
"0.7.1": {},
"0.7.0": {},
"0.5.0": {},
"0.2.0": {}
}

View file

@ -0,0 +1,9 @@
{
"tempDir": true,
"steps": [
{
"args": "install",
"output": "install.out"
}
]
}

View file

@ -0,0 +1,5 @@
{
"imports": {
"@denotest/multiple-exports": "jsr:@denotest/multiple-exports@^0.7.0"
}
}

View file

@ -0,0 +1,28 @@
{
"version": "4",
"specifiers": {
"jsr:@denotest/add@1": "1.0.0",
"jsr:@denotest/multiple-exports@0.7": "0.7.0",
"jsr:@denotest/subtract@1": "1.0.0"
},
"jsr": {
"@denotest/add@1.0.0": {
"integrity": "3b2e675c1ad7fba2a45bc251992e01aff08a3c974ac09079b11e6a5b95d4bfcb"
},
"@denotest/multiple-exports@0.7.0": {
"integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36",
"dependencies": [
"jsr:@denotest/add",
"jsr:@denotest/subtract"
]
},
"@denotest/subtract@1.0.0": {
"integrity": "e178a7101c073e93d9efa6833d5cbf83bc1bc8d509b7c2a5ecbf74265e917597"
}
},
"workspace": {
"dependencies": [
"jsr:@denotest/multiple-exports@0.7"
]
}
}

View file

@ -0,0 +1,13 @@
[UNORDERED_START]
Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0_meta.json
Download http://127.0.0.1:4250/@denotest/multiple-exports/meta.json
Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0/add.ts
Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0/subtract.ts
Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0/data.json
Download http://127.0.0.1:4250/@denotest/add/meta.json
Download http://127.0.0.1:4250/@denotest/subtract/meta.json
Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json
Download http://127.0.0.1:4250/@denotest/subtract/1.0.0_meta.json
Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts
Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts
[UNORDERED_END]

View file

@ -5,3 +5,4 @@ iso8601
UTC
undefined
undefined
1 day, 6 hr, 30 min

View file

@ -9,3 +9,6 @@ console.log(zoned.timeZoneId);
console.log(zoned.calendar);
// @ts-expect-error: undefined check
console.log(zoned.timeZone);
const duration = Temporal.Duration.from("P1DT6H30M");
console.log(duration.toLocaleString("en-US"));

View file

@ -40,6 +40,21 @@
"args": "task --filter *",
"output": "npm_filter_no_task.out"
},
"npm_recursive": {
"cwd": "./npm",
"args": "task -r dev",
"output": "npm_recursive.out"
},
"npm_recursive_no_pkg": {
"cwd": "./npm_recursive_no_pkg",
"args": "task -r dev",
"output": "npm_recursive_no_pkg.out"
},
"npm_filter_recursive": {
"cwd": "./npm",
"args": "task -r --filter foo dev",
"output": "npm_filter_recursive.out"
},
"deno_all": {
"cwd": "./deno",
"args": "task --filter * dev",
@ -74,6 +89,21 @@
"cwd": "./deno",
"args": "task --filter *",
"output": "deno_filter_no_task.out"
},
"deno_recursive": {
"cwd": "./deno",
"args": "task -r dev",
"output": "deno_recursive.out"
},
"deno_recursive_no_pkg": {
"cwd": "./deno_recursive_no_pkg",
"args": "task -r dev",
"output": "deno_recursive_no_pkg.out"
},
"deno_filter_recursive": {
"cwd": "./deno",
"args": "task -r --filter @deno/foo dev",
"output": "deno_filter_recursive.out"
}
}
}

View file

@ -0,0 +1,2 @@
Task dev echo '@deno/foo'
@deno/foo

View file

@ -0,0 +1,4 @@
Task dev echo '@deno/bar'
@deno/bar
Task dev echo '@deno/foo'
@deno/foo

View file

@ -0,0 +1,4 @@
Task dev echo 'bar'
bar
Task dev echo 'foo'
foo

View file

@ -0,0 +1,5 @@
{
"tasks": {
"dev": "echo 'bar'"
}
}

View file

@ -0,0 +1,6 @@
{
"workspace": [
"./foo",
"./bar"
]
}

View file

@ -0,0 +1,5 @@
{
"tasks": {
"dev": "echo 'foo'"
}
}

View file

@ -0,0 +1,2 @@
Task dev echo 'foo'
foo

View file

@ -0,0 +1,4 @@
Task dev echo 'bar'
bar
Task dev echo 'foo'
foo

View file

@ -0,0 +1,4 @@
Task dev echo 'bar'
bar
Task dev echo 'foo'
foo

View file

@ -0,0 +1,5 @@
{
"scripts": {
"dev": "echo 'bar'"
}
}

View file

@ -0,0 +1,5 @@
{
"scripts": {
"dev": "echo 'foo'"
}
}

View file

@ -0,0 +1,3 @@
{
"workspaces": ["./foo", "./bar"]
}

View file

@ -152,6 +152,7 @@ Deno.test("[node/http2.createServer()]", {
// TODO(satyarohith): enable the test on windows.
ignore: Deno.build.os === "windows",
}, async () => {
const serverListening = Promise.withResolvers<number>();
const server = http2.createServer((_req, res) => {
res.setHeader("Content-Type", "text/html");
res.setHeader("X-Foo", "bar");
@ -159,8 +160,10 @@ Deno.test("[node/http2.createServer()]", {
res.write("Hello, World!");
res.end();
});
server.listen(0);
const port = (server.address() as net.AddressInfo).port;
server.listen(0, () => {
serverListening.resolve((server.address() as net.AddressInfo).port);
});
const port = await serverListening.promise;
const endpoint = `http://localhost:${port}`;
const response = await curlRequest([

View file

@ -136,6 +136,25 @@ Deno.test({
},
});
Deno.test({
name: "[node/worker_threads] Worker eval",
async fn() {
// Check that newlines are encoded properly
const worker = new workerThreads.Worker(
`
import { parentPort } from "node:worker_threads"
console.log("hey, foo") // comment
parentPort.postMessage("It works!");
`,
{
eval: true,
},
);
assertEquals((await once(worker, "message"))[0], "It works!");
worker.terminate();
},
});
Deno.test({
name: "[node/worker_threads] worker thread with type module",
async fn() {