1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

Cherry-pick version bump commit with conflicts

This commit is contained in:
denobot 2023-11-30 20:12:13 +01:00 committed by bartlomieju
parent ffa09541d7
commit eb156dc6cd
128 changed files with 3711 additions and 1 deletions

View file

@ -30,7 +30,10 @@
"cli/tests/testdata/file_extensions/ts_with_js_extension.js", "cli/tests/testdata/file_extensions/ts_with_js_extension.js",
"cli/tests/testdata/fmt/badly_formatted.json", "cli/tests/testdata/fmt/badly_formatted.json",
"cli/tests/testdata/fmt/badly_formatted.md", "cli/tests/testdata/fmt/badly_formatted.md",
<<<<<<< HEAD
"cli/tests/testdata/fmt/badly_formatted.ipynb", "cli/tests/testdata/fmt/badly_formatted.ipynb",
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"cli/tests/testdata/byte_order_mark.ts", "cli/tests/testdata/byte_order_mark.ts",
"cli/tests/testdata/encoding", "cli/tests/testdata/encoding",
"cli/tests/testdata/fmt/", "cli/tests/testdata/fmt/",
@ -56,9 +59,15 @@
"ext/websocket/autobahn/reports" "ext/websocket/autobahn/reports"
], ],
"plugins": [ "plugins": [
<<<<<<< HEAD
"https://plugins.dprint.dev/typescript-0.88.6.wasm", "https://plugins.dprint.dev/typescript-0.88.6.wasm",
"https://plugins.dprint.dev/json-0.19.1.wasm", "https://plugins.dprint.dev/json-0.19.1.wasm",
"https://plugins.dprint.dev/markdown-0.16.3.wasm", "https://plugins.dprint.dev/markdown-0.16.3.wasm",
=======
"https://plugins.dprint.dev/typescript-0.88.4.wasm",
"https://plugins.dprint.dev/json-0.19.0.wasm",
"https://plugins.dprint.dev/markdown-0.16.2.wasm",
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"https://plugins.dprint.dev/toml-0.5.4.wasm", "https://plugins.dprint.dev/toml-0.5.4.wasm",
"https://plugins.dprint.dev/exec-0.4.4.json@c207bf9b9a4ee1f0ecb75c594f774924baf62e8e53a2ce9d873816a408cecbf7" "https://plugins.dprint.dev/exec-0.4.4.json@c207bf9b9a4ee1f0ecb75c594f774924baf62e8e53a2ce9d873816a408cecbf7"
] ]

View file

@ -5,7 +5,11 @@ import * as yaml from "https://deno.land/std@0.173.0/encoding/yaml.ts";
// Bump this number when you want to purge the cache. // Bump this number when you want to purge the cache.
// Note: the tools/release/01_bump_crate_versions.ts script will update this version // 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. // automatically via regex, so ensure that this line maintains this format.
<<<<<<< HEAD
const cacheVersion = 60; const cacheVersion = 60;
=======
const cacheVersion = 61;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
const ubuntuRunner = "ubuntu-22.04"; const ubuntuRunner = "ubuntu-22.04";
const ubuntuXlRunner = "ubuntu-22.04-xl"; const ubuntuXlRunner = "ubuntu-22.04-xl";

View file

@ -329,8 +329,13 @@ jobs:
path: |- path: |-
~/.cargo/registry/index ~/.cargo/registry/index
~/.cargo/registry/cache ~/.cargo/registry/cache
<<<<<<< HEAD
key: '60-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}' key: '60-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '60-cargo-home-${{ matrix.os }}' restore-keys: '60-cargo-home-${{ matrix.os }}'
=======
key: '61-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '61-cargo-home-${{ matrix.os }}'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
if: '!(matrix.skip)' if: '!(matrix.skip)'
- name: Restore cache build output (PR) - name: Restore cache build output (PR)
uses: actions/cache/restore@v3 uses: actions/cache/restore@v3
@ -342,7 +347,11 @@ jobs:
!./target/*/*.zip !./target/*/*.zip
!./target/*/*.tar.gz !./target/*/*.tar.gz
key: never_saved key: never_saved
<<<<<<< HEAD
restore-keys: '60-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-' restore-keys: '60-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
=======
restore-keys: '61-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
- name: Apply and update mtime cache - name: Apply and update mtime cache
if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))' if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))'
uses: ./.github/mtime_cache uses: ./.github/mtime_cache
@ -639,7 +648,11 @@ jobs:
!./target/*/gn_out !./target/*/gn_out
!./target/*/*.zip !./target/*/*.zip
!./target/*/*.tar.gz !./target/*/*.tar.gz
<<<<<<< HEAD
key: '60-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' key: '60-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
=======
key: '61-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
publish-canary: publish-canary:
name: publish canary name: publish canary
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04

185
Cargo.lock generated
View file

@ -851,7 +851,11 @@ dependencies = [
[[package]] [[package]]
name = "deno" name = "deno"
<<<<<<< HEAD
version = "1.38.3" version = "1.38.3"
=======
version = "1.38.4"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"async-trait", "async-trait",
"base32", "base32",
@ -884,7 +888,10 @@ dependencies = [
"dissimilar", "dissimilar",
"dotenvy", "dotenvy",
"dprint-plugin-json", "dprint-plugin-json",
<<<<<<< HEAD
"dprint-plugin-jupyter", "dprint-plugin-jupyter",
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"dprint-plugin-markdown", "dprint-plugin-markdown",
"dprint-plugin-typescript", "dprint-plugin-typescript",
"encoding_rs", "encoding_rs",
@ -993,7 +1000,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_bench_util" name = "deno_bench_util"
<<<<<<< HEAD
version = "0.119.0" version = "0.119.0"
=======
version = "0.120.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"bencher", "bencher",
"deno_core", "deno_core",
@ -1003,7 +1014,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_broadcast_channel" name = "deno_broadcast_channel"
<<<<<<< HEAD
version = "0.119.0" version = "0.119.0"
=======
version = "0.120.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"async-trait", "async-trait",
"deno_core", "deno_core",
@ -1013,7 +1028,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_cache" name = "deno_cache"
<<<<<<< HEAD
version = "0.57.0" version = "0.57.0"
=======
version = "0.58.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"async-trait", "async-trait",
"deno_core", "deno_core",
@ -1044,9 +1063,15 @@ dependencies = [
[[package]] [[package]]
name = "deno_config" name = "deno_config"
<<<<<<< HEAD
version = "0.6.5" version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97979f94af93f388822233278ede930414efa273d6eb495de7680f2a6862a4d3" checksum = "97979f94af93f388822233278ede930414efa273d6eb495de7680f2a6862a4d3"
=======
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c6b9137fcc5c6f81d12214fc31cdddf2c64d0667a5458803e081ddd856d5b6"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap 2.0.2", "indexmap 2.0.2",
@ -1060,16 +1085,26 @@ dependencies = [
[[package]] [[package]]
name = "deno_console" name = "deno_console"
<<<<<<< HEAD
version = "0.125.0" version = "0.125.0"
=======
version = "0.126.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_core", "deno_core",
] ]
[[package]] [[package]]
name = "deno_core" name = "deno_core"
<<<<<<< HEAD
version = "0.233.0" version = "0.233.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1c9dadf191bb484179cf4a599e0ccbe8ea62f35676a15397f171aff14bd9a0" checksum = "1b1c9dadf191bb484179cf4a599e0ccbe8ea62f35676a15397f171aff14bd9a0"
=======
version = "0.232.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "229ffd108e028b148a1a5a6122f771bc7c37094170226f44b8b93b3a9b79d114"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -1092,7 +1127,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_cron" name = "deno_cron"
<<<<<<< HEAD
version = "0.5.0" version = "0.5.0"
=======
version = "0.6.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1105,7 +1144,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_crypto" name = "deno_crypto"
<<<<<<< HEAD
version = "0.139.0" version = "0.139.0"
=======
version = "0.140.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"aes", "aes",
"aes-gcm", "aes-gcm",
@ -1178,7 +1221,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_fetch" name = "deno_fetch"
<<<<<<< HEAD
version = "0.149.0" version = "0.149.0"
=======
version = "0.150.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"bytes", "bytes",
"data-url", "data-url",
@ -1194,7 +1241,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_ffi" name = "deno_ffi"
<<<<<<< HEAD
version = "0.112.0" version = "0.112.0"
=======
version = "0.113.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_core", "deno_core",
"dlopen2", "dlopen2",
@ -1210,7 +1261,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_fs" name = "deno_fs"
<<<<<<< HEAD
version = "0.35.0" version = "0.35.0"
=======
version = "0.36.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"async-trait", "async-trait",
"deno_core", "deno_core",
@ -1252,7 +1307,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_http" name = "deno_http"
<<<<<<< HEAD
version = "0.122.0" version = "0.122.0"
=======
version = "0.123.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"async-compression", "async-compression",
"async-trait", "async-trait",
@ -1289,7 +1348,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_io" name = "deno_io"
<<<<<<< HEAD
version = "0.35.0" version = "0.35.0"
=======
version = "0.36.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"async-trait", "async-trait",
"deno_core", "deno_core",
@ -1302,7 +1365,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_kv" name = "deno_kv"
<<<<<<< HEAD
version = "0.33.0" version = "0.33.0"
=======
version = "0.34.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1374,7 +1441,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_napi" name = "deno_napi"
<<<<<<< HEAD
version = "0.55.0" version = "0.55.0"
=======
version = "0.56.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_core", "deno_core",
"libloading", "libloading",
@ -1395,7 +1466,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_net" name = "deno_net"
<<<<<<< HEAD
version = "0.117.0" version = "0.117.0"
=======
version = "0.118.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_tls", "deno_tls",
@ -1412,7 +1487,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_node" name = "deno_node"
<<<<<<< HEAD
version = "0.62.0" version = "0.62.0"
=======
version = "0.63.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"aead-gcm-stream", "aead-gcm-stream",
"aes", "aes",
@ -1492,9 +1571,15 @@ dependencies = [
[[package]] [[package]]
name = "deno_ops" name = "deno_ops"
<<<<<<< HEAD
version = "0.109.0" version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3901bf4ce170c37d936ce8b947ba0217e5d235ebbbc1c340703268141c359d3" checksum = "a3901bf4ce170c37d936ce8b947ba0217e5d235ebbbc1c340703268141c359d3"
=======
version = "0.108.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7dde627916f8539f3f0d2e754dda40810c8ca4d655f2eaac1ef54785a12fd27"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"proc-macro-rules", "proc-macro-rules",
"proc-macro2", "proc-macro2",
@ -1507,7 +1592,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_runtime" name = "deno_runtime"
<<<<<<< HEAD
version = "0.133.0" version = "0.133.0"
=======
version = "0.134.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"console_static_text", "console_static_text",
"deno_ast", "deno_ast",
@ -1593,7 +1682,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_tls" name = "deno_tls"
<<<<<<< HEAD
version = "0.112.0" version = "0.112.0"
=======
version = "0.113.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_native_certs", "deno_native_certs",
@ -1625,7 +1718,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_url" name = "deno_url"
<<<<<<< HEAD
version = "0.125.0" version = "0.125.0"
=======
version = "0.126.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_bench_util", "deno_bench_util",
"deno_console", "deno_console",
@ -1637,7 +1734,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_web" name = "deno_web"
<<<<<<< HEAD
version = "0.156.0" version = "0.156.0"
=======
version = "0.157.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"async-trait", "async-trait",
"base64-simd", "base64-simd",
@ -1658,7 +1759,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_webidl" name = "deno_webidl"
<<<<<<< HEAD
version = "0.125.0" version = "0.125.0"
=======
version = "0.126.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_bench_util", "deno_bench_util",
"deno_core", "deno_core",
@ -1666,7 +1771,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_websocket" name = "deno_websocket"
<<<<<<< HEAD
version = "0.130.0" version = "0.130.0"
=======
version = "0.131.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"bytes", "bytes",
"deno_core", "deno_core",
@ -1684,7 +1793,11 @@ dependencies = [
[[package]] [[package]]
name = "deno_webstorage" name = "deno_webstorage"
<<<<<<< HEAD
version = "0.120.0" version = "0.120.0"
=======
version = "0.121.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_web", "deno_web",
@ -1704,9 +1817,15 @@ dependencies = [
[[package]] [[package]]
name = "denokv_proto" name = "denokv_proto"
<<<<<<< HEAD
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd501a6b10a8b7fe7e605cafe4aad1d266ed0791b788dab78889df14b1a23e5f" checksum = "dd501a6b10a8b7fe7e605cafe4aad1d266ed0791b788dab78889df14b1a23e5f"
=======
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8952fb8c38c1dcd796d49b00030afb74aa184160ae86817b72a32a994c8e16f0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1720,9 +1839,15 @@ dependencies = [
[[package]] [[package]]
name = "denokv_remote" name = "denokv_remote"
<<<<<<< HEAD
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d94fd3da7d1fa9ef1515bf3bc5b2fe75389edb3f15e9445e345679fda44987c" checksum = "7d94fd3da7d1fa9ef1515bf3bc5b2fe75389edb3f15e9445e345679fda44987c"
=======
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edfc8447324d783b01e215bd5040ff9149c34d9715c7b7b5080dd648ebf1148a"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1742,9 +1867,15 @@ dependencies = [
[[package]] [[package]]
name = "denokv_sqlite" name = "denokv_sqlite"
<<<<<<< HEAD
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2d2ab5fe45079dc41ab76549bb9fc3aeb9be4e54fddbdfb16a779db4a0b38df" checksum = "c2d2ab5fe45079dc41ab76549bb9fc3aeb9be4e54fddbdfb16a779db4a0b38df"
=======
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ec76b691ff069f14e56e3e053c2b2163540b27e4b60179f2b120064a7e4960d"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1756,7 +1887,10 @@ dependencies = [
"rand", "rand",
"rusqlite", "rusqlite",
"serde_json", "serde_json",
<<<<<<< HEAD
"thiserror", "thiserror",
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"tokio", "tokio",
"uuid", "uuid",
] ]
@ -1917,6 +2051,7 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
[[package]] [[package]]
name = "dprint-core" name = "dprint-core"
<<<<<<< HEAD
version = "0.63.3" version = "0.63.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7227b28d24aafee21ff72512336c797fa00bb3ea803186b1b105a68abc97660b" checksum = "7227b28d24aafee21ff72512336c797fa00bb3ea803186b1b105a68abc97660b"
@ -1924,6 +2059,15 @@ dependencies = [
"anyhow", "anyhow",
"bumpalo", "bumpalo",
"indexmap 2.0.2", "indexmap 2.0.2",
=======
version = "0.62.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6563addfa2b6c6fa96acdda0341090beba2c5c4ff6ef91f3a232a6d4dd34156"
dependencies = [
"anyhow",
"bumpalo",
"indexmap 1.9.3",
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"rustc-hash", "rustc-hash",
"serde", "serde",
"unicode-width", "unicode-width",
@ -1931,9 +2075,15 @@ dependencies = [
[[package]] [[package]]
name = "dprint-plugin-json" name = "dprint-plugin-json"
<<<<<<< HEAD
version = "0.19.1" version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b6bf034eebeab36b78f45c07df87c6a578215e4f3238b5c0b6e5e66300ac348" checksum = "0b6bf034eebeab36b78f45c07df87c6a578215e4f3238b5c0b6e5e66300ac348"
=======
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8631287de4a33f7246c846e7a6cbbfd42ab8eef89520ae414e371e7bfbb85401"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"dprint-core", "dprint-core",
@ -1943,6 +2093,7 @@ dependencies = [
] ]
[[package]] [[package]]
<<<<<<< HEAD
name = "dprint-plugin-jupyter" name = "dprint-plugin-jupyter"
version = "0.1.2" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
@ -1960,6 +2111,12 @@ name = "dprint-plugin-markdown"
version = "0.16.3" version = "0.16.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afa43a107cebe8989fa739fa4bafcce3b98725e13dddfe061744bce86071eb60" checksum = "afa43a107cebe8989fa739fa4bafcce3b98725e13dddfe061744bce86071eb60"
=======
name = "dprint-plugin-markdown"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f1eee7353bc4d7031dde53468356eeba7cdfe8e237085647cec3be41c3cdbc7"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"dprint-core", "dprint-core",
@ -1971,9 +2128,15 @@ dependencies = [
[[package]] [[package]]
name = "dprint-plugin-typescript" name = "dprint-plugin-typescript"
<<<<<<< HEAD
version = "0.88.6" version = "0.88.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb7fe06e34987533797220544a8baea26bacbbbc1e81f41c7e654d2e68f41f72" checksum = "bb7fe06e34987533797220544a8baea26bacbbbc1e81f41c7e654d2e68f41f72"
=======
version = "0.88.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a5be6e2f026971bd4b75ed2b77203c4195587229818ddef23721f66a044907b"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"anyhow", "anyhow",
"deno_ast", "deno_ast",
@ -3001,9 +3164,15 @@ dependencies = [
[[package]] [[package]]
name = "jsonc-parser" name = "jsonc-parser"
<<<<<<< HEAD
version = "0.23.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7725c320caac8c21d8228c1d055af27a995d371f78cc763073d3e068323641b5" checksum = "7725c320caac8c21d8228c1d055af27a995d371f78cc763073d3e068323641b5"
=======
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b56a20e76235284255a09fcd1f45cf55d3c524ea657ebd3854735925c57743d"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"serde_json", "serde_json",
] ]
@ -3325,7 +3494,11 @@ dependencies = [
[[package]] [[package]]
name = "napi_sym" name = "napi_sym"
<<<<<<< HEAD
version = "0.55.0" version = "0.55.0"
=======
version = "0.56.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -4636,9 +4809,15 @@ dependencies = [
[[package]] [[package]]
name = "serde_v8" name = "serde_v8"
<<<<<<< HEAD
version = "0.142.0" version = "0.142.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6abec9ca384cb6869fcbf7ab816bd0d342cd2668fa7b090d80554831e2d93e60" checksum = "6abec9ca384cb6869fcbf7ab816bd0d342cd2668fa7b090d80554831e2d93e60"
=======
version = "0.141.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc689cb316d67b200e9f7449ce76cceb7e483e0f828d1a9c3d057c4367b6c26e"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"bytes", "bytes",
"derive_more", "derive_more",
@ -6035,9 +6214,15 @@ dependencies = [
[[package]] [[package]]
name = "v8" name = "v8"
<<<<<<< HEAD
version = "0.82.0" version = "0.82.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f53dfb242f4c0c39ed3fc7064378a342e57b5c9bd774636ad34ffe405b808121" checksum = "f53dfb242f4c0c39ed3fc7064378a342e57b5c9bd774636ad34ffe405b808121"
=======
version = "0.81.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b75f5f378b9b54aff3b10da8170d26af4cfd217f644cf671badcd13af5db4beb"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"fslock", "fslock",

View file

@ -40,15 +40,24 @@ repository = "https://github.com/denoland/deno"
[workspace.dependencies] [workspace.dependencies]
deno_ast = { version = "0.31.6", features = ["transpiling"] } deno_ast = { version = "0.31.6", features = ["transpiling"] }
<<<<<<< HEAD
deno_core = { version = "0.233.0" } deno_core = { version = "0.233.0" }
deno_runtime = { version = "0.133.0", path = "./runtime" } deno_runtime = { version = "0.133.0", path = "./runtime" }
napi_sym = { version = "0.55.0", path = "./cli/napi/sym" } napi_sym = { version = "0.55.0", path = "./cli/napi/sym" }
deno_bench_util = { version = "0.119.0", path = "./bench_util" } deno_bench_util = { version = "0.119.0", path = "./bench_util" }
=======
deno_core = { version = "0.232.0" }
deno_runtime = { version = "0.134.0", path = "./runtime" }
napi_sym = { version = "0.56.0", path = "./cli/napi/sym" }
deno_bench_util = { version = "0.120.0", path = "./bench_util" }
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
test_util = { path = "./test_util" } test_util = { path = "./test_util" }
deno_lockfile = "0.17.2" deno_lockfile = "0.17.2"
deno_media_type = { version = "0.1.1", features = ["module_specifier"] } deno_media_type = { version = "0.1.1", features = ["module_specifier"] }
<<<<<<< HEAD
denokv_proto = "0.4.0" denokv_proto = "0.4.0"
# denokv_sqlite brings in bundled sqlite if we don't disable the default features # denokv_sqlite brings in bundled sqlite if we don't disable the default features
denokv_sqlite = { default-features = false, version = "0.4.0" } denokv_sqlite = { default-features = false, version = "0.4.0" }
@ -75,6 +84,34 @@ deno_webidl = { version = "0.125.0", path = "./ext/webidl" }
deno_websocket = { version = "0.130.0", path = "./ext/websocket" } deno_websocket = { version = "0.130.0", path = "./ext/websocket" }
deno_webstorage = { version = "0.120.0", path = "./ext/webstorage" } deno_webstorage = { version = "0.120.0", path = "./ext/webstorage" }
deno_napi = { version = "0.55.0", path = "./ext/napi" } deno_napi = { version = "0.55.0", path = "./ext/napi" }
=======
denokv_proto = "0.2.1"
# denokv_sqlite brings in bundled sqlite if we don't disable the default features
denokv_sqlite = { default-features = false, version = "0.2.1" }
denokv_remote = "0.2.3"
# exts
deno_broadcast_channel = { version = "0.120.0", path = "./ext/broadcast_channel" }
deno_cache = { version = "0.58.0", path = "./ext/cache" }
deno_console = { version = "0.126.0", path = "./ext/console" }
deno_cron = { version = "0.6.0", path = "./ext/cron" }
deno_crypto = { version = "0.140.0", path = "./ext/crypto" }
deno_fetch = { version = "0.150.0", path = "./ext/fetch" }
deno_ffi = { version = "0.113.0", path = "./ext/ffi" }
deno_fs = { version = "0.36.0", path = "./ext/fs" }
deno_http = { version = "0.123.0", path = "./ext/http" }
deno_io = { version = "0.36.0", path = "./ext/io" }
deno_net = { version = "0.118.0", path = "./ext/net" }
deno_node = { version = "0.63.0", path = "./ext/node" }
deno_kv = { version = "0.34.0", path = "./ext/kv" }
deno_tls = { version = "0.113.0", path = "./ext/tls" }
deno_url = { version = "0.126.0", path = "./ext/url" }
deno_web = { version = "0.157.0", path = "./ext/web" }
deno_webidl = { version = "0.126.0", path = "./ext/webidl" }
deno_websocket = { version = "0.131.0", path = "./ext/websocket" }
deno_webstorage = { version = "0.121.0", path = "./ext/webstorage" }
deno_napi = { version = "0.56.0", path = "./ext/napi" }
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
aes = "=0.8.3" aes = "=0.8.3"
anyhow = "1.0.57" anyhow = "1.0.57"

View file

@ -6,6 +6,7 @@
<img align="right" src="https://deno.land/logo.svg" height="150px" alt="the deno mascot dinosaur standing in the rain"> <img align="right" src="https://deno.land/logo.svg" height="150px" alt="the deno mascot dinosaur standing in the rain">
<<<<<<< HEAD
[Deno](https://www.deno.com) [Deno](https://www.deno.com)
([/ˈdiːnoʊ/](http://ipa-reader.xyz/?text=%CB%88di%CB%90no%CA%8A), pronounced ([/ˈdiːnoʊ/](http://ipa-reader.xyz/?text=%CB%88di%CB%90no%CA%8A), pronounced
`dee-no`) is a JavaScript, TypeScript, and WebAssembly runtime with secure `dee-no`) is a JavaScript, TypeScript, and WebAssembly runtime with secure
@ -21,6 +22,28 @@ Install the Deno runtime on your system using one of the commands below. Note
that there are a number of ways to install Deno - a comprehensive list of that there are a number of ways to install Deno - a comprehensive list of
installation options can be found installation options can be found
[here](https://docs.deno.com/runtime/manual/getting_started/installation). [here](https://docs.deno.com/runtime/manual/getting_started/installation).
=======
[Deno](https://deno.com/runtime) is a _simple_, _modern_ and _secure_ runtime
for **JavaScript** and **TypeScript** that uses V8 and is built in Rust.
### Features
- [Secure by default.](https://deno.land/manual/basics/permissions) No file,
network, or environment access, unless explicitly enabled.
- Provides
[web platform functionality and APIs](https://deno.land/manual/runtime/web_platform_apis),
e.g. using ES modules, web workers, and `fetch()`.
- Supports
[TypeScript out of the box](https://deno.land/manual/advanced/typescript).
- Ships only a single executable file.
- [Built-in tooling](https://deno.land/manual/tools#built-in-tooling) including
`deno test`, `deno fmt`, `deno bench`, and more.
- Includes [a set of reviewed standard modules](https://deno.land/std/)
guaranteed to work with Deno.
- [Supports npm.](https://deno.land/manual/node)
### Install
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
Shell (Mac, Linux): Shell (Mac, Linux):
@ -46,6 +69,7 @@ brew install deno
choco install deno choco install deno
``` ```
<<<<<<< HEAD
### Build and install from source ### Build and install from source
Complete instructions for building Deno from source can be found in the manual Complete instructions for building Deno from source can be found in the manual
@ -89,6 +113,66 @@ Learn more about writing and running Deno programs
We appreciate your help! To contribute, please read our We appreciate your help! To contribute, please read our
[contributing instructions](https://docs.deno.com/runtime/manual/references/contributing/). [contributing instructions](https://docs.deno.com/runtime/manual/references/contributing/).
=======
[Scoop](https://scoop.sh/) (Windows):
```powershell
scoop install deno
```
Build and install from source using [Cargo](https://crates.io/crates/deno):
```sh
# Install build dependencies
apt install -y cmake protobuf-compiler # Linux
brew install cmake protobuf # macOS
# Build and install Deno
cargo install deno --locked
```
See
[deno_install](https://github.com/denoland/deno_install/blob/master/README.md)
and [releases](https://github.com/denoland/deno/releases) for other options.
### Getting Started
Try [running a simple program](https://examples.deno.land/hello-world):
```sh
deno run https://examples.deno.land/hello-world.ts
```
Or [setup a simple HTTP server](https://examples.deno.land/http-server):
```ts
Deno.serve((_req) => new Response("Hello, World!"));
```
[More Examples](https://examples.deno.land)
### Additional Resources
- **[The Deno Manual](https://deno.land/manual)** is a great starting point for
[additional examples](https://deno.land/manual/examples),
[setting up your environment](https://deno.land/manual/getting_started/setup_your_environment),
[using npm](https://deno.land/manual/node), and more.
- **[Runtime API reference](https://deno.land/api)** documents all APIs built
into Deno CLI.
- **[Deno Standard Modules](https://deno.land/std)** do not have external
dependencies and are reviewed by the Deno core team.
- **[deno.land/x](https://deno.land/x)** is the registry for third party
modules.
- **[Blog](https://deno.com/blog)** is where the Deno team shares important
product updates and “how to”s about solving technical problems.
### Contributing
We appreciate your help!
To contribute, please read our
[contributing instructions](https://deno.land/manual/references/contributing/).
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
[Build status - Cirrus]: https://github.com/denoland/deno/workflows/ci/badge.svg?branch=main&event=push [Build status - Cirrus]: https://github.com/denoland/deno/workflows/ci/badge.svg?branch=main&event=push
[Build status]: https://github.com/denoland/deno/actions [Build status]: https://github.com/denoland/deno/actions

View file

@ -6,9 +6,23 @@ https://github.com/denoland/deno/releases
We also have one-line install commands at: We also have one-line install commands at:
https://github.com/denoland/deno_install https://github.com/denoland/deno_install
<<<<<<< HEAD
### 1.38.3 / 2023.11.24 ### 1.38.3 / 2023.11.24
- feat(unstable): tar up directory with deno.json (#21228) - feat(unstable): tar up directory with deno.json (#21228)
=======
### 1.38.4 / 2023.11.30
- fix(node): `spawnSync`'s `status` was incorrect (#21359)
- perf(lsp): add performance marks for TSC requests (#21383)
- perf(lsp): avoid redundant getNavigationTree() calls (#21396)
- perf(lsp): cancel ts requests on future drop (#21387)
- perf(lsp): remove throttling of cancellation token (#21395)
### 1.38.3 / 2023.11.24
- feat(unstable): tar up directory with deno.json (#21228)
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
- fix(ext,runtime): add missing custom inspections (#21219) - fix(ext,runtime): add missing custom inspections (#21219)
- fix(ext/http): avoid lockup in graceful shutdown (#21253) - fix(ext/http): avoid lockup in graceful shutdown (#21253)
- fix(ext/http): fix crash in dropped Deno.serve requests (#21252) - fix(ext/http): fix crash in dropped Deno.serve requests (#21252)

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_bench_util" name = "deno_bench_util"
<<<<<<< HEAD
version = "0.119.0" version = "0.119.0"
=======
version = "0.120.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno" name = "deno"
<<<<<<< HEAD
version = "1.38.3" version = "1.38.3"
=======
version = "1.38.4"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
default-run = "deno" default-run = "deno"
edition.workspace = true edition.workspace = true
@ -27,11 +31,15 @@ harness = false
path = "./bench/lsp_bench_standalone.rs" path = "./bench/lsp_bench_standalone.rs"
[features] [features]
<<<<<<< HEAD
default = ["upgrade", "__vendored_zlib_ng"] default = ["upgrade", "__vendored_zlib_ng"]
# A feature that enables the upgrade subcommand and the background check for # A feature that enables the upgrade subcommand and the background check for
# available updates (of deno binary). This is typically disabled for (Linux) # available updates (of deno binary). This is typically disabled for (Linux)
# distribution packages. # distribution packages.
upgrade = [] upgrade = []
=======
default = ["__vendored_zlib_ng"]
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
# A dev feature to disable creations and loading of snapshots in favor of # A dev feature to disable creations and loading of snapshots in favor of
# loading JS sources at runtime. # loading JS sources at runtime.
__runtime_js_sources = ["deno_runtime/__runtime_js_sources"] __runtime_js_sources = ["deno_runtime/__runtime_js_sources"]
@ -55,7 +63,11 @@ winres.workspace = true
[dependencies] [dependencies]
deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] } deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] }
deno_cache_dir = "=0.6.1" deno_cache_dir = "=0.6.1"
<<<<<<< HEAD
deno_config = "=0.6.5" deno_config = "=0.6.5"
=======
deno_config = "=0.6.4"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
deno_doc = { version = "=0.73.3", features = ["html"] } deno_doc = { version = "=0.73.3", features = ["html"] }
deno_emit = "=0.31.4" deno_emit = "=0.31.4"
@ -85,10 +97,16 @@ data-encoding.workspace = true
data-url.workspace = true data-url.workspace = true
dissimilar = "=1.0.4" dissimilar = "=1.0.4"
dotenvy = "0.15.7" dotenvy = "0.15.7"
<<<<<<< HEAD
dprint-plugin-json = "=0.19.1" dprint-plugin-json = "=0.19.1"
dprint-plugin-jupyter = "=0.1.2" dprint-plugin-jupyter = "=0.1.2"
dprint-plugin-markdown = "=0.16.3" dprint-plugin-markdown = "=0.16.3"
dprint-plugin-typescript = "=0.88.6" dprint-plugin-typescript = "=0.88.6"
=======
dprint-plugin-json = "=0.19.0"
dprint-plugin-markdown = "=0.16.2"
dprint-plugin-typescript = "=0.88.4"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
encoding_rs.workspace = true encoding_rs.workspace = true
env_logger = "=0.10.0" env_logger = "=0.10.0"
fancy-regex = "=0.10.0" fancy-regex = "=0.10.0"
@ -102,7 +120,11 @@ http.workspace = true
hyper.workspace = true hyper.workspace = true
import_map = { version = "=0.17.0", features = ["ext"] } import_map = { version = "=0.17.0", features = ["ext"] }
indexmap.workspace = true indexmap.workspace = true
<<<<<<< HEAD
jsonc-parser = { version = "=0.23.0", features = ["serde"] } jsonc-parser = { version = "=0.23.0", features = ["serde"] }
=======
jsonc-parser = { version = "=0.21.1", features = ["serde"] }
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
lazy-regex.workspace = true lazy-regex.workspace = true
libc.workspace = true libc.workspace = true
libz-sys.workspace = true libz-sys.workspace = true

View file

@ -320,6 +320,7 @@ impl DenoSubcommand {
matches!(self, Self::Run(_)) matches!(self, Self::Run(_))
} }
<<<<<<< HEAD
// Returns `true` if the subcommand depends on testing infrastructure. // Returns `true` if the subcommand depends on testing infrastructure.
pub fn needs_test(&self) -> bool { pub fn needs_test(&self) -> bool {
matches!( matches!(
@ -330,6 +331,10 @@ impl DenoSubcommand {
| Self::Bench(_) | Self::Bench(_)
| Self::Lsp | Self::Lsp
) )
=======
pub fn is_test_or_jupyter(&self) -> bool {
matches!(self, Self::Test(_) | Self::Jupyter(_))
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }
@ -844,11 +849,53 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> {
if matches.get_flag("unstable") { if matches.get_flag("unstable") {
flags.unstable = true; flags.unstable = true;
} }
<<<<<<< HEAD
for (name, _, _) in crate::UNSTABLE_GRANULAR_FLAGS { for (name, _, _) in crate::UNSTABLE_GRANULAR_FLAGS {
if matches.get_flag(&format!("unstable-{}", name)) { if matches.get_flag(&format!("unstable-{}", name)) {
flags.unstable_features.push(name.to_string()); flags.unstable_features.push(name.to_string());
} }
=======
if matches.get_flag("unstable-broadcast-channel") {
flags.unstable_features.push(
deno_runtime::deno_broadcast_channel::UNSTABLE_FEATURE_NAME.to_string(),
);
}
if matches.get_flag("unstable-ffi") {
flags
.unstable_features
.push(deno_runtime::deno_ffi::UNSTABLE_FEATURE_NAME.to_string());
}
if matches.get_flag("unstable-fs") {
flags
.unstable_features
.push(deno_runtime::deno_fs::UNSTABLE_FEATURE_NAME.to_string());
}
if matches.get_flag("unstable-http") {
flags
.unstable_features
.push(deno_runtime::ops::http::UNSTABLE_FEATURE_NAME.to_string());
}
if matches.get_flag("unstable-kv") {
flags
.unstable_features
.push(deno_runtime::deno_kv::UNSTABLE_FEATURE_NAME.to_string());
}
if matches.get_flag("unstable-net") {
flags
.unstable_features
.push(deno_runtime::deno_net::UNSTABLE_FEATURE_NAME.to_string());
}
if matches.get_flag("unstable-worker-options") {
flags
.unstable_features
.push(deno_runtime::ops::worker_host::UNSTABLE_FEATURE_NAME.to_string());
}
if matches.get_flag("unstable-cron") {
flags
.unstable_features
.push(deno_runtime::deno_cron::UNSTABLE_FEATURE_NAME.to_string());
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
flags.unstable_bare_node_builtins = flags.unstable_bare_node_builtins =
@ -1579,9 +1626,13 @@ Ignore formatting a file by adding an ignore comment at the top of the file:
.help("Set content type of the supplied file") .help("Set content type of the supplied file")
// prefer using ts for formatting instead of js because ts works in more scenarios // prefer using ts for formatting instead of js because ts works in more scenarios
.default_value("ts") .default_value("ts")
<<<<<<< HEAD
.value_parser([ .value_parser([
"ts", "tsx", "js", "jsx", "md", "json", "jsonc", "ipynb", "ts", "tsx", "js", "jsx", "md", "json", "jsonc", "ipynb",
]), ]),
=======
.value_parser(["ts", "tsx", "js", "jsx", "md", "json", "jsonc"]),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
) )
.arg( .arg(
Arg::new("ignore") Arg::new("ignore")
@ -2202,7 +2253,10 @@ update to a different location, use the --output flag
deno upgrade --output $HOME/my_deno", deno upgrade --output $HOME/my_deno",
) )
<<<<<<< HEAD
.hide(cfg!(not(feature = "upgrade"))) .hide(cfg!(not(feature = "upgrade")))
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
.defer(|cmd| { .defer(|cmd| {
cmd cmd
.arg( .arg(
@ -2306,8 +2360,12 @@ fn publish_subcommand() -> Command {
) )
.arg( .arg(
Arg::new("token") Arg::new("token")
<<<<<<< HEAD
.long("token") .long("token")
.help("The API token to use when publishing. If unset, interactive authentication is be used") .help("The API token to use when publishing. If unset, interactive authentication is be used")
=======
.help("The API token to use when publishing. If unset, interactive authentication will be used.")
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
) )
}) })
} }

View file

@ -331,6 +331,10 @@ deno_core::extension!(
esm_entry_point = "ext:cli/99_main.js", esm_entry_point = "ext:cli/99_main.js",
esm = [ esm = [
dir "js", dir "js",
<<<<<<< HEAD
=======
"40_testing.js",
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"99_main.js" "99_main.js"
], ],
customizer = |ext: &mut deno_core::Extension| { customizer = |ext: &mut deno_core::Extension| {
@ -359,7 +363,15 @@ fn create_cli_snapshot(snapshot_path: PathBuf) -> CreateSnapshotOutput {
// Ideally we could deduplicate that code. // Ideally we could deduplicate that code.
fn deno_version() -> String { fn deno_version() -> String {
if env::var("DENO_CANARY").is_ok() { if env::var("DENO_CANARY").is_ok() {
<<<<<<< HEAD
format!("{}+{}", env!("CARGO_PKG_VERSION"), &git_commit_hash()[..7]) format!("{}+{}", env!("CARGO_PKG_VERSION"), &git_commit_hash()[..7])
=======
format!(
"{}+{}",
env!("CARGO_PKG_VERSION"),
git_commit_hash()[..7].to_string()
)
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} else { } else {
env!("CARGO_PKG_VERSION").to_string() env!("CARGO_PKG_VERSION").to_string()
} }

View file

@ -43,7 +43,10 @@ use crate::resolver::CliGraphResolverOptions;
use crate::standalone::DenoCompileBinaryWriter; use crate::standalone::DenoCompileBinaryWriter;
use crate::tools::check::TypeChecker; use crate::tools::check::TypeChecker;
use crate::util::file_watcher::WatcherCommunicator; use crate::util::file_watcher::WatcherCommunicator;
<<<<<<< HEAD
use crate::util::fs::canonicalize_path_maybe_not_exists; use crate::util::fs::canonicalize_path_maybe_not_exists;
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBar;
use crate::util::progress_bar::ProgressBarStyle; use crate::util::progress_bar::ProgressBarStyle;
use crate::worker::CliMainWorkerFactory; use crate::worker::CliMainWorkerFactory;
@ -307,6 +310,7 @@ impl CliFactory {
create_cli_npm_resolver(if self.options.unstable_byonm() { create_cli_npm_resolver(if self.options.unstable_byonm() {
CliNpmResolverCreateOptions::Byonm(CliNpmResolverByonmCreateOptions { CliNpmResolverCreateOptions::Byonm(CliNpmResolverByonmCreateOptions {
fs: fs.clone(), fs: fs.clone(),
<<<<<<< HEAD
root_node_modules_dir: match self.options.node_modules_dir_path().clone() { root_node_modules_dir: match self.options.node_modules_dir_path().clone() {
Some(node_modules_path) => node_modules_path, Some(node_modules_path) => node_modules_path,
// path needs to be canonicalized for node resolution // path needs to be canonicalized for node resolution
@ -314,6 +318,11 @@ impl CliFactory {
None => canonicalize_path_maybe_not_exists(self.options.initial_cwd())? None => canonicalize_path_maybe_not_exists(self.options.initial_cwd())?
.join("node_modules"), .join("node_modules"),
}, },
=======
// todo(byonm): actually resolve this properly because the package.json
// might be in an ancestor directory
root_node_modules_dir: self.options.initial_cwd().join("node_modules"),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}) })
} else { } else {
CliNpmResolverCreateOptions::Managed(CliNpmResolverManagedCreateOptions { CliNpmResolverCreateOptions::Managed(CliNpmResolverManagedCreateOptions {

View file

@ -36,7 +36,11 @@
* }, { raw: true }); * }, { raw: true });
* ``` * ```
*/ */
<<<<<<< HEAD
(() => { (() => {
=======
{
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
const internals = Deno[Deno.internal]; const internals = Deno[Deno.internal];
const core = internals.core; const core = internals.core;
@ -428,4 +432,8 @@
} }
internals.enableJupyter = enableJupyter; internals.enableJupyter = enableJupyter;
<<<<<<< HEAD
})(); })();
=======
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,6 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
<<<<<<< HEAD
=======
import "ext:cli/40_testing.js";
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
import "ext:cli/runtime/js/99_main.js"; import "ext:cli/runtime/js/99_main.js";

View file

@ -3,6 +3,10 @@
use super::client::Client; use super::client::Client;
use super::config::ConfigSnapshot; use super::config::ConfigSnapshot;
use super::config::WorkspaceSettings; use super::config::WorkspaceSettings;
<<<<<<< HEAD
=======
use super::documents::file_like_to_file_specifier;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use super::documents::Documents; use super::documents::Documents;
use super::documents::DocumentsFilter; use super::documents::DocumentsFilter;
use super::lsp_custom; use super::lsp_custom;
@ -374,11 +378,23 @@ fn get_local_completions(
current: &str, current: &str,
range: &lsp::Range, range: &lsp::Range,
) -> Option<Vec<lsp::CompletionItem>> { ) -> Option<Vec<lsp::CompletionItem>> {
<<<<<<< HEAD
=======
let base = match file_like_to_file_specifier(base) {
Some(s) => s,
None => base.clone(),
};
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
if base.scheme() != "file" { if base.scheme() != "file" {
return None; return None;
} }
<<<<<<< HEAD
let mut base_path = specifier_to_file_path(base).ok()?; let mut base_path = specifier_to_file_path(base).ok()?;
=======
let mut base_path = specifier_to_file_path(&base).ok()?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
base_path.pop(); base_path.pop();
let mut current_path = normalize_path(base_path.join(current)); let mut current_path = normalize_path(base_path.join(current));
// if the current text does not end in a `/` then we are still selecting on // if the current text does not end in a `/` then we are still selecting on
@ -398,10 +414,17 @@ fn get_local_completions(
let de = de.ok()?; let de = de.ok()?;
let label = de.path().file_name()?.to_string_lossy().to_string(); let label = de.path().file_name()?.to_string_lossy().to_string();
let entry_specifier = resolve_path(de.path().to_str()?, &cwd).ok()?; let entry_specifier = resolve_path(de.path().to_str()?, &cwd).ok()?;
<<<<<<< HEAD
if entry_specifier == *base { if entry_specifier == *base {
return None; return None;
} }
let full_text = relative_specifier(base, &entry_specifier)?; let full_text = relative_specifier(base, &entry_specifier)?;
=======
if entry_specifier == base {
return None;
}
let full_text = relative_specifier(&base, &entry_specifier)?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
// this weeds out situations where we are browsing in the parent, but // this weeds out situations where we are browsing in the parent, but
// we want to filter out non-matches when the completion is manually // we want to filter out non-matches when the completion is manually
// invoked by the user, but still allows for things like `../src/../` // invoked by the user, but still allows for things like `../src/../`

View file

@ -859,6 +859,12 @@ impl Config {
specifier: &ModuleSpecifier, specifier: &ModuleSpecifier,
) -> Option<&LanguageWorkspaceSettings> { ) -> Option<&LanguageWorkspaceSettings> {
let workspace_settings = self.workspace_settings_for_specifier(specifier); let workspace_settings = self.workspace_settings_for_specifier(specifier);
<<<<<<< HEAD
=======
if specifier.scheme() == "deno-notebook-cell" {
return Some(&workspace_settings.typescript);
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
match MediaType::from_specifier(specifier) { match MediaType::from_specifier(specifier) {
MediaType::JavaScript MediaType::JavaScript
| MediaType::Jsx | MediaType::Jsx

View file

@ -92,8 +92,20 @@ static TSX_HEADERS: Lazy<HashMap<String, String>> = Lazy::new(|| {
.collect() .collect()
}); });
<<<<<<< HEAD
pub const DOCUMENT_SCHEMES: [&str; 5] = pub const DOCUMENT_SCHEMES: [&str; 5] =
["data", "blob", "file", "http", "https"]; ["data", "blob", "file", "http", "https"];
=======
pub const DOCUMENT_SCHEMES: [&str; 7] = [
"data",
"blob",
"file",
"http",
"https",
"untitled",
"deno-notebook-cell",
];
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum LanguageId { pub enum LanguageId {
@ -256,6 +268,32 @@ impl AssetOrDocument {
} }
} }
<<<<<<< HEAD
=======
/// Convert a e.g. `deno-notebook-cell:` specifier to a `file:` specifier.
/// ```rust
/// assert_eq!(
/// file_like_to_file_specifier(
/// &Url::parse("deno-notebook-cell:/path/to/file.ipynb#abc").unwrap(),
/// ),
/// Some(Url::parse("file:///path/to/file.ipynb#abc").unwrap()),
/// );
pub fn file_like_to_file_specifier(specifier: &Url) -> Option<Url> {
if matches!(specifier.scheme(), "untitled" | "deno-notebook-cell") {
if let Ok(mut s) = ModuleSpecifier::parse(&format!(
"file://{}",
&specifier.as_str()
[url::quirks::internal_components(specifier).host_end as usize..],
)) {
s.query_pairs_mut()
.append_pair("scheme", specifier.scheme());
return Some(s);
}
}
None
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
#[derive(Debug, Default)] #[derive(Debug, Default)]
struct DocumentDependencies { struct DocumentDependencies {
deps: IndexMap<String, deno_graph::Dependency>, deps: IndexMap<String, deno_graph::Dependency>,
@ -272,10 +310,45 @@ impl DocumentDependencies {
} }
pub fn from_module(module: &deno_graph::EsmModule) -> Self { pub fn from_module(module: &deno_graph::EsmModule) -> Self {
<<<<<<< HEAD
Self { Self {
deps: module.dependencies.clone(), deps: module.dependencies.clone(),
maybe_types_dependency: module.maybe_types_dependency.clone(), maybe_types_dependency: module.maybe_types_dependency.clone(),
} }
=======
let mut deps = Self {
deps: module.dependencies.clone(),
maybe_types_dependency: module.maybe_types_dependency.clone(),
};
if file_like_to_file_specifier(&module.specifier).is_some() {
for (_, dep) in &mut deps.deps {
if let Resolution::Ok(resolved) = &mut dep.maybe_code {
if let Some(specifier) =
file_like_to_file_specifier(&resolved.specifier)
{
resolved.specifier = specifier;
}
}
if let Resolution::Ok(resolved) = &mut dep.maybe_type {
if let Some(specifier) =
file_like_to_file_specifier(&resolved.specifier)
{
resolved.specifier = specifier;
}
}
}
if let Some(dep) = &mut deps.maybe_types_dependency {
if let Resolution::Ok(resolved) = &mut dep.dependency {
if let Some(specifier) =
file_like_to_file_specifier(&resolved.specifier)
{
resolved.specifier = specifier;
}
}
}
}
deps
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }

View file

@ -3,6 +3,10 @@
use super::analysis::CodeActionData; use super::analysis::CodeActionData;
use super::code_lens; use super::code_lens;
use super::config; use super::config;
<<<<<<< HEAD
=======
use super::documents::file_like_to_file_specifier;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use super::documents::AssetOrDocument; use super::documents::AssetOrDocument;
use super::documents::DocumentsFilter; use super::documents::DocumentsFilter;
use super::language_server; use super::language_server;
@ -263,9 +267,15 @@ impl TsServer {
.map(|s| self.specifier_map.denormalize(&s)) .map(|s| self.specifier_map.denormalize(&s))
.collect::<Vec<String>>(),]), .collect::<Vec<String>>(),]),
}; };
<<<<<<< HEAD
let raw_diagnostics = self.request_with_cancellation::<HashMap<String, Vec<crate::tsc::Diagnostic>>>(snapshot, req, token).await?; let raw_diagnostics = self.request_with_cancellation::<HashMap<String, Vec<crate::tsc::Diagnostic>>>(snapshot, req, token).await?;
let mut diagnostics_map = HashMap::with_capacity(raw_diagnostics.len()); let mut diagnostics_map = HashMap::with_capacity(raw_diagnostics.len());
for (mut specifier, mut diagnostics) in raw_diagnostics { for (mut specifier, mut diagnostics) in raw_diagnostics {
=======
let diagnostics_map_ = self.request_with_cancellation::<HashMap<String, Vec<crate::tsc::Diagnostic>>>(snapshot, req, token).await?;
let mut diagnostics_map = HashMap::new();
for (mut specifier, mut diagnostics) in diagnostics_map_ {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
specifier = self.specifier_map.normalize(&specifier)?.to_string(); specifier = self.specifier_map.normalize(&specifier)?.to_string();
for diagnostic in &mut diagnostics { for diagnostic in &mut diagnostics {
normalize_diagnostic(diagnostic, &self.specifier_map)?; normalize_diagnostic(diagnostic, &self.specifier_map)?;
@ -3739,8 +3749,21 @@ impl TscSpecifierMap {
if let Some(specifier) = self.denormalized_specifiers.get(original) { if let Some(specifier) = self.denormalized_specifiers.get(original) {
return specifier.to_string(); return specifier.to_string();
} }
<<<<<<< HEAD
let mut specifier = original.to_string(); let mut specifier = original.to_string();
let media_type = MediaType::from_specifier(original); let media_type = MediaType::from_specifier(original);
=======
let mut specifier = if let Some(s) = file_like_to_file_specifier(original) {
s.to_string()
} else {
original.to_string()
};
let media_type = if original.scheme() == "deno-notebook-cell" {
MediaType::TypeScript
} else {
MediaType::from_specifier(original)
};
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
// If the URL-inferred media type doesn't correspond to tsc's path-inferred // If the URL-inferred media type doesn't correspond to tsc's path-inferred
// media type, force it to be the same by appending an extension. // media type, force it to be the same by appending an extension.
if MediaType::from_path(Path::new(specifier.as_str())) != media_type { if MediaType::from_path(Path::new(specifier.as_str())) != media_type {

View file

@ -247,8 +247,11 @@ impl LspUrlMap {
LspUrlKind::File => Url::from_file_path(path).unwrap(), LspUrlKind::File => Url::from_file_path(path).unwrap(),
}); });
} }
<<<<<<< HEAD
} else if let Some(s) = file_like_to_file_specifier(url) { } else if let Some(s) = file_like_to_file_specifier(url) {
specifier = Some(s); specifier = Some(s);
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} else if let Some(s) = from_deno_url(url) { } else if let Some(s) = from_deno_url(url) {
specifier = Some(s); specifier = Some(s);
} }
@ -258,6 +261,7 @@ impl LspUrlMap {
} }
} }
<<<<<<< HEAD
/// Convert a e.g. `deno-notebook-cell:` specifier to a `file:` specifier. /// Convert a e.g. `deno-notebook-cell:` specifier to a `file:` specifier.
/// ```rust /// ```rust
/// assert_eq!( /// assert_eq!(
@ -282,6 +286,8 @@ fn file_like_to_file_specifier(specifier: &Url) -> Option<Url> {
None None
} }
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
@ -415,6 +421,7 @@ mod tests {
let actual = map.normalize_url(&fixture, LspUrlKind::File); let actual = map.normalize_url(&fixture, LspUrlKind::File);
assert_eq!(actual, fixture); assert_eq!(actual, fixture);
} }
<<<<<<< HEAD
#[test] #[test]
fn test_file_like_to_file_specifier() { fn test_file_like_to_file_specifier() {
@ -439,4 +446,6 @@ mod tests {
), ),
); );
} }
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }

View file

@ -198,6 +198,7 @@ async fn run_subcommand(flags: Flags) -> Result<i32, AnyError> {
let types = tsc::get_types_declaration_file_text(flags.unstable); let types = tsc::get_types_declaration_file_text(flags.unstable);
display::write_to_stdout_ignore_sigpipe(types.as_bytes()) display::write_to_stdout_ignore_sigpipe(types.as_bytes())
}), }),
<<<<<<< HEAD
#[cfg(feature = "upgrade")] #[cfg(feature = "upgrade")]
DenoSubcommand::Upgrade(upgrade_flags) => spawn_subcommand(async { DenoSubcommand::Upgrade(upgrade_flags) => spawn_subcommand(async {
tools::upgrade::upgrade(flags, upgrade_flags).await tools::upgrade::upgrade(flags, upgrade_flags).await
@ -207,6 +208,11 @@ async fn run_subcommand(flags: Flags) -> Result<i32, AnyError> {
"This deno was built without the \"upgrade\" feature. Please upgrade using the installation method originally used to install Deno.", "This deno was built without the \"upgrade\" feature. Please upgrade using the installation method originally used to install Deno.",
1, 1,
), ),
=======
DenoSubcommand::Upgrade(upgrade_flags) => spawn_subcommand(async {
tools::upgrade::upgrade(flags, upgrade_flags).await
}),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
DenoSubcommand::Vendor(vendor_flags) => spawn_subcommand(async { DenoSubcommand::Vendor(vendor_flags) => spawn_subcommand(async {
tools::vendor::vendor(flags, vendor_flags).await tools::vendor::vendor(flags, vendor_flags).await
}), }),
@ -243,6 +249,7 @@ fn setup_panic_hook() {
})); }));
} }
<<<<<<< HEAD
fn exit_with_message(message: &str, code: i32) -> ! { fn exit_with_message(message: &str, code: i32) -> ! {
eprintln!( eprintln!(
"{}: {}", "{}: {}",
@ -252,6 +259,8 @@ fn exit_with_message(message: &str, code: i32) -> ! {
std::process::exit(code); std::process::exit(code);
} }
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T { fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T {
match result { match result {
Ok(value) => value, Ok(value) => value,
@ -266,7 +275,16 @@ fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T {
error_code = 10; error_code = 10;
} }
<<<<<<< HEAD
exit_with_message(&error_string, error_code); exit_with_message(&error_string, error_code);
=======
eprintln!(
"{}: {}",
colors::red_bold("error"),
error_string.trim_start_matches("error: ")
);
std::process::exit(error_code);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }
} }
@ -320,11 +338,14 @@ pub(crate) static UNSTABLE_GRANULAR_FLAGS: &[(
"Enable unstable Deno.cron API", "Enable unstable Deno.cron API",
8, 8,
), ),
<<<<<<< HEAD
( (
"unsafe-proto", "unsafe-proto",
"Enable unsafe __proto__ support. This is a security risk.", "Enable unsafe __proto__ support. This is a security risk.",
9, 9,
), ),
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
]; ];
pub(crate) fn unstable_exit_cb(_feature: &str, api_name: &str) { pub(crate) fn unstable_exit_cb(_feature: &str, api_name: &str) {

View file

@ -2,7 +2,11 @@
[package] [package]
name = "napi_sym" name = "napi_sym"
<<<<<<< HEAD
version = "0.55.0" version = "0.55.0"
=======
version = "0.56.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -19,7 +19,11 @@ use deno_semver::package::PackageReq;
use crate::args::package_json::get_local_package_json_version_reqs; use crate::args::package_json::get_local_package_json_version_reqs;
use crate::args::NpmProcessState; use crate::args::NpmProcessState;
use crate::args::NpmProcessStateKind; use crate::args::NpmProcessStateKind;
<<<<<<< HEAD
use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs; use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs;
=======
use crate::util::fs::canonicalize_path_maybe_not_exists;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use crate::util::path::specifier_to_file_path; use crate::util::path::specifier_to_file_path;
use super::common::types_package_name; use super::common::types_package_name;
@ -188,8 +192,13 @@ impl CliNpmResolver for ByonmCliNpmResolver {
InnerCliNpmResolverRef::Byonm(self) InnerCliNpmResolverRef::Byonm(self)
} }
<<<<<<< HEAD
fn root_node_modules_path(&self) -> Option<&PathBuf> { fn root_node_modules_path(&self) -> Option<&PathBuf> {
Some(&self.root_node_modules_dir) Some(&self.root_node_modules_dir)
=======
fn root_node_modules_path(&self) -> Option<std::path::PathBuf> {
Some(self.root_node_modules_dir.clone())
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
fn resolve_pkg_folder_from_deno_module_req( fn resolve_pkg_folder_from_deno_module_req(
@ -215,10 +224,14 @@ impl CliNpmResolver for ByonmCliNpmResolver {
.unwrap() .unwrap()
.join("node_modules") .join("node_modules")
.join(key); .join(key);
<<<<<<< HEAD
return Ok(canonicalize_path_maybe_not_exists_with_fs( return Ok(canonicalize_path_maybe_not_exists_with_fs(
&package_path, &package_path,
fs, fs,
)?); )?);
=======
return Ok(canonicalize_path_maybe_not_exists(&package_path)?);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }
} }

View file

@ -288,8 +288,17 @@ impl ManagedCliNpmResolver {
pkg_id: &NpmPackageId, pkg_id: &NpmPackageId,
) -> Result<PathBuf, AnyError> { ) -> Result<PathBuf, AnyError> {
let path = self.fs_resolver.package_folder(pkg_id)?; let path = self.fs_resolver.package_folder(pkg_id)?;
<<<<<<< HEAD
let path = let path =
canonicalize_path_maybe_not_exists_with_fs(&path, self.fs.as_ref())?; canonicalize_path_maybe_not_exists_with_fs(&path, self.fs.as_ref())?;
=======
let path = canonicalize_path_maybe_not_exists_with_fs(&path, |path| {
self
.fs
.realpath_sync(path)
.map_err(|err| err.into_io_error())
})?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
log::debug!( log::debug!(
"Resolved package folder of {} to {}", "Resolved package folder of {} to {}",
pkg_id.as_serialized(), pkg_id.as_serialized(),
@ -556,7 +565,11 @@ impl CliNpmResolver for ManagedCliNpmResolver {
&self.progress_bar, &self.progress_bar,
self.api.base_url().clone(), self.api.base_url().clone(),
npm_resolution, npm_resolution,
<<<<<<< HEAD
self.root_node_modules_path().map(ToOwned::to_owned), self.root_node_modules_path().map(ToOwned::to_owned),
=======
self.root_node_modules_path(),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
self.npm_system_info.clone(), self.npm_system_info.clone(),
), ),
self.global_npm_cache.clone(), self.global_npm_cache.clone(),
@ -571,7 +584,11 @@ impl CliNpmResolver for ManagedCliNpmResolver {
InnerCliNpmResolverRef::Managed(self) InnerCliNpmResolverRef::Managed(self)
} }
<<<<<<< HEAD
fn root_node_modules_path(&self) -> Option<&PathBuf> { fn root_node_modules_path(&self) -> Option<&PathBuf> {
=======
fn root_node_modules_path(&self) -> Option<PathBuf> {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
self.fs_resolver.node_modules_path() self.fs_resolver.node_modules_path()
} }

View file

@ -29,7 +29,11 @@ pub trait NpmPackageFsResolver: Send + Sync {
fn root_dir_url(&self) -> &Url; fn root_dir_url(&self) -> &Url;
/// The local node_modules folder if it is applicable to the implementation. /// The local node_modules folder if it is applicable to the implementation.
<<<<<<< HEAD
fn node_modules_path(&self) -> Option<&PathBuf>; fn node_modules_path(&self) -> Option<&PathBuf>;
=======
fn node_modules_path(&self) -> Option<PathBuf>;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
fn package_folder( fn package_folder(
&self, &self,

View file

@ -75,7 +75,11 @@ impl NpmPackageFsResolver for GlobalNpmPackageResolver {
self.cache.root_dir_url() self.cache.root_dir_url()
} }
<<<<<<< HEAD
fn node_modules_path(&self) -> Option<&PathBuf> { fn node_modules_path(&self) -> Option<&PathBuf> {
=======
fn node_modules_path(&self) -> Option<PathBuf> {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
None None
} }

View file

@ -122,9 +122,20 @@ impl LocalNpmPackageResolver {
}; };
// Canonicalize the path so it's not pointing to the symlinked directory // Canonicalize the path so it's not pointing to the symlinked directory
// in `node_modules` directory of the referrer. // in `node_modules` directory of the referrer.
<<<<<<< HEAD
canonicalize_path_maybe_not_exists_with_fs(&path, self.fs.as_ref()) canonicalize_path_maybe_not_exists_with_fs(&path, self.fs.as_ref())
.map(Some) .map(Some)
.map_err(|err| err.into()) .map_err(|err| err.into())
=======
canonicalize_path_maybe_not_exists_with_fs(&path, |path| {
self
.fs
.realpath_sync(path)
.map_err(|err| err.into_io_error())
})
.map(Some)
.map_err(|err| err.into())
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }
@ -134,8 +145,13 @@ impl NpmPackageFsResolver for LocalNpmPackageResolver {
&self.root_node_modules_url &self.root_node_modules_url
} }
<<<<<<< HEAD
fn node_modules_path(&self) -> Option<&PathBuf> { fn node_modules_path(&self) -> Option<&PathBuf> {
Some(&self.root_node_modules_path) Some(&self.root_node_modules_path)
=======
fn node_modules_path(&self) -> Option<PathBuf> {
Some(self.root_node_modules_path.clone())
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
fn package_folder(&self, id: &NpmPackageId) -> Result<PathBuf, AnyError> { fn package_folder(&self, id: &NpmPackageId) -> Result<PathBuf, AnyError> {

View file

@ -75,7 +75,11 @@ pub trait CliNpmResolver: NpmResolver {
} }
} }
<<<<<<< HEAD
fn root_node_modules_path(&self) -> Option<&PathBuf>; fn root_node_modules_path(&self) -> Option<&PathBuf>;
=======
fn root_node_modules_path(&self) -> Option<PathBuf>;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
fn resolve_pkg_folder_from_deno_module_req( fn resolve_pkg_folder_from_deno_module_req(
&self, &self,

View file

@ -123,6 +123,7 @@ impl SerializablePackageJsonDeps {
} }
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
<<<<<<< HEAD
pub enum NodeModules { pub enum NodeModules {
Managed { Managed {
/// Whether this uses a node_modules directory (true) or the global cache (false). /// Whether this uses a node_modules directory (true) or the global cache (false).
@ -135,6 +136,8 @@ pub enum NodeModules {
} }
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
pub struct Metadata { pub struct Metadata {
pub argv: Vec<String>, pub argv: Vec<String>,
pub unstable: bool, pub unstable: bool,
@ -148,7 +151,13 @@ pub struct Metadata {
pub unsafely_ignore_certificate_errors: Option<Vec<String>>, pub unsafely_ignore_certificate_errors: Option<Vec<String>>,
pub maybe_import_map: Option<(Url, String)>, pub maybe_import_map: Option<(Url, String)>,
pub entrypoint: ModuleSpecifier, pub entrypoint: ModuleSpecifier,
<<<<<<< HEAD
pub node_modules: Option<NodeModules>, pub node_modules: Option<NodeModules>,
=======
/// Whether this uses a node_modules directory (true) or the global cache (false).
pub node_modules_dir: bool,
pub package_json_deps: Option<SerializablePackageJsonDeps>,
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
pub fn load_npm_vfs(root_dir_path: PathBuf) -> Result<FileBackedVfs, AnyError> { pub fn load_npm_vfs(root_dir_path: PathBuf) -> Result<FileBackedVfs, AnyError> {
@ -500,6 +509,7 @@ impl<'a> DenoCompileBinaryWriter<'a> {
.resolve_import_map(self.file_fetcher) .resolve_import_map(self.file_fetcher)
.await? .await?
.map(|import_map| (import_map.base_url().clone(), import_map.to_json())); .map(|import_map| (import_map.base_url().clone(), import_map.to_json()));
<<<<<<< HEAD
let (npm_vfs, npm_files, node_modules) = let (npm_vfs, npm_files, node_modules) =
match self.npm_resolver.as_inner() { match self.npm_resolver.as_inner() {
InnerCliNpmResolverRef::Managed(managed) => { InnerCliNpmResolverRef::Managed(managed) => {
@ -538,6 +548,25 @@ impl<'a> DenoCompileBinaryWriter<'a> {
) )
} }
}; };
=======
let (npm_vfs, npm_files) = match self.npm_resolver.as_inner() {
InnerCliNpmResolverRef::Managed(managed) => {
let snapshot =
managed.serialized_valid_snapshot_for_system(&self.npm_system_info);
if !snapshot.as_serialized().packages.is_empty() {
let (root_dir, files) = self.build_vfs()?.into_dir_and_files();
eszip.add_npm_snapshot(snapshot);
(Some(root_dir), files)
} else {
(None, Vec::new())
}
}
InnerCliNpmResolverRef::Byonm(_) => {
let (root_dir, files) = self.build_vfs()?.into_dir_and_files();
(Some(root_dir), files)
}
};
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let metadata = Metadata { let metadata = Metadata {
argv: compile_flags.args.clone(), argv: compile_flags.args.clone(),
@ -554,7 +583,15 @@ impl<'a> DenoCompileBinaryWriter<'a> {
ca_data, ca_data,
entrypoint: entrypoint.clone(), entrypoint: entrypoint.clone(),
maybe_import_map, maybe_import_map,
<<<<<<< HEAD
node_modules, node_modules,
=======
node_modules_dir: self.npm_resolver.root_node_modules_path().is_some(),
package_json_deps: self
.package_json_deps_provider
.deps()
.map(|deps| SerializablePackageJsonDeps::from_deps(deps.clone())),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };
write_binary_bytes( write_binary_bytes(
@ -572,7 +609,11 @@ impl<'a> DenoCompileBinaryWriter<'a> {
InnerCliNpmResolverRef::Managed(npm_resolver) => { InnerCliNpmResolverRef::Managed(npm_resolver) => {
if let Some(node_modules_path) = npm_resolver.root_node_modules_path() { if let Some(node_modules_path) = npm_resolver.root_node_modules_path() {
let mut builder = VfsBuilder::new(node_modules_path.clone())?; let mut builder = VfsBuilder::new(node_modules_path.clone())?;
<<<<<<< HEAD
builder.add_dir_recursive(node_modules_path)?; builder.add_dir_recursive(node_modules_path)?;
=======
builder.add_dir_recursive(&node_modules_path)?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
Ok(builder) Ok(builder)
} else { } else {
// DO NOT include the user's registry url as it may contain credentials, // DO NOT include the user's registry url as it may contain credentials,
@ -592,6 +633,7 @@ impl<'a> DenoCompileBinaryWriter<'a> {
Ok(builder) Ok(builder)
} }
} }
<<<<<<< HEAD
InnerCliNpmResolverRef::Byonm(npm_resolver) => { InnerCliNpmResolverRef::Byonm(npm_resolver) => {
// the root_node_modules directory will always exist for byonm // the root_node_modules directory will always exist for byonm
let node_modules_path = npm_resolver.root_node_modules_path().unwrap(); let node_modules_path = npm_resolver.root_node_modules_path().unwrap();
@ -605,6 +647,11 @@ impl<'a> DenoCompileBinaryWriter<'a> {
builder.add_dir_recursive(node_modules_path)?; builder.add_dir_recursive(node_modules_path)?;
} }
Ok(builder) Ok(builder)
=======
InnerCliNpmResolverRef::Byonm(_) => {
// todo(#18967): should use the node_modules directory
todo!()
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }
} }

View file

@ -16,7 +16,10 @@ use crate::module_loader::CliNodeResolver;
use crate::module_loader::NpmModuleLoader; use crate::module_loader::NpmModuleLoader;
use crate::node::CliCjsCodeAnalyzer; use crate::node::CliCjsCodeAnalyzer;
use crate::npm::create_cli_npm_resolver; use crate::npm::create_cli_npm_resolver;
<<<<<<< HEAD
use crate::npm::CliNpmResolverByonmCreateOptions; use crate::npm::CliNpmResolverByonmCreateOptions;
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverCreateOptions;
use crate::npm::CliNpmResolverManagedCreateOptions; use crate::npm::CliNpmResolverManagedCreateOptions;
use crate::npm::CliNpmResolverManagedPackageJsonInstallerOption; use crate::npm::CliNpmResolverManagedPackageJsonInstallerOption;
@ -312,6 +315,7 @@ pub async fn run(
.join("node_modules"); .join("node_modules");
let npm_cache_dir = NpmCacheDir::new(root_path.clone()); let npm_cache_dir = NpmCacheDir::new(root_path.clone());
let npm_global_cache_dir = npm_cache_dir.get_cache_location(); let npm_global_cache_dir = npm_cache_dir.get_cache_location();
<<<<<<< HEAD
let cache_setting = CacheSetting::Only; let cache_setting = CacheSetting::Only;
let (package_json_deps_provider, fs, npm_resolver, maybe_vfs_root) = let (package_json_deps_provider, fs, npm_resolver, maybe_vfs_root) =
match metadata.node_modules { match metadata.node_modules {
@ -419,6 +423,63 @@ pub async fn run(
}; };
let has_node_modules_dir = npm_resolver.root_node_modules_path().is_some(); let has_node_modules_dir = npm_resolver.root_node_modules_path().is_some();
=======
let (fs, vfs_root, maybe_node_modules_path, maybe_snapshot) =
if let Some(snapshot) = eszip.take_npm_snapshot() {
let vfs_root_dir_path = if metadata.node_modules_dir {
root_path
} else {
npm_cache_dir.registry_folder(&npm_registry_url)
};
let vfs = load_npm_vfs(vfs_root_dir_path.clone())
.context("Failed to load npm vfs.")?;
let node_modules_path = if metadata.node_modules_dir {
Some(vfs.root().to_path_buf())
} else {
None
};
(
Arc::new(DenoCompileFileSystem::new(vfs))
as Arc<dyn deno_fs::FileSystem>,
Some(vfs_root_dir_path),
node_modules_path,
Some(snapshot),
)
} else {
(
Arc::new(deno_fs::RealFs) as Arc<dyn deno_fs::FileSystem>,
None,
None,
None,
)
};
let has_node_modules_dir = maybe_node_modules_path.is_some();
let package_json_deps_provider = Arc::new(PackageJsonDepsProvider::new(
metadata
.package_json_deps
.map(|serialized| serialized.into_deps()),
));
let npm_resolver = create_cli_npm_resolver(
CliNpmResolverCreateOptions::Managed(CliNpmResolverManagedCreateOptions {
snapshot: CliNpmResolverManagedSnapshotOption::Specified(maybe_snapshot),
maybe_lockfile: None,
fs: fs.clone(),
http_client: http_client.clone(),
npm_global_cache_dir,
cache_setting: CacheSetting::Only,
text_only_progress_bar: progress_bar,
maybe_node_modules_path,
package_json_installer:
CliNpmResolverManagedPackageJsonInstallerOption::ConditionalInstall(
package_json_deps_provider.clone(),
),
npm_registry_url,
npm_system_info: Default::default(),
}),
)
.await?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let node_resolver = Arc::new(NodeResolver::new( let node_resolver = Arc::new(NodeResolver::new(
fs.clone(), fs.clone(),
npm_resolver.clone().into_npm_resolver(), npm_resolver.clone().into_npm_resolver(),
@ -462,7 +523,11 @@ pub async fn run(
let permissions = { let permissions = {
let mut permissions = metadata.permissions; let mut permissions = metadata.permissions;
// if running with an npm vfs, grant read access to it // if running with an npm vfs, grant read access to it
<<<<<<< HEAD
if let Some(vfs_root) = maybe_vfs_root { if let Some(vfs_root) = maybe_vfs_root {
=======
if let Some(vfs_root) = vfs_root {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
match &mut permissions.allow_read { match &mut permissions.allow_read {
Some(vec) if vec.is_empty() => { Some(vec) if vec.is_empty() => {
// do nothing, already granted // do nothing, already granted

View file

@ -92,7 +92,13 @@ impl VfsBuilder {
if file_type.is_dir() { if file_type.is_dir() {
self.add_dir_recursive_internal(&path)?; self.add_dir_recursive_internal(&path)?;
} else if file_type.is_file() { } else if file_type.is_file() {
<<<<<<< HEAD
self.add_file_at_path(&path)?; self.add_file_at_path(&path)?;
=======
let file_bytes = std::fs::read(&path)
.with_context(|| format!("Reading {}", path.display()))?;
self.add_file(&path, file_bytes)?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} else if file_type.is_symlink() { } else if file_type.is_symlink() {
let target = util::fs::canonicalize_path(&path) let target = util::fs::canonicalize_path(&path)
.with_context(|| format!("Reading symlink {}", path.display()))?; .with_context(|| format!("Reading symlink {}", path.display()))?;
@ -161,12 +167,15 @@ impl VfsBuilder {
Ok(current_dir) Ok(current_dir)
} }
<<<<<<< HEAD
pub fn add_file_at_path(&mut self, path: &Path) -> Result<(), AnyError> { pub fn add_file_at_path(&mut self, path: &Path) -> Result<(), AnyError> {
let file_bytes = std::fs::read(path) let file_bytes = std::fs::read(path)
.with_context(|| format!("Reading {}", path.display()))?; .with_context(|| format!("Reading {}", path.display()))?;
self.add_file(path, file_bytes) self.add_file(path, file_bytes)
} }
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
fn add_file(&mut self, path: &Path, data: Vec<u8>) -> Result<(), AnyError> { fn add_file(&mut self, path: &Path, data: Vec<u8>) -> Result<(), AnyError> {
log::debug!("Adding file '{}'", path.display()); log::debug!("Adding file '{}'", path.display());
let checksum = util::checksum::gen(&[&data]); let checksum = util::checksum::gen(&[&data]);

View file

@ -798,6 +798,7 @@ testing[WILDCARD]this
r#"{ "dependencies": { "@denotest/esm-basic": "1" } }"#, r#"{ "dependencies": { "@denotest/esm-basic": "1" } }"#,
); );
<<<<<<< HEAD
context context
.new_command() .new_command()
.args("compile --output binary main.ts") .args("compile --output binary main.ts")
@ -828,6 +829,17 @@ testing[WILDCARD]this
.name(&binary_path) .name(&binary_path)
.run() .run()
.assert_matches_text("2\n"); .assert_matches_text("2\n");
=======
let output = context
.new_command()
.args("compile --output binary main.ts")
.run();
output.assert_exit_code(0);
output.skip_output_check();
let output = context.new_command().name(binary_path).run();
output.assert_matches_text("2\n");
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
#[test] #[test]

View file

@ -45,7 +45,10 @@ fn help_output() {
"Run a task defined in the configuration file", "Run a task defined in the configuration file",
"Run tests", "Run tests",
"Print runtime TypeScript declarations", "Print runtime TypeScript declarations",
<<<<<<< HEAD
#[cfg(feature = "upgrade")] #[cfg(feature = "upgrade")]
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"Upgrade deno executable to given version", "Upgrade deno executable to given version",
"Vendor remote modules into a local directory", "Vendor remote modules into a local directory",
"Print this message or the help of the given subcommand(s)", "Print this message or the help of the given subcommand(s)",

View file

@ -27,6 +27,7 @@ fn fmt_test() {
testdata_fmt_dir.join("badly_formatted.json"); testdata_fmt_dir.join("badly_formatted.json");
let badly_formatted_json = t.path().join("badly_formatted.json"); let badly_formatted_json = t.path().join("badly_formatted.json");
badly_formatted_original_json.copy(&badly_formatted_json); badly_formatted_original_json.copy(&badly_formatted_json);
<<<<<<< HEAD
let fixed_ipynb = testdata_fmt_dir.join("badly_formatted_fixed.ipynb"); let fixed_ipynb = testdata_fmt_dir.join("badly_formatted_fixed.ipynb");
let badly_formatted_original_ipynb = let badly_formatted_original_ipynb =
@ -35,16 +36,27 @@ fn fmt_test() {
badly_formatted_original_ipynb.copy(&badly_formatted_ipynb); badly_formatted_original_ipynb.copy(&badly_formatted_ipynb);
// First, check formatting by ignoring the badly formatted file. // First, check formatting by ignoring the badly formatted file.
=======
// First, check formatting by ignoring the badly formatted file.
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let output = context let output = context
.new_command() .new_command()
.current_dir(&testdata_fmt_dir) .current_dir(&testdata_fmt_dir)
.args_vec(vec![ .args_vec(vec![
"fmt".to_string(), "fmt".to_string(),
format!( format!(
<<<<<<< HEAD
"--ignore={badly_formatted_js},{badly_formatted_md},{badly_formatted_json},{badly_formatted_ipynb}", "--ignore={badly_formatted_js},{badly_formatted_md},{badly_formatted_json},{badly_formatted_ipynb}",
), ),
format!( format!(
"--check {badly_formatted_js} {badly_formatted_md} {badly_formatted_json} {badly_formatted_ipynb}", "--check {badly_formatted_js} {badly_formatted_md} {badly_formatted_json} {badly_formatted_ipynb}",
=======
"--ignore={badly_formatted_js},{badly_formatted_md},{badly_formatted_json}",
),
format!(
"--check {badly_formatted_js} {badly_formatted_md} {badly_formatted_json}",
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
), ),
]) ])
.run(); .run();
@ -63,7 +75,10 @@ fn fmt_test() {
badly_formatted_js.to_string(), badly_formatted_js.to_string(),
badly_formatted_md.to_string(), badly_formatted_md.to_string(),
badly_formatted_json.to_string(), badly_formatted_json.to_string(),
<<<<<<< HEAD
badly_formatted_ipynb.to_string(), badly_formatted_ipynb.to_string(),
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
]) ])
.run(); .run();
@ -79,7 +94,10 @@ fn fmt_test() {
badly_formatted_js.to_string(), badly_formatted_js.to_string(),
badly_formatted_md.to_string(), badly_formatted_md.to_string(),
badly_formatted_json.to_string(), badly_formatted_json.to_string(),
<<<<<<< HEAD
badly_formatted_ipynb.to_string(), badly_formatted_ipynb.to_string(),
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
]) ])
.run(); .run();
@ -89,6 +107,7 @@ fn fmt_test() {
let expected_js = fixed_js.read_to_string(); let expected_js = fixed_js.read_to_string();
let expected_md = fixed_md.read_to_string(); let expected_md = fixed_md.read_to_string();
let expected_json = fixed_json.read_to_string(); let expected_json = fixed_json.read_to_string();
<<<<<<< HEAD
let expected_ipynb = fixed_ipynb.read_to_string(); let expected_ipynb = fixed_ipynb.read_to_string();
let actual_js = badly_formatted_js.read_to_string(); let actual_js = badly_formatted_js.read_to_string();
let actual_md = badly_formatted_md.read_to_string(); let actual_md = badly_formatted_md.read_to_string();
@ -98,6 +117,14 @@ fn fmt_test() {
assert_eq!(expected_md, actual_md); assert_eq!(expected_md, actual_md);
assert_eq!(expected_json, actual_json); assert_eq!(expected_json, actual_json);
assert_eq!(expected_ipynb, actual_ipynb); assert_eq!(expected_ipynb, actual_ipynb);
=======
let actual_js = badly_formatted_js.read_to_string();
let actual_md = badly_formatted_md.read_to_string();
let actual_json = badly_formatted_json.read_to_string();
assert_eq!(expected_js, actual_js);
assert_eq!(expected_md, actual_md);
assert_eq!(expected_json, actual_json);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
#[test] #[test]
@ -209,12 +236,15 @@ itest!(fmt_stdin_json {
output_str: Some("{ \"key\": \"value\" }\n"), output_str: Some("{ \"key\": \"value\" }\n"),
}); });
<<<<<<< HEAD
itest!(fmt_stdin_ipynb { itest!(fmt_stdin_ipynb {
args: "fmt --ext=ipynb -", args: "fmt --ext=ipynb -",
input: Some(include_str!("../testdata/fmt/badly_formatted.ipynb")), input: Some(include_str!("../testdata/fmt/badly_formatted.ipynb")),
output_str: Some(include_str!("../testdata/fmt/badly_formatted_fixed.ipynb")), output_str: Some(include_str!("../testdata/fmt/badly_formatted_fixed.ipynb")),
}); });
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
itest!(fmt_stdin_check_formatted { itest!(fmt_stdin_check_formatted {
args: "fmt --check -", args: "fmt --check -",
input: Some("const a = 1;\n"), input: Some("const a = 1;\n"),

View file

@ -10442,6 +10442,7 @@ fn lsp_import_unstable_bare_node_builtins_auto_discovered() {
client.shutdown(); client.shutdown();
} }
<<<<<<< HEAD
#[test] #[test]
fn lsp_jupyter_byonm_diagnostics() { fn lsp_jupyter_byonm_diagnostics() {
@ -10502,3 +10503,5 @@ fn lsp_jupyter_byonm_diagnostics() {
); );
client.shutdown(); client.shutdown();
} }
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -4716,6 +4716,7 @@ itest!(workspaces_nested_member {
http_server: true, http_server: true,
exit_code: 1, exit_code: 1,
}); });
<<<<<<< HEAD
itest!(unsafe_proto { itest!(unsafe_proto {
args: "run -A run/unsafe_proto/main.js", args: "run -A run/unsafe_proto/main.js",
@ -4730,3 +4731,5 @@ itest!(unsafe_proto_flag {
http_server: false, http_server: false,
exit_code: 0, exit_code: 0,
}); });
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -253,7 +253,13 @@ fn upgrade_lsp_repl_sleeps() {
pty.expect("579"); pty.expect("579");
}); });
<<<<<<< HEAD
// the test server will sleep for 95 seconds, so ensure this is less // the test server will sleep for 95 seconds, so ensure this is less
let elapsed_secs = start_instant.elapsed().as_secs(); let elapsed_secs = start_instant.elapsed().as_secs();
assert!(elapsed_secs < 94, "elapsed_secs: {}", elapsed_secs); assert!(elapsed_secs < 94, "elapsed_secs: {}", elapsed_secs);
=======
// the test server will sleep for 45 seconds, so ensure this is less
let elapsed_secs = start_instant.elapsed().as_secs();
assert!(elapsed_secs < 30, "elapsed_secs: {}", elapsed_secs);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }

View file

@ -88,7 +88,10 @@
"test-querystring.js", "test-querystring.js",
"test-readline-interface.js", "test-readline-interface.js",
"test-stdin-from-file-spawn.js", "test-stdin-from-file-spawn.js",
<<<<<<< HEAD
"test-stream-duplex-from.js", "test-stream-duplex-from.js",
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"test-ttywrap-invalid-fd.js", "test-ttywrap-invalid-fd.js",
"test-url-urltooptions.js", "test-url-urltooptions.js",
"test-util-format.js", "test-util-format.js",
@ -430,7 +433,10 @@
"test-nodeeventtarget.js", "test-nodeeventtarget.js",
"test-outgoing-message-destroy.js", "test-outgoing-message-destroy.js",
"test-outgoing-message-pipe.js", "test-outgoing-message-pipe.js",
<<<<<<< HEAD
"test-parse-args.mjs", "test-parse-args.mjs",
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"test-path-basename.js", "test-path-basename.js",
"test-path-dirname.js", "test-path-dirname.js",
"test-path-extname.js", "test-path-extname.js",

View file

@ -1,14 +1,21 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import "./polyfill_globals.js"; import "./polyfill_globals.js";
import { createRequire } from "node:module"; import { createRequire } from "node:module";
<<<<<<< HEAD
import { toFileUrl } from "../../../test_util/std/path/mod.ts"; import { toFileUrl } from "../../../test_util/std/path/mod.ts";
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
const file = Deno.args[0]; const file = Deno.args[0];
if (!file) { if (!file) {
throw new Error("No file provided"); throw new Error("No file provided");
} }
<<<<<<< HEAD
if (file.endsWith(".mjs")) { if (file.endsWith(".mjs")) {
await import(toFileUrl(file).href); await import(toFileUrl(file).href);
} else { } else {
createRequire(import.meta.url)(file); createRequire(import.meta.url)(file);
} }
=======
createRequire(import.meta.url)(file);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -83,7 +83,10 @@ async function runTest(t: Deno.TestContext, path: string): Promise<void> {
"--quiet", "--quiet",
"--unstable", "--unstable",
//"--unsafely-ignore-certificate-errors", //"--unsafely-ignore-certificate-errors",
<<<<<<< HEAD
"--unstable-bare-node-builtins", "--unstable-bare-node-builtins",
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"--v8-flags=" + v8Flags.join(), "--v8-flags=" + v8Flags.join(),
"runner.ts", "runner.ts",
testCase, testCase,

View file

@ -52,5 +52,9 @@ module.exports = {
cleanupStaleProcess, cleanupStaleProcess,
logAfterTime, logAfterTime,
kExpiringChildRunTime, kExpiringChildRunTime,
<<<<<<< HEAD
kExpiringParentTimer, kExpiringParentTimer,
=======
kExpiringParentTimer
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };

View file

@ -20,11 +20,19 @@ const types = {
MX: 15, MX: 15,
TXT: 16, TXT: 16,
ANY: 255, ANY: 255,
<<<<<<< HEAD
CAA: 257, CAA: 257,
}; };
const classes = { const classes = {
IN: 1, IN: 1,
=======
CAA: 257
};
const classes = {
IN: 1
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };
// Naïve DNS parser/serializer. // Naïve DNS parser/serializer.
@ -41,7 +49,11 @@ function readDomainFromPacket(buffer, offset) {
const { nread, domain } = readDomainFromPacket(buffer, offset + length); const { nread, domain } = readDomainFromPacket(buffer, offset + length);
return { return {
nread: 1 + length + nread, nread: 1 + length + nread,
<<<<<<< HEAD
domain: domain ? `${chunk}.${domain}` : chunk, domain: domain ? `${chunk}.${domain}` : chunk,
=======
domain: domain ? `${chunk}.${domain}` : chunk
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };
} }
// Pointer to another part of the packet. // Pointer to another part of the packet.
@ -50,7 +62,11 @@ function readDomainFromPacket(buffer, offset) {
const pointeeOffset = buffer.readUInt16BE(offset) &~ 0xC000; const pointeeOffset = buffer.readUInt16BE(offset) &~ 0xC000;
return { return {
nread: 2, nread: 2,
<<<<<<< HEAD
domain: readDomainFromPacket(buffer, pointeeOffset), domain: readDomainFromPacket(buffer, pointeeOffset),
=======
domain: readDomainFromPacket(buffer, pointeeOffset)
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };
} }
@ -323,5 +339,9 @@ module.exports = {
parseDNSPacket, parseDNSPacket,
errorLookupMock, errorLookupMock,
mockedErrorCode, mockedErrorCode,
<<<<<<< HEAD
mockedSysCall, mockedSysCall,
=======
mockedSysCall
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };

View file

@ -35,5 +35,9 @@ module.exports = {
hijackStdout: hijackStdWritable.bind(null, 'stdout'), hijackStdout: hijackStdWritable.bind(null, 'stdout'),
hijackStderr: hijackStdWritable.bind(null, 'stderr'), hijackStderr: hijackStdWritable.bind(null, 'stderr'),
restoreStdout: restoreWritable.bind(null, 'stdout'), restoreStdout: restoreWritable.bind(null, 'stdout'),
<<<<<<< HEAD
restoreStderr: restoreWritable.bind(null, 'stderr'), restoreStderr: restoreWritable.bind(null, 'stderr'),
=======
restoreStderr: restoreWritable.bind(null, 'stderr')
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };

View file

@ -44,7 +44,10 @@ const {
getCallSite, getCallSite,
mustNotCall, mustNotCall,
mustNotMutateObjectDeep, mustNotMutateObjectDeep,
<<<<<<< HEAD
parseTestFlags, parseTestFlags,
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
printSkipMessage, printSkipMessage,
skip, skip,
nodeProcessAborted, nodeProcessAborted,
@ -96,7 +99,10 @@ export {
getCallSite, getCallSite,
mustNotCall, mustNotCall,
mustNotMutateObjectDeep, mustNotMutateObjectDeep,
<<<<<<< HEAD
parseTestFlags, parseTestFlags,
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
printSkipMessage, printSkipMessage,
skip, skip,
nodeProcessAborted, nodeProcessAborted,

View file

@ -62,6 +62,7 @@ function onexit() {
} }
} }
<<<<<<< HEAD
function resolve(...paths) { function resolve(...paths) {
return path.resolve(tmpPath, ...paths); return path.resolve(tmpPath, ...paths);
} }
@ -76,4 +77,9 @@ module.exports = {
refresh, refresh,
hasEnoughSpace, hasEnoughSpace,
resolve, resolve,
=======
module.exports = {
path: tmpPath,
refresh
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}; };

View file

@ -41,7 +41,11 @@ dns.lookup(
} }
assert.ifError(err); assert.ifError(err);
assert.strictEqual(address, fixture.expectedAddress); assert.strictEqual(address, fixture.expectedAddress);
<<<<<<< HEAD
}), }),
=======
})
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
dns.promises.lookup(fixture.hostname, { family: fixture.family }) dns.promises.lookup(fixture.hostname, { family: fixture.family })

View file

@ -18,35 +18,61 @@ assert.rejects(
dnsPromises.lookup(addresses.NOT_FOUND, { dnsPromises.lookup(addresses.NOT_FOUND, {
hints: 0, hints: 0,
family: 0, family: 0,
<<<<<<< HEAD
all: false, all: false,
}), }),
{ {
code: 'ENOTFOUND', code: 'ENOTFOUND',
message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`, message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`,
}, },
=======
all: false
}),
{
code: 'ENOTFOUND',
message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
assert.rejects( assert.rejects(
dnsPromises.lookup(addresses.NOT_FOUND, { dnsPromises.lookup(addresses.NOT_FOUND, {
hints: 0, hints: 0,
family: 0, family: 0,
<<<<<<< HEAD
all: true, all: true,
}), }),
{ {
code: 'ENOTFOUND', code: 'ENOTFOUND',
message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`, message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`,
}, },
=======
all: true
}),
{
code: 'ENOTFOUND',
message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
dns.lookup(addresses.NOT_FOUND, { dns.lookup(addresses.NOT_FOUND, {
hints: 0, hints: 0,
family: 0, family: 0,
<<<<<<< HEAD
all: true, all: true,
=======
all: true
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}, common.mustCall((error) => { }, common.mustCall((error) => {
assert.strictEqual(error.code, 'ENOTFOUND'); assert.strictEqual(error.code, 'ENOTFOUND');
assert.strictEqual( assert.strictEqual(
error.message, error.message,
<<<<<<< HEAD
`getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`, `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`,
=======
`getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
assert.strictEqual(error.syscall, 'getaddrinfo'); assert.strictEqual(error.syscall, 'getaddrinfo');
assert.strictEqual(error.hostname, addresses.NOT_FOUND); assert.strictEqual(error.hostname, addresses.NOT_FOUND);
@ -55,7 +81,13 @@ dns.lookup(addresses.NOT_FOUND, {
assert.throws( assert.throws(
() => dnsPromises.lookup(addresses.NOT_FOUND, { () => dnsPromises.lookup(addresses.NOT_FOUND, {
family: 'ipv4', family: 'ipv4',
<<<<<<< HEAD
all: 'all', all: 'all',
}), }),
{ code: 'ERR_INVALID_ARG_VALUE' }, { code: 'ERR_INVALID_ARG_VALUE' },
=======
all: 'all'
}),
{ code: 'ERR_INVALID_ARG_VALUE' }
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );

View file

@ -19,8 +19,13 @@ const dnsPromises = require('dns').promises;
{ {
code: 'ERR_INVALID_ARG_VALUE', code: 'ERR_INVALID_ARG_VALUE',
name: 'TypeError', name: 'TypeError',
<<<<<<< HEAD
message: `The argument 'rrtype' is invalid. Received '${rrtype}'`, message: `The argument 'rrtype' is invalid. Received '${rrtype}'`,
}, },
=======
message: `The argument 'rrtype' is invalid. Received '${rrtype}'`
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
} }
@ -33,8 +38,13 @@ const dnsPromises = require('dns').promises;
code: 'ERR_INVALID_ARG_TYPE', code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError', name: 'TypeError',
message: 'The "rrtype" argument must be of type string. ' + message: 'The "rrtype" argument must be of type string. ' +
<<<<<<< HEAD
`Received type ${typeof rrtype} (${rrtype})`, `Received type ${typeof rrtype} (${rrtype})`,
}, },
=======
`Received type ${typeof rrtype} (${rrtype})`
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
} }

View file

@ -131,7 +131,11 @@ b.copy(Buffer.alloc(0), 1, 1, 1);
b.copy(Buffer.alloc(1), 1, 1, 1); b.copy(Buffer.alloc(1), 1, 1, 1);
// Try to copy 0 bytes from past the end of the source buffer // Try to copy 0 bytes from past the end of the source buffer
<<<<<<< HEAD
b.copy(Buffer.alloc(1), 0, 1024, 1024); b.copy(Buffer.alloc(1), 0, 1024, 1024);
=======
b.copy(Buffer.alloc(1), 0, 2048, 2048);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
// Testing for smart defaults and ability to pass string values as offset // Testing for smart defaults and ability to pass string values as offset
{ {

View file

@ -162,6 +162,7 @@ assert.throws(
{ {
code: 'ERR_OUT_OF_RANGE', code: 'ERR_OUT_OF_RANGE',
name: 'RangeError', name: 'RangeError',
<<<<<<< HEAD
} }
); );
@ -171,6 +172,10 @@ assert.throws(
{ {
code: 'ERR_OUT_OF_RANGE', code: 'ERR_OUT_OF_RANGE',
name: 'RangeError', name: 'RangeError',
=======
message: 'The value of "sourceStart" is out of range. ' +
'It must be >= 0. Received -1'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );

View file

@ -42,5 +42,9 @@ if (common.isWindows) {
} }
exec(pwdcommand, { cwd: dir }, common.mustSucceed((stdout, stderr) => { exec(pwdcommand, { cwd: dir }, common.mustSucceed((stdout, stderr) => {
<<<<<<< HEAD
assert(stdout.toLowerCase().startsWith(dir)); assert(stdout.toLowerCase().startsWith(dir));
=======
assert(stdout.startsWith(dir));
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
})); }));

View file

@ -18,7 +18,11 @@ assert.throws(
{ {
code: 'ERR_UNHANDLED_ERROR', code: 'ERR_UNHANDLED_ERROR',
name: 'Error', name: 'Error',
<<<<<<< HEAD
message: "Unhandled error. ('Accepts a string')", message: "Unhandled error. ('Accepts a string')",
=======
message: "Unhandled error. ('Accepts a string')"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );
@ -27,18 +31,30 @@ assert.throws(
{ {
code: 'ERR_UNHANDLED_ERROR', code: 'ERR_UNHANDLED_ERROR',
name: 'Error', name: 'Error',
<<<<<<< HEAD
message: "Unhandled error. ({ message: 'Error!' })", message: "Unhandled error. ({ message: 'Error!' })",
=======
message: "Unhandled error. ({ message: 'Error!' })"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );
assert.throws( assert.throws(
() => EE.emit('error', { () => EE.emit('error', {
message: 'Error!', message: 'Error!',
<<<<<<< HEAD
[util.inspect.custom]() { throw new Error(); }, [util.inspect.custom]() { throw new Error(); },
=======
[util.inspect.custom]() { throw new Error(); }
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}), }),
{ {
code: 'ERR_UNHANDLED_ERROR', code: 'ERR_UNHANDLED_ERROR',
name: 'Error', name: 'Error',
<<<<<<< HEAD
message: 'Unhandled error. ([object Object])', message: 'Unhandled error. ([object Object])',
=======
message: 'Unhandled error. ([object Object])'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );

View file

@ -22,6 +22,10 @@ for (const method of eventsMethods) {
code: 'ERR_INVALID_ARG_TYPE', code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError', name: 'TypeError',
message: 'The "listener" argument must be of type function. ' + message: 'The "listener" argument must be of type function. ' +
<<<<<<< HEAD
'Received null', 'Received null',
=======
'Received null'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}, `event.${method}('foo', null) should throw the proper error`); }, `event.${method}('foo', null) should throw the proper error`);
} }

View file

@ -12,7 +12,11 @@ const common = require('../common');
const assert = require('assert'); const assert = require('assert');
const { on, EventEmitter } = require('events'); const { on, EventEmitter } = require('events');
const { const {
<<<<<<< HEAD
NodeEventTarget, NodeEventTarget,
=======
NodeEventTarget
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} = require('internal/event_target'); } = require('internal/event_target');
async function basic() { async function basic() {
@ -138,6 +142,7 @@ async function next() {
assert.deepStrictEqual(results, [{ assert.deepStrictEqual(results, [{
value: ['bar'], value: ['bar'],
<<<<<<< HEAD
done: false, done: false,
}, { }, {
value: [42], value: [42],
@ -145,11 +150,24 @@ async function next() {
}, { }, {
value: undefined, value: undefined,
done: true, done: true,
=======
done: false
}, {
value: [42],
done: false
}, {
value: undefined,
done: true
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}]); }]);
assert.deepStrictEqual(await iterable.next(), { assert.deepStrictEqual(await iterable.next(), {
value: undefined, value: undefined,
<<<<<<< HEAD
done: true, done: true,
=======
done: true
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
} }
@ -167,19 +185,33 @@ async function nextError() {
]); ]);
assert.deepStrictEqual(results, [{ assert.deepStrictEqual(results, [{
status: 'rejected', status: 'rejected',
<<<<<<< HEAD
reason: _err, reason: _err,
=======
reason: _err
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}, { }, {
status: 'fulfilled', status: 'fulfilled',
value: { value: {
value: undefined, value: undefined,
<<<<<<< HEAD
done: true, done: true,
}, },
=======
done: true
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}, { }, {
status: 'fulfilled', status: 'fulfilled',
value: { value: {
value: undefined, value: undefined,
<<<<<<< HEAD
done: true, done: true,
}, },
=======
done: true
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}]); }]);
assert.strictEqual(ee.listeners('error').length, 0); assert.strictEqual(ee.listeners('error').length, 0);
} }
@ -203,7 +235,11 @@ async function iterableThrow() {
}, { }, {
message: 'The "EventEmitter.AsyncIterator" property must be' + message: 'The "EventEmitter.AsyncIterator" property must be' +
' an instance of Error. Received undefined', ' an instance of Error. Received undefined',
<<<<<<< HEAD
name: 'TypeError', name: 'TypeError',
=======
name: 'TypeError'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
const expected = [['bar'], [42]]; const expected = [['bar'], [42]];
@ -265,11 +301,19 @@ async function abortableOnBefore() {
const abortedSignal = AbortSignal.abort(); const abortedSignal = AbortSignal.abort();
[1, {}, null, false, 'hi'].forEach((signal) => { [1, {}, null, false, 'hi'].forEach((signal) => {
assert.throws(() => on(ee, 'foo', { signal }), { assert.throws(() => on(ee, 'foo', { signal }), {
<<<<<<< HEAD
code: 'ERR_INVALID_ARG_TYPE', code: 'ERR_INVALID_ARG_TYPE',
}); });
}); });
assert.throws(() => on(ee, 'foo', { signal: abortedSignal }), { assert.throws(() => on(ee, 'foo', { signal: abortedSignal }), {
name: 'AbortError', name: 'AbortError',
=======
code: 'ERR_INVALID_ARG_TYPE'
});
});
assert.throws(() => on(ee, 'foo', { signal: abortedSignal }), {
name: 'AbortError'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
} }
@ -278,11 +322,19 @@ async function eventTargetAbortableOnBefore() {
const abortedSignal = AbortSignal.abort(); const abortedSignal = AbortSignal.abort();
[1, {}, null, false, 'hi'].forEach((signal) => { [1, {}, null, false, 'hi'].forEach((signal) => {
assert.throws(() => on(et, 'foo', { signal }), { assert.throws(() => on(et, 'foo', { signal }), {
<<<<<<< HEAD
code: 'ERR_INVALID_ARG_TYPE', code: 'ERR_INVALID_ARG_TYPE',
}); });
}); });
assert.throws(() => on(et, 'foo', { signal: abortedSignal }), { assert.throws(() => on(et, 'foo', { signal: abortedSignal }), {
name: 'AbortError', name: 'AbortError',
=======
code: 'ERR_INVALID_ARG_TYPE'
});
});
assert.throws(() => on(et, 'foo', { signal: abortedSignal }), {
name: 'AbortError'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
} }

View file

@ -177,12 +177,20 @@ fs.accessSync(readWriteFile, mode);
() => fs.access(readWriteFile, mode, common.mustNotCall()), () => fs.access(readWriteFile, mode, common.mustNotCall()),
{ {
code: 'ERR_INVALID_ARG_TYPE', code: 'ERR_INVALID_ARG_TYPE',
<<<<<<< HEAD
=======
message: /"mode" argument.+integer/
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );
assert.throws( assert.throws(
() => fs.accessSync(readWriteFile, mode), () => fs.accessSync(readWriteFile, mode),
{ {
code: 'ERR_INVALID_ARG_TYPE', code: 'ERR_INVALID_ARG_TYPE',
<<<<<<< HEAD
=======
message: /"mode" argument.+integer/
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );
}); });
@ -199,12 +207,20 @@ fs.accessSync(readWriteFile, mode);
() => fs.access(readWriteFile, mode, common.mustNotCall()), () => fs.access(readWriteFile, mode, common.mustNotCall()),
{ {
code: 'ERR_OUT_OF_RANGE', code: 'ERR_OUT_OF_RANGE',
<<<<<<< HEAD
=======
message: /"mode".+It must be an integer >= 0 && <= 7/
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );
assert.throws( assert.throws(
() => fs.accessSync(readWriteFile, mode), () => fs.accessSync(readWriteFile, mode),
{ {
code: 'ERR_OUT_OF_RANGE', code: 'ERR_OUT_OF_RANGE',
<<<<<<< HEAD
=======
message: /"mode".+It must be an integer >= 0 && <= 7/
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
); );
}); });

View file

@ -163,6 +163,11 @@ assert.throws(() => {
}, { }, {
code: 'ERR_OUT_OF_RANGE', code: 'ERR_OUT_OF_RANGE',
name: 'RangeError', name: 'RangeError',
<<<<<<< HEAD
=======
message: 'The value of "mode" is out of range. It must be an integer ' +
'>= 0 && <= 7. Received 8'
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
assert.throws(() => { assert.throws(() => {

View file

@ -87,7 +87,11 @@ const watcher =
// 'stop' should only be emitted once - stopping a stopped watcher should // 'stop' should only be emitted once - stopping a stopped watcher should
// not trigger a 'stop' event. // not trigger a 'stop' event.
<<<<<<< HEAD
watcher.on('stop', common.mustCall()); watcher.on('stop', common.mustCall());
=======
watcher.on('stop', common.mustCall(function onStop() {}));
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
// Watch events should callback with a filename on supported systems. // Watch events should callback with a filename on supported systems.
// Omitting AIX. It works but not reliably. // Omitting AIX. It works but not reliably.

View file

@ -43,11 +43,15 @@ function connectDoesNotThrow(input) {
{ {
// Verify that an error is emitted when an invalid address family is returned. // Verify that an error is emitted when an invalid address family is returned.
const s = connectDoesNotThrow((host, options, cb) => { const s = connectDoesNotThrow((host, options, cb) => {
<<<<<<< HEAD
if (options.all) { if (options.all) {
cb(null, [{ address: '127.0.0.1', family: 100 }]); cb(null, [{ address: '127.0.0.1', family: 100 }]);
} else { } else {
cb(null, '127.0.0.1', 100); cb(null, '127.0.0.1', 100);
} }
=======
cb(null, '127.0.0.1', 100);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
s.on('error', common.expectsError({ s.on('error', common.expectsError({

View file

@ -9,8 +9,12 @@
const common = require('../common'); const common = require('../common');
const assert = require('assert'); const assert = require('assert');
<<<<<<< HEAD
const { Duplex, Readable, Writable, pipeline, PassThrough } = require('stream'); const { Duplex, Readable, Writable, pipeline, PassThrough } = require('stream');
const { ReadableStream, WritableStream } = require('stream/web'); const { ReadableStream, WritableStream } = require('stream/web');
=======
const { Duplex, Readable, Writable, pipeline } = require('stream');
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
const { Blob } = require('buffer'); const { Blob } = require('buffer');
{ {
@ -150,7 +154,11 @@ const { Blob } = require('buffer');
} }
assert.strictEqual(ret, 'abcdefghi'); assert.strictEqual(ret, 'abcdefghi');
}, },
<<<<<<< HEAD
common.mustSucceed(), common.mustSucceed(),
=======
common.mustCall(() => {}),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
} }
@ -286,6 +294,7 @@ const { Blob } = require('buffer');
duplex.write('test'); duplex.write('test');
} }
<<<<<<< HEAD
{ {
const through = new PassThrough({ objectMode: true }); const through = new PassThrough({ objectMode: true });
@ -411,3 +420,5 @@ TODO(kt3k): Enable this test case
})); }));
} }
*/ */
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -16,7 +16,11 @@ const { Readable, Duplex, pipeline } = require('stream');
// Refs: https://github.com/nodejs/node/issues/24456 // Refs: https://github.com/nodejs/node/issues/24456
const readable = new Readable({ const readable = new Readable({
<<<<<<< HEAD
read: common.mustCall() read: common.mustCall()
=======
read: common.mustCall(() => {})
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
const duplex = new Duplex({ const duplex = new Duplex({

View file

@ -18,8 +18,16 @@ async function runTest() {
await pipeline( await pipeline(
'', '',
new PassThrough({ objectMode: true }), new PassThrough({ objectMode: true }),
<<<<<<< HEAD
common.mustCall(), common.mustCall(),
); );
} }
runTest().then(common.mustCall()); runTest().then(common.mustCall());
=======
common.mustCall(() => { })
);
}
runTest().then(common.mustCall(() => {}));
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -256,7 +256,11 @@ const assert = require('assert');
{ {
const read = new Readable({ const read = new Readable({
<<<<<<< HEAD
read: common.mustNotCall() read: common.mustNotCall()
=======
read: common.mustNotCall(function() {})
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}); });
read.destroy(); read.destroy();
assert.strictEqual(read.destroyed, true); assert.strictEqual(read.destroyed, true);

View file

@ -21,6 +21,10 @@ stream.on('error', expectsError({
message: 'May not write null values to stream' message: 'May not write null values to stream'
})); }));
<<<<<<< HEAD
stream.on('data', mustNotCall()); stream.on('data', mustNotCall());
=======
stream.on('data', mustNotCall((chunk) => {}));
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
stream.on('end', mustNotCall()); stream.on('end', mustNotCall());

View file

@ -172,6 +172,10 @@ const { Readable } = require('stream');
const stream = new ArrayReader(); const stream = new ArrayReader();
stream.once('readable', common.mustCall(onRead)); stream.once('readable', common.mustCall(onRead));
<<<<<<< HEAD
stream.on('end', common.mustCall()); stream.on('end', common.mustCall());
=======
stream.on('end', common.mustCall(() => {}));
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }

View file

@ -475,6 +475,7 @@ const { PassThrough, Transform } = require('stream');
assert.strictEqual(ended, true); assert.strictEqual(ended, true);
})); }));
} }
<<<<<<< HEAD
{ {
const s = new Transform({ const s = new Transform({
@ -499,3 +500,5 @@ const { PassThrough, Transform } = require('stream');
s.write('firstLine'); s.write('firstLine');
process.nextTick(() => s.write('secondLine')); process.nextTick(() => s.write('secondLine'));
} }
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -17,7 +17,11 @@ console.log('%s q', 'string');
console.log('%o with object format param', { foo: 'bar' }); console.log('%o with object format param', { foo: 'bar' });
console.log( console.log(
<<<<<<< HEAD
new Error('test\n at abc (../fixtures/node_modules/bar.js:4:4)\nfoobar'), new Error('test\n at abc (../fixtures/node_modules/bar.js:4:4)\nfoobar'),
=======
new Error('test\n at abc (../fixtures/node_modules/bar.js:4:4)\nfoobar')
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
); );
try { try {

View file

@ -0,0 +1,2 @@
[WILDCARD]
error: Found 1 not formatted file in [WILDCARD] files

View file

@ -17,8 +17,11 @@ import {
} from "../../../../test_util/std/testing/asserts.ts"; } from "../../../../test_util/std/testing/asserts.ts";
import { createHmac } from "node:crypto"; import { createHmac } from "node:crypto";
<<<<<<< HEAD
const RUN_SLOW_TESTS = Deno.env.get("SLOW_TESTS") === "1"; const RUN_SLOW_TESTS = Deno.env.get("SLOW_TESTS") === "1";
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
const generateKeyPairAsync = promisify( const generateKeyPairAsync = promisify(
( (
type: any, type: any,
@ -79,12 +82,19 @@ Deno.test({
}, },
}); });
<<<<<<< HEAD
const modulusLengths = RUN_SLOW_TESTS ? [2048, 3072] : [2048]; const modulusLengths = RUN_SLOW_TESTS ? [2048, 3072] : [2048];
for (const type of ["rsa", "rsa-pss", "dsa"]) { for (const type of ["rsa", "rsa-pss", "dsa"]) {
for (const modulusLength of modulusLengths) { for (const modulusLength of modulusLengths) {
Deno.test({ Deno.test({
name: `generate ${type} key ${modulusLength}`, name: `generate ${type} key ${modulusLength}`,
=======
for (const type of ["rsa", "rsa-pss", "dsa"]) {
for (const modulusLength of [2048, 3072]) {
Deno.test({
name: `generate ${type} key`,
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
fn() { fn() {
const { publicKey, privateKey } = generateKeyPairSync(type as any, { const { publicKey, privateKey } = generateKeyPairSync(type as any, {
modulusLength, modulusLength,
@ -96,7 +106,11 @@ for (const type of ["rsa", "rsa-pss", "dsa"]) {
}); });
Deno.test({ Deno.test({
<<<<<<< HEAD
name: `generate ${type} key async ${modulusLength}`, name: `generate ${type} key async ${modulusLength}`,
=======
name: `generate ${type} key async`,
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
async fn() { async fn() {
const x = await generateKeyPairAsync(type as any, { const x = await generateKeyPairAsync(type as any, {
modulusLength, modulusLength,
@ -178,9 +192,13 @@ for (
}); });
} }
<<<<<<< HEAD
const primeLengths = RUN_SLOW_TESTS ? [1024, 2048, 4096] : [1024]; const primeLengths = RUN_SLOW_TESTS ? [1024, 2048, 4096] : [1024];
for (const primeLength of primeLengths) { for (const primeLength of primeLengths) {
=======
for (const primeLength of [1024, 2048, 4096]) {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
Deno.test({ Deno.test({
name: `generate dh key ${primeLength}`, name: `generate dh key ${primeLength}`,
fn() { fn() {

View file

@ -289,6 +289,7 @@ Deno.test({
await child.status; await child.status;
}, },
}); });
<<<<<<< HEAD
Deno.test({ Deno.test({
name: name:
@ -309,3 +310,5 @@ Deno.test({
assert(diff < 10_000); assert(diff < 10_000);
}, },
}); });
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -1,8 +1,15 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
<<<<<<< HEAD
import { assert } from "../../../test_util/std/testing/asserts.ts"; import { assert } from "../../../test_util/std/testing/asserts.ts";
import { fromFileUrl, relative } from "../../../test_util/std/path/mod.ts"; import { fromFileUrl, relative } from "../../../test_util/std/path/mod.ts";
import { pipeline } from "node:stream/promises"; import { pipeline } from "node:stream/promises";
=======
import { assert, fail } from "../../../test_util/std/testing/asserts.ts";
import { fromFileUrl, relative } from "../../../test_util/std/path/mod.ts";
import { pipeline } from "node:stream/promises";
import { Writable } from "node:stream";
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
import { createReadStream, createWriteStream } from "node:fs"; import { createReadStream, createWriteStream } from "node:fs";
Deno.test("stream/promises pipeline", async () => { Deno.test("stream/promises pipeline", async () => {
@ -23,3 +30,40 @@ Deno.test("stream/promises pipeline", async () => {
// pass // pass
} }
}); });
<<<<<<< HEAD
=======
// TODO(kt3k): Remove this test case when the node compat test suite is
// updated to version 18.16.0 or above.
// The last case in parallel/test-stream2-transform.js covers this case.
// See https://github.com/nodejs/node/pull/46818
Deno.test("stream.Writable does not change the order of items", async () => {
async function test() {
const chunks: Uint8Array[] = [];
const writable = new Writable({
construct(cb) {
setTimeout(cb, 10);
},
write(chunk, _, cb) {
chunks.push(chunk);
cb();
},
});
for (const i of Array(20).keys()) {
writable.write(Uint8Array.from([i]));
await new Promise((resolve) => setTimeout(resolve, 1));
}
if (chunks[0][0] !== 0) {
// The first chunk is swapped with the later chunk.
fail("The first chunk is swapped");
}
}
for (const _ of Array(10)) {
// Run it multiple times to avoid flaky false negative.
await test();
}
});
>>>>>>> 8c07f52a7 (1.38.4 (#21398))

View file

@ -223,13 +223,18 @@ pub fn format_json(
dprint_plugin_json::format_text(file_path, file_text, &config) dprint_plugin_json::format_text(file_path, file_text, &config)
} }
<<<<<<< HEAD
/// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, or IPYNB file. /// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, or IPYNB file.
=======
/// Formats a single TS, TSX, JS, JSX, JSONC, JSON, or MD file.
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
pub fn format_file( pub fn format_file(
file_path: &Path, file_path: &Path,
file_text: &str, file_text: &str,
fmt_options: &FmtOptionsConfig, fmt_options: &FmtOptionsConfig,
) -> Result<Option<String>, AnyError> { ) -> Result<Option<String>, AnyError> {
let ext = get_extension(file_path).unwrap_or_default(); let ext = get_extension(file_path).unwrap_or_default();
<<<<<<< HEAD
match ext.as_str() { match ext.as_str() {
"md" | "mkd" | "mkdn" | "mdwn" | "mdown" | "markdown" => { "md" | "mkd" | "mkdn" | "mdwn" | "mdown" | "markdown" => {
@ -246,6 +251,18 @@ pub fn format_file(
let config = get_resolved_typescript_config(fmt_options); let config = get_resolved_typescript_config(fmt_options);
dprint_plugin_typescript::format_text(file_path, file_text, &config) dprint_plugin_typescript::format_text(file_path, file_text, &config)
} }
=======
if matches!(
ext.as_str(),
"md" | "mkd" | "mkdn" | "mdwn" | "mdown" | "markdown"
) {
format_markdown(file_text, fmt_options)
} else if matches!(ext.as_str(), "json" | "jsonc") {
format_json(file_path, file_text, fmt_options)
} else {
let config = get_resolved_typescript_config(fmt_options);
dprint_plugin_typescript::format_text(file_path, file_text, &config)
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }
@ -673,7 +690,11 @@ where
/// This function is similar to is_supported_ext but adds additional extensions /// This function is similar to is_supported_ext but adds additional extensions
/// supported by `deno fmt`. /// supported by `deno fmt`.
fn is_supported_ext_fmt(path: &Path) -> bool { fn is_supported_ext_fmt(path: &Path) -> bool {
<<<<<<< HEAD
get_extension(path).is_some_and(|ext| { get_extension(path).is_some_and(|ext| {
=======
if let Some(ext) = get_extension(path) {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
matches!( matches!(
ext.as_str(), ext.as_str(),
"ts" "ts"
@ -692,9 +713,16 @@ fn is_supported_ext_fmt(path: &Path) -> bool {
| "mdwn" | "mdwn"
| "mdown" | "mdown"
| "markdown" | "markdown"
<<<<<<< HEAD
| "ipynb" | "ipynb"
) )
}) })
=======
)
} else {
false
}
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
#[cfg(test)] #[cfg(test)]
@ -726,7 +754,10 @@ mod test {
assert!(is_supported_ext_fmt(Path::new("foo.JSONC"))); assert!(is_supported_ext_fmt(Path::new("foo.JSONC")));
assert!(is_supported_ext_fmt(Path::new("foo.json"))); assert!(is_supported_ext_fmt(Path::new("foo.json")));
assert!(is_supported_ext_fmt(Path::new("foo.JsON"))); assert!(is_supported_ext_fmt(Path::new("foo.JsON")));
<<<<<<< HEAD
assert!(is_supported_ext_fmt(Path::new("foo.ipynb"))); assert!(is_supported_ext_fmt(Path::new("foo.ipynb")));
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
#[test] #[test]

View file

@ -4,25 +4,40 @@ use std::fmt::Write;
use std::io::IsTerminal; use std::io::IsTerminal;
use std::path::Path; use std::path::Path;
use std::path::PathBuf; use std::path::PathBuf;
<<<<<<< HEAD
use std::rc::Rc; use std::rc::Rc;
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use std::sync::Arc; use std::sync::Arc;
use base64::prelude::BASE64_STANDARD; use base64::prelude::BASE64_STANDARD;
use base64::Engine; use base64::Engine;
use deno_config::ConfigFile; use deno_config::ConfigFile;
use deno_core::anyhow; use deno_core::anyhow;
<<<<<<< HEAD
=======
use deno_core::anyhow::anyhow;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use deno_core::anyhow::bail; use deno_core::anyhow::bail;
use deno_core::anyhow::Context; use deno_core::anyhow::Context;
use deno_core::error::AnyError; use deno_core::error::AnyError;
use deno_core::serde_json; use deno_core::serde_json;
use deno_core::serde_json::json; use deno_core::serde_json::json;
<<<<<<< HEAD
=======
use deno_core::url::Url;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use deno_runtime::colors; use deno_runtime::colors;
use deno_runtime::deno_fetch::reqwest; use deno_runtime::deno_fetch::reqwest;
use http::header::AUTHORIZATION; use http::header::AUTHORIZATION;
use http::header::CONTENT_ENCODING; use http::header::CONTENT_ENCODING;
use hyper::body::Bytes; use hyper::body::Bytes;
<<<<<<< HEAD
use import_map::ImportMap; use import_map::ImportMap;
use lsp_types::Url; use lsp_types::Url;
=======
use import_map::ImportMapWithDiagnostics;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use serde::de::DeserializeOwned; use serde::de::DeserializeOwned;
use serde::Serialize; use serde::Serialize;
use sha2::Digest; use sha2::Digest;
@ -72,8 +87,14 @@ pub struct PublishingTask {
async fn prepare_publish( async fn prepare_publish(
initial_cwd: &Path, initial_cwd: &Path,
directory: PathBuf, directory: PathBuf,
<<<<<<< HEAD
import_map: &ImportMap, import_map: &ImportMap,
) -> Result<PreparedPublishPackage, AnyError> { ) -> Result<PreparedPublishPackage, AnyError> {
=======
) -> Result<PreparedPublishPackage, AnyError> {
// TODO: handle publishing without deno.json
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let directory_path = initial_cwd.join(directory); let directory_path = initial_cwd.join(directory);
// TODO: doesn't handle jsonc // TODO: doesn't handle jsonc
let deno_json_path = directory_path.join("deno.json"); let deno_json_path = directory_path.join("deno.json");
@ -97,6 +118,20 @@ async fn prepare_publish(
bail!("Invalid package name, use '@<scope_name>/<package_name> format"); bail!("Invalid package name, use '@<scope_name>/<package_name> format");
}; };
<<<<<<< HEAD
=======
// TODO: support `importMap` field in deno.json
assert!(deno_json.to_import_map_path().is_none());
let deno_json_url = Url::from_file_path(&deno_json_path)
.map_err(|_| anyhow!("deno.json path is not a valid file URL"))?;
let ImportMapWithDiagnostics { import_map, .. } =
import_map::parse_from_value(
&deno_json_url,
deno_json.to_import_map_value(),
)?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let unfurler = ImportMapUnfurler::new(import_map); let unfurler = ImportMapUnfurler::new(import_map);
let tarball = tar::create_gzipped_tarball(directory_path, unfurler) let tarball = tar::create_gzipped_tarball(directory_path, unfurler)
@ -228,6 +263,7 @@ async fn perform_publish(
let client = http_client.client()?; let client = http_client.client()?;
let registry_url = crate::cache::DENO_REGISTRY_URL.to_string(); let registry_url = crate::cache::DENO_REGISTRY_URL.to_string();
<<<<<<< HEAD
let permissions = packages let permissions = packages
.iter() .iter()
.map(|package| Permission::VersionPublish { .map(|package| Permission::VersionPublish {
@ -239,12 +275,30 @@ async fn perform_publish(
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let authorizations = match auth_method { let authorizations = match auth_method {
=======
let authorization = match auth_method {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
AuthMethod::Interactive => { AuthMethod::Interactive => {
let verifier = uuid::Uuid::new_v4().to_string(); let verifier = uuid::Uuid::new_v4().to_string();
let challenge = BASE64_STANDARD.encode(sha2::Sha256::digest(&verifier)); let challenge = BASE64_STANDARD.encode(sha2::Sha256::digest(&verifier));
<<<<<<< HEAD
let response = client let response = client
.post(format!("{}authorizations", registry_url)) .post(format!("{}authorizations", registry_url))
=======
let permissions = packages
.iter()
.map(|package| Permission::VersionPublish {
scope: &package.scope,
package: &package.package,
version: &package.version,
tarball_hash: &package.tarball_hash,
})
.collect::<Vec<_>>();
let response = client
.post(format!("{}/authorizations", registry_url))
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
.json(&serde_json::json!({ .json(&serde_json::json!({
"challenge": challenge, "challenge": challenge,
"permissions": permissions, "permissions": permissions,
@ -273,7 +327,11 @@ async fn perform_publish(
loop { loop {
tokio::time::sleep(interval).await; tokio::time::sleep(interval).await;
let response = client let response = client
<<<<<<< HEAD
.post(format!("{}authorizations/exchange", registry_url)) .post(format!("{}authorizations/exchange", registry_url))
=======
.post(format!("{}/authorizations/exchange", registry_url))
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
.json(&serde_json::json!({ .json(&serde_json::json!({
"exchangeToken": auth.exchange_token, "exchangeToken": auth.exchange_token,
"verifier": verifier, "verifier": verifier,
@ -291,12 +349,16 @@ async fn perform_publish(
colors::gray("Authenticated as"), colors::gray("Authenticated as"),
colors::cyan(res.user.name) colors::cyan(res.user.name)
); );
<<<<<<< HEAD
let authorization: Rc<str> = format!("Bearer {}", res.token).into(); let authorization: Rc<str> = format!("Bearer {}", res.token).into();
let mut authorizations = Vec::new(); let mut authorizations = Vec::new();
for _ in &packages { for _ in &packages {
authorizations.push(authorization.clone()); authorizations.push(authorization.clone());
} }
break authorizations; break authorizations;
=======
break format!("Bearer {}", res.token);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
Err(err) => { Err(err) => {
if err.code == "authorizationPending" { if err.code == "authorizationPending" {
@ -308,6 +370,7 @@ async fn perform_publish(
} }
} }
} }
<<<<<<< HEAD
AuthMethod::Token(token) => { AuthMethod::Token(token) => {
let authorization: Rc<str> = format!("Bearer {}", token).into(); let authorization: Rc<str> = format!("Bearer {}", token).into();
let mut authorizations = Vec::new(); let mut authorizations = Vec::new();
@ -367,6 +430,56 @@ async fn perform_publish(
for (package, authorization) in for (package, authorization) in
packages.into_iter().zip(authorizations.into_iter()) packages.into_iter().zip(authorizations.into_iter())
{ {
=======
AuthMethod::Token(token) => format!("Bearer {}", token),
AuthMethod::Oidc(oidc_config) => {
let permissions = packages
.iter()
.map(|package| Permission::VersionPublish {
scope: &package.scope,
package: &package.package,
version: &package.version,
tarball_hash: &package.tarball_hash,
})
.collect::<Vec<_>>();
let audience = json!({ "permissions": permissions }).to_string();
let url = format!(
"{}&audience={}",
oidc_config.url,
percent_encoding::percent_encode(
audience.as_bytes(),
percent_encoding::NON_ALPHANUMERIC
)
);
let response = client
.get(url)
.bearer_auth(oidc_config.token)
.send()
.await
.context("Failed to get OIDC token")?;
let status = response.status();
let text = response.text().await.with_context(|| {
format!("Failed to get OIDC token: status {}", status)
})?;
if !status.is_success() {
bail!(
"Failed to get OIDC token: status {}, response: '{}'",
status,
text
);
}
let OidcTokenResponse { value } = serde_json::from_str(&text)
.with_context(|| {
format!("Failed to parse OIDC token: '{}' (status {})", text, status)
})?;
format!("githuboidc {}", value)
}
};
for package in packages {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
println!( println!(
"{} @{}/{}@{} ...", "{} @{}/{}@{} ...",
colors::intense_blue("Publishing"), colors::intense_blue("Publishing"),
@ -376,13 +489,21 @@ async fn perform_publish(
); );
let url = format!( let url = format!(
<<<<<<< HEAD
"{}scopes/{}/packages/{}/versions/{}", "{}scopes/{}/packages/{}/versions/{}",
=======
"{}/scopes/{}/packages/{}/versions/{}",
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
registry_url, package.scope, package.package, package.version registry_url, package.scope, package.package, package.version
); );
let response = client let response = client
.post(url) .post(url)
<<<<<<< HEAD
.header(AUTHORIZATION, &*authorization) .header(AUTHORIZATION, &*authorization)
=======
.header(AUTHORIZATION, &authorization)
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
.header(CONTENT_ENCODING, "gzip") .header(CONTENT_ENCODING, "gzip")
.body(package.tarball) .body(package.tarball)
.send() .send()
@ -401,7 +522,11 @@ async fn perform_publish(
while task.status != "success" && task.status != "failure" { while task.status != "success" && task.status != "failure" {
tokio::time::sleep(interval).await; tokio::time::sleep(interval).await;
let resp = client let resp = client
<<<<<<< HEAD
.get(format!("{}publish_status/{}", registry_url, task.id)) .get(format!("{}publish_status/{}", registry_url, task.id))
=======
.get(format!("{}/publish_status/{}", registry_url, task.id))
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
.send() .send()
.await .await
.with_context(|| { .with_context(|| {
@ -482,6 +607,7 @@ pub async fn publish(
}, },
}; };
<<<<<<< HEAD
let import_map = cli_factory let import_map = cli_factory
.maybe_import_map() .maybe_import_map()
.await? .await?
@ -490,6 +616,8 @@ pub async fn publish(
Arc::new(ImportMap::new(Url::parse("file:///dev/null").unwrap())) Arc::new(ImportMap::new(Url::parse("file:///dev/null").unwrap()))
}); });
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let initial_cwd = let initial_cwd =
std::env::current_dir().with_context(|| "Failed getting cwd.")?; std::env::current_dir().with_context(|| "Failed getting cwd.")?;
@ -508,14 +636,22 @@ pub async fn publish(
let members = &deno_json.json.workspaces; let members = &deno_json.json.workspaces;
if members.is_empty() { if members.is_empty() {
<<<<<<< HEAD
packages packages
.push(prepare_publish(&initial_cwd, directory_path, &import_map).await?); .push(prepare_publish(&initial_cwd, directory_path, &import_map).await?);
=======
packages.push(prepare_publish(&initial_cwd, directory_path).await?);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} else { } else {
println!("Publishing a workspace..."); println!("Publishing a workspace...");
for member in members { for member in members {
let member_dir = directory_path.join(member); let member_dir = directory_path.join(member);
<<<<<<< HEAD
packages packages
.push(prepare_publish(&initial_cwd, member_dir, &import_map).await?); .push(prepare_publish(&initial_cwd, member_dir, &import_map).await?);
=======
packages.push(prepare_publish(&initial_cwd, member_dir).await?);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }

View file

@ -18,15 +18,22 @@ pub fn create_gzipped_tarball(
unfurler: ImportMapUnfurler, unfurler: ImportMapUnfurler,
) -> Result<Bytes, AnyError> { ) -> Result<Bytes, AnyError> {
let mut tar = TarGzArchive::new(); let mut tar = TarGzArchive::new();
<<<<<<< HEAD
let dir = dir let dir = dir
.canonicalize() .canonicalize()
.map_err(|_| anyhow::anyhow!("Unable to canonicalize path {:?}", dir))?; .map_err(|_| anyhow::anyhow!("Unable to canonicalize path {:?}", dir))?;
for entry in walkdir::WalkDir::new(&dir).follow_links(false) { for entry in walkdir::WalkDir::new(&dir).follow_links(false) {
=======
let dir_url = Url::from_directory_path(&dir).unwrap();
for entry in walkdir::WalkDir::new(dir).follow_links(false) {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let entry = entry?; let entry = entry?;
if entry.file_type().is_file() { if entry.file_type().is_file() {
let url = Url::from_file_path(entry.path()) let url = Url::from_file_path(entry.path())
<<<<<<< HEAD
.map_err(|_| anyhow::anyhow!("Unable to convert path to url"))?; .map_err(|_| anyhow::anyhow!("Unable to convert path to url"))?;
let relative_path = entry let relative_path = entry
.path() .path()
@ -35,16 +42,28 @@ pub fn create_gzipped_tarball(
let relative_path = relative_path.to_str().ok_or_else(|| { let relative_path = relative_path.to_str().ok_or_else(|| {
anyhow::anyhow!("Unable to convert path to string {:?}", relative_path) anyhow::anyhow!("Unable to convert path to string {:?}", relative_path)
})?; })?;
=======
.map_err(|_| anyhow::anyhow!("Invalid file path {:?}", entry.path()))?;
let relative_path = dir_url
.make_relative(&url)
.expect("children can be relative to parent");
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let data = std::fs::read(entry.path()) let data = std::fs::read(entry.path())
.with_context(|| format!("Unable to read file {:?}", entry.path()))?; .with_context(|| format!("Unable to read file {:?}", entry.path()))?;
let content = unfurler let content = unfurler
.unfurl(&url, data) .unfurl(&url, data)
.with_context(|| format!("Unable to unfurl file {:?}", entry.path()))?; .with_context(|| format!("Unable to unfurl file {:?}", entry.path()))?;
<<<<<<< HEAD
tar tar
.add_file(relative_path.to_string(), &content) .add_file(relative_path.to_string(), &content)
.with_context(|| { .with_context(|| {
format!("Unable to add file to tarball {:?}", entry.path()) format!("Unable to add file to tarball {:?}", entry.path())
})?; })?;
=======
tar.add_file(relative_path, &content).with_context(|| {
format!("Unable to add file to tarball {:?}", entry.path())
})?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} else if entry.file_type().is_dir() { } else if entry.file_type().is_dir() {
// skip // skip
} else { } else {

View file

@ -47,7 +47,10 @@ To grant permissions, set them before the script argument. For example:
// Run a background task that checks for available upgrades or output // Run a background task that checks for available upgrades or output
// if an earlier run of this background task found a new version of Deno. // if an earlier run of this background task found a new version of Deno.
<<<<<<< HEAD
#[cfg(feature = "upgrade")] #[cfg(feature = "upgrade")]
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
super::upgrade::check_for_upgrades( super::upgrade::check_for_upgrades(
http_client.clone(), http_client.clone(),
deno_dir.upgrade_check_file_path(), deno_dir.upgrade_check_file_path(),

View file

@ -122,7 +122,11 @@ pub async fn execute_script(
None => Default::default(), None => Default::default(),
}; };
let env_vars = match npm_resolver.root_node_modules_path() { let env_vars = match npm_resolver.root_node_modules_path() {
<<<<<<< HEAD
Some(dir_path) => collect_env_vars_with_node_modules_dir(dir_path), Some(dir_path) => collect_env_vars_with_node_modules_dir(dir_path),
=======
Some(dir_path) => collect_env_vars_with_node_modules_dir(&dir_path),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
None => collect_env_vars(), None => collect_env_vars(),
}; };
let local = LocalSet::new(); let local = LocalSet::new();

View file

@ -4312,7 +4312,11 @@ declare namespace Deno {
* *
* @category Sub Process * @category Sub Process
*/ */
<<<<<<< HEAD
export class ChildProcess implements AsyncDisposable { export class ChildProcess implements AsyncDisposable {
=======
export class ChildProcess implements Disposable {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
get stdin(): WritableStream<Uint8Array>; get stdin(): WritableStream<Uint8Array>;
get stdout(): ReadableStream<Uint8Array>; get stdout(): ReadableStream<Uint8Array>;
get stderr(): ReadableStream<Uint8Array>; get stderr(): ReadableStream<Uint8Array>;
@ -4338,7 +4342,11 @@ declare namespace Deno {
* process from exiting. */ * process from exiting. */
unref(): void; unref(): void;
<<<<<<< HEAD
[Symbol.asyncDispose](): Promise<void>; [Symbol.asyncDispose](): Promise<void>;
=======
[Symbol.dispose](): void;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
/** /**

View file

@ -6,7 +6,10 @@ pub use deno_core::normalize_path;
use deno_core::unsync::spawn_blocking; use deno_core::unsync::spawn_blocking;
use deno_core::ModuleSpecifier; use deno_core::ModuleSpecifier;
use deno_runtime::deno_crypto::rand; use deno_runtime::deno_crypto::rand;
<<<<<<< HEAD
use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_fs::FileSystem;
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use deno_runtime::deno_node::PathClean; use deno_runtime::deno_node::PathClean;
use std::borrow::Cow; use std::borrow::Cow;
use std::env::current_dir; use std::env::current_dir;
@ -188,11 +191,16 @@ pub fn canonicalize_path(path: &Path) -> Result<PathBuf, Error> {
pub fn canonicalize_path_maybe_not_exists( pub fn canonicalize_path_maybe_not_exists(
path: &Path, path: &Path,
) -> Result<PathBuf, Error> { ) -> Result<PathBuf, Error> {
<<<<<<< HEAD
canonicalize_path_maybe_not_exists_with_custom_fn(path, canonicalize_path) canonicalize_path_maybe_not_exists_with_custom_fn(path, canonicalize_path)
=======
canonicalize_path_maybe_not_exists_with_fs(path, canonicalize_path)
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
pub fn canonicalize_path_maybe_not_exists_with_fs( pub fn canonicalize_path_maybe_not_exists_with_fs(
path: &Path, path: &Path,
<<<<<<< HEAD
fs: &dyn FileSystem, fs: &dyn FileSystem,
) -> Result<PathBuf, Error> { ) -> Result<PathBuf, Error> {
canonicalize_path_maybe_not_exists_with_custom_fn(path, |path| { canonicalize_path_maybe_not_exists_with_custom_fn(path, |path| {
@ -202,6 +210,8 @@ pub fn canonicalize_path_maybe_not_exists_with_fs(
fn canonicalize_path_maybe_not_exists_with_custom_fn( fn canonicalize_path_maybe_not_exists_with_custom_fn(
path: &Path, path: &Path,
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
canonicalize: impl Fn(&Path) -> Result<PathBuf, Error>, canonicalize: impl Fn(&Path) -> Result<PathBuf, Error>,
) -> Result<PathBuf, Error> { ) -> Result<PathBuf, Error> {
let path = path.to_path_buf().clean(); let path = path.to_path_buf().clean();

View file

@ -8,12 +8,21 @@ use deno_graph::MediaType;
use deno_graph::TypeScriptReference; use deno_graph::TypeScriptReference;
use import_map::ImportMap; use import_map::ImportMap;
<<<<<<< HEAD
pub struct ImportMapUnfurler<'a> { pub struct ImportMapUnfurler<'a> {
import_map: &'a ImportMap, import_map: &'a ImportMap,
} }
impl<'a> ImportMapUnfurler<'a> { impl<'a> ImportMapUnfurler<'a> {
pub fn new(import_map: &'a ImportMap) -> Self { pub fn new(import_map: &'a ImportMap) -> Self {
=======
pub struct ImportMapUnfurler {
import_map: ImportMap,
}
impl ImportMapUnfurler {
pub fn new(import_map: ImportMap) -> Self {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
Self { import_map } Self { import_map }
} }
@ -158,7 +167,11 @@ mod tests {
}); });
let ImportMapWithDiagnostics { import_map, .. } = let ImportMapWithDiagnostics { import_map, .. } =
import_map::parse_from_value(&deno_json_url, value).unwrap(); import_map::parse_from_value(&deno_json_url, value).unwrap();
<<<<<<< HEAD
let unfurler = ImportMapUnfurler::new(&import_map); let unfurler = ImportMapUnfurler::new(&import_map);
=======
let unfurler = ImportMapUnfurler::new(import_map);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
// Unfurling TS file should apply changes. // Unfurling TS file should apply changes.
{ {

View file

@ -570,8 +570,12 @@ impl CliMainWorkerFactory {
// TODO(bartlomieju): this is cruft, update FeatureChecker to spit out // TODO(bartlomieju): this is cruft, update FeatureChecker to spit out
// list of enabled features. // list of enabled features.
let feature_checker = shared.feature_checker.clone(); let feature_checker = shared.feature_checker.clone();
<<<<<<< HEAD
let mut unstable_features = let mut unstable_features =
Vec::with_capacity(crate::UNSTABLE_GRANULAR_FLAGS.len()); Vec::with_capacity(crate::UNSTABLE_GRANULAR_FLAGS.len());
=======
let mut unstable_features = Vec::with_capacity(8);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
for (feature_name, _, id) in crate::UNSTABLE_GRANULAR_FLAGS { for (feature_name, _, id) in crate::UNSTABLE_GRANULAR_FLAGS {
if feature_checker.check(feature_name) { if feature_checker.check(feature_name) {
unstable_features.push(*id); unstable_features.push(*id);
@ -640,6 +644,7 @@ impl CliMainWorkerFactory {
options, options,
); );
<<<<<<< HEAD
if self.shared.subcommand.needs_test() { if self.shared.subcommand.needs_test() {
worker.js_runtime.execute_script_static( worker.js_runtime.execute_script_static(
"ext:cli/40_testing.js", "ext:cli/40_testing.js",
@ -647,6 +652,11 @@ impl CliMainWorkerFactory {
)?; )?;
worker.js_runtime.execute_script_static( worker.js_runtime.execute_script_static(
"ext:cli/40_jupyter.js", "ext:cli/40_jupyter.js",
=======
if self.shared.subcommand.is_test_or_jupyter() {
worker.js_runtime.execute_script_static(
"40_jupyter.js",
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
include_str!("js/40_jupyter.js"), include_str!("js/40_jupyter.js"),
)?; )?;
} }
@ -769,8 +779,12 @@ fn create_web_worker_callback(
// TODO(bartlomieju): this is cruft, update FeatureChecker to spit out // TODO(bartlomieju): this is cruft, update FeatureChecker to spit out
// list of enabled features. // list of enabled features.
let feature_checker = shared.feature_checker.clone(); let feature_checker = shared.feature_checker.clone();
<<<<<<< HEAD
let mut unstable_features = let mut unstable_features =
Vec::with_capacity(crate::UNSTABLE_GRANULAR_FLAGS.len()); Vec::with_capacity(crate::UNSTABLE_GRANULAR_FLAGS.len());
=======
let mut unstable_features = Vec::with_capacity(8);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
for (feature_name, _, id) in crate::UNSTABLE_GRANULAR_FLAGS { for (feature_name, _, id) in crate::UNSTABLE_GRANULAR_FLAGS {
if feature_checker.check(feature_name) { if feature_checker.check(feature_name) {
unstable_features.push(*id); unstable_features.push(*id);

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_broadcast_channel" name = "deno_broadcast_channel"
<<<<<<< HEAD
version = "0.119.0" version = "0.119.0"
=======
version = "0.120.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_cache" name = "deno_cache"
<<<<<<< HEAD
version = "0.57.0" version = "0.57.0"
=======
version = "0.58.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -12,7 +12,10 @@ const {
ArrayBufferPrototypeGetByteLength, ArrayBufferPrototypeGetByteLength,
ArrayIsArray, ArrayIsArray,
ArrayPrototypeFill, ArrayPrototypeFill,
<<<<<<< HEAD
ArrayPrototypeConcat, ArrayPrototypeConcat,
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
ArrayPrototypeFilter, ArrayPrototypeFilter,
ArrayPrototypeFind, ArrayPrototypeFind,
ArrayPrototypeForEach, ArrayPrototypeForEach,
@ -42,7 +45,10 @@ const {
FunctionPrototypeBind, FunctionPrototypeBind,
FunctionPrototypeCall, FunctionPrototypeCall,
FunctionPrototypeToString, FunctionPrototypeToString,
<<<<<<< HEAD
NumberIsNaN, NumberIsNaN,
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
MapPrototype, MapPrototype,
MapPrototypeDelete, MapPrototypeDelete,
MapPrototypeEntries, MapPrototypeEntries,
@ -136,6 +142,7 @@ const {
Uint8Array, Uint8Array,
WeakMapPrototypeHas, WeakMapPrototypeHas,
WeakSetPrototypeHas, WeakSetPrototypeHas,
<<<<<<< HEAD
} = primordials; } = primordials;
// supposed to be in node/internal_binding/util.ts // supposed to be in node/internal_binding/util.ts
@ -154,6 +161,11 @@ export function previewEntries(iter, isKeyValue) {
} }
} }
=======
isNaN,
} = primordials;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let noColor = () => false; let noColor = () => false;
function setNoColorFn(fn) { function setNoColorFn(fn) {
@ -967,7 +979,11 @@ function formatRaw(ctx, value, recurseTimes, typedArray, proxyDetails) {
} }
} else if (ObjectPrototypeIsPrototypeOf(DatePrototype, value)) { } else if (ObjectPrototypeIsPrototypeOf(DatePrototype, value)) {
const date = proxyDetails ? proxyDetails[0] : value; const date = proxyDetails ? proxyDetails[0] : value;
<<<<<<< HEAD
if (NumberIsNaN(DatePrototypeGetTime(date))) { if (NumberIsNaN(DatePrototypeGetTime(date))) {
=======
if (isNaN(DatePrototypeGetTime(date))) {
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
return ctx.stylize("Invalid Date", "date"); return ctx.stylize("Invalid Date", "date");
} else { } else {
base = DatePrototypeToISOString(date); base = DatePrototypeToISOString(date);
@ -1510,7 +1526,13 @@ function getIteratorBraces(type, tag) {
const iteratorRegExp = new SafeRegExp(" Iterator] {$"); const iteratorRegExp = new SafeRegExp(" Iterator] {$");
function formatIterator(braces, ctx, value, recurseTimes) { function formatIterator(braces, ctx, value, recurseTimes) {
<<<<<<< HEAD
const { 0: entries, 1: isKeyValue } = previewEntries(value, true); const { 0: entries, 1: isKeyValue } = previewEntries(value, true);
=======
// TODO(wafuwafu13): Implement
// const { 0: entries, 1: isKeyValue } = previewEntries(value, true);
const { 0: entries, 1: isKeyValue } = value;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
if (isKeyValue) { if (isKeyValue) {
// Mark entry iterators as such. // Mark entry iterators as such.
braces[0] = StringPrototypeReplace( braces[0] = StringPrototypeReplace(
@ -1719,12 +1741,24 @@ function formatWeakCollection(ctx) {
} }
function formatWeakSet(ctx, value, recurseTimes) { function formatWeakSet(ctx, value, recurseTimes) {
<<<<<<< HEAD
const entries = previewEntries(value); const entries = previewEntries(value);
=======
// TODO(wafuwafu13): Implement
// const entries = previewEntries(value);
const entries = value;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
return formatSetIterInner(ctx, recurseTimes, entries, kWeak); return formatSetIterInner(ctx, recurseTimes, entries, kWeak);
} }
function formatWeakMap(ctx, value, recurseTimes) { function formatWeakMap(ctx, value, recurseTimes) {
<<<<<<< HEAD
const entries = previewEntries(value); const entries = previewEntries(value);
=======
// TODO(wafuwafu13): Implement
// const entries = previewEntries(value);
const entries = value;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
return formatMapIterInner(ctx, recurseTimes, entries, kWeak); return formatMapIterInner(ctx, recurseTimes, entries, kWeak);
} }
@ -2753,34 +2787,57 @@ const HSL_PATTERN = new SafeRegExp(
); );
function parseCssColor(colorString) { function parseCssColor(colorString) {
<<<<<<< HEAD
if (colorKeywords.has(colorString)) { if (colorKeywords.has(colorString)) {
colorString = colorKeywords.get(colorString); colorString = colorKeywords.get(colorString);
=======
if (MapPrototypeHas(colorKeywords, colorString)) {
colorString = MapPrototypeGet(colorKeywords, colorString);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
// deno-fmt-ignore // deno-fmt-ignore
const hashMatch = StringPrototypeMatch(colorString, HASH_PATTERN); const hashMatch = StringPrototypeMatch(colorString, HASH_PATTERN);
if (hashMatch != null) { if (hashMatch != null) {
return [ return [
<<<<<<< HEAD
NumberParseInt(hashMatch[1], 16), NumberParseInt(hashMatch[1], 16),
NumberParseInt(hashMatch[2], 16), NumberParseInt(hashMatch[2], 16),
NumberParseInt(hashMatch[3], 16), NumberParseInt(hashMatch[3], 16),
=======
Number(`0x${hashMatch[1]}`),
Number(`0x${hashMatch[2]}`),
Number(`0x${hashMatch[3]}`),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
]; ];
} }
// deno-fmt-ignore // deno-fmt-ignore
const smallHashMatch = StringPrototypeMatch(colorString, SMALL_HASH_PATTERN); const smallHashMatch = StringPrototypeMatch(colorString, SMALL_HASH_PATTERN);
if (smallHashMatch != null) { if (smallHashMatch != null) {
return [ return [
<<<<<<< HEAD
NumberParseInt(`${smallHashMatch[1]}${smallHashMatch[1]}`, 16), NumberParseInt(`${smallHashMatch[1]}${smallHashMatch[1]}`, 16),
NumberParseInt(`${smallHashMatch[2]}${smallHashMatch[2]}`, 16), NumberParseInt(`${smallHashMatch[2]}${smallHashMatch[2]}`, 16),
NumberParseInt(`${smallHashMatch[3]}${smallHashMatch[3]}`, 16), NumberParseInt(`${smallHashMatch[3]}${smallHashMatch[3]}`, 16),
=======
Number(`0x${smallHashMatch[1]}${smallHashMatch[1]}`),
Number(`0x${smallHashMatch[2]}${smallHashMatch[2]}`),
Number(`0x${smallHashMatch[3]}${smallHashMatch[3]}`),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
]; ];
} }
// deno-fmt-ignore // deno-fmt-ignore
const rgbMatch = StringPrototypeMatch(colorString, RGB_PATTERN); const rgbMatch = StringPrototypeMatch(colorString, RGB_PATTERN);
if (rgbMatch != null) { if (rgbMatch != null) {
return [ return [
<<<<<<< HEAD
MathRound(MathMax(0, MathMin(255, rgbMatch[1]))), MathRound(MathMax(0, MathMin(255, rgbMatch[1]))),
MathRound(MathMax(0, MathMin(255, rgbMatch[2]))), MathRound(MathMax(0, MathMin(255, rgbMatch[2]))),
MathRound(MathMax(0, MathMin(255, rgbMatch[3]))), MathRound(MathMax(0, MathMin(255, rgbMatch[3]))),
=======
MathRound(MathMax(0, MathMin(255, Number(rgbMatch[1])))),
MathRound(MathMax(0, MathMin(255, Number(rgbMatch[2])))),
MathRound(MathMax(0, MathMin(255, Number(rgbMatch[3])))),
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
]; ];
} }
// deno-fmt-ignore // deno-fmt-ignore
@ -2791,8 +2848,13 @@ function parseCssColor(colorString) {
if (h < 0) { if (h < 0) {
h += 360; h += 360;
} }
<<<<<<< HEAD
const s = MathMax(0, MathMin(100, hslMatch[2])) / 100; const s = MathMax(0, MathMin(100, hslMatch[2])) / 100;
const l = MathMax(0, MathMin(100, hslMatch[3])) / 100; const l = MathMax(0, MathMin(100, hslMatch[3])) / 100;
=======
const s = MathMax(0, MathMin(100, Number(hslMatch[2]))) / 100;
const l = MathMax(0, MathMin(100, Number(hslMatch[3]))) / 100;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
const c = (1 - MathAbs(2 * l - 1)) * s; const c = (1 - MathAbs(2 * l - 1)) * s;
const x = c * (1 - MathAbs((h / 60) % 2 - 1)); const x = c * (1 - MathAbs((h / 60) % 2 - 1));
const m = l - c / 2; const m = l - c / 2;

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_console" name = "deno_console"
<<<<<<< HEAD
version = "0.125.0" version = "0.125.0"
=======
version = "0.126.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_cron" name = "deno_cron"
<<<<<<< HEAD
version = "0.5.0" version = "0.5.0"
=======
version = "0.6.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_crypto" name = "deno_crypto"
<<<<<<< HEAD
version = "0.139.0" version = "0.139.0"
=======
version = "0.140.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_fetch" name = "deno_fetch"
<<<<<<< HEAD
version = "0.149.0" version = "0.149.0"
=======
version = "0.150.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_ffi" name = "deno_ffi"
<<<<<<< HEAD
version = "0.112.0" version = "0.112.0"
=======
version = "0.113.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_fs" name = "deno_fs"
<<<<<<< HEAD
version = "0.35.0" version = "0.35.0"
=======
version = "0.36.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_http" name = "deno_http"
<<<<<<< HEAD
version = "0.122.0" version = "0.122.0"
=======
version = "0.123.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_io" name = "deno_io"
<<<<<<< HEAD
version = "0.35.0" version = "0.35.0"
=======
version = "0.36.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_kv" name = "deno_kv"
<<<<<<< HEAD
version = "0.33.0" version = "0.33.0"
=======
version = "0.34.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -18,7 +18,11 @@ use deno_core::error::AnyError;
use deno_core::unsync::spawn_blocking; use deno_core::unsync::spawn_blocking;
use deno_core::OpState; use deno_core::OpState;
use deno_node::PathClean; use deno_node::PathClean;
<<<<<<< HEAD
pub use denokv_sqlite::SqliteBackendError; pub use denokv_sqlite::SqliteBackendError;
=======
pub use denokv_sqlite::TypeError;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
use rand::RngCore; use rand::RngCore;
use rand::SeedableRng; use rand::SeedableRng;
use rusqlite::OpenFlags; use rusqlite::OpenFlags;
@ -95,16 +99,24 @@ impl<P: SqliteDbHandlerPermissions> DatabaseHandler for SqliteDbHandler<P> {
(Some(path), _) => { (Some(path), _) => {
let flags = let flags =
OpenFlags::default().difference(OpenFlags::SQLITE_OPEN_URI); OpenFlags::default().difference(OpenFlags::SQLITE_OPEN_URI);
<<<<<<< HEAD
let resolved_path = canonicalize_path(&PathBuf::from(path)) let resolved_path = canonicalize_path(&PathBuf::from(path))
.map_err(|_| SqliteBackendError::DatabaseClosed)?; .map_err(|_| SqliteBackendError::DatabaseClosed)?;
=======
let resolved_path = canonicalize_path(&PathBuf::from(path))?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
( (
rusqlite::Connection::open_with_flags(path, flags)?, rusqlite::Connection::open_with_flags(path, flags)?,
Some(resolved_path), Some(resolved_path),
) )
} }
(None, Some(path)) => { (None, Some(path)) => {
<<<<<<< HEAD
std::fs::create_dir_all(path) std::fs::create_dir_all(path)
.map_err(|_| SqliteBackendError::DatabaseClosed)?; .map_err(|_| SqliteBackendError::DatabaseClosed)?;
=======
std::fs::create_dir_all(path)?;
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
let path = path.join("kv.sqlite3"); let path = path.join("kv.sqlite3");
(rusqlite::Connection::open(path.clone())?, Some(path)) (rusqlite::Connection::open(path.clone())?, Some(path))
} }
@ -112,7 +124,11 @@ impl<P: SqliteDbHandlerPermissions> DatabaseHandler for SqliteDbHandler<P> {
conn.pragma_update(None, "journal_mode", "wal")?; conn.pragma_update(None, "journal_mode", "wal")?;
<<<<<<< HEAD
Ok::<_, SqliteBackendError>((conn, queue_waker_key)) Ok::<_, SqliteBackendError>((conn, queue_waker_key))
=======
Ok::<_, AnyError>((conn, queue_waker_key))
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
}) })
}) })
.await .await

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_napi" name = "deno_napi"
<<<<<<< HEAD
version = "0.55.0" version = "0.55.0"
=======
version = "0.56.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_net" name = "deno_net"
<<<<<<< HEAD
version = "0.117.0" version = "0.117.0"
=======
version = "0.118.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,7 +2,11 @@
[package] [package]
name = "deno_node" name = "deno_node"
<<<<<<< HEAD
version = "0.62.0" version = "0.62.0"
=======
version = "0.63.0"
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

@ -463,8 +463,11 @@ deno_core::extension!(deno_node,
"internal/util/comparisons.ts", "internal/util/comparisons.ts",
"internal/util/debuglog.ts", "internal/util/debuglog.ts",
"internal/util/inspect.mjs", "internal/util/inspect.mjs",
<<<<<<< HEAD
"internal/util/parse_args/parse_args.js", "internal/util/parse_args/parse_args.js",
"internal/util/parse_args/utils.js", "internal/util/parse_args/utils.js",
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
"internal/util/types.ts", "internal/util/types.ts",
"internal/validators.mjs", "internal/validators.mjs",
"path/_constants.ts", "path/_constants.ts",

View file

@ -4474,7 +4474,10 @@ var require_duplexify = __commonJS({
readable: false, readable: false,
}); });
} }
<<<<<<< HEAD
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
if (typeof body === "function") { if (typeof body === "function") {
const { value, write, final, destroy } = fromAsyncGen(body); const { value, write, final, destroy } = fromAsyncGen(body);
if (isIterable(value)) { if (isIterable(value)) {
@ -4670,6 +4673,11 @@ var require_duplexify = __commonJS({
cb(err); cb(err);
} else if (err) { } else if (err) {
d.destroy(err); d.destroy(err);
<<<<<<< HEAD
=======
} else if (!readable && !writable) {
d.destroy();
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
} }
d = new Duplexify({ d = new Duplexify({

View file

@ -1536,12 +1536,17 @@ Buffer.prototype.copy = function copy(
sourceStart = 0; sourceStart = 0;
} else { } else {
sourceStart = toInteger(sourceStart, 0); sourceStart = toInteger(sourceStart, 0);
<<<<<<< HEAD
if (sourceStart < 0 || sourceStart > this.length) { if (sourceStart < 0 || sourceStart > this.length) {
throw new codes.ERR_OUT_OF_RANGE( throw new codes.ERR_OUT_OF_RANGE(
"sourceStart", "sourceStart",
`>= 0 && <= ${this.length}`, `>= 0 && <= ${this.length}`,
sourceStart, sourceStart,
); );
=======
if (sourceStart < 0) {
throw new codes.ERR_OUT_OF_RANGE("sourceStart", ">= 0", sourceStart);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
} }
if (sourceStart >= MAX_UINT32) { if (sourceStart >= MAX_UINT32) {
throw new codes.ERR_OUT_OF_RANGE( throw new codes.ERR_OUT_OF_RANGE(

View file

@ -17,7 +17,21 @@ import {
validateInteger, validateInteger,
validateObject, validateObject,
} from "ext:deno_node/internal/validators.mjs"; } from "ext:deno_node/internal/validators.mjs";
<<<<<<< HEAD
import { previewEntries } from "ext:deno_node/internal_binding/util.ts"; import { previewEntries } from "ext:deno_node/internal_binding/util.ts";
=======
const previewEntries = (iter, isKeyValue) => {
if (isKeyValue) {
const arr = [...iter];
if (Array.isArray(arr[0]) && arr[0].length === 2) {
return [[].concat(...arr), true];
}
return [arr, false];
} else {
return [...iter];
}
};
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
import { Buffer } from "node:buffer"; import { Buffer } from "node:buffer";
const { isBuffer } = Buffer; const { isBuffer } = Buffer;
import { import {
@ -465,6 +479,10 @@ const consoleMethods = {
// https://console.spec.whatwg.org/#table // https://console.spec.whatwg.org/#table
table(tabularData, properties) { table(tabularData, properties) {
<<<<<<< HEAD
=======
console.log("tabularData", tabularData);
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
if (properties !== undefined) { if (properties !== undefined) {
validateArray(properties, "properties"); validateArray(properties, "properties");
} }

View file

@ -2472,6 +2472,7 @@ export class ERR_PACKAGE_PATH_NOT_EXPORTED extends NodeError {
} }
} }
<<<<<<< HEAD
export class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends NodeTypeError { export class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends NodeTypeError {
constructor(x: string) { constructor(x: string) {
super("ERR_PARSE_ARGS_INVALID_OPTION_VALUE", x); super("ERR_PARSE_ARGS_INVALID_OPTION_VALUE", x);
@ -2502,6 +2503,8 @@ export class ERR_PARSE_ARGS_UNKNOWN_OPTION extends NodeTypeError {
} }
} }
=======
>>>>>>> 8c07f52a7 (1.38.4 (#21398))
export class ERR_INTERNAL_ASSERTION extends NodeError { export class ERR_INTERNAL_ASSERTION extends NodeError {
constructor(message?: string) { constructor(message?: string) {
const suffix = "This is caused by either a bug in Node.js " + const suffix = "This is caused by either a bug in Node.js " +

Some files were not shown because too many files have changed in this diff Show more