0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-09 05:36:49 -04:00

Merge branch 'main' into update_wpt

Signed-off-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
Luca Casonato 2024-11-25 16:34:12 +01:00 committed by GitHub
commit c31e0eac51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
646 changed files with 4587 additions and 3994 deletions

View file

@ -5,7 +5,7 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify";
// Bump this number when you want to purge the cache. // 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.
const cacheVersion = 26; const cacheVersion = 27;
const ubuntuX86Runner = "ubuntu-24.04"; const ubuntuX86Runner = "ubuntu-24.04";
const ubuntuX86XlRunner = "ubuntu-24.04-xl"; const ubuntuX86XlRunner = "ubuntu-24.04-xl";

View file

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

100
Cargo.lock generated
View file

@ -1201,7 +1201,7 @@ dependencies = [
[[package]] [[package]]
name = "deno" name = "deno"
version = "2.1.0" version = "2.1.1"
dependencies = [ dependencies = [
"anstream", "anstream",
"async-trait", "async-trait",
@ -1232,7 +1232,6 @@ dependencies = [
"deno_resolver", "deno_resolver",
"deno_runtime", "deno_runtime",
"deno_semver", "deno_semver",
"deno_sqlformat",
"deno_task_shell", "deno_task_shell",
"deno_terminal 0.2.0", "deno_terminal 0.2.0",
"deno_tower_lsp", "deno_tower_lsp",
@ -1292,6 +1291,7 @@ dependencies = [
"sha2", "sha2",
"shell-escape", "shell-escape",
"spki", "spki",
"sqlformat",
"strsim", "strsim",
"tar", "tar",
"tempfile", "tempfile",
@ -1371,7 +1371,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_bench_util" name = "deno_bench_util"
version = "0.172.0" version = "0.173.0"
dependencies = [ dependencies = [
"bencher", "bencher",
"deno_core", "deno_core",
@ -1380,7 +1380,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_broadcast_channel" name = "deno_broadcast_channel"
version = "0.172.0" version = "0.173.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"deno_core", "deno_core",
@ -1391,7 +1391,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_cache" name = "deno_cache"
version = "0.110.0" version = "0.111.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"deno_core", "deno_core",
@ -1424,7 +1424,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_canvas" name = "deno_canvas"
version = "0.47.0" version = "0.48.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_webgpu", "deno_webgpu",
@ -1459,16 +1459,16 @@ dependencies = [
[[package]] [[package]]
name = "deno_console" name = "deno_console"
version = "0.178.0" version = "0.179.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
] ]
[[package]] [[package]]
name = "deno_core" name = "deno_core"
version = "0.321.0" version = "0.322.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd2a54cda74cdc187d5fc2d23370a45cf09f912caf566dd1cd24a50157d809c7" checksum = "2f593ef2b8acab8cd3ace9d50052edc65a3654fdbde808070cfa5da5cf7aaae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -1506,7 +1506,7 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695"
[[package]] [[package]]
name = "deno_cron" name = "deno_cron"
version = "0.58.0" version = "0.59.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1519,7 +1519,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_crypto" name = "deno_crypto"
version = "0.192.0" version = "0.193.0"
dependencies = [ dependencies = [
"aes", "aes",
"aes-gcm", "aes-gcm",
@ -1587,7 +1587,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_fetch" name = "deno_fetch"
version = "0.202.0" version = "0.203.0"
dependencies = [ dependencies = [
"base64 0.21.7", "base64 0.21.7",
"bytes", "bytes",
@ -1621,7 +1621,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_ffi" name = "deno_ffi"
version = "0.165.0" version = "0.166.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_permissions", "deno_permissions",
@ -1641,7 +1641,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_fs" name = "deno_fs"
version = "0.88.0" version = "0.89.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"base32", "base32",
@ -1694,7 +1694,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_http" name = "deno_http"
version = "0.176.0" version = "0.177.0"
dependencies = [ dependencies = [
"async-compression", "async-compression",
"async-trait", "async-trait",
@ -1733,7 +1733,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_io" name = "deno_io"
version = "0.88.0" version = "0.89.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"deno_core", "deno_core",
@ -1754,7 +1754,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_kv" name = "deno_kv"
version = "0.86.0" version = "0.87.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1827,7 +1827,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_napi" name = "deno_napi"
version = "0.109.0" version = "0.110.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_permissions", "deno_permissions",
@ -1855,7 +1855,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_net" name = "deno_net"
version = "0.170.0" version = "0.171.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_permissions", "deno_permissions",
@ -1872,7 +1872,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_node" name = "deno_node"
version = "0.115.0" version = "0.116.0"
dependencies = [ dependencies = [
"aead-gcm-stream", "aead-gcm-stream",
"aes", "aes",
@ -1983,9 +1983,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_ops" name = "deno_ops"
version = "0.197.0" version = "0.198.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37a8825d92301cf445727c43f17fee2a20fcdf4370004339965156ae7c56c97e" checksum = "870826735cd9aa0376d2aadca14365b753e830e3cc16891efb9232845a6982a4"
dependencies = [ dependencies = [
"proc-macro-rules", "proc-macro-rules",
"proc-macro2", "proc-macro2",
@ -2024,7 +2024,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_permissions" name = "deno_permissions"
version = "0.38.0" version = "0.39.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_path_util", "deno_path_util",
@ -2042,7 +2042,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_resolver" name = "deno_resolver"
version = "0.10.0" version = "0.11.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base32", "base32",
@ -2061,7 +2061,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_runtime" name = "deno_runtime"
version = "0.187.0" version = "0.188.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"color-print", "color-print",
@ -2147,18 +2147,6 @@ dependencies = [
"url", "url",
] ]
[[package]]
name = "deno_sqlformat"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e196799ec0cc240fac1fb5c5bf813ef92a9602740a059cfcbb20593b2deee52"
dependencies = [
"nom 7.1.3",
"once_cell",
"regex",
"unicode_categories",
]
[[package]] [[package]]
name = "deno_task_shell" name = "deno_task_shell"
version = "0.18.1" version = "0.18.1"
@ -2198,7 +2186,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_tls" name = "deno_tls"
version = "0.165.0" version = "0.166.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_native_certs", "deno_native_certs",
@ -2247,7 +2235,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_url" name = "deno_url"
version = "0.178.0" version = "0.179.0"
dependencies = [ dependencies = [
"deno_bench_util", "deno_bench_util",
"deno_console", "deno_console",
@ -2259,7 +2247,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_web" name = "deno_web"
version = "0.209.0" version = "0.210.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"base64-simd 0.8.0", "base64-simd 0.8.0",
@ -2281,7 +2269,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_webgpu" name = "deno_webgpu"
version = "0.145.0" version = "0.146.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"raw-window-handle", "raw-window-handle",
@ -2294,7 +2282,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_webidl" name = "deno_webidl"
version = "0.178.0" version = "0.179.0"
dependencies = [ dependencies = [
"deno_bench_util", "deno_bench_util",
"deno_core", "deno_core",
@ -2302,7 +2290,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_websocket" name = "deno_websocket"
version = "0.183.0" version = "0.184.0"
dependencies = [ dependencies = [
"bytes", "bytes",
"deno_core", "deno_core",
@ -2324,7 +2312,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_webstorage" name = "deno_webstorage"
version = "0.173.0" version = "0.174.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_web", "deno_web",
@ -3086,9 +3074,9 @@ checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f"
[[package]] [[package]]
name = "file_test_runner" name = "file_test_runner"
version = "0.7.2" version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05b23dcc1b671771c6f59fdace6da685735c925f859733e8fd07fba6cae6462a" checksum = "cf50901549edf2241e33d1715aec0575adc5510a09724877a1e0afe7ffafb0fb"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"crossbeam-channel", "crossbeam-channel",
@ -4887,7 +4875,7 @@ dependencies = [
[[package]] [[package]]
name = "napi_sym" name = "napi_sym"
version = "0.108.0" version = "0.109.0"
dependencies = [ dependencies = [
"quote", "quote",
"serde", "serde",
@ -4942,7 +4930,7 @@ dependencies = [
[[package]] [[package]]
name = "node_resolver" name = "node_resolver"
version = "0.17.0" version = "0.18.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -6666,9 +6654,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_v8" name = "serde_v8"
version = "0.230.0" version = "0.231.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a783242d2af51d6955cc04bf2b64adb643ab588b61e9573c908a69dabf8c2f" checksum = "1a0c48b8842ebae21c52da1d978fba5c2be5991680bddfdc1a36ee0ccbc60114"
dependencies = [ dependencies = [
"num-bigint", "num-bigint",
"serde", "serde",
@ -6944,6 +6932,18 @@ dependencies = [
"der", "der",
] ]
[[package]]
name = "sqlformat"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c38684453189293372e6fffa3bed1015d20488ce4cc09a23de050fd7411e46"
dependencies = [
"nom 7.1.3",
"once_cell",
"regex",
"unicode_categories",
]
[[package]] [[package]]
name = "stable_deref_trait" name = "stable_deref_trait"
version = "1.2.0" version = "1.2.0"

View file

@ -46,19 +46,19 @@ repository = "https://github.com/denoland/deno"
[workspace.dependencies] [workspace.dependencies]
deno_ast = { version = "=0.43.3", features = ["transpiling"] } deno_ast = { version = "=0.43.3", features = ["transpiling"] }
deno_core = { version = "0.321.0" } deno_core = { version = "0.322.0" }
deno_bench_util = { version = "0.172.0", path = "./bench_util" } deno_bench_util = { version = "0.173.0", path = "./bench_util" }
deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } deno_config = { version = "=0.39.2", features = ["workspace", "sync"] }
deno_lockfile = "=0.23.1" deno_lockfile = "=0.23.1"
deno_media_type = { version = "0.2.0", features = ["module_specifier"] } deno_media_type = { version = "0.2.0", features = ["module_specifier"] }
deno_npm = "=0.25.4" deno_npm = "=0.25.4"
deno_path_util = "=0.2.1" deno_path_util = "=0.2.1"
deno_permissions = { version = "0.38.0", path = "./runtime/permissions" } deno_permissions = { version = "0.39.0", path = "./runtime/permissions" }
deno_runtime = { version = "0.187.0", path = "./runtime" } deno_runtime = { version = "0.188.0", path = "./runtime" }
deno_semver = "=0.5.16" deno_semver = "=0.5.16"
deno_terminal = "0.2.0" deno_terminal = "0.2.0"
napi_sym = { version = "0.108.0", path = "./ext/napi/sym" } napi_sym = { version = "0.109.0", path = "./ext/napi/sym" }
test_util = { package = "test_server", path = "./tests/util/server" } test_util = { package = "test_server", path = "./tests/util/server" }
denokv_proto = "0.8.4" denokv_proto = "0.8.4"
@ -67,32 +67,32 @@ denokv_remote = "0.8.4"
denokv_sqlite = { default-features = false, version = "0.8.4" } denokv_sqlite = { default-features = false, version = "0.8.4" }
# exts # exts
deno_broadcast_channel = { version = "0.172.0", path = "./ext/broadcast_channel" } deno_broadcast_channel = { version = "0.173.0", path = "./ext/broadcast_channel" }
deno_cache = { version = "0.110.0", path = "./ext/cache" } deno_cache = { version = "0.111.0", path = "./ext/cache" }
deno_canvas = { version = "0.47.0", path = "./ext/canvas" } deno_canvas = { version = "0.48.0", path = "./ext/canvas" }
deno_console = { version = "0.178.0", path = "./ext/console" } deno_console = { version = "0.179.0", path = "./ext/console" }
deno_cron = { version = "0.58.0", path = "./ext/cron" } deno_cron = { version = "0.59.0", path = "./ext/cron" }
deno_crypto = { version = "0.192.0", path = "./ext/crypto" } deno_crypto = { version = "0.193.0", path = "./ext/crypto" }
deno_fetch = { version = "0.202.0", path = "./ext/fetch" } deno_fetch = { version = "0.203.0", path = "./ext/fetch" }
deno_ffi = { version = "0.165.0", path = "./ext/ffi" } deno_ffi = { version = "0.166.0", path = "./ext/ffi" }
deno_fs = { version = "0.88.0", path = "./ext/fs" } deno_fs = { version = "0.89.0", path = "./ext/fs" }
deno_http = { version = "0.176.0", path = "./ext/http" } deno_http = { version = "0.177.0", path = "./ext/http" }
deno_io = { version = "0.88.0", path = "./ext/io" } deno_io = { version = "0.89.0", path = "./ext/io" }
deno_kv = { version = "0.86.0", path = "./ext/kv" } deno_kv = { version = "0.87.0", path = "./ext/kv" }
deno_napi = { version = "0.109.0", path = "./ext/napi" } deno_napi = { version = "0.110.0", path = "./ext/napi" }
deno_net = { version = "0.170.0", path = "./ext/net" } deno_net = { version = "0.171.0", path = "./ext/net" }
deno_node = { version = "0.115.0", path = "./ext/node" } deno_node = { version = "0.116.0", path = "./ext/node" }
deno_tls = { version = "0.165.0", path = "./ext/tls" } deno_tls = { version = "0.166.0", path = "./ext/tls" }
deno_url = { version = "0.178.0", path = "./ext/url" } deno_url = { version = "0.179.0", path = "./ext/url" }
deno_web = { version = "0.209.0", path = "./ext/web" } deno_web = { version = "0.210.0", path = "./ext/web" }
deno_webgpu = { version = "0.145.0", path = "./ext/webgpu" } deno_webgpu = { version = "0.146.0", path = "./ext/webgpu" }
deno_webidl = { version = "0.178.0", path = "./ext/webidl" } deno_webidl = { version = "0.179.0", path = "./ext/webidl" }
deno_websocket = { version = "0.183.0", path = "./ext/websocket" } deno_websocket = { version = "0.184.0", path = "./ext/websocket" }
deno_webstorage = { version = "0.173.0", path = "./ext/webstorage" } deno_webstorage = { version = "0.174.0", path = "./ext/webstorage" }
# resolvers # resolvers
deno_resolver = { version = "0.10.0", path = "./resolvers/deno" } deno_resolver = { version = "0.11.0", path = "./resolvers/deno" }
node_resolver = { version = "0.17.0", path = "./resolvers/node" } node_resolver = { version = "0.18.0", path = "./resolvers/node" }
aes = "=0.8.3" aes = "=0.8.3"
anyhow = "1.0.57" anyhow = "1.0.57"

View file

@ -6,6 +6,16 @@ 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
### 2.1.1 / 2024.11.21
- docs(add): clarification to add command (#26968)
- docs(doc): fix typo in doc subcommand help output (#26321)
- fix(node): regression where ts files were sometimes resolved instead of js
(#26971)
- fix(task): ensure root config always looks up dependencies in root (#26959)
- fix(watch): don't panic if there's no path provided (#26972)
- fix: Buffer global in --unstable-node-globals (#26973)
### 2.1.0 / 2024.11.21 ### 2.1.0 / 2024.11.21
- feat(cli): add `--unstable-node-globals` flag (#26617) - feat(cli): add `--unstable-node-globals` flag (#26617)

View file

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

View file

@ -2,7 +2,7 @@
[package] [package]
name = "deno" name = "deno"
version = "2.1.0" version = "2.1.1"
authors.workspace = true authors.workspace = true
default-run = "deno" default-run = "deno"
edition.workspace = true edition.workspace = true
@ -151,8 +151,7 @@ serde_repr.workspace = true
sha2.workspace = true sha2.workspace = true
shell-escape = "=0.1.5" shell-escape = "=0.1.5"
spki = { version = "0.7", features = ["pem"] } spki = { version = "0.7", features = ["pem"] }
# NOTE(bartlomieju): using temporary fork for now, revert back to `sqlformat-rs` later sqlformat = "=0.3.2"
sqlformat = { package = "deno_sqlformat", version = "0.3.2" }
strsim = "0.11.1" strsim = "0.11.1"
tar.workspace = true tar.workspace = true
tempfile.workspace = true tempfile.workspace = true

View file

@ -1704,8 +1704,11 @@ fn add_subcommand() -> Command {
"Add dependencies to your configuration file. "Add dependencies to your configuration file.
<p(245)>deno add jsr:@std/path</> <p(245)>deno add jsr:@std/path</>
You can add multiple dependencies at once: You can also add npm packages:
<p(245)>deno add jsr:@std/path jsr:@std/assert</>" <p(245)>deno add npm:react</>
Or multiple dependencies at once:
<p(245)>deno add jsr:@std/path jsr:@std/assert npm:chalk</>"
), ),
UnstableArgsConfig::None, UnstableArgsConfig::None,
) )
@ -3073,14 +3076,14 @@ Evaluate a task from string
Arg::new("filter") Arg::new("filter")
.long("filter") .long("filter")
.short('f') .short('f')
.help("Filter members of the workspace by name - should be used with --recursive") .help("Filter members of the workspace by name, implies --recursive flag")
.value_parser(value_parser!(String)), .value_parser(value_parser!(String)),
) )
.arg( .arg(
Arg::new("eval") Arg::new("eval")
.long("eval") .long("eval")
.help( .help(
"Evaluate the passed value as if, it was a task in a configuration file", "Evaluate the passed value as if it was a task in a configuration file",
).action(ArgAction::SetTrue) ).action(ArgAction::SetTrue)
) )
.arg(node_modules_dir_arg()) .arg(node_modules_dir_arg())

View file

@ -4454,11 +4454,7 @@ fn op_load<'s>(
== NodeModuleKind::Cjs, == NodeModuleKind::Cjs,
}) })
}; };
lsp_warn!("op_load {} {}", &specifier, maybe_load_response.is_some());
let serialized = serde_v8::to_v8(scope, maybe_load_response)?; let serialized = serde_v8::to_v8(scope, maybe_load_response)?;
state.performance.measure(mark); state.performance.measure(mark);
Ok(serialized) Ok(serialized)
} }

View file

@ -87,6 +87,7 @@ use super::serialization::RemoteModulesStore;
use super::serialization::RemoteModulesStoreBuilder; use super::serialization::RemoteModulesStoreBuilder;
use super::virtual_fs::FileBackedVfs; use super::virtual_fs::FileBackedVfs;
use super::virtual_fs::VfsBuilder; use super::virtual_fs::VfsBuilder;
use super::virtual_fs::VfsFileSubDataKind;
use super::virtual_fs::VfsRoot; use super::virtual_fs::VfsRoot;
use super::virtual_fs::VirtualDirectory; use super::virtual_fs::VirtualDirectory;
@ -275,7 +276,9 @@ impl StandaloneModules {
if specifier.scheme() == "file" { if specifier.scheme() == "file" {
let path = deno_path_util::url_to_file_path(specifier)?; let path = deno_path_util::url_to_file_path(specifier)?;
let bytes = match self.vfs.file_entry(&path) { let bytes = match self.vfs.file_entry(&path) {
Ok(entry) => self.vfs.read_file_all(entry)?, Ok(entry) => self
.vfs
.read_file_all(entry, VfsFileSubDataKind::ModuleGraph)?,
Err(err) if err.kind() == ErrorKind::NotFound => { Err(err) if err.kind() == ErrorKind::NotFound => {
let bytes = match RealFs.read_file_sync(&path, None) { let bytes = match RealFs.read_file_sync(&path, None) {
Ok(bytes) => bytes, Ok(bytes) => bytes,
@ -691,6 +694,7 @@ impl<'a> DenoCompileBinaryWriter<'a> {
Some(source) => source, Some(source) => source,
None => RealFs.read_file_sync(&file_path, None)?, None => RealFs.read_file_sync(&file_path, None)?,
}, },
VfsFileSubDataKind::ModuleGraph,
) )
.with_context(|| { .with_context(|| {
format!("Failed adding '{}'", file_path.display()) format!("Failed adding '{}'", file_path.display())

View file

@ -42,7 +42,11 @@ impl DenoCompileCodeCache {
// attempt to deserialize the cache data // attempt to deserialize the cache data
match deserialize(&file_path, cache_key) { match deserialize(&file_path, cache_key) {
Ok(data) => { Ok(data) => {
log::debug!("Loaded {} code cache entries", data.len()); log::debug!(
"Loaded {} code cache entries from {}",
data.len(),
file_path.display()
);
Self { Self {
strategy: CodeCacheStrategy::SubsequentRun( strategy: CodeCacheStrategy::SubsequentRun(
SubsequentRunCodeCacheStrategy { SubsequentRunCodeCacheStrategy {
@ -53,7 +57,11 @@ impl DenoCompileCodeCache {
} }
} }
Err(err) => { Err(err) => {
log::debug!("Failed to deserialize code cache: {:#}", err); log::debug!(
"Failed to deserialize code cache from {}: {:#}",
file_path.display(),
err
);
Self { Self {
strategy: CodeCacheStrategy::FirstRun(FirstRunCodeCacheStrategy { strategy: CodeCacheStrategy::FirstRun(FirstRunCodeCacheStrategy {
cache_key, cache_key,
@ -186,6 +194,7 @@ impl FirstRunCodeCacheStrategy {
Ok(()) => { Ok(()) => {
if let Err(err) = std::fs::rename(&temp_file, &self.file_path) { if let Err(err) = std::fs::rename(&temp_file, &self.file_path) {
log::debug!("Failed to rename code cache: {}", err); log::debug!("Failed to rename code cache: {}", err);
let _ = std::fs::remove_file(&temp_file);
} else { } else {
log::debug!("Serialized {} code cache entries", count); log::debug!("Serialized {} code cache entries", count);
} }

View file

@ -17,6 +17,7 @@ use deno_runtime::deno_io::fs::FsResult;
use deno_runtime::deno_io::fs::FsStat; use deno_runtime::deno_io::fs::FsStat;
use super::virtual_fs::FileBackedVfs; use super::virtual_fs::FileBackedVfs;
use super::virtual_fs::VfsFileSubDataKind;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct DenoCompileFileSystem(Arc<FileBackedVfs>); pub struct DenoCompileFileSystem(Arc<FileBackedVfs>);
@ -36,7 +37,8 @@ impl DenoCompileFileSystem {
fn copy_to_real_path(&self, oldpath: &Path, newpath: &Path) -> FsResult<()> { fn copy_to_real_path(&self, oldpath: &Path, newpath: &Path) -> FsResult<()> {
let old_file = self.0.file_entry(oldpath)?; let old_file = self.0.file_entry(oldpath)?;
let old_file_bytes = self.0.read_file_all(old_file)?; let old_file_bytes =
self.0.read_file_all(old_file, VfsFileSubDataKind::Raw)?;
RealFs.write_file_sync( RealFs.write_file_sync(
newpath, newpath,
OpenOptions { OpenOptions {

View file

@ -56,6 +56,8 @@ use serialization::DenoCompileModuleSource;
use std::borrow::Cow; use std::borrow::Cow;
use std::rc::Rc; use std::rc::Rc;
use std::sync::Arc; use std::sync::Arc;
use virtual_fs::FileBackedVfs;
use virtual_fs::VfsFileSubDataKind;
use crate::args::create_default_npmrc; use crate::args::create_default_npmrc;
use crate::args::get_root_cert_store; use crate::args::get_root_cert_store;
@ -111,6 +113,7 @@ use self::file_system::DenoCompileFileSystem;
struct SharedModuleLoaderState { struct SharedModuleLoaderState {
cjs_tracker: Arc<CjsTracker>, cjs_tracker: Arc<CjsTracker>,
code_cache: Option<Arc<dyn CliCodeCache>>,
fs: Arc<dyn deno_fs::FileSystem>, fs: Arc<dyn deno_fs::FileSystem>,
modules: StandaloneModules, modules: StandaloneModules,
node_code_translator: Arc<CliNodeCodeTranslator>, node_code_translator: Arc<CliNodeCodeTranslator>,
@ -118,8 +121,8 @@ struct SharedModuleLoaderState {
npm_module_loader: Arc<NpmModuleLoader>, npm_module_loader: Arc<NpmModuleLoader>,
npm_req_resolver: Arc<CliNpmReqResolver>, npm_req_resolver: Arc<CliNpmReqResolver>,
npm_resolver: Arc<dyn CliNpmResolver>, npm_resolver: Arc<dyn CliNpmResolver>,
vfs: Arc<FileBackedVfs>,
workspace_resolver: WorkspaceResolver, workspace_resolver: WorkspaceResolver,
code_cache: Option<Arc<dyn CliCodeCache>>,
} }
impl SharedModuleLoaderState { impl SharedModuleLoaderState {
@ -514,7 +517,12 @@ impl NodeRequireLoader for EmbeddedModuleLoader {
&self, &self,
path: &std::path::Path, path: &std::path::Path,
) -> Result<String, AnyError> { ) -> Result<String, AnyError> {
Ok(self.shared.fs.read_text_file_lossy_sync(path, None)?) let file_entry = self.shared.vfs.file_entry(path)?;
let file_bytes = self
.shared
.vfs
.read_file_all(file_entry, VfsFileSubDataKind::ModuleGraph)?;
Ok(String::from_utf8(file_bytes.into_owned())?)
} }
fn is_maybe_cjs( fn is_maybe_cjs(
@ -817,6 +825,7 @@ pub async fn run(data: StandaloneData) -> Result<i32, AnyError> {
let module_loader_factory = StandaloneModuleLoaderFactory { let module_loader_factory = StandaloneModuleLoaderFactory {
shared: Arc::new(SharedModuleLoaderState { shared: Arc::new(SharedModuleLoaderState {
cjs_tracker: cjs_tracker.clone(), cjs_tracker: cjs_tracker.clone(),
code_cache: code_cache.clone(),
fs: fs.clone(), fs: fs.clone(),
modules, modules,
node_code_translator: node_code_translator.clone(), node_code_translator: node_code_translator.clone(),
@ -826,10 +835,10 @@ pub async fn run(data: StandaloneData) -> Result<i32, AnyError> {
fs.clone(), fs.clone(),
node_code_translator, node_code_translator,
)), )),
code_cache: code_cache.clone(),
npm_resolver: npm_resolver.clone(), npm_resolver: npm_resolver.clone(),
workspace_resolver,
npm_req_resolver, npm_req_resolver,
vfs,
workspace_resolver,
}), }),
}; };

View file

@ -32,6 +32,15 @@ use thiserror::Error;
use crate::util; use crate::util;
use crate::util::fs::canonicalize_path; use crate::util::fs::canonicalize_path;
#[derive(Debug, Copy, Clone)]
pub enum VfsFileSubDataKind {
/// Raw bytes of the file.
Raw,
/// Bytes to use for module loading. For example, for TypeScript
/// files this will be the transpiled JavaScript source.
ModuleGraph,
}
#[derive(Error, Debug)] #[derive(Error, Debug)]
#[error( #[error(
"Failed to strip prefix '{}' from '{}'", root_path.display(), target.display() "Failed to strip prefix '{}' from '{}'", root_path.display(), target.display()
@ -141,7 +150,11 @@ impl VfsBuilder {
// inline the symlink and make the target file // inline the symlink and make the target file
let file_bytes = std::fs::read(&target) let file_bytes = std::fs::read(&target)
.with_context(|| format!("Reading {}", path.display()))?; .with_context(|| format!("Reading {}", path.display()))?;
self.add_file_with_data_inner(&path, file_bytes)?; self.add_file_with_data_inner(
&path,
file_bytes,
VfsFileSubDataKind::Raw,
)?;
} else { } else {
log::warn!( log::warn!(
"{} Symlink target is outside '{}'. Excluding symlink at '{}' with target '{}'.", "{} Symlink target is outside '{}'. Excluding symlink at '{}' with target '{}'.",
@ -219,25 +232,27 @@ impl VfsBuilder {
) -> Result<(), AnyError> { ) -> 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_with_data_inner(path, file_bytes) self.add_file_with_data_inner(path, file_bytes, VfsFileSubDataKind::Raw)
} }
pub fn add_file_with_data( pub fn add_file_with_data(
&mut self, &mut self,
path: &Path, path: &Path,
data: Vec<u8>, data: Vec<u8>,
sub_data_kind: VfsFileSubDataKind,
) -> Result<(), AnyError> { ) -> Result<(), AnyError> {
let target_path = canonicalize_path(path)?; let target_path = canonicalize_path(path)?;
if target_path != path { if target_path != path {
self.add_symlink(path, &target_path)?; self.add_symlink(path, &target_path)?;
} }
self.add_file_with_data_inner(&target_path, data) self.add_file_with_data_inner(&target_path, data, sub_data_kind)
} }
fn add_file_with_data_inner( fn add_file_with_data_inner(
&mut self, &mut self,
path: &Path, path: &Path,
data: Vec<u8>, data: Vec<u8>,
sub_data_kind: VfsFileSubDataKind,
) -> Result<(), AnyError> { ) -> 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]);
@ -253,8 +268,19 @@ impl VfsBuilder {
let name = path.file_name().unwrap().to_string_lossy(); let name = path.file_name().unwrap().to_string_lossy();
let data_len = data.len(); let data_len = data.len();
match dir.entries.binary_search_by(|e| e.name().cmp(&name)) { match dir.entries.binary_search_by(|e| e.name().cmp(&name)) {
Ok(_) => { Ok(index) => {
// already added, just ignore let entry = &mut dir.entries[index];
match entry {
VfsEntry::File(virtual_file) => match sub_data_kind {
VfsFileSubDataKind::Raw => {
virtual_file.offset = offset;
}
VfsFileSubDataKind::ModuleGraph => {
virtual_file.module_graph_offset = offset;
}
},
VfsEntry::Dir(_) | VfsEntry::Symlink(_) => unreachable!(),
}
} }
Err(insert_index) => { Err(insert_index) => {
dir.entries.insert( dir.entries.insert(
@ -262,6 +288,7 @@ impl VfsBuilder {
VfsEntry::File(VirtualFile { VfsEntry::File(VirtualFile {
name: name.to_string(), name: name.to_string(),
offset, offset,
module_graph_offset: offset,
len: data.len() as u64, len: data.len() as u64,
}), }),
); );
@ -454,6 +481,12 @@ pub struct VirtualDirectory {
pub struct VirtualFile { pub struct VirtualFile {
pub name: String, pub name: String,
pub offset: u64, pub offset: u64,
/// Offset file to use for module loading when it differs from the
/// raw file. Often this will be the same offset as above for data
/// such as JavaScript files, but for TypeScript files the `offset`
/// will be the original raw bytes when included as an asset and this
/// offset will be to the transpiled JavaScript source.
pub module_graph_offset: u64,
pub len: u64, pub len: u64,
} }
@ -634,7 +667,7 @@ impl FileBackedVfsFile {
} }
fn read_to_buf(&self, buf: &mut [u8]) -> FsResult<usize> { fn read_to_buf(&self, buf: &mut [u8]) -> FsResult<usize> {
let pos = { let read_pos = {
let mut pos = self.pos.lock(); let mut pos = self.pos.lock();
let read_pos = *pos; let read_pos = *pos;
// advance the position due to the read // advance the position due to the read
@ -643,12 +676,12 @@ impl FileBackedVfsFile {
}; };
self self
.vfs .vfs
.read_file(&self.file, pos, buf) .read_file(&self.file, read_pos, buf)
.map_err(|err| err.into()) .map_err(|err| err.into())
} }
fn read_to_end(&self) -> FsResult<Vec<u8>> { fn read_to_end(&self) -> FsResult<Cow<'static, [u8]>> {
let pos = { let read_pos = {
let mut pos = self.pos.lock(); let mut pos = self.pos.lock();
let read_pos = *pos; let read_pos = *pos;
// todo(dsherret): should this always set it to the end of the file? // todo(dsherret): should this always set it to the end of the file?
@ -658,13 +691,21 @@ impl FileBackedVfsFile {
} }
read_pos read_pos
}; };
if pos > self.file.len { if read_pos > self.file.len {
return Ok(Vec::new()); return Ok(Cow::Borrowed(&[]));
}
if read_pos == 0 {
Ok(
self
.vfs
.read_file_all(&self.file, VfsFileSubDataKind::Raw)?,
)
} else {
let size = (self.file.len - read_pos) as usize;
let mut buf = vec![0; size];
self.vfs.read_file(&self.file, read_pos, &mut buf)?;
Ok(Cow::Owned(buf))
} }
let size = (self.file.len - pos) as usize;
let mut buf = vec![0; size];
self.vfs.read_file(&self.file, pos, &mut buf)?;
Ok(buf)
} }
} }
@ -703,11 +744,14 @@ impl deno_io::fs::File for FileBackedVfsFile {
} }
fn read_all_sync(self: Rc<Self>) -> FsResult<Vec<u8>> { fn read_all_sync(self: Rc<Self>) -> FsResult<Vec<u8>> {
self.read_to_end() self.read_to_end().map(|bytes| bytes.into_owned())
} }
async fn read_all_async(self: Rc<Self>) -> FsResult<Vec<u8>> { async fn read_all_async(self: Rc<Self>) -> FsResult<Vec<u8>> {
let inner = (*self).clone(); let inner = (*self).clone();
tokio::task::spawn_blocking(move || inner.read_to_end()).await? tokio::task::spawn_blocking(move || {
inner.read_to_end().map(|bytes| bytes.into_owned())
})
.await?
} }
fn chmod_sync(self: Rc<Self>, _pathmode: u32) -> FsResult<()> { fn chmod_sync(self: Rc<Self>, _pathmode: u32) -> FsResult<()> {
@ -878,8 +922,9 @@ impl FileBackedVfs {
pub fn read_file_all( pub fn read_file_all(
&self, &self,
file: &VirtualFile, file: &VirtualFile,
sub_data_kind: VfsFileSubDataKind,
) -> std::io::Result<Cow<'static, [u8]>> { ) -> std::io::Result<Cow<'static, [u8]>> {
let read_range = self.get_read_range(file, 0, file.len)?; let read_range = self.get_read_range(file, sub_data_kind, 0, file.len)?;
match &self.vfs_data { match &self.vfs_data {
Cow::Borrowed(data) => Ok(Cow::Borrowed(&data[read_range])), Cow::Borrowed(data) => Ok(Cow::Borrowed(&data[read_range])),
Cow::Owned(data) => Ok(Cow::Owned(data[read_range].to_vec())), Cow::Owned(data) => Ok(Cow::Owned(data[read_range].to_vec())),
@ -892,26 +937,37 @@ impl FileBackedVfs {
pos: u64, pos: u64,
buf: &mut [u8], buf: &mut [u8],
) -> std::io::Result<usize> { ) -> std::io::Result<usize> {
let read_range = self.get_read_range(file, pos, buf.len() as u64)?; let read_range = self.get_read_range(
buf.copy_from_slice(&self.vfs_data[read_range]); file,
Ok(buf.len()) VfsFileSubDataKind::Raw,
pos,
buf.len() as u64,
)?;
let read_len = read_range.len();
buf[..read_len].copy_from_slice(&self.vfs_data[read_range]);
Ok(read_len)
} }
fn get_read_range( fn get_read_range(
&self, &self,
file: &VirtualFile, file: &VirtualFile,
sub_data_kind: VfsFileSubDataKind,
pos: u64, pos: u64,
len: u64, len: u64,
) -> std::io::Result<Range<usize>> { ) -> std::io::Result<Range<usize>> {
let data = &self.vfs_data; if pos > file.len {
let start = self.fs_root.start_file_offset + file.offset + pos;
let end = start + len;
if end > data.len() as u64 {
return Err(std::io::Error::new( return Err(std::io::Error::new(
std::io::ErrorKind::UnexpectedEof, std::io::ErrorKind::UnexpectedEof,
"unexpected EOF", "unexpected EOF",
)); ));
} }
let offset = match sub_data_kind {
VfsFileSubDataKind::Raw => file.offset,
VfsFileSubDataKind::ModuleGraph => file.module_graph_offset,
};
let file_offset = self.fs_root.start_file_offset + offset;
let start = file_offset + pos;
let end = file_offset + std::cmp::min(pos + len, file.len);
Ok(start as usize..end as usize) Ok(start as usize..end as usize)
} }
@ -950,7 +1006,13 @@ mod test {
#[track_caller] #[track_caller]
fn read_file(vfs: &FileBackedVfs, path: &Path) -> String { fn read_file(vfs: &FileBackedVfs, path: &Path) -> String {
let file = vfs.file_entry(path).unwrap(); let file = vfs.file_entry(path).unwrap();
String::from_utf8(vfs.read_file_all(file).unwrap().into_owned()).unwrap() String::from_utf8(
vfs
.read_file_all(file, VfsFileSubDataKind::Raw)
.unwrap()
.into_owned(),
)
.unwrap()
} }
#[test] #[test]
@ -963,23 +1025,40 @@ mod test {
let src_path = src_path.to_path_buf(); let src_path = src_path.to_path_buf();
let mut builder = VfsBuilder::new(src_path.clone()).unwrap(); let mut builder = VfsBuilder::new(src_path.clone()).unwrap();
builder builder
.add_file_with_data_inner(&src_path.join("a.txt"), "data".into()) .add_file_with_data_inner(
&src_path.join("a.txt"),
"data".into(),
VfsFileSubDataKind::Raw,
)
.unwrap(); .unwrap();
builder builder
.add_file_with_data_inner(&src_path.join("b.txt"), "data".into()) .add_file_with_data_inner(
&src_path.join("b.txt"),
"data".into(),
VfsFileSubDataKind::Raw,
)
.unwrap(); .unwrap();
assert_eq!(builder.files.len(), 1); // because duplicate data assert_eq!(builder.files.len(), 1); // because duplicate data
builder builder
.add_file_with_data_inner(&src_path.join("c.txt"), "c".into()) .add_file_with_data_inner(
&src_path.join("c.txt"),
"c".into(),
VfsFileSubDataKind::Raw,
)
.unwrap(); .unwrap();
builder builder
.add_file_with_data_inner( .add_file_with_data_inner(
&src_path.join("sub_dir").join("d.txt"), &src_path.join("sub_dir").join("d.txt"),
"d".into(), "d".into(),
VfsFileSubDataKind::Raw,
) )
.unwrap(); .unwrap();
builder builder
.add_file_with_data_inner(&src_path.join("e.txt"), "e".into()) .add_file_with_data_inner(
&src_path.join("e.txt"),
"e".into(),
VfsFileSubDataKind::Raw,
)
.unwrap(); .unwrap();
builder builder
.add_symlink( .add_symlink(
@ -1150,6 +1229,7 @@ mod test {
.add_file_with_data_inner( .add_file_with_data_inner(
temp_path.join("a.txt").as_path(), temp_path.join("a.txt").as_path(),
"0123456789".to_string().into_bytes(), "0123456789".to_string().into_bytes(),
VfsFileSubDataKind::Raw,
) )
.unwrap(); .unwrap();
let (dest_path, virtual_fs) = into_virtual_fs(builder, &temp_dir); let (dest_path, virtual_fs) = into_virtual_fs(builder, &temp_dir);

View file

@ -549,7 +549,11 @@ pub fn format_sql(
// Add single new line to the end of file. // Add single new line to the end of file.
formatted_str.push('\n'); formatted_str.push('\n');
Ok(Some(formatted_str)) Ok(if formatted_str == file_text {
None
} else {
Some(formatted_str)
})
} }
/// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, IPYNB or SQL file. /// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, IPYNB or SQL file.

View file

@ -9,6 +9,7 @@ use crate::args::RunFlags;
use crate::colors; use crate::colors;
use color_print::cformat; use color_print::cformat;
use color_print::cstr; use color_print::cstr;
use deno_config::deno_json::NodeModulesDirMode;
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::json; use deno_core::serde_json::json;
@ -288,6 +289,7 @@ async fn init_npm(name: &str, args: Vec<String>) -> Result<i32, AnyError> {
}, },
allow_scripts: PackagesAllowedScripts::All, allow_scripts: PackagesAllowedScripts::All,
argv: args, argv: args,
node_modules_dir: Some(NodeModulesDirMode::Auto),
subcommand: DenoSubcommand::Run(RunFlags { subcommand: DenoSubcommand::Run(RunFlags {
script: script_name, script: script_name,
..Default::default() ..Default::default()

View file

@ -359,6 +359,7 @@ async fn install_global(
// ensure the module is cached // ensure the module is cached
let factory = CliFactory::from_flags(flags.clone()); let factory = CliFactory::from_flags(flags.clone());
let cli_options = factory.cli_options()?;
let http_client = factory.http_client_provider(); let http_client = factory.http_client_provider();
let deps_http_cache = factory.global_http_cache()?; let deps_http_cache = factory.global_http_cache()?;
let mut deps_file_fetcher = FileFetcher::new( let mut deps_file_fetcher = FileFetcher::new(
@ -381,20 +382,22 @@ async fn install_global(
)); ));
let entry_text = install_flags_global.module_url.as_str(); let entry_text = install_flags_global.module_url.as_str();
let req = super::registry::AddRmPackageReq::parse(entry_text); if !cli_options.initial_cwd().join(entry_text).exists() {
// check for package requirement missing prefix
// found a package requirement but missing the prefix if let Ok(Err(package_req)) =
if let Ok(Err(package_req)) = req { super::registry::AddRmPackageReq::parse(entry_text)
if jsr_resolver.req_to_nv(&package_req).await.is_some() { {
bail!( if jsr_resolver.req_to_nv(&package_req).await.is_some() {
"{entry_text} is missing a prefix. Did you mean `{}`?", bail!(
crate::colors::yellow(format!("deno install -g jsr:{package_req}")) "{entry_text} is missing a prefix. Did you mean `{}`?",
); crate::colors::yellow(format!("deno install -g jsr:{package_req}"))
} else if npm_resolver.req_to_nv(&package_req).await.is_some() { );
bail!( } else if npm_resolver.req_to_nv(&package_req).await.is_some() {
"{entry_text} is missing a prefix. Did you mean `{}`?", bail!(
crate::colors::yellow(format!("deno install -g npm:{package_req}")) "{entry_text} is missing a prefix. Did you mean `{}`?",
); crate::colors::yellow(format!("deno install -g npm:{package_req}"))
);
}
} }
} }

View file

@ -27,7 +27,16 @@ pub fn is_importable_ext(path: &Path) -> bool {
if let Some(ext) = get_extension(path) { if let Some(ext) = get_extension(path) {
matches!( matches!(
ext.as_str(), ext.as_str(),
"ts" | "tsx" | "js" | "jsx" | "mjs" | "mts" | "cjs" | "cts" | "json" "ts"
| "tsx"
| "js"
| "jsx"
| "mjs"
| "mts"
| "cjs"
| "cts"
| "json"
| "wasm"
) )
} else { } else {
false false
@ -222,6 +231,7 @@ mod test {
assert!(is_script_ext(Path::new("foo.cjs"))); assert!(is_script_ext(Path::new("foo.cjs")));
assert!(is_script_ext(Path::new("foo.cts"))); assert!(is_script_ext(Path::new("foo.cts")));
assert!(!is_script_ext(Path::new("foo.json"))); assert!(!is_script_ext(Path::new("foo.json")));
assert!(!is_script_ext(Path::new("foo.wasm")));
assert!(!is_script_ext(Path::new("foo.mjsx"))); assert!(!is_script_ext(Path::new("foo.mjsx")));
} }
@ -243,6 +253,7 @@ mod test {
assert!(is_importable_ext(Path::new("foo.cjs"))); assert!(is_importable_ext(Path::new("foo.cjs")));
assert!(is_importable_ext(Path::new("foo.cts"))); assert!(is_importable_ext(Path::new("foo.cts")));
assert!(is_importable_ext(Path::new("foo.json"))); assert!(is_importable_ext(Path::new("foo.json")));
assert!(is_importable_ext(Path::new("foo.wasm")));
assert!(!is_importable_ext(Path::new("foo.mjsx"))); assert!(!is_importable_ext(Path::new("foo.mjsx")));
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -34,8 +34,11 @@ const {
ObjectHasOwn, ObjectHasOwn,
ObjectPrototypeIsPrototypeOf, ObjectPrototypeIsPrototypeOf,
PromisePrototypeCatch, PromisePrototypeCatch,
SafePromisePrototypeFinally,
PromisePrototypeThen, PromisePrototypeThen,
String,
StringPrototypeIncludes, StringPrototypeIncludes,
StringPrototypeSlice,
Symbol, Symbol,
TypeError, TypeError,
TypedArrayPrototypeGetSymbolToStringTag, TypedArrayPrototypeGetSymbolToStringTag,
@ -513,91 +516,139 @@ function fastSyncResponseOrStream(
* This function returns a promise that will only reject in the case of abnormal exit. * This function returns a promise that will only reject in the case of abnormal exit.
*/ */
function mapToCallback(context, callback, onError) { function mapToCallback(context, callback, onError) {
return async function (req) { let mapped = async function (req, span) {
const asyncContext = getAsyncContext(); // Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback
setAsyncContext(context.asyncContext); // 500 error.
let innerRequest;
let response;
try { try {
// Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback innerRequest = new InnerRequest(req, context);
// 500 error. const request = fromInnerRequest(innerRequest, "immutable");
let innerRequest; innerRequest.request = request;
let response;
try {
innerRequest = new InnerRequest(req, context);
const request = fromInnerRequest(innerRequest, "immutable");
innerRequest.request = request;
response = await callback(
request,
new ServeHandlerInfo(innerRequest),
);
// Throwing Error if the handler return value is not a Response class if (span) {
span.updateName(request.method);
span.setAttribute("http.request.method", request.method);
const url = new URL(request.url);
span.setAttribute("url.full", request.url);
span.setAttribute(
"url.scheme",
StringPrototypeSlice(url.protocol, 0, -1),
);
span.setAttribute("url.path", url.pathname);
span.setAttribute("url.query", StringPrototypeSlice(url.search, 1));
}
response = await callback(
request,
new ServeHandlerInfo(innerRequest),
);
// Throwing Error if the handler return value is not a Response class
if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) {
throw new TypeError(
"Return value from serve handler must be a response or a promise resolving to a response",
);
}
if (response.type === "error") {
throw new TypeError(
"Return value from serve handler must not be an error response (like Response.error())",
);
}
if (response.bodyUsed) {
throw new TypeError(
"The body of the Response returned from the serve handler has already been consumed",
);
}
} catch (error) {
try {
response = await onError(error);
if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) {
throw new TypeError( throw new TypeError(
"Return value from serve handler must be a response or a promise resolving to a response", "Return value from onError handler must be a response or a promise resolving to a response",
);
}
if (response.type === "error") {
throw new TypeError(
"Return value from serve handler must not be an error response (like Response.error())",
);
}
if (response.bodyUsed) {
throw new TypeError(
"The body of the Response returned from the serve handler has already been consumed",
); );
} }
} catch (error) { } catch (error) {
try { // deno-lint-ignore no-console
response = await onError(error); console.error("Exception in onError while handling exception", error);
if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { response = internalServerError();
throw new TypeError(
"Return value from onError handler must be a response or a promise resolving to a response",
);
}
} catch (error) {
// deno-lint-ignore no-console
console.error("Exception in onError while handling exception", error);
response = internalServerError();
}
} }
const inner = toInnerResponse(response);
if (innerRequest?.[_upgraded]) {
// We're done here as the connection has been upgraded during the callback and no longer requires servicing.
if (response !== UPGRADE_RESPONSE_SENTINEL) {
// deno-lint-ignore no-console
console.error("Upgrade response was not returned from callback");
context.close();
}
innerRequest?.[_upgraded]();
return;
}
// Did everything shut down while we were waiting?
if (context.closed) {
// We're shutting down, so this status shouldn't make it back to the client but "Service Unavailable" seems appropriate
innerRequest?.close();
op_http_set_promise_complete(req, 503);
return;
}
const status = inner.status;
const headers = inner.headerList;
if (headers && headers.length > 0) {
if (headers.length == 1) {
op_http_set_response_header(req, headers[0][0], headers[0][1]);
} else {
op_http_set_response_headers(req, headers);
}
}
fastSyncResponseOrStream(req, inner.body, status, innerRequest);
} finally {
setAsyncContext(asyncContext);
} }
if (span) {
span.setAttribute(
"http.response.status_code",
String(response.status),
);
}
const inner = toInnerResponse(response);
if (innerRequest?.[_upgraded]) {
// We're done here as the connection has been upgraded during the callback and no longer requires servicing.
if (response !== UPGRADE_RESPONSE_SENTINEL) {
// deno-lint-ignore no-console
console.error("Upgrade response was not returned from callback");
context.close();
}
innerRequest?.[_upgraded]();
return;
}
// Did everything shut down while we were waiting?
if (context.closed) {
// We're shutting down, so this status shouldn't make it back to the client but "Service Unavailable" seems appropriate
innerRequest?.close();
op_http_set_promise_complete(req, 503);
return;
}
const status = inner.status;
const headers = inner.headerList;
if (headers && headers.length > 0) {
if (headers.length == 1) {
op_http_set_response_header(req, headers[0][0], headers[0][1]);
} else {
op_http_set_response_headers(req, headers);
}
}
fastSyncResponseOrStream(req, inner.body, status, innerRequest);
}; };
if (internals.telemetry.tracingEnabled) {
const { Span, enterSpan, endSpan } = internals.telemetry;
const origMapped = mapped;
mapped = function (req, _span) {
const oldCtx = getAsyncContext();
setAsyncContext(context.asyncContext);
const span = new Span("deno.serve");
try {
enterSpan(span);
return SafePromisePrototypeFinally(
origMapped(req, span),
() => endSpan(span),
);
} finally {
// equiv to exitSpan.
setAsyncContext(oldCtx);
}
};
} else {
const origMapped = mapped;
mapped = function (req, span) {
const oldCtx = getAsyncContext();
setAsyncContext(context.asyncContext);
try {
return origMapped(req, span);
} finally {
setAsyncContext(oldCtx);
}
};
}
return mapped;
} }
type RawHandler = ( type RawHandler = (
@ -795,7 +846,7 @@ function serveHttpOn(context, addr, callback) {
// Attempt to pull as many requests out of the queue as possible before awaiting. This API is // Attempt to pull as many requests out of the queue as possible before awaiting. This API is
// a synchronous, non-blocking API that returns u32::MAX if anything goes wrong. // a synchronous, non-blocking API that returns u32::MAX if anything goes wrong.
while ((req = op_http_try_wait(rid)) !== null) { while ((req = op_http_try_wait(rid)) !== null) {
PromisePrototypeCatch(callback(req), promiseErrorHandler); PromisePrototypeCatch(callback(req, undefined), promiseErrorHandler);
} }
currentPromise = op_http_wait(rid); currentPromise = op_http_wait(rid);
if (!ref) { if (!ref) {
@ -815,7 +866,7 @@ function serveHttpOn(context, addr, callback) {
if (req === null) { if (req === null) {
break; break;
} }
PromisePrototypeCatch(callback(req), promiseErrorHandler); PromisePrototypeCatch(callback(req, undefined), promiseErrorHandler);
} }
try { try {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,7 @@
[package] [package]
name = "deno_net" name = "deno_net"
version = "0.170.0" version = "0.171.0"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true

View file

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

View file

@ -1060,22 +1060,39 @@ Module.prototype._compile = function (content, filename, format) {
return result; return result;
}; };
Module._extensions[".js"] = Module._extensions[".js"] = function (module, filename) {
Module._extensions[".ts"] = // We don't define everything on Module.extensions in
Module._extensions[".jsx"] = // order to prevent probing for these files
Module._extensions[".tsx"] = if (
function (module, filename) { StringPrototypeEndsWith(filename, ".js") ||
const content = op_require_read_file(filename); StringPrototypeEndsWith(filename, ".ts") ||
const format = op_require_is_maybe_cjs(filename) ? undefined : "module"; StringPrototypeEndsWith(filename, ".jsx") ||
module._compile(content, filename, format); StringPrototypeEndsWith(filename, ".tsx")
}; ) {
return loadMaybeCjs(module, filename);
} else if (StringPrototypeEndsWith(filename, ".mts")) {
return loadESMFromCJS(module, filename);
} else if (StringPrototypeEndsWith(filename, ".cts")) {
return loadCjs(module, filename);
} else {
return loadMaybeCjs(module, filename);
}
};
Module._extensions[".cjs"] = Module._extensions[".cjs"] = loadCjs;
Module._extensions[".cts"] = Module._extensions[".mjs"] = loadESMFromCJS;
function (module, filename) { Module._extensions[".wasm"] = loadESMFromCJS;
const content = op_require_read_file(filename);
module._compile(content, filename, "commonjs"); function loadMaybeCjs(module, filename) {
}; const content = op_require_read_file(filename);
const format = op_require_is_maybe_cjs(filename) ? undefined : "module";
module._compile(content, filename, format);
}
function loadCjs(module, filename) {
const content = op_require_read_file(filename);
module._compile(content, filename, "commonjs");
}
function loadESMFromCJS(module, filename, code) { function loadESMFromCJS(module, filename, code) {
const namespace = op_import_sync( const namespace = op_import_sync(
@ -1086,11 +1103,6 @@ function loadESMFromCJS(module, filename, code) {
module.exports = namespace; module.exports = namespace;
} }
Module._extensions[".mjs"] =
Module._extensions[".mts"] =
Module._extensions[".wasm"] =
loadESMFromCJS;
function stripBOM(content) { function stripBOM(content) {
if (StringPrototypeCharCodeAt(content, 0) === 0xfeff) { if (StringPrototypeCharCodeAt(content, 0) === 0xfeff) {
content = StringPrototypeSlice(content, 1); content = StringPrototypeSlice(content, 1);

View file

@ -63,3 +63,24 @@ export function fstatSync(
const origin = new FsFile(fd, Symbol.for("Deno.internal.FsFile")).statSync(); const origin = new FsFile(fd, Symbol.for("Deno.internal.FsFile")).statSync();
return CFISBIS(origin, options?.bigint || false); return CFISBIS(origin, options?.bigint || false);
} }
export function fstatPromise(fd: number): Promise<Stats>;
export function fstatPromise(
fd: number,
options: { bigint: false },
): Promise<Stats>;
export function fstatPromise(
fd: number,
options: { bigint: true },
): Promise<BigIntStats>;
export function fstatPromise(
fd: number,
options?: statOptions,
): Stats | BigIntStats {
return new Promise((resolve, reject) => {
fstat(fd, options, (err, stats) => {
if (err) reject(err);
else resolve(stats);
});
});
}

View file

@ -88,7 +88,7 @@ export function readFile(
} }
const buffer = maybeDecode(data, encoding); const buffer = maybeDecode(data, encoding);
(cb as BinaryCallback)(null, buffer); (cb as BinaryCallback)(null, buffer);
}, (err) => cb && cb(denoErrorToNodeError(err))); }, (err) => cb && cb(denoErrorToNodeError(err, { path, syscall: "open" })));
} }
} }
@ -122,7 +122,7 @@ export function readFileSync(
try { try {
data = Deno.readFileSync(path); data = Deno.readFileSync(path);
} catch (err) { } catch (err) {
throw denoErrorToNodeError(err); throw denoErrorToNodeError(err, { path, syscall: "open" });
} }
const encoding = getEncoding(opt); const encoding = getEncoding(opt);
if (encoding && encoding !== "binary") { if (encoding && encoding !== "binary") {

View file

@ -23,7 +23,7 @@ import Dir from "ext:deno_node/_fs/_fs_dir.ts";
import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; import Dirent from "ext:deno_node/_fs/_fs_dirent.ts";
import { exists, existsSync } from "ext:deno_node/_fs/_fs_exists.ts"; import { exists, existsSync } from "ext:deno_node/_fs/_fs_exists.ts";
import { fdatasync, fdatasyncSync } from "ext:deno_node/_fs/_fs_fdatasync.ts"; import { fdatasync, fdatasyncSync } from "ext:deno_node/_fs/_fs_fdatasync.ts";
import { fstat, fstatSync } from "ext:deno_node/_fs/_fs_fstat.ts"; import { fstat, fstatPromise, fstatSync } from "ext:deno_node/_fs/_fs_fstat.ts";
import { fsync, fsyncSync } from "ext:deno_node/_fs/_fs_fsync.ts"; import { fsync, fsyncSync } from "ext:deno_node/_fs/_fs_fsync.ts";
import { ftruncate, ftruncateSync } from "ext:deno_node/_fs/_fs_ftruncate.ts"; import { ftruncate, ftruncateSync } from "ext:deno_node/_fs/_fs_ftruncate.ts";
import { futimes, futimesSync } from "ext:deno_node/_fs/_fs_futimes.ts"; import { futimes, futimesSync } from "ext:deno_node/_fs/_fs_futimes.ts";
@ -174,6 +174,7 @@ const promises = {
lstat: lstatPromise, lstat: lstatPromise,
stat: statPromise, stat: statPromise,
statfs: statfsPromise, statfs: statfsPromise,
fstat: fstatPromise,
link: linkPromise, link: linkPromise,
unlink: unlinkPromise, unlink: unlinkPromise,
chmod: chmodPromise, chmod: chmodPromise,

View file

@ -16,6 +16,7 @@ export const readlink = fsPromises.readlink;
export const symlink = fsPromises.symlink; export const symlink = fsPromises.symlink;
export const lstat = fsPromises.lstat; export const lstat = fsPromises.lstat;
export const stat = fsPromises.stat; export const stat = fsPromises.stat;
export const fstat = fsPromises.fstat;
export const link = fsPromises.link; export const link = fsPromises.link;
export const unlink = fsPromises.unlink; export const unlink = fsPromises.unlink;
export const chmod = fsPromises.chmod; export const chmod = fsPromises.chmod;

View file

@ -6,6 +6,7 @@
import { EventEmitter } from "node:events"; import { EventEmitter } from "node:events";
import { Buffer } from "node:buffer"; import { Buffer } from "node:buffer";
import { promises, read, write } from "node:fs"; import { promises, read, write } from "node:fs";
export type { BigIntStats, Stats } from "ext:deno_node/_fs/_fs_stat.ts";
import { import {
BinaryOptionsArgument, BinaryOptionsArgument,
FileOptionsArgument, FileOptionsArgument,
@ -141,6 +142,13 @@ export class FileHandle extends EventEmitter {
// Note that Deno.close is not async // Note that Deno.close is not async
return Promise.resolve(core.close(this.fd)); return Promise.resolve(core.close(this.fd));
} }
stat(): Promise<Stats>;
stat(options: { bigint: false }): Promise<Stats>;
stat(options: { bigint: true }): Promise<BigIntStats>;
stat(options?: { bigint: boolean }): Promise<Stats | BigIntStats> {
return fsCall(promises.fstat, this, options);
}
} }
function fsCall(fn, handle, ...args) { function fsCall(fn, handle, ...args) {
@ -152,7 +160,7 @@ function fsCall(fn, handle, ...args) {
}); });
} }
return fn(handle, ...args); return fn(handle.fd, ...args);
} }
export default { export default {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -330,10 +330,14 @@ class WebSocket extends EventTarget {
webidl.requiredArguments(arguments.length, 1, prefix); webidl.requiredArguments(arguments.length, 1, prefix);
data = webidl.converters.WebSocketSend(data, prefix, "Argument 1"); data = webidl.converters.WebSocketSend(data, prefix, "Argument 1");
if (this[_readyState] !== OPEN) { if (this[_readyState] === CONNECTING) {
throw new DOMException("'readyState' not OPEN", "InvalidStateError"); throw new DOMException("'readyState' not OPEN", "InvalidStateError");
} }
if (this[_readyState] !== OPEN) {
return;
}
if (this[_sendQueue].length === 0) { if (this[_sendQueue].length === 0) {
// Fast path if the send queue is empty, for example when only synchronous // Fast path if the send queue is empty, for example when only synchronous
// data is being sent. // data is being sent.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { core, primordials } from "ext:core/mod.js"; import { core, internals, primordials } from "ext:core/mod.js";
import { import {
op_crypto_get_random_values, op_crypto_get_random_values,
op_otel_instrumentation_scope_create_and_enter, op_otel_instrumentation_scope_create_and_enter,
@ -32,11 +32,9 @@ const {
ObjectDefineProperty, ObjectDefineProperty,
WeakRefPrototypeDeref, WeakRefPrototypeDeref,
String, String,
StringPrototypePadStart,
ObjectPrototypeIsPrototypeOf, ObjectPrototypeIsPrototypeOf,
DataView,
DataViewPrototypeSetUint32,
SafeWeakRef, SafeWeakRef,
TypedArrayPrototypeGetBuffer,
} = primordials; } = primordials;
const { AsyncVariable, setAsyncContext } = core; const { AsyncVariable, setAsyncContext } = core;
@ -404,7 +402,7 @@ export class Span {
span.#asyncContext = NO_ASYNC_CONTEXT; span.#asyncContext = NO_ASYNC_CONTEXT;
}; };
exitSpan = (span: Span) => { endSpan = (span: Span) => {
const endTime = now(); const endTime = now();
submit( submit(
span.#spanId, span.#spanId,
@ -449,39 +447,11 @@ export class Span {
const currentSpan: Span | { const currentSpan: Span | {
spanContext(): { traceId: string; spanId: string }; spanContext(): { traceId: string; spanId: string };
} = CURRENT.get()?.getValue(SPAN_KEY); } = CURRENT.get()?.getValue(SPAN_KEY);
if (!currentSpan) { if (currentSpan) {
const buffer = new Uint8Array(TRACE_ID_BYTES + SPAN_ID_BYTES);
if (DETERMINISTIC) { if (DETERMINISTIC) {
DataViewPrototypeSetUint32( this.#spanId = StringPrototypePadStart(String(COUNTER++), 16, "0");
new DataView(TypedArrayPrototypeGetBuffer(buffer)),
TRACE_ID_BYTES - 4,
COUNTER,
true,
);
COUNTER += 1;
DataViewPrototypeSetUint32(
new DataView(TypedArrayPrototypeGetBuffer(buffer)),
TRACE_ID_BYTES + SPAN_ID_BYTES - 4,
COUNTER,
true,
);
COUNTER += 1;
} else {
op_crypto_get_random_values(buffer);
}
this.#traceId = TypedArrayPrototypeSubarray(buffer, 0, TRACE_ID_BYTES);
this.#spanId = TypedArrayPrototypeSubarray(buffer, TRACE_ID_BYTES);
} else {
this.#spanId = new Uint8Array(SPAN_ID_BYTES);
if (DETERMINISTIC) {
DataViewPrototypeSetUint32(
new DataView(TypedArrayPrototypeGetBuffer(this.#spanId)),
SPAN_ID_BYTES - 4,
COUNTER,
true,
);
COUNTER += 1;
} else { } else {
this.#spanId = new Uint8Array(SPAN_ID_BYTES);
op_crypto_get_random_values(this.#spanId); op_crypto_get_random_values(this.#spanId);
} }
// deno-lint-ignore prefer-primordials // deno-lint-ignore prefer-primordials
@ -493,6 +463,16 @@ export class Span {
this.#traceId = context.traceId; this.#traceId = context.traceId;
this.#parentSpanId = context.spanId; this.#parentSpanId = context.spanId;
} }
} else {
if (DETERMINISTIC) {
this.#traceId = StringPrototypePadStart(String(COUNTER++), 32, "0");
this.#spanId = StringPrototypePadStart(String(COUNTER++), 16, "0");
} else {
const buffer = new Uint8Array(TRACE_ID_BYTES + SPAN_ID_BYTES);
op_crypto_get_random_values(buffer);
this.#traceId = TypedArrayPrototypeSubarray(buffer, 0, TRACE_ID_BYTES);
this.#spanId = TypedArrayPrototypeSubarray(buffer, TRACE_ID_BYTES);
}
} }
} }
@ -717,4 +697,16 @@ export function bootstrap(
} }
} }
export const telemetry = { SpanExporter, ContextManager }; export const telemetry = {
SpanExporter,
ContextManager,
};
internals.telemetry = {
Span,
enterSpan,
exitSpan,
endSpan,
get tracingEnabled() {
return TRACING_ENABLED;
},
};

View file

@ -835,9 +835,9 @@ fn op_otel_span_set_dropped(
#[smi] dropped_events_count: u32, #[smi] dropped_events_count: u32,
) { ) {
if let Some(temporary_span) = state.try_borrow_mut::<TemporarySpan>() { if let Some(temporary_span) = state.try_borrow_mut::<TemporarySpan>() {
temporary_span.0.dropped_attributes_count = dropped_attributes_count; temporary_span.0.dropped_attributes_count += dropped_attributes_count;
temporary_span.0.links.dropped_count = dropped_links_count; temporary_span.0.links.dropped_count += dropped_links_count;
temporary_span.0.events.dropped_count = dropped_events_count; temporary_span.0.events.dropped_count += dropped_events_count;
} }
} }

View file

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

View file

@ -45,7 +45,7 @@ deno_semver.workspace = true
deno_terminal.workspace = true deno_terminal.workspace = true
deno_tls.workspace = true deno_tls.workspace = true
fastwebsockets = { workspace = true, features = ["upgrade", "unstable-split"] } fastwebsockets = { workspace = true, features = ["upgrade", "unstable-split"] }
file_test_runner = "0.7.2" file_test_runner = "0.7.3"
flaky_test = "=0.2.2" flaky_test = "=0.2.2"
hickory-client = "=0.24" hickory-client = "=0.24"
hickory-server = "=0.24" hickory-server = "=0.24"

View file

@ -12,7 +12,6 @@ import * as JSONC from "@std/jsonc";
type TestSuites = Record<string, string[]>; type TestSuites = Record<string, string[]>;
interface Config { interface Config {
nodeVersion: string;
/** Ignored files won't regenerated by the update script */ /** Ignored files won't regenerated by the update script */
ignore: TestSuites; ignore: TestSuites;
/** /**

View file

@ -1,5 +1,4 @@
{ {
"nodeVersion": "18.12.1",
"ignore": { "ignore": {
"common": ["index.js", "internet.js"], "common": ["index.js", "internet.js"],
"fixtures": [ "fixtures": [

File diff suppressed because it is too large Load diff

View file

@ -11,12 +11,13 @@ import { ensureFile } from "@std/fs/ensure-file";
import { writeAll } from "@std/io/write-all"; import { writeAll } from "@std/io/write-all";
import { withoutAll } from "@std/collections/without-all"; import { withoutAll } from "@std/collections/without-all";
import { relative } from "@std/path/posix/relative"; import { relative } from "@std/path/posix/relative";
import { version } from "./suite/node_version.ts";
import { config, ignoreList } from "../common.ts"; import { config, ignoreList } from "../common.ts";
const encoder = new TextEncoder(); const encoder = new TextEncoder();
const NODE_VERSION = config.nodeVersion; const NODE_VERSION = version;
const NODE_IGNORED_TEST_DIRS = [ const NODE_IGNORED_TEST_DIRS = [
"addons", "addons",

@ -1 +1 @@
Subproject commit d12a68fc4930062c0bed26447a6b5245697e77c1 Subproject commit 1c9511e584eb9d465bcd4b1e6c05ecedf7f15549

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
import { createRequire } from 'module'; import { createRequire } from 'module';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
setInterval(function() {}, 9999); setInterval(function() {}, 9999);

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
var t = 1; var t = 1;

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
// Copyright Joyent, Inc. and other Node contributors. // Copyright Joyent, Inc. and other Node contributors.

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

View file

@ -2,7 +2,7 @@
// deno-lint-ignore-file // deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1 // Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict'; 'use strict';

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