diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 941ee47984e1f6..53a0f46e504ab9 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -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 = 26; +const cacheVersion = 27; const ubuntuX86Runner = "ubuntu-24.04"; const ubuntuX86XlRunner = "ubuntu-24.04-xl"; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20e9fef503c999..ee8527bcef3019 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -361,8 +361,8 @@ jobs: path: |- ~/.cargo/registry/index ~/.cargo/registry/cache - key: '26-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' - restore-keys: '26-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' + key: '27-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' + restore-keys: '27-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: '26-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' + restore-keys: '27-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: '26-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' + key: '27-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' publish-canary: name: publish canary runs-on: ubuntu-24.04 diff --git a/Cargo.lock b/Cargo.lock index bf6d3a37147e94..6e929168f5313a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1201,7 +1201,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.1.0" +version = "2.1.1" dependencies = [ "anstream", "async-trait", @@ -1371,7 +1371,7 @@ dependencies = [ [[package]] name = "deno_bench_util" -version = "0.172.0" +version = "0.173.0" dependencies = [ "bencher", "deno_core", @@ -1380,7 +1380,7 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" -version = "0.172.0" +version = "0.173.0" dependencies = [ "async-trait", "deno_core", @@ -1391,7 +1391,7 @@ dependencies = [ [[package]] name = "deno_cache" -version = "0.110.0" +version = "0.111.0" dependencies = [ "async-trait", "deno_core", @@ -1424,7 +1424,7 @@ dependencies = [ [[package]] name = "deno_canvas" -version = "0.47.0" +version = "0.48.0" dependencies = [ "deno_core", "deno_webgpu", @@ -1459,16 +1459,16 @@ dependencies = [ [[package]] name = "deno_console" -version = "0.178.0" +version = "0.179.0" dependencies = [ "deno_core", ] [[package]] name = "deno_core" -version = "0.321.0" +version = "0.322.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2a54cda74cdc187d5fc2d23370a45cf09f912caf566dd1cd24a50157d809c7" +checksum = "2f593ef2b8acab8cd3ace9d50052edc65a3654fdbde808070cfa5da5cf7aaae6" dependencies = [ "anyhow", "bincode", @@ -1506,7 +1506,7 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" [[package]] name = "deno_cron" -version = "0.58.0" +version = "0.59.0" dependencies = [ "anyhow", "async-trait", @@ -1519,7 +1519,7 @@ dependencies = [ [[package]] name = "deno_crypto" -version = "0.192.0" +version = "0.193.0" dependencies = [ "aes", "aes-gcm", @@ -1587,7 +1587,7 @@ dependencies = [ [[package]] name = "deno_fetch" -version = "0.202.0" +version = "0.203.0" dependencies = [ "base64 0.21.7", "bytes", @@ -1621,7 +1621,7 @@ dependencies = [ [[package]] name = "deno_ffi" -version = "0.165.0" +version = "0.166.0" dependencies = [ "deno_core", "deno_permissions", @@ -1641,7 +1641,7 @@ dependencies = [ [[package]] name = "deno_fs" -version = "0.88.0" +version = "0.89.0" dependencies = [ "async-trait", "base32", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "deno_http" -version = "0.176.0" +version = "0.177.0" dependencies = [ "async-compression", "async-trait", @@ -1733,7 +1733,7 @@ dependencies = [ [[package]] name = "deno_io" -version = "0.88.0" +version = "0.89.0" dependencies = [ "async-trait", "deno_core", @@ -1754,7 +1754,7 @@ dependencies = [ [[package]] name = "deno_kv" -version = "0.86.0" +version = "0.87.0" dependencies = [ "anyhow", "async-trait", @@ -1827,7 +1827,7 @@ dependencies = [ [[package]] name = "deno_napi" -version = "0.109.0" +version = "0.110.0" dependencies = [ "deno_core", "deno_permissions", @@ -1855,7 +1855,7 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.170.0" +version = "0.171.0" dependencies = [ "deno_core", "deno_permissions", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "deno_node" -version = "0.115.0" +version = "0.116.0" dependencies = [ "aead-gcm-stream", "aes", @@ -1911,7 +1911,7 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-util", - "idna 0.3.0", + "idna 1.0.3", "indexmap 2.3.0", "ipnetwork", "k256", @@ -1983,9 +1983,9 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.197.0" +version = "0.198.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a8825d92301cf445727c43f17fee2a20fcdf4370004339965156ae7c56c97e" +checksum = "870826735cd9aa0376d2aadca14365b753e830e3cc16891efb9232845a6982a4" dependencies = [ "proc-macro-rules", "proc-macro2", @@ -2024,7 +2024,7 @@ dependencies = [ [[package]] name = "deno_permissions" -version = "0.38.0" +version = "0.39.0" dependencies = [ "deno_core", "deno_path_util", @@ -2042,7 +2042,7 @@ dependencies = [ [[package]] name = "deno_resolver" -version = "0.10.0" +version = "0.11.0" dependencies = [ "anyhow", "base32", @@ -2061,7 +2061,7 @@ dependencies = [ [[package]] name = "deno_runtime" -version = "0.187.0" +version = "0.188.0" dependencies = [ "async-trait", "color-print", @@ -2198,7 +2198,7 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.165.0" +version = "0.166.0" dependencies = [ "deno_core", "deno_native_certs", @@ -2247,7 +2247,7 @@ dependencies = [ [[package]] name = "deno_url" -version = "0.178.0" +version = "0.179.0" dependencies = [ "deno_bench_util", "deno_console", @@ -2259,7 +2259,7 @@ dependencies = [ [[package]] name = "deno_web" -version = "0.209.0" +version = "0.210.0" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -2281,7 +2281,7 @@ dependencies = [ [[package]] name = "deno_webgpu" -version = "0.145.0" +version = "0.146.0" dependencies = [ "deno_core", "raw-window-handle", @@ -2294,7 +2294,7 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.178.0" +version = "0.179.0" dependencies = [ "deno_bench_util", "deno_core", @@ -2302,7 +2302,7 @@ dependencies = [ [[package]] name = "deno_websocket" -version = "0.183.0" +version = "0.184.0" dependencies = [ "bytes", "deno_core", @@ -2324,7 +2324,7 @@ dependencies = [ [[package]] name = "deno_webstorage" -version = "0.173.0" +version = "0.174.0" dependencies = [ "deno_core", "deno_web", @@ -3086,9 +3086,9 @@ checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "file_test_runner" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b23dcc1b671771c6f59fdace6da685735c925f859733e8fd07fba6cae6462a" +checksum = "cf50901549edf2241e33d1715aec0575adc5510a09724877a1e0afe7ffafb0fb" dependencies = [ "anyhow", "crossbeam-channel", @@ -3982,6 +3982,124 @@ dependencies = [ "tracing", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -3990,9 +4108,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4000,12 +4118,23 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -4477,6 +4606,12 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "litrs" version = "0.4.1" @@ -4752,7 +4887,7 @@ dependencies = [ [[package]] name = "napi_sym" -version = "0.108.0" +version = "0.109.0" dependencies = [ "quote", "serde", @@ -4807,7 +4942,7 @@ dependencies = [ [[package]] name = "node_resolver" -version = "0.17.0" +version = "0.18.0" dependencies = [ "anyhow", "async-trait", @@ -6531,9 +6666,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.230.0" +version = "0.231.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a783242d2af51d6955cc04bf2b64adb643ab588b61e9573c908a69dabf8c2f" +checksum = "1a0c48b8842ebae21c52da1d978fba5c2be5991680bddfdc1a36ee0ccbc60114" dependencies = [ "num-bigint", "serde", @@ -7636,6 +7771,16 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -8048,12 +8193,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 1.0.3", "percent-encoding", "serde", ] @@ -8076,12 +8221,24 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.1" @@ -8690,6 +8847,18 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wtf8" version = "0.1.0" @@ -8880,6 +9049,28 @@ dependencies = [ "uuid", ] +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "zip" version = "2.1.6" diff --git a/Cargo.toml b/Cargo.toml index 5f66c0d44de82f..f72d3c80d3f06a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,19 +46,19 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "=0.43.3", features = ["transpiling"] } -deno_core = { version = "0.321.0" } +deno_core = { version = "0.322.0" } -deno_bench_util = { version = "0.172.0", path = "./bench_util" } +deno_bench_util = { version = "0.173.0", path = "./bench_util" } deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.2.0", features = ["module_specifier"] } deno_npm = "=0.25.4" deno_path_util = "=0.2.1" -deno_permissions = { version = "0.38.0", path = "./runtime/permissions" } -deno_runtime = { version = "0.187.0", path = "./runtime" } +deno_permissions = { version = "0.39.0", path = "./runtime/permissions" } +deno_runtime = { version = "0.188.0", path = "./runtime" } deno_semver = "=0.5.16" deno_terminal = "0.2.0" -napi_sym = { version = "0.108.0", path = "./ext/napi/sym" } +napi_sym = { version = "0.109.0", path = "./ext/napi/sym" } test_util = { package = "test_server", path = "./tests/util/server" } denokv_proto = "0.8.4" @@ -67,32 +67,32 @@ denokv_remote = "0.8.4" denokv_sqlite = { default-features = false, version = "0.8.4" } # exts -deno_broadcast_channel = { version = "0.172.0", path = "./ext/broadcast_channel" } -deno_cache = { version = "0.110.0", path = "./ext/cache" } -deno_canvas = { version = "0.47.0", path = "./ext/canvas" } -deno_console = { version = "0.178.0", path = "./ext/console" } -deno_cron = { version = "0.58.0", path = "./ext/cron" } -deno_crypto = { version = "0.192.0", path = "./ext/crypto" } -deno_fetch = { version = "0.202.0", path = "./ext/fetch" } -deno_ffi = { version = "0.165.0", path = "./ext/ffi" } -deno_fs = { version = "0.88.0", path = "./ext/fs" } -deno_http = { version = "0.176.0", path = "./ext/http" } -deno_io = { version = "0.88.0", path = "./ext/io" } -deno_kv = { version = "0.86.0", path = "./ext/kv" } -deno_napi = { version = "0.109.0", path = "./ext/napi" } -deno_net = { version = "0.170.0", path = "./ext/net" } -deno_node = { version = "0.115.0", path = "./ext/node" } -deno_tls = { version = "0.165.0", path = "./ext/tls" } -deno_url = { version = "0.178.0", path = "./ext/url" } -deno_web = { version = "0.209.0", path = "./ext/web" } -deno_webgpu = { version = "0.145.0", path = "./ext/webgpu" } -deno_webidl = { version = "0.178.0", path = "./ext/webidl" } -deno_websocket = { version = "0.183.0", path = "./ext/websocket" } -deno_webstorage = { version = "0.173.0", path = "./ext/webstorage" } +deno_broadcast_channel = { version = "0.173.0", path = "./ext/broadcast_channel" } +deno_cache = { version = "0.111.0", path = "./ext/cache" } +deno_canvas = { version = "0.48.0", path = "./ext/canvas" } +deno_console = { version = "0.179.0", path = "./ext/console" } +deno_cron = { version = "0.59.0", path = "./ext/cron" } +deno_crypto = { version = "0.193.0", path = "./ext/crypto" } +deno_fetch = { version = "0.203.0", path = "./ext/fetch" } +deno_ffi = { version = "0.166.0", path = "./ext/ffi" } +deno_fs = { version = "0.89.0", path = "./ext/fs" } +deno_http = { version = "0.177.0", path = "./ext/http" } +deno_io = { version = "0.89.0", path = "./ext/io" } +deno_kv = { version = "0.87.0", path = "./ext/kv" } +deno_napi = { version = "0.110.0", path = "./ext/napi" } +deno_net = { version = "0.171.0", path = "./ext/net" } +deno_node = { version = "0.116.0", path = "./ext/node" } +deno_tls = { version = "0.166.0", path = "./ext/tls" } +deno_url = { version = "0.179.0", path = "./ext/url" } +deno_web = { version = "0.210.0", path = "./ext/web" } +deno_webgpu = { version = "0.146.0", path = "./ext/webgpu" } +deno_webidl = { version = "0.179.0", path = "./ext/webidl" } +deno_websocket = { version = "0.184.0", path = "./ext/websocket" } +deno_webstorage = { version = "0.174.0", path = "./ext/webstorage" } # resolvers -deno_resolver = { version = "0.10.0", path = "./resolvers/deno" } -node_resolver = { version = "0.17.0", path = "./resolvers/node" } +deno_resolver = { version = "0.11.0", path = "./resolvers/deno" } +node_resolver = { version = "0.18.0", path = "./resolvers/node" } aes = "=0.8.3" anyhow = "1.0.57" @@ -200,8 +200,7 @@ tower-http = { version = "0.6.1", features = ["decompression-br", "decompression tower-lsp = { package = "deno_tower_lsp", version = "0.1.0", features = ["proposed"] } tower-service = "0.3.2" twox-hash = "=1.6.3" -# Upgrading past 2.4.1 may cause WPT failures -url = { version = "< 2.5.0", features = ["serde", "expose_internals"] } +url = { version = "2.5", features = ["serde", "expose_internals"] } uuid = { version = "1.3.0", features = ["v4"] } webpki-root-certs = "0.26.5" webpki-roots = "0.26" diff --git a/Releases.md b/Releases.md index 2cb2dfbd80c8ae..0e977d0311bc0b 100644 --- a/Releases.md +++ b/Releases.md @@ -6,6 +6,16 @@ https://github.com/denoland/deno/releases We also have one-line install commands at: https://github.com/denoland/deno_install +### 2.1.1 / 2024.11.21 + +- docs(add): clarification to add command (#26968) +- docs(doc): fix typo in doc subcommand help output (#26321) +- fix(node): regression where ts files were sometimes resolved instead of js + (#26971) +- fix(task): ensure root config always looks up dependencies in root (#26959) +- fix(watch): don't panic if there's no path provided (#26972) +- fix: Buffer global in --unstable-node-globals (#26973) + ### 2.1.0 / 2024.11.21 - feat(cli): add `--unstable-node-globals` flag (#26617) diff --git a/bench_util/Cargo.toml b/bench_util/Cargo.toml index 7bb785e6e55f87..4d39ae30e4b61b 100644 --- a/bench_util/Cargo.toml +++ b/bench_util/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_bench_util" -version = "0.172.0" +version = "0.173.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c6818848371ac4..6a1fc51bc45d8d 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.1.0" +version = "2.1.1" authors.workspace = true default-run = "deno" edition.workspace = true diff --git a/cli/args/flags.rs b/cli/args/flags.rs index a55e067ff2226b..49f2bf21858786 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1234,7 +1234,7 @@ static DENO_HELP: &str = cstr!( compile Compile the script into a self contained executable deno compile main.ts | deno compile --target=x86_64-unknown-linux-gnu coverage Print coverage reports - doc Genereate and show documentation for a module or built-ins + doc Generate and show documentation for a module or built-ins deno doc | deno doc --json | deno doc --html mod.ts fmt Format source files deno fmt | deno fmt main.ts @@ -1706,8 +1706,11 @@ fn add_subcommand() -> Command { "Add dependencies to your configuration file. deno add jsr:@std/path -You can add multiple dependencies at once: - deno add jsr:@std/path jsr:@std/assert" +You can also add npm packages: + deno add npm:react + +Or multiple dependencies at once: + deno add jsr:@std/path jsr:@std/assert npm:chalk" ), UnstableArgsConfig::None, ) @@ -3075,14 +3078,14 @@ Evaluate a task from string Arg::new("filter") .long("filter") .short('f') - .help("Filter members of the workspace by name - should be used with --recursive") + .help("Filter members of the workspace by name, implies --recursive flag") .value_parser(value_parser!(String)), ) .arg( Arg::new("eval") .long("eval") .help( - "Evaluate the passed value as if, it was a task in a configuration file", + "Evaluate the passed value as if it was a task in a configuration file", ).action(ArgAction::SetTrue) ) .arg(node_modules_dir_arg()) diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index c221a6097b92cd..ae87a9914f4501 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4454,11 +4454,7 @@ fn op_load<'s>( == NodeModuleKind::Cjs, }) }; - - lsp_warn!("op_load {} {}", &specifier, maybe_load_response.is_some()); - let serialized = serde_v8::to_v8(scope, maybe_load_response)?; - state.performance.measure(mark); Ok(serialized) } diff --git a/cli/standalone/code_cache.rs b/cli/standalone/code_cache.rs index 25b490544cf1d7..9580b9b44e16c1 100644 --- a/cli/standalone/code_cache.rs +++ b/cli/standalone/code_cache.rs @@ -42,7 +42,11 @@ impl DenoCompileCodeCache { // attempt to deserialize the cache data match deserialize(&file_path, cache_key) { Ok(data) => { - log::debug!("Loaded {} code cache entries", data.len()); + log::debug!( + "Loaded {} code cache entries from {}", + data.len(), + file_path.display() + ); Self { strategy: CodeCacheStrategy::SubsequentRun( SubsequentRunCodeCacheStrategy { @@ -53,7 +57,11 @@ impl DenoCompileCodeCache { } } Err(err) => { - log::debug!("Failed to deserialize code cache: {:#}", err); + log::debug!( + "Failed to deserialize code cache from {}: {:#}", + file_path.display(), + err + ); Self { strategy: CodeCacheStrategy::FirstRun(FirstRunCodeCacheStrategy { cache_key, @@ -186,6 +194,7 @@ impl FirstRunCodeCacheStrategy { Ok(()) => { if let Err(err) = std::fs::rename(&temp_file, &self.file_path) { log::debug!("Failed to rename code cache: {}", err); + let _ = std::fs::remove_file(&temp_file); } else { log::debug!("Serialized {} code cache entries", count); } diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs index d1084f016c9608..be7e937ee1e5b4 100644 --- a/cli/standalone/virtual_fs.rs +++ b/cli/standalone/virtual_fs.rs @@ -634,7 +634,7 @@ impl FileBackedVfsFile { } fn read_to_buf(&self, buf: &mut [u8]) -> FsResult { - let pos = { + let read_pos = { let mut pos = self.pos.lock(); let read_pos = *pos; // advance the position due to the read @@ -643,12 +643,12 @@ impl FileBackedVfsFile { }; self .vfs - .read_file(&self.file, pos, buf) + .read_file(&self.file, read_pos, buf) .map_err(|err| err.into()) } fn read_to_end(&self) -> FsResult> { - let pos = { + let read_pos = { let mut pos = self.pos.lock(); let read_pos = *pos; // todo(dsherret): should this always set it to the end of the file? @@ -658,12 +658,12 @@ impl FileBackedVfsFile { } read_pos }; - if pos > self.file.len { + if read_pos > self.file.len { return Ok(Vec::new()); } - let size = (self.file.len - pos) as usize; + let size = (self.file.len - read_pos) as usize; let mut buf = vec![0; size]; - self.vfs.read_file(&self.file, pos, &mut buf)?; + self.vfs.read_file(&self.file, read_pos, &mut buf)?; Ok(buf) } } @@ -893,8 +893,9 @@ impl FileBackedVfs { buf: &mut [u8], ) -> std::io::Result { let read_range = self.get_read_range(file, pos, buf.len() as u64)?; - buf.copy_from_slice(&self.vfs_data[read_range]); - Ok(buf.len()) + let read_len = read_range.len(); + buf[..read_len].copy_from_slice(&self.vfs_data[read_range]); + Ok(read_len) } fn get_read_range( @@ -903,15 +904,15 @@ impl FileBackedVfs { pos: u64, len: u64, ) -> std::io::Result> { - let data = &self.vfs_data; - let start = self.fs_root.start_file_offset + file.offset + pos; - let end = start + len; - if end > data.len() as u64 { + if pos > file.len { return Err(std::io::Error::new( std::io::ErrorKind::UnexpectedEof, "unexpected EOF", )); } + let file_offset = self.fs_root.start_file_offset + file.offset; + let start = file_offset + pos; + let end = file_offset + std::cmp::min(pos + len, file.len); Ok(start as usize..end as usize) } diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index 9c2c7091294125..c2c2a6bb6bf3ca 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -549,7 +549,11 @@ pub fn format_sql( // Add single new line to the end of file. formatted_str.push('\n'); - Ok(Some(formatted_str)) + Ok(if formatted_str == file_text { + None + } else { + Some(formatted_str) + }) } /// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, IPYNB or SQL file. diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index fe477a8e6cc540..df5981e6e7b85e 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -359,6 +359,7 @@ async fn install_global( // ensure the module is cached let factory = CliFactory::from_flags(flags.clone()); + let cli_options = factory.cli_options()?; let http_client = factory.http_client_provider(); let deps_http_cache = factory.global_http_cache()?; let mut deps_file_fetcher = FileFetcher::new( @@ -381,20 +382,22 @@ async fn install_global( )); let entry_text = install_flags_global.module_url.as_str(); - let req = super::registry::AddRmPackageReq::parse(entry_text); - - // found a package requirement but missing the prefix - if let Ok(Err(package_req)) = req { - if jsr_resolver.req_to_nv(&package_req).await.is_some() { - bail!( - "{entry_text} is missing a prefix. Did you mean `{}`?", - crate::colors::yellow(format!("deno install -g jsr:{package_req}")) - ); - } else if npm_resolver.req_to_nv(&package_req).await.is_some() { - bail!( - "{entry_text} is missing a prefix. Did you mean `{}`?", - crate::colors::yellow(format!("deno install -g npm:{package_req}")) - ); + if !cli_options.initial_cwd().join(entry_text).exists() { + // check for package requirement missing prefix + if let Ok(Err(package_req)) = + super::registry::AddRmPackageReq::parse(entry_text) + { + if jsr_resolver.req_to_nv(&package_req).await.is_some() { + bail!( + "{entry_text} is missing a prefix. Did you mean `{}`?", + crate::colors::yellow(format!("deno install -g jsr:{package_req}")) + ); + } else if npm_resolver.req_to_nv(&package_req).await.is_some() { + bail!( + "{entry_text} is missing a prefix. Did you mean `{}`?", + crate::colors::yellow(format!("deno install -g npm:{package_req}")) + ); + } } } diff --git a/cli/tools/task.rs b/cli/tools/task.rs index b0c290adc0fcf2..478853f4e64f61 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -12,6 +12,7 @@ use deno_config::workspace::FolderConfigs; use deno_config::workspace::TaskDefinition; use deno_config::workspace::TaskOrScript; use deno_config::workspace::WorkspaceDirectory; +use deno_config::workspace::WorkspaceMemberTasksConfig; use deno_config::workspace::WorkspaceTasksConfig; use deno_core::anyhow::anyhow; use deno_core::anyhow::bail; @@ -270,11 +271,7 @@ impl<'a> TaskRunner<'a> { pkg_tasks_config: &PackageTaskInfo, ) -> Result { match sort_tasks_topo(pkg_tasks_config) { - Ok(sorted) => { - self - .run_tasks_in_parallel(&pkg_tasks_config.tasks_config, sorted) - .await - } + Ok(sorted) => self.run_tasks_in_parallel(sorted).await, Err(err) => match err { TaskError::NotFound(name) => { if self.task_flags.is_run { @@ -308,64 +305,62 @@ impl<'a> TaskRunner<'a> { async fn run_tasks_in_parallel( &self, - tasks_config: &WorkspaceTasksConfig, - task_names: Vec, + tasks: Vec>, ) -> Result { - struct PendingTasksContext { - completed: HashSet, - running: HashSet, - task_names: Vec, + struct PendingTasksContext<'a> { + completed: HashSet, + running: HashSet, + tasks: &'a [ResolvedTask<'a>], } - impl PendingTasksContext { + impl<'a> PendingTasksContext<'a> { fn has_remaining_tasks(&self) -> bool { - self.completed.len() < self.task_names.len() + self.completed.len() < self.tasks.len() } - fn mark_complete(&mut self, task_name: String) { - self.running.remove(&task_name); - self.completed.insert(task_name); + fn mark_complete(&mut self, task: &ResolvedTask) { + self.running.remove(&task.id); + self.completed.insert(task.id); } - fn get_next_task<'a>( + fn get_next_task<'b>( &mut self, - runner: &'a TaskRunner<'a>, - tasks_config: &'a WorkspaceTasksConfig, - ) -> Option>> { - for name in &self.task_names { - if self.completed.contains(name) || self.running.contains(name) { + runner: &'b TaskRunner<'b>, + ) -> Option< + LocalBoxFuture<'b, Result<(i32, &'a ResolvedTask<'a>), AnyError>>, + > + where + 'a: 'b, + { + for task in self.tasks.iter() { + if self.completed.contains(&task.id) + || self.running.contains(&task.id) + { continue; } - let Some((folder_url, task_or_script)) = tasks_config.task(name) - else { - continue; - }; - let should_run = match task_or_script { - TaskOrScript::Task(_, def) => def - .dependencies - .iter() - .all(|dep| self.completed.contains(dep)), - TaskOrScript::Script(_, _) => true, - }; - + let should_run = task + .dependencies + .iter() + .all(|dep_id| self.completed.contains(dep_id)); if !should_run { continue; } - self.running.insert(name.clone()); - let name = name.clone(); + self.running.insert(task.id); return Some( async move { - match task_or_script { + match task.task_or_script { TaskOrScript::Task(_, def) => { - runner.run_deno_task(folder_url, &name, def).await + runner.run_deno_task(task.folder_url, task.name, def).await } TaskOrScript::Script(scripts, _) => { - runner.run_npm_script(folder_url, &name, scripts).await + runner + .run_npm_script(task.folder_url, task.name, scripts) + .await } } - .map(|exit_code| (exit_code, name)) + .map(|exit_code| (exit_code, task)) } .boxed_local(), ); @@ -375,16 +370,16 @@ impl<'a> TaskRunner<'a> { } let mut context = PendingTasksContext { - completed: HashSet::with_capacity(task_names.len()), + completed: HashSet::with_capacity(tasks.len()), running: HashSet::with_capacity(self.concurrency), - task_names, + tasks: &tasks, }; let mut queue = futures_unordered::FuturesUnordered::new(); while context.has_remaining_tasks() { while queue.len() < self.concurrency { - if let Some(task) = context.get_next_task(self, tasks_config) { + if let Some(task) = context.get_next_task(self) { queue.push(task); } else { break; @@ -393,7 +388,7 @@ impl<'a> TaskRunner<'a> { // If queue is empty at this point, then there are no more tasks in the queue. let Some(result) = queue.next().await else { - debug_assert_eq!(context.task_names.len(), 0); + debug_assert_eq!(context.tasks.len(), 0); break; }; @@ -521,46 +516,105 @@ enum TaskError { TaskDepCycle { path: Vec }, } -fn sort_tasks_topo( - pkg_task_config: &PackageTaskInfo, -) -> Result, TaskError> { +struct ResolvedTask<'a> { + id: usize, + name: &'a str, + folder_url: &'a Url, + task_or_script: TaskOrScript<'a>, + dependencies: Vec, +} + +fn sort_tasks_topo<'a>( + pkg_task_config: &'a PackageTaskInfo, +) -> Result>, TaskError> { + trait TasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)>; + } + + impl TasksConfig for WorkspaceTasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)> { + if let Some(member) = &self.member { + if let Some((dir_url, task_or_script)) = member.task(name) { + return Some((dir_url, task_or_script, self as &dyn TasksConfig)); + } + } + if let Some(root) = &self.root { + if let Some((dir_url, task_or_script)) = root.task(name) { + // switch to only using the root tasks for the dependencies + return Some((dir_url, task_or_script, root as &dyn TasksConfig)); + } + } + None + } + } + + impl TasksConfig for WorkspaceMemberTasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)> { + self.task(name).map(|(dir_url, task_or_script)| { + (dir_url, task_or_script, self as &dyn TasksConfig) + }) + } + } + fn sort_visit<'a>( name: &'a str, - sorted: &mut Vec, - mut path: Vec<&'a str>, - tasks_config: &'a WorkspaceTasksConfig, - ) -> Result<(), TaskError> { - // Already sorted - if sorted.iter().any(|sorted_name| sorted_name == name) { - return Ok(()); + sorted: &mut Vec>, + mut path: Vec<(&'a Url, &'a str)>, + tasks_config: &'a dyn TasksConfig, + ) -> Result { + let Some((folder_url, task_or_script, tasks_config)) = + tasks_config.task(name) + else { + return Err(TaskError::NotFound(name.to_string())); + }; + + if let Some(existing_task) = sorted + .iter() + .find(|task| task.name == name && task.folder_url == folder_url) + { + // already exists + return Ok(existing_task.id); } - // Graph has a cycle - if path.contains(&name) { - path.push(name); + if path.contains(&(folder_url, name)) { + path.push((folder_url, name)); return Err(TaskError::TaskDepCycle { - path: path.iter().map(|s| s.to_string()).collect(), + path: path.iter().map(|(_, s)| s.to_string()).collect(), }); } - let Some((_, task_or_script)) = tasks_config.task(name) else { - return Err(TaskError::NotFound(name.to_string())); - }; - + let mut dependencies: Vec = Vec::new(); if let TaskOrScript::Task(_, task) = task_or_script { + dependencies.reserve(task.dependencies.len()); for dep in &task.dependencies { let mut path = path.clone(); - path.push(name); - sort_visit(dep, sorted, path, tasks_config)? + path.push((folder_url, name)); + dependencies.push(sort_visit(dep, sorted, path, tasks_config)?); } } - sorted.push(name.to_string()); + let id = sorted.len(); + sorted.push(ResolvedTask { + id, + name, + folder_url, + task_or_script, + dependencies, + }); - Ok(()) + Ok(id) } - let mut sorted: Vec = vec![]; + let mut sorted: Vec> = vec![]; for name in &pkg_task_config.matched_tasks { sort_visit(name, &mut sorted, Vec::new(), &pkg_task_config.tasks_config)?; diff --git a/cli/util/file_watcher.rs b/cli/util/file_watcher.rs index eb3fb8c6029c21..b9318a6e4bd612 100644 --- a/cli/util/file_watcher.rs +++ b/cli/util/file_watcher.rs @@ -185,9 +185,11 @@ impl WatcherCommunicator { pub fn show_path_changed(&self, changed_paths: Option>) { if let Some(paths) = changed_paths { - self.print( - format!("Restarting! File change detected: {:?}", paths[0]).to_string(), - ) + if !paths.is_empty() { + self.print(format!("Restarting! File change detected: {:?}", paths[0])) + } else { + self.print("Restarting! File change detected.".to_string()) + } } } } diff --git a/cli/util/path.rs b/cli/util/path.rs index 58bed664f9ba98..173f357c087f42 100644 --- a/cli/util/path.rs +++ b/cli/util/path.rs @@ -27,7 +27,16 @@ pub fn is_importable_ext(path: &Path) -> bool { if let Some(ext) = get_extension(path) { matches!( ext.as_str(), - "ts" | "tsx" | "js" | "jsx" | "mjs" | "mts" | "cjs" | "cts" | "json" + "ts" + | "tsx" + | "js" + | "jsx" + | "mjs" + | "mts" + | "cjs" + | "cts" + | "json" + | "wasm" ) } else { false @@ -222,6 +231,7 @@ mod test { assert!(is_script_ext(Path::new("foo.cjs"))); assert!(is_script_ext(Path::new("foo.cts"))); assert!(!is_script_ext(Path::new("foo.json"))); + assert!(!is_script_ext(Path::new("foo.wasm"))); assert!(!is_script_ext(Path::new("foo.mjsx"))); } @@ -243,6 +253,7 @@ mod test { assert!(is_importable_ext(Path::new("foo.cjs"))); assert!(is_importable_ext(Path::new("foo.cts"))); assert!(is_importable_ext(Path::new("foo.json"))); + assert!(is_importable_ext(Path::new("foo.wasm"))); assert!(!is_importable_ext(Path::new("foo.mjsx"))); } diff --git a/ext/broadcast_channel/Cargo.toml b/ext/broadcast_channel/Cargo.toml index b92b1c7beb3fdf..e7c3f584b61fbe 100644 --- a/ext/broadcast_channel/Cargo.toml +++ b/ext/broadcast_channel/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_broadcast_channel" -version = "0.172.0" +version = "0.173.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cache/Cargo.toml b/ext/cache/Cargo.toml index c79024e82c16a0..9005bf5b24418f 100644 --- a/ext/cache/Cargo.toml +++ b/ext/cache/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cache" -version = "0.110.0" +version = "0.111.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/canvas/Cargo.toml b/ext/canvas/Cargo.toml index 8fcb2c4a9c8e19..5dca4424376b8b 100644 --- a/ext/canvas/Cargo.toml +++ b/ext/canvas/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_canvas" -version = "0.47.0" +version = "0.48.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/console/Cargo.toml b/ext/console/Cargo.toml index 9f925ac61b316d..1d76390b6e02d4 100644 --- a/ext/console/Cargo.toml +++ b/ext/console/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_console" -version = "0.178.0" +version = "0.179.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cron/Cargo.toml b/ext/cron/Cargo.toml index 23ac77d5eda371..d1809da1354ca0 100644 --- a/ext/cron/Cargo.toml +++ b/ext/cron/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cron" -version = "0.58.0" +version = "0.59.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/crypto/Cargo.toml b/ext/crypto/Cargo.toml index 4a44314221f9fe..dfb81c62a32604 100644 --- a/ext/crypto/Cargo.toml +++ b/ext/crypto/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_crypto" -version = "0.192.0" +version = "0.193.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fetch/Cargo.toml b/ext/fetch/Cargo.toml index 9ebd9ec03f2006..90b1b152d95778 100644 --- a/ext/fetch/Cargo.toml +++ b/ext/fetch/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fetch" -version = "0.202.0" +version = "0.203.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml index e63d22e57dc9ac..2f0813a58b9674 100644 --- a/ext/ffi/Cargo.toml +++ b/ext/ffi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_ffi" -version = "0.165.0" +version = "0.166.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fs/Cargo.toml b/ext/fs/Cargo.toml index f37d1f699796ca..1d7d5d3d9aabed 100644 --- a/ext/fs/Cargo.toml +++ b/ext/fs/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fs" -version = "0.88.0" +version = "0.89.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/http/Cargo.toml b/ext/http/Cargo.toml index 5105b47ddef6e8..5dc3cd9a7b83c0 100644 --- a/ext/http/Cargo.toml +++ b/ext/http/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_http" -version = "0.176.0" +version = "0.177.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/io/Cargo.toml b/ext/io/Cargo.toml index 8f7c0e197a7df7..caaf67ab0b6b35 100644 --- a/ext/io/Cargo.toml +++ b/ext/io/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_io" -version = "0.88.0" +version = "0.89.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/kv/Cargo.toml b/ext/kv/Cargo.toml index 870e4fec3b69d1..972aabfbb7cdb7 100644 --- a/ext/kv/Cargo.toml +++ b/ext/kv/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_kv" -version = "0.86.0" +version = "0.87.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/Cargo.toml b/ext/napi/Cargo.toml index 19f4036a886e3a..f9a1f73007ba5a 100644 --- a/ext/napi/Cargo.toml +++ b/ext/napi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_napi" -version = "0.109.0" +version = "0.110.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/sym/Cargo.toml b/ext/napi/sym/Cargo.toml index 83107782b814c5..74d7b450ba67a0 100644 --- a/ext/napi/sym/Cargo.toml +++ b/ext/napi/sym/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "napi_sym" -version = "0.108.0" +version = "0.109.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/net/Cargo.toml b/ext/net/Cargo.toml index 1cb109dd2182e1..8669f650e3f708 100644 --- a/ext/net/Cargo.toml +++ b/ext/net/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_net" -version = "0.170.0" +version = "0.171.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index 3502d3b5f851d1..5e47a74e1dc352 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_node" -version = "0.115.0" +version = "0.116.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -54,7 +54,7 @@ http.workspace = true http-body-util.workspace = true hyper.workspace = true hyper-util.workspace = true -idna = "0.3.0" +idna = "1.0.3" indexmap.workspace = true ipnetwork = "0.20.0" k256 = "0.13.1" diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index db032014c2d07b..df73cad6b7ddc2 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -1060,22 +1060,39 @@ Module.prototype._compile = function (content, filename, format) { return result; }; -Module._extensions[".js"] = - Module._extensions[".ts"] = - Module._extensions[".jsx"] = - Module._extensions[".tsx"] = - function (module, filename) { - const content = op_require_read_file(filename); - const format = op_require_is_maybe_cjs(filename) ? undefined : "module"; - module._compile(content, filename, format); - }; - -Module._extensions[".cjs"] = - Module._extensions[".cts"] = - function (module, filename) { - const content = op_require_read_file(filename); - module._compile(content, filename, "commonjs"); - }; +Module._extensions[".js"] = function (module, filename) { + // We don't define everything on Module.extensions in + // order to prevent probing for these files + if ( + StringPrototypeEndsWith(filename, ".js") || + StringPrototypeEndsWith(filename, ".ts") || + StringPrototypeEndsWith(filename, ".jsx") || + StringPrototypeEndsWith(filename, ".tsx") + ) { + return loadMaybeCjs(module, filename); + } else if (StringPrototypeEndsWith(filename, ".mts")) { + return loadESMFromCJS(module, filename); + } else if (StringPrototypeEndsWith(filename, ".cts")) { + return loadCjs(module, filename); + } else { + return loadMaybeCjs(module, filename); + } +}; + +Module._extensions[".cjs"] = loadCjs; +Module._extensions[".mjs"] = loadESMFromCJS; +Module._extensions[".wasm"] = loadESMFromCJS; + +function loadMaybeCjs(module, filename) { + const content = op_require_read_file(filename); + const format = op_require_is_maybe_cjs(filename) ? undefined : "module"; + module._compile(content, filename, format); +} + +function loadCjs(module, filename) { + const content = op_require_read_file(filename); + module._compile(content, filename, "commonjs"); +} function loadESMFromCJS(module, filename, code) { const namespace = op_import_sync( @@ -1086,11 +1103,6 @@ function loadESMFromCJS(module, filename, code) { module.exports = namespace; } -Module._extensions[".mjs"] = - Module._extensions[".mts"] = - Module._extensions[".wasm"] = - loadESMFromCJS; - function stripBOM(content) { if (StringPrototypeCharCodeAt(content, 0) === 0xfeff) { content = StringPrototypeSlice(content, 1); diff --git a/ext/node/polyfills/_fs/_fs_readFile.ts b/ext/node/polyfills/_fs/_fs_readFile.ts index cf7e0305d82100..029e57c5029e0c 100644 --- a/ext/node/polyfills/_fs/_fs_readFile.ts +++ b/ext/node/polyfills/_fs/_fs_readFile.ts @@ -88,7 +88,7 @@ export function readFile( } const buffer = maybeDecode(data, encoding); (cb as BinaryCallback)(null, buffer); - }, (err) => cb && cb(denoErrorToNodeError(err))); + }, (err) => cb && cb(denoErrorToNodeError(err, { path, syscall: "open" }))); } } @@ -122,7 +122,7 @@ export function readFileSync( try { data = Deno.readFileSync(path); } catch (err) { - throw denoErrorToNodeError(err); + throw denoErrorToNodeError(err, { path, syscall: "open" }); } const encoding = getEncoding(opt); if (encoding && encoding !== "binary") { diff --git a/ext/tls/Cargo.toml b/ext/tls/Cargo.toml index 81d28d44212247..6b4bc98909a930 100644 --- a/ext/tls/Cargo.toml +++ b/ext/tls/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_tls" -version = "0.165.0" +version = "0.166.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/url/Cargo.toml b/ext/url/Cargo.toml index 2b390e8b07c9a4..e2ea7dae581f8b 100644 --- a/ext/url/Cargo.toml +++ b/ext/url/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_url" -version = "0.178.0" +version = "0.179.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml index c00298991b9dce..f56f21b72f6178 100644 --- a/ext/web/Cargo.toml +++ b/ext/web/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_web" -version = "0.209.0" +version = "0.210.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webgpu/Cargo.toml b/ext/webgpu/Cargo.toml index 73541ba6a2c754..93be59b734c31a 100644 --- a/ext/webgpu/Cargo.toml +++ b/ext/webgpu/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webgpu" -version = "0.145.0" +version = "0.146.0" authors = ["the Deno authors"] edition.workspace = true license = "MIT" diff --git a/ext/webidl/Cargo.toml b/ext/webidl/Cargo.toml index 9f6fdc49437224..9bf65335c04871 100644 --- a/ext/webidl/Cargo.toml +++ b/ext/webidl/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webidl" -version = "0.178.0" +version = "0.179.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index 468999b95dda62..78572f5f002fab 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -330,10 +330,14 @@ class WebSocket extends EventTarget { webidl.requiredArguments(arguments.length, 1, prefix); data = webidl.converters.WebSocketSend(data, prefix, "Argument 1"); - if (this[_readyState] !== OPEN) { + if (this[_readyState] === CONNECTING) { throw new DOMException("'readyState' not OPEN", "InvalidStateError"); } + if (this[_readyState] !== OPEN) { + return; + } + if (this[_sendQueue].length === 0) { // Fast path if the send queue is empty, for example when only synchronous // data is being sent. diff --git a/ext/websocket/Cargo.toml b/ext/websocket/Cargo.toml index bdbc1694353ca1..d6177dada0f39a 100644 --- a/ext/websocket/Cargo.toml +++ b/ext/websocket/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_websocket" -version = "0.183.0" +version = "0.184.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webstorage/Cargo.toml b/ext/webstorage/Cargo.toml index 928844c5aaa16c..580eb95e2fe074 100644 --- a/ext/webstorage/Cargo.toml +++ b/ext/webstorage/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webstorage" -version = "0.173.0" +version = "0.174.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml index 0de8b31b38d558..b2c4bd2384ccb7 100644 --- a/resolvers/deno/Cargo.toml +++ b/resolvers/deno/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_resolver" -version = "0.10.0" +version = "0.11.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/node/Cargo.toml b/resolvers/node/Cargo.toml index 7f914479ad553c..fb302705730a04 100644 --- a/resolvers/node/Cargo.toml +++ b/resolvers/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "node_resolver" -version = "0.17.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index d4c41b831fe3c9..94fe4ce02bd2ac 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_runtime" -version = "0.187.0" +version = "0.188.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/js/98_global_scope_shared.js b/runtime/js/98_global_scope_shared.js index f8e76b7ce7e981..c01bde6fad68f6 100644 --- a/runtime/js/98_global_scope_shared.js +++ b/runtime/js/98_global_scope_shared.js @@ -32,7 +32,7 @@ import { DOMException } from "ext:deno_web/01_dom_exception.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; import * as imageData from "ext:deno_web/16_image_data.js"; import process from "node:process"; -import Buffer from "node:buffer"; +import { Buffer } from "node:buffer"; import { clearImmediate, setImmediate } from "node:timers"; import { loadWebGPU } from "ext:deno_webgpu/00_init.js"; import * as webgpuSurface from "ext:deno_webgpu/02_surface.js"; diff --git a/runtime/permissions/Cargo.toml b/runtime/permissions/Cargo.toml index 1e7133de6ddb48..efbc657055f23c 100644 --- a/runtime/permissions/Cargo.toml +++ b/runtime/permissions/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_permissions" -version = "0.38.0" +version = "0.39.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/tests/Cargo.toml b/tests/Cargo.toml index ede509e38095b2..31cc022ce26ca0 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -45,7 +45,7 @@ deno_semver.workspace = true deno_terminal.workspace = true deno_tls.workspace = true fastwebsockets = { workspace = true, features = ["upgrade", "unstable-split"] } -file_test_runner = "0.7.2" +file_test_runner = "0.7.3" flaky_test = "=0.2.2" hickory-client = "=0.24" hickory-server = "=0.24" diff --git a/tests/integration/flags_tests.rs b/tests/integration/flags_tests.rs index 663da363da88a2..e233ca5baf4b40 100644 --- a/tests/integration/flags_tests.rs +++ b/tests/integration/flags_tests.rs @@ -24,7 +24,7 @@ fn help_output() { "Type-check the dependencies", "Compile the script into a self contained executable", "Print coverage reports", - "Genereate and show documentation for a module or built-ins", + "Generate and show documentation for a module or built-ins", "Format source files", "Show info about cache or info related to source file", "Deno kernel for Jupyter notebooks", diff --git a/tests/registry/npm/cli.ts/registry.json b/tests/registry/npm/cli.ts/registry.json new file mode 100644 index 00000000000000..d58dc8537820a5 --- /dev/null +++ b/tests/registry/npm/cli.ts/registry.json @@ -0,0 +1,32 @@ +{ + "name": "cli.ts", + "description": "Package with name like a file path", + "dist-tags": { + "latest": "2.2.0" + }, + "versions": { + "2.2.0": { + "name": "cli.ts", + "version": "2.2.0", + "description": "Package with name like a file path", + "license": "MIT", + "author": {}, + "engines": { + "node": ">=6" + }, + "gitHead": "91440c5a1615354fb9419354650937c434eb9f49", + "_id": "cli.ts@2.2.0", + "_nodeVersion": "10.16.0", + "_npmVersion": "6.9.0", + "dist": { + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "shasum": "ee8472dbb129e727b31e8a10a427dee9dfe4008b", + "tarball": "http://localhost:4260/cli.ts/cli.ts-2.2.0.tgz", + "fileCount": 5, + "unpackedSize": 5508 + }, + "directories": {}, + "_hasShrinkwrap": false + } + } +} diff --git a/tests/specs/compile/include/buffered_reads/__test__.jsonc b/tests/specs/compile/include/buffered_reads/__test__.jsonc new file mode 100644 index 00000000000000..7640fed56b4565 --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/__test__.jsonc @@ -0,0 +1,27 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run -A setup.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "args": "compile --allow-read=data --include data --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "[WILDCARD]", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include data --output main.exe main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "[WILDCARD]", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/buffered_reads/main.ts b/tests/specs/compile/include/buffered_reads/main.ts new file mode 100644 index 00000000000000..7f78eab612ddeb --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/main.ts @@ -0,0 +1,57 @@ +// buffer larger than file +{ + using file = Deno.openSync(import.meta.dirname + "/data/1.txt"); + const data = new Uint8Array(13); + const len = file.readSync(data); + if (len !== 13) { + throw new Error("Unexpected read length"); + } + if (file.readSync(new Uint8Array(1024)) !== null) { + throw new Error("Unexpected."); + } + const textData = new TextDecoder().decode(data); + if (textData !== "Hello, world!") { + throw new Error("Unexpected file data (1): " + textData); + } +} + +// buffer smaller than file +{ + using file = Deno.openSync(import.meta.dirname + "/data/1.txt"); + const finalData = new Uint8Array(13); + const data = new Uint8Array(2); + let pos = 0; + while (true) { + const len = file.readSync(data); + if (len === 0 || len == null) { + break; + } + finalData.set(data.subarray(0, len), pos); + pos += len; + } + const textData = new TextDecoder().decode(finalData); + if (textData !== "Hello, world!") { + throw new Error("Unexpected file data (2): " + textData); + } +} + +// large amount of data, small reads +{ + const bytes = new Uint8Array((1024 ** 2) * 20); + using file = Deno.openSync(import.meta.dirname + "/data/2.dat"); + const buffer = new Uint8Array(2); + let pos = 0; + while (true) { + const len = file.readSync(buffer); + if (len === 0 || len == null) { + break; + } + bytes.set(buffer.subarray(0, len), pos); + pos += len; + } + for (let i = 0; i < bytes.length; i++) { + if (bytes[i] !== i % 256) { + throw new Error("Unexpected data."); + } + } +} diff --git a/tests/specs/compile/include/buffered_reads/setup.js b/tests/specs/compile/include/buffered_reads/setup.js new file mode 100644 index 00000000000000..39cd5cb8b0d058 --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/setup.js @@ -0,0 +1,7 @@ +Deno.mkdirSync("data"); +Deno.writeTextFileSync("data/1.txt", "Hello, world!"); +const bytes = new Uint8Array((1024 ** 2) * 20); +for (let i = 0; i < bytes.length; i++) { + bytes[i] = i % 256; +} +Deno.writeFileSync("data/2.dat", bytes); diff --git a/tests/specs/compile/include_data_files/__test__.jsonc b/tests/specs/compile/include/data_files/__test__.jsonc similarity index 100% rename from tests/specs/compile/include_data_files/__test__.jsonc rename to tests/specs/compile/include/data_files/__test__.jsonc diff --git a/tests/specs/compile/include_data_files/data-file.txt b/tests/specs/compile/include/data_files/data-file.txt similarity index 100% rename from tests/specs/compile/include_data_files/data-file.txt rename to tests/specs/compile/include/data_files/data-file.txt diff --git a/tests/specs/compile/include_data_files/main.js b/tests/specs/compile/include/data_files/main.js similarity index 100% rename from tests/specs/compile/include_data_files/main.js rename to tests/specs/compile/include/data_files/main.js diff --git a/tests/specs/compile/include_data_files/non_existent.out b/tests/specs/compile/include/data_files/non_existent.out similarity index 100% rename from tests/specs/compile/include_data_files/non_existent.out rename to tests/specs/compile/include/data_files/non_existent.out diff --git a/tests/specs/compile/include_data_files/output.out b/tests/specs/compile/include/data_files/output.out similarity index 100% rename from tests/specs/compile/include_data_files/output.out rename to tests/specs/compile/include/data_files/output.out diff --git a/tests/specs/compile/include_folder/__test__.jsonc b/tests/specs/compile/include/folder/__test__.jsonc similarity index 100% rename from tests/specs/compile/include_folder/__test__.jsonc rename to tests/specs/compile/include/folder/__test__.jsonc diff --git a/tests/specs/compile/include_folder/data/a.txt b/tests/specs/compile/include/folder/data/a.txt similarity index 100% rename from tests/specs/compile/include_folder/data/a.txt rename to tests/specs/compile/include/folder/data/a.txt diff --git a/tests/specs/compile/include_folder/data/b.txt b/tests/specs/compile/include/folder/data/b.txt similarity index 100% rename from tests/specs/compile/include_folder/data/b.txt rename to tests/specs/compile/include/folder/data/b.txt diff --git a/tests/specs/compile/include_folder/main.js b/tests/specs/compile/include/folder/main.js similarity index 100% rename from tests/specs/compile/include_folder/main.js rename to tests/specs/compile/include/folder/main.js diff --git a/tests/specs/compile/include_folder/output.out b/tests/specs/compile/include/folder/output.out similarity index 100% rename from tests/specs/compile/include_folder/output.out rename to tests/specs/compile/include/folder/output.out diff --git a/tests/specs/doc/invalid_url/invalid_url.out b/tests/specs/doc/invalid_url/invalid_url.out index 038c53177a336c..17974318c7f019 100644 --- a/tests/specs/doc/invalid_url/invalid_url.out +++ b/tests/specs/doc/invalid_url/invalid_url.out @@ -1,4 +1,4 @@ error: Invalid URL 'https://raw.githubusercontent.com%2Fdyedgreen%2Fdeno-sqlite%2Frework_api%2Fmod.ts' Caused by: - invalid domain character + invalid international domain name diff --git a/tests/specs/fmt/sql/__test__.jsonc b/tests/specs/fmt/sql/__test__.jsonc index a335e79c24d971..27c08abd835346 100644 --- a/tests/specs/fmt/sql/__test__.jsonc +++ b/tests/specs/fmt/sql/__test__.jsonc @@ -7,7 +7,7 @@ }, "flag": { "args": "fmt --unstable-sql", - "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]well_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 7 files\n" + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 7 files\n" }, "config_file": { "steps": [{ @@ -18,8 +18,12 @@ "output": "[WILDCARD]" }, { "args": "fmt", - "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]well_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 8 files\n" + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 8 files\n" }] + }, + "well_formatted_check": { + "args": "fmt --unstable-sql --check well_formatted.sql", + "output": "Checked 1 file\n" } } } diff --git a/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc b/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc new file mode 100644 index 00000000000000..980361361a8c32 --- /dev/null +++ b/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc @@ -0,0 +1,20 @@ +{ + "tempDir": true, + "tests": { + "file_exists": { + "steps": [{ + "args": ["eval", "Deno.writeTextFileSync('cli.ts', '')"], + "output": "[WILDCARD]" + }, { + // success + "args": "install --root ./bins -g --name my-cli cli.ts", + "output": "[WILDCARD]" + }] + }, + "file_not_exists": { + "args": "install --root ./bins -g --name my-cli cli.ts", + "output": "file_not_exists.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out b/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out new file mode 100644 index 00000000000000..92a0bb8dcd7c62 --- /dev/null +++ b/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out @@ -0,0 +1 @@ +error: cli.ts is missing a prefix. Did you mean `deno install -g npm:cli.ts`? diff --git a/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc b/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc new file mode 100644 index 00000000000000..689f6e1f41512e --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run index.js", + "output": "Hi\nWasm\nJSON\n" +} diff --git a/tests/specs/npm/pkg_index_ts_and_js/index.js b/tests/specs/npm/pkg_index_ts_and_js/index.js new file mode 100644 index 00000000000000..c6ef1486e6f64b --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/index.js @@ -0,0 +1 @@ +import "package"; diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js new file mode 100644 index 00000000000000..4c83afcf50ad8e --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js @@ -0,0 +1,3 @@ +require("./subdir"); +require("./wasm"); +require("./json"); diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js new file mode 100644 index 00000000000000..e998adfbdcc3b4 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js @@ -0,0 +1 @@ +console.log("JSON"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json new file mode 100644 index 00000000000000..0967ef424bce67 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json @@ -0,0 +1 @@ +{} diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json new file mode 100644 index 00000000000000..028ddbb95b53eb --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json @@ -0,0 +1,3 @@ +{ + "name": "package" +} \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js new file mode 100644 index 00000000000000..1b8b5ee92b1f68 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js @@ -0,0 +1 @@ +console.log("Hi") \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts new file mode 100644 index 00000000000000..e9cffd2de027b4 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts @@ -0,0 +1 @@ +console.log("No"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js new file mode 100644 index 00000000000000..9174e5fd65b085 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js @@ -0,0 +1 @@ +console.log("Wasm"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm new file mode 100644 index 00000000000000..6b3950fcc5297b Binary files /dev/null and b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm differ diff --git a/tests/specs/npm/pkg_index_ts_and_js/package.json b/tests/specs/npm/pkg_index_ts_and_js/package.json new file mode 100644 index 00000000000000..f0b3ee21dd5975 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "package": "*" + } +} diff --git a/tests/specs/run/unstable/node_globals.out b/tests/specs/run/unstable/node_globals.out index 77045c7cbd785d..8262ace2712274 100644 --- a/tests/specs/run/unstable/node_globals.out +++ b/tests/specs/run/unstable/node_globals.out @@ -1,4 +1,10 @@ global: true -Buffer: true +Buffer: function from( + value, + encodingOrOffset, + length, +) { + return _from(value, encodingOrOffset, length); +} setImmediate: true clearImmediate: true diff --git a/tests/specs/run/unstable/node_globals.ts b/tests/specs/run/unstable/node_globals.ts index 706b7eb6549ed1..3a000ea3417f61 100644 --- a/tests/specs/run/unstable/node_globals.ts +++ b/tests/specs/run/unstable/node_globals.ts @@ -2,6 +2,6 @@ import * as nodeBuffer from "node:buffer"; import * as nodeTimers from "node:timers"; console.log(`global: ${globalThis === global}`); -console.log(`Buffer: ${Buffer === nodeBuffer.default}`); +console.log(`Buffer: ${Buffer.from}`); console.log(`setImmediate: ${setImmediate === nodeTimers.setImmediate}`); console.log(`clearImmediate: ${clearImmediate === nodeTimers.clearImmediate}`); diff --git a/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc new file mode 100644 index 00000000000000..55f16ed0c2eee1 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tests": { + "run": { + "args": "run main.js", + "output": "main.out" + }, + "check": { + "args": "check check.ts", + "output": "check.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/run/wasm_module/table_global_memory/check.out b/tests/specs/run/wasm_module/table_global_memory/check.out new file mode 100644 index 00000000000000..e335a7c9070ba8 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/check.out @@ -0,0 +1,14 @@ +Check file:///[WILDLINE]/check.ts +error: TS2322 [ERROR]: Type 'Function | null' is not assignable to type 'number'. + Type 'null' is not assignable to type 'number'. +const value1: number = table.get(0); + ~~~~~~ + at file:///[WILDLINE]/check.ts:2:7 + +TS2322 [ERROR]: Type 'ArrayBuffer | SharedArrayBuffer' is not assignable to type 'number'. + Type 'ArrayBuffer' is not assignable to type 'number'. +const value2: number = memory.buffer; + ~~~~~~ + at file:///[WILDLINE]/check.ts:3:7 + +Found 2 errors. diff --git a/tests/specs/run/wasm_module/table_global_memory/check.ts b/tests/specs/run/wasm_module/table_global_memory/check.ts new file mode 100644 index 00000000000000..c0e43ed2aa380d --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/check.ts @@ -0,0 +1,4 @@ +import { memory, table } from "./mod.wasm"; +const value1: number = table.get(0); +const value2: number = memory.buffer; +console.log(value1, value2); diff --git a/tests/specs/run/wasm_module/table_global_memory/main.js b/tests/specs/run/wasm_module/table_global_memory/main.js new file mode 100644 index 00000000000000..a5ff412a922246 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/main.js @@ -0,0 +1,2 @@ +import * as wasm from "./mod.wasm"; +console.log(wasm); diff --git a/tests/specs/run/wasm_module/table_global_memory/main.out b/tests/specs/run/wasm_module/table_global_memory/main.out new file mode 100644 index 00000000000000..c095b0dd9298d2 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/main.out @@ -0,0 +1,6 @@ +[Module: null prototype] { + func: [Function: 0], + global: Global [WebAssembly.Global] {}, + memory: Memory [WebAssembly.Memory] {}, + table: Table [WebAssembly.Table] {} +} diff --git a/tests/specs/run/wasm_module/table_global_memory/mod.wasm b/tests/specs/run/wasm_module/table_global_memory/mod.wasm new file mode 100644 index 00000000000000..a99e01c5dc23e9 Binary files /dev/null and b/tests/specs/run/wasm_module/table_global_memory/mod.wasm differ diff --git a/tests/specs/run/wasm_module/table_global_memory/mod.wat b/tests/specs/run/wasm_module/table_global_memory/mod.wat new file mode 100644 index 00000000000000..d2a92f0ac1518b --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/mod.wat @@ -0,0 +1,6 @@ +(module + (func (export "func") unreachable) + (table (export "table") 0 funcref) + (memory (export "memory") 0) + (global (export "global") i32 i32.const 0) +) diff --git a/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc b/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc new file mode 100644 index 00000000000000..073210358209a1 --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "task a", + "cwd": "member", + "output": "task.out" +} diff --git a/tests/specs/task/dependencies_root_not_cycle/deno.json b/tests/specs/task/dependencies_root_not_cycle/deno.json new file mode 100644 index 00000000000000..43a4952f938732 --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/deno.json @@ -0,0 +1,10 @@ +{ + "tasks": { + "a": "echo root-a", + "b": { + "dependencies": ["a"], + "command": "echo b" + } + }, + "workspace": ["./member"] +} diff --git a/tests/specs/task/dependencies_root_not_cycle/member/deno.json b/tests/specs/task/dependencies_root_not_cycle/member/deno.json new file mode 100644 index 00000000000000..08c3493c73a1da --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/member/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "a": { + "dependencies": ["b"], + "command": "echo a" + } + } +} diff --git a/tests/specs/task/dependencies_root_not_cycle/task.out b/tests/specs/task/dependencies_root_not_cycle/task.out new file mode 100644 index 00000000000000..0194f31e4e3fad --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/task.out @@ -0,0 +1,6 @@ +Task a echo root-a +root-a +Task b echo b +b +Task a echo a +a diff --git a/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc b/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc new file mode 100644 index 00000000000000..9d3d50582c5f11 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "root_dependending_root": { + "args": "task root-depending-root", + "cwd": "member", + "output": "root_dependending_root.out" + }, + "member_depending_root_and_member": { + "args": "task member-dependending-root-and-member", + "cwd": "member", + "output": "member_depending_root_and_member.out" + } + } +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc b/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc new file mode 100644 index 00000000000000..88f0ee4e9eef09 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc @@ -0,0 +1,12 @@ +{ + "tasks": { + "build": "echo root", + "root-depending-root": { + "dependencies": [ + "build" + ], + "command": "echo test" + } + }, + "workspace": ["./member"] +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc b/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc new file mode 100644 index 00000000000000..df5ac047a3842d --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc @@ -0,0 +1,12 @@ +{ + "tasks": { + "build": "echo member", + "member-dependending-root-and-member": { + "dependencies": [ + "build", + "root-depending-root" + ], + "command": "echo member-test" + } + } +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out b/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out new file mode 100644 index 00000000000000..3b6fd0e0a440f0 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Task build echo member +member +Task build echo root +root +Task root-depending-root echo test +test +[UNORDERED_END] +Task member-dependending-root-and-member echo member-test +member-test diff --git a/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out b/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out new file mode 100644 index 00000000000000..2b8d9d5efebf22 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out @@ -0,0 +1,4 @@ +Task build echo root +root +Task root-depending-root echo test +test diff --git a/tests/unit/websocket_test.ts b/tests/unit/websocket_test.ts index 3aafe8da22dbfa..d9878828db4d97 100644 --- a/tests/unit/websocket_test.ts +++ b/tests/unit/websocket_test.ts @@ -806,3 +806,18 @@ Deno.test("Close connection", async () => { await server.finished; conn.close(); }); + +Deno.test("send to a closed socket", async () => { + const { promise, resolve } = Promise.withResolvers(); + const ws = new WebSocket("ws://localhost:4242"); + const blob = new Blob(["foo"]); + ws.onerror = () => fail(); + ws.onopen = () => { + ws.close(); + ws.send(blob); + }; + ws.onclose = () => { + resolve(); + }; + await promise; +}); diff --git a/tests/unit_node/_fs/_fs_readFile_test.ts b/tests/unit_node/_fs/_fs_readFile_test.ts index ea36b9d866af4d..a75f12d1f6fe39 100644 --- a/tests/unit_node/_fs/_fs_readFile_test.ts +++ b/tests/unit_node/_fs/_fs_readFile_test.ts @@ -2,7 +2,7 @@ import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { promises, readFile, readFileSync } from "node:fs"; import * as path from "@std/path"; -import { assert, assertEquals } from "@std/assert"; +import { assert, assertEquals, assertMatch } from "@std/assert"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); @@ -121,3 +121,26 @@ Deno.test("fs.promises.readFile with no arg call rejects with error correctly", // @ts-ignore no arg call needs to be supported await promises.readFile().catch((_e) => {}); }); + +Deno.test("fs.readFile error message contains path + syscall", async () => { + const path = "/does/not/exist"; + const err = await new Promise((resolve) => { + readFile(path, "utf-8", (err) => resolve(err)); + }); + if (err instanceof Error) { + assert(err.message.includes(path), "Path not found in error message"); + assertMatch(err.message, /[,\s]open\s/); + } +}); + +Deno.test("fs.readFileSync error message contains path + syscall", () => { + const path = "/does/not/exist"; + try { + readFileSync(path, "utf-8"); + } catch (err) { + if (err instanceof Error) { + assert(err.message.includes(path), "Path not found in error message"); + assertMatch(err.message, /[,\s]open\s/); + } + } +}); diff --git a/tests/wpt/runner/expectation.json b/tests/wpt/runner/expectation.json index 23cc85b498811f..6140f4379d03c2 100644 --- a/tests/wpt/runner/expectation.json +++ b/tests/wpt/runner/expectation.json @@ -3741,18 +3741,12 @@ "ab--c.ß (using .hostname)", "ab--c.ß (using .host)", "ab--c.ß (using .hostname)", - "‍.example (using URL)", - "‍.example (using URL.host)", - "‍.example (using URL.hostname)", "‍.example (using )", "‍.example (using .host)", "‍.example (using .hostname)", "‍.example (using )", "‍.example (using .host)", "‍.example (using .hostname)", - "xn--1ug.example (using URL)", - "xn--1ug.example (using URL.host)", - "xn--1ug.example (using URL.hostname)", "xn--1ug.example (using )", "xn--1ug.example (using .host)", "xn--1ug.example (using .hostname)", @@ -3874,18 +3868,8 @@ ], "url-searchparams.any.html": true, "url-searchparams.any.worker.html": true, - "url-setters-stripping.any.html": [ - "Setting port with leading U+0000 (https:)", - "Setting port with leading U+001F (https:)", - "Setting port with leading U+0000 (wpt++:)", - "Setting port with leading U+001F (wpt++:)" - ], - "url-setters-stripping.any.worker.html": [ - "Setting port with leading U+0000 (https:)", - "Setting port with leading U+001F (https:)", - "Setting port with leading U+0000 (wpt++:)", - "Setting port with leading U+001F (wpt++:)" - ], + "url-setters-stripping.any.html": true, + "url-setters-stripping.any.worker.html": true, "url-tojson.any.html": true, "url-tojson.any.worker.html": true, "urlencoded-parser.any.html": true, @@ -3894,12 +3878,8 @@ "urlsearchparams-append.any.worker.html": true, "urlsearchparams-constructor.any.html": true, "urlsearchparams-constructor.any.worker.html": true, - "urlsearchparams-delete.any.html": [ - "Changing the query of a URL with an opaque path can impact the path if the URL has no fragment" - ], - "urlsearchparams-delete.any.worker.html": [ - "Changing the query of a URL with an opaque path can impact the path if the URL has no fragment" - ], + "urlsearchparams-delete.any.html": true, + "urlsearchparams-delete.any.worker.html": true, "urlsearchparams-foreach.any.html": true, "urlsearchparams-foreach.any.worker.html": true, "urlsearchparams-get.any.html": true, @@ -3932,182 +3912,7 @@ "Input − with encoding utf-8", "Input á| with encoding utf-8" ], - "IdnaTestV2.window.html": [ - "ToASCII(\"a‌b\") C1", - "ToASCII(\"A‌B\") C1", - "ToASCII(\"A‌b\") C1", - "ToASCII(\"xn--ab-j1t\") C1", - "ToASCII(\"a‍b\") C2", - "ToASCII(\"A‍B\") C2", - "ToASCII(\"A‍b\") C2", - "ToASCII(\"xn--ab-m1t\") C2", - "ToASCII(\"1.aß‌‍b‌‍cßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ASS‌‍B‌‍CSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ASS‌‍B‌‍CSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa69989dba9gc\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Aß‌‍b‌‍cßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.xn--abcdexyz-qyacaaabaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaa010ze2isb1140zba8cc\") C1; C2; A4_2 (ignored)", - "ToASCII(\"‌x‍n‌-‍-bß\") C1; C2", - "ToASCII(\"‌X‍N‌-‍-BSS\") C1; C2", - "ToASCII(\"‌x‍n‌-‍-bss\") C1; C2", - "ToASCII(\"‌X‍n‌-‍-Bss\") C1; C2", - "ToASCII(\"xn--xn--bss-7z6ccid\") C1; C2", - "ToASCII(\"‌X‍n‌-‍-Bß\") C1; C2", - "ToASCII(\"xn--xn--b-pqa5796ccahd\") C1; C2", - "ToASCII(\"ஹ‍\") C2", - "ToASCII(\"xn--dmc225h\") C2", - "ToASCII(\"‍\") C2", - "ToASCII(\"xn--1ug\") C2", - "ToASCII(\"ஹ‌\") C1", - "ToASCII(\"xn--dmc025h\") C1", - "ToASCII(\"‌\") C1", - "ToASCII(\"xn--0ug\") C1", - "ToASCII(\"ۯ‌ۯ\") C1", - "ToASCII(\"xn--cmba004q\") C1", - "ToASCII(\"ß۫。‍\") C2", - "ToASCII(\"SS۫。‍\") C2", - "ToASCII(\"ss۫。‍\") C2", - "ToASCII(\"Ss۫。‍\") C2", - "ToASCII(\"xn--ss-59d.xn--1ug\") C2", - "ToASCII(\"xn--zca012a.xn--1ug\") C2", - "ToASCII(\"‌긃.榶-\") C1; V3 (ignored)", - "ToASCII(\"‌긃.榶-\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug3307c.xn----d87b\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"xn----1fa1788k.xn--0ug\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"ꡦᡑ‍1.。𐋣-\") C2; V3 (ignored); A4_2 (ignored)", - "ToASCII(\"xn--1-o7j663bdl7m..xn----381i\") C2; V3 (ignored); A4_2 (ignored)", - "ToASCII(\"1.䰹‍-。웈\") C2; V3 (ignored)", - "ToASCII(\"1.䰹‍-。웈\") C2; V3 (ignored)", - "ToASCII(\"1.xn----tgnz80r.xn--kp5b\") C2; V3 (ignored)", - "ToASCII(\"-3.‍ヌᢕ\") C2; V3 (ignored)", - "ToASCII(\"-3.xn--fbf739aq5o\") C2; V3 (ignored)", - "ToASCII(\"ς-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"ς-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"Σ-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"σ-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"xn----zmb.xn--1--i1t\") C1; V3 (ignored)", - "ToASCII(\"xn----xmb.xn--1--i1t\") C1; V3 (ignored)", - "ToASCII(\"Σ-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"σ-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"ᡯ⚉姶🄉.۷‍🎪‍\") C2; P1; V6", - "ToASCII(\"𝟵隁⯮.᠍‌\") C1", - "ToASCII(\"9隁⯮.᠍‌\") C1", - "ToASCII(\"xn--9-mfs8024b.xn--0ug\") C1", - "ToASCII(\"ß‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"ss‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"xn--ss-4ep585bkm5p.xn--ifh802b6a\") C1", - "ToASCII(\"xn--zca682johfi89m.xn--ifh802b6a\") C1", - "ToASCII(\"ß‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"ss‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"-。‍\") C2; V3 (ignored)", - "ToASCII(\"-。‍\") C2; V3 (ignored)", - "ToASCII(\"-.xn--1ug\") C2; V3 (ignored)", - "ToASCII(\"ς‍-.ⴣ𦟙\") C2; V3 (ignored)", - "ToASCII(\"σ‍-.ⴣ𦟙\") C2; V3 (ignored)", - "ToASCII(\"xn----zmb048s.xn--rlj2573p\") C2; V3 (ignored)", - "ToASCII(\"xn----xmb348s.xn--rlj2573p\") C2; V3 (ignored)", - "ToASCII(\"鱊。‌\") C1", - "ToASCII(\"xn--rt6a.xn--0ug\") C1", - "ToASCII(\"‌ⴚ。ς\") C1", - "ToASCII(\"‌ⴚ。σ\") C1", - "ToASCII(\"xn--0ug262c.xn--4xa\") C1", - "ToASCII(\"xn--0ug262c.xn--3xa\") C1", - "ToASCII(\"‌ⴚ。ς\") C1", - "ToASCII(\"‌ⴚ。σ\") C1", - "ToASCII(\"‍⾕。‌꥓̐ꡎ\") C1; C2", - "ToASCII(\"‍⾕。‌꥓̐ꡎ\") C1; C2", - "ToASCII(\"‍谷。‌꥓̐ꡎ\") C1; C2", - "ToASCII(\"xn--1ug0273b.xn--0sa359l6n7g13a\") C1; C2", - "ToASCII(\"‍。‌\") C1; C2", - "ToASCII(\"xn--1ug.xn--0ug\") C1; C2", - "ToASCII(\"‌。。\") C1; A4_2 (ignored)", - "ToASCII(\"xn--0ug..\") C1; A4_2 (ignored)", - "ToASCII(\"ᡲ-𝟹.ß-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.ß-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.SS-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.Ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"xn---3-p9o.xn--ss---276a\") C1; V3 (ignored)", - "ToASCII(\"xn---3-p9o.xn-----fia9303a\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-𝟹.SS-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-𝟹.ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-𝟹.Ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"𝟙。‍𝟸‍⁷\") C2", - "ToASCII(\"1。‍2‍7\") C2", - "ToASCII(\"1.xn--27-l1tb\") C2", - "ToASCII(\"‌.ßⴉ-\") C1; V3 (ignored)", - "ToASCII(\"‌.ssⴉ-\") C1; V3 (ignored)", - "ToASCII(\"‌.Ssⴉ-\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug.xn--ss--bi1b\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug.xn----pfa2305a\") C1; V3 (ignored)", - "ToASCII(\"ⴏ󠅋-.‍ⴉ\") C2; V3 (ignored)", - "ToASCII(\"xn----3vs.xn--1ug532c\") C2; V3 (ignored)", - "ToASCII(\"ⴏ󠅋-.‍ⴉ\") C2; V3 (ignored)", - "ToASCII(\"。ⴖͦ.‌\") C1; A4_2 (ignored)", - "ToASCII(\".xn--hva754s.xn--0ug\") C1; A4_2 (ignored)", - "ToASCII(\"‍攌꯭。ᢖ-ⴘ\") C2", - "ToASCII(\"xn--1ug592ykp6b.xn----mck373i\") C2", - "ToASCII(\"‌ꖨ.16.3툒۳\") C1", - "ToASCII(\"‌ꖨ.16.3툒۳\") C1", - "ToASCII(\"xn--0ug2473c.16.xn--3-nyc0117m\") C1", - "ToASCII(\"𝟏𝨙⸖.‍\") C2", - "ToASCII(\"1𝨙⸖.‍\") C2", - "ToASCII(\"xn--1-5bt6845n.xn--1ug\") C2", - "ToASCII(\"-‍.ⴞ𐋷\") C2; V3 (ignored)", - "ToASCII(\"xn----ugn.xn--mlj8559d\") C2; V3 (ignored)", - "ToASCII(\"嬃𝍌.‍ୄ\") C2", - "ToASCII(\"嬃𝍌.‍ୄ\") C2", - "ToASCII(\"xn--b6s0078f.xn--0ic557h\") C2", - "ToASCII(\"‍.F\") C2", - "ToASCII(\"‍.f\") C2", - "ToASCII(\"xn--1ug.f\") C2", - "ToASCII(\"‍㨲。ß\") C2", - "ToASCII(\"‍㨲。ß\") C2", - "ToASCII(\"‍㨲。SS\") C2", - "ToASCII(\"‍㨲。ss\") C2", - "ToASCII(\"‍㨲。Ss\") C2", - "ToASCII(\"xn--1ug914h.ss\") C2", - "ToASCII(\"xn--1ug914h.xn--zca\") C2", - "ToASCII(\"‍㨲。SS\") C2", - "ToASCII(\"‍㨲。ss\") C2", - "ToASCII(\"‍㨲。Ss\") C2", - "ToASCII(\"璼𝨭。‌󠇟\") C1", - "ToASCII(\"璼𝨭。‌󠇟\") C1", - "ToASCII(\"xn--gky8837e.xn--0ug\") C1", - "ToASCII(\"‌.‌\") C1", - "ToASCII(\"xn--0ug.xn--0ug\") C1", - "ToASCII(\"𝟠4󠇗𝈻.‍𐋵⛧‍\") C2", - "ToASCII(\"84󠇗𝈻.‍𐋵⛧‍\") C2", - "ToASCII(\"xn--84-s850a.xn--1uga573cfq1w\") C2", - "ToASCII(\"‍‌󠆪。ß𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。ß𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。SS𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。ss𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。Ss𑓃\") C1; C2", - "ToASCII(\"xn--0ugb.xn--ss-bh7o\") C1; C2", - "ToASCII(\"xn--0ugb.xn--zca0732l\") C1; C2", - "ToASCII(\"‍‌󠆪。SS𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。ss𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。Ss𑓃\") C1; C2", - "ToASCII(\"。‌ヶ䒩.ꡪ\") C1; A4_2 (ignored)", - "ToASCII(\".xn--0ug287dj0o.xn--gd9a\") C1; A4_2 (ignored)", - "ToASCII(\"梉。‌\") C1", - "ToASCII(\"xn--7zv.xn--0ug\") C1", - "ToASCII(\"𐋷。‍\") C2", - "ToASCII(\"xn--r97c.xn--1ug\") C2" - ], + "IdnaTestV2.window.html": true, "javascript-urls.window.html": false, "url-constructor.any.html?exclude=(file|javascript|mailto)": [ "Parsing: without base", @@ -4760,21 +4565,11 @@ ": Setting .pathname = '/foo' Opaque paths cannot be set" ], "url-setters.any.html?exclude=(file|javascript|mailto)": [ - "URL: Setting .host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", - "URL: Setting .host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", "URL: Setting .hostname = 'example.com:8080' : delimiter invalidates entire value", "URL: Setting .hostname = 'example.com:' : delimiter invalidates entire value", "URL: Setting .hostname = 'h' Drop /. from path", "URL: Setting .hostname = ''", - "URL: Setting .port = 'randomstring' Setting port to a string that doesn't parse as a number", - "URL: Setting .pathname = '' Non-special URLs can have their paths erased", - "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased", - "URL: Setting .pathname = '/.//p' Serialize /. in path", - "URL: Setting .pathname = '/..//p'", - "URL: Setting .pathname = '//p'", - "URL: Setting .pathname = 'p' Drop /. from path", - "URL: Setting .search = '' Do not drop trailing spaces from non-trailing opaque paths", - "URL: Setting .search = ''" + "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased" ], "url-setters.any.html?include=file": [ "URL: Setting .pathname = '\\\\' File URLs and (back)slashes", @@ -4784,21 +4579,11 @@ "url-setters.any.html?include=javascript": true, "url-setters.any.html?include=mailto": true, "url-setters.any.worker.html?exclude=(file|javascript|mailto)": [ - "URL: Setting .host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", - "URL: Setting .host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", "URL: Setting .hostname = 'example.com:8080' : delimiter invalidates entire value", "URL: Setting .hostname = 'example.com:' : delimiter invalidates entire value", "URL: Setting .hostname = 'h' Drop /. from path", "URL: Setting .hostname = ''", - "URL: Setting .port = 'randomstring' Setting port to a string that doesn't parse as a number", - "URL: Setting .pathname = '' Non-special URLs can have their paths erased", - "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased", - "URL: Setting .pathname = '/.//p' Serialize /. in path", - "URL: Setting .pathname = '/..//p'", - "URL: Setting .pathname = '//p'", - "URL: Setting .pathname = 'p' Drop /. from path", - "URL: Setting .search = '' Do not drop trailing spaces from non-trailing opaque paths", - "URL: Setting .search = ''" + "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased" ], "url-setters.any.worker.html?include=file": [ "URL: Setting .pathname = '\\\\' File URLs and (back)slashes", @@ -11518,10 +11303,10 @@ "006.html?default": true, "006.html?wpt_flags=h2": false, "006.html?wss": false, - "007.html?default": false, + "007.html?default": true, "007.html?wpt_flags=h2": false, "007.html?wss": false, - "008.html?default": false, + "008.html?default": true, "008.html?wss": false, "009.html?default": { "ignore": true