summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-17fix: serve handler error with 0 arguments (#23652)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/23651 Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-05-17feat(serve): support `--port 0` to use an open port (#23846)Satya Rohith
Closes https://github.com/denoland/deno/issues/23845
2024-05-17chore: forward v1.43.4 commit to main (#23861)Bartek Iwańczuk
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-05-16fix(lsp): respect types dependencies for tsc roots (#23825)Nayeem Rahman
2024-05-16fix(ext/node): fix grpc error_handling example (#23755)Satya Rohith
gRPC depends only on the END_STREAM flag to emit "trailers" event which is responsible to propagate the errors correctly. This patch uses Body::is_end_stream() to determine if a stream will end and set the END_STREAM flag. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-16fix(node): error when throwing `FS_EISDIR` (#23829)Marvin Hagemeister
The `EISDIR` error code is not available as a global variable, but must be accessed through the `osConstants.errno` object. Fixes https://github.com/denoland/deno/issues/23695
2024-05-16fix(node): seperate worker module cache (#23634)Divy Srivastava
Construct a new module graph container for workers instead of sharing it with the main worker. Fixes #17248 Fixes #23461 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-16fix(ext/node): homedir() `getpwuid`/`SHGetKnownFolderPath` fallback (#23841)Divy Srivastava
**Unix**: Returns the value of the HOME environment variable if it is set even if it is an empty string. Otherwise, it tries to determine the home directory by invoking the [getpwuid_r](https://linux.die.net/man/3/getpwuid_r) function with the UID of the current user. **Windows**: Returns the value of the USERPROFILE environment variable if it is set and it is not an empty string. Otherwise, it tries to determine the home directory by invoking the [SHGetKnownFolderPath](https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath) function with [FOLDERID_Profile](https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid). Fixes https://github.com/denoland/deno/issues/23824
2024-05-16fix(ext/node): export geteuid from node:process (#23840)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23827
2024-05-15perf(compile): Do not checksum eszip content (#23839)Arnau Orriols
Related: https://github.com/denoland/eszip/pull/181 eszip < v0.69.0 hashes all its contents to ensure data integrity. This feature is not necessary in Deno CLI as the binary integrity guarantee is deemed an external responsibility (ie it is to be assumed that, if necessary, the compiled binary will be checksumed externally prior to being executed). eszip >= v0.69.0 no longer performs this checksum by default. This reduces the cold-start time of the compiled binaries, proportionally to their size.
2024-05-16perf(jsr): download metadata files as soon as possible and in parallel (#23836)David Sherret
* https://github.com/denoland/deno_graph/pull/471 * https://github.com/denoland/deno_graph/pull/473
2024-05-15fix(doc): --lint - private ref diagnostic was displaying incorrect ↵David Sherret
information (#23834) * https://github.com/denoland/deno_doc/pull/576 Closes #23303
2024-05-15chore: Fix flaky semantic tokens caching test (#23831)Nathan Whitaker
The stderr stream from the LSP is consumed by a separate thread, so it may not have processed the part we care about yet. Instead, wait until you see the measure for the request you care about.
2024-05-15chore: bump sysroot (#23830)Matt Mastracci
Use the smaller, reproducible sysroot from https://github.com/denoland/deno_sysroot_build This saves about 50% of the transfer for each sysroot download.
2024-05-15fix: widen aarch64 linux minimum GLIBC version by improving sysroot build ↵Matt Mastracci
(#23791) Fixes the sysroot to make it more reliable on aarch64. The sysroot we download as part of the build process now includes a small script to set up the linker flags required to build in that sysroot. Fixes #23775 Before: ``` matt@raspberrypi:~ $ ~/.deno/bin/deno /home/matt/.deno/bin/deno: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /home/matt/.deno/bin/deno) ``` After: ``` matt@raspberrypi:/tmp $ ./deno Deno 1.43.3 exit using ctrl+d, ctrl+c, or close() REPL is running with all permissions allowed. To specify permissions, run `deno repl` with allow flags. ```
2024-05-15fix(node): wrong `worker_threads.terminate()` return value (#23803)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> Fixes https://github.com/denoland/deno/issues/23801 --------- Signed-off-by: Marvin Hagemeister <marvinhagemeister50@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-15chore: fix flaky '[node/http] send request with non-chunked body' test (#23818)David Sherret
https://github.com/denoland/deno/actions/runs/9086887959/job/24973565321
2024-05-15perf(lsp): Cache semantic tokens for open documents (#23799)Nathan Whitaker
VScode will typically send a `textDocument/semanticTokens/full` request followed by `textDocument/semanticTokens/range`, and occassionally request semantic tokens even when we know nothing has changed. Semantic tokens also get refreshed on each change. Computing semantic tokens is relatively heavy in TSC, so we should avoid it as much as possible. Caches the semantic tokens for open documents, to avoid making TSC do unnecessary work. Results in a noticeable improvement in local benchmarking before: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 383ms) - Big Document/Several Edits (5 runs, mean: 1079ms) - Find/Replace (10 runs, mean: 59ms) - Code Lens (10 runs, mean: 440ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 9921ms) <- End benchmarking lsp ``` after: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 395ms) - Big Document/Several Edits (5 runs, mean: 1024ms) - Find/Replace (10 runs, mean: 56ms) - Code Lens (10 runs, mean: 438ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 8927ms) <- End benchmarking lsp ```
2024-05-14chore: fix flaky rejection_handled_web_process (#23817)David Sherret
Closes https://github.com/denoland/deno/issues/23712
2024-05-15fix(node): stub `AsyncResource.emitDestroy()` (#23802)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> Fixes https://github.com/denoland/deno/issues/23397
2024-05-14fix: update swc_ecma_parser to 0.114.1 (#23816)David Sherret
Has some explicit resource management fixes.
2024-05-14fix(emit): regression - keep comments in emit (#23815)David Sherret
Closes https://github.com/denoland/deno/discussions/23814
2024-05-14fix(lsp): show reference code lens on methods (#23804)Nayeem Rahman
2024-05-14fix(runtime): output to stderr with colors if a tty and stdout is piped (#23813)David Sherret
This also fixes a bug where Deno would output to stderr with colours when piped and stdout was not piped.
2024-05-14chore(tests): increase repl timeout on ci (#23812)David Sherret
https://github.com/denoland/deno/actions/runs/9084225162/job/24964698935 ``` ---- run::file_fetcher_preserves_permissions stdout ---- command /Users/runner/work/deno/deno/target/debug/deno repl --quiet command cwd /Users/runner/work/deno/deno/tests/testdata ------ Start Full Text ------ "const a = await import('http://localhost:4545/run/019_media_types.ts');\r\n" ------- End Full Text ------- Next text: "\r\n" thread 'run::file_fetcher_preserves_permissions' panicked at tests/integration/run_tests.rs:4615:15: Timed out. ``` Closes https://github.com/denoland/deno/issues/23690 Closes https://github.com/denoland/deno/issues/23682 Closes https://github.com/denoland/deno/issues/23625
2024-05-14fix(npm): make tarball extraction more reliable (#23759)David Sherret
1. Extracts to a directory beside the destination. 2. Renames to the destination with retries.
2024-05-14fix(publish): always include config file when publishing (#23797)David Sherret
Closes https://github.com/denoland/deno/issues/23796
2024-05-14chore: 045_proxy output stdout & stderr on failure (#23810)David Sherret
Part of https://github.com/denoland/deno/issues/23624
2024-05-14fix(publish): error for missing version constraints on dry-publish instead ↵David Sherret
of just publish (#23798) Closes https://github.com/denoland/deno/issues/22835
2024-05-14fix: Add missing `"junction"` type for `SymlinkOptions.types` (#23756)futsuuu
Junction symlink support is added in #22762, but `SymlinkOptions` and its documents are not updated.
2024-05-14fix(doc/publish): support expando properties (#23795)David Sherret
* https://github.com/denoland/deno_graph/pull/428 * https://github.com/denoland/deno_doc/pull/575 Closes https://github.com/denoland/deno/issues/23276
2024-05-13fix(ext/web): update ongoing promise in async iterator `return()` method ↵Mattias Buelens
(#23642) See https://github.com/whatwg/webidl/pull/1387 for context. There are new WPT tests for this change in https://github.com/web-platform-tests/wpt/pull/44456. They pass on my local machine, but I'm not sure if I should update the WPT submodule for all of Deno as part of this PR? Fixes #22389 --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.
2024-05-13chore(task): various small refactorings (#23793)David Sherret
2024-05-13chore: cleanup unused dependencies (#23787)Leo Kettmeir
2024-05-13fix(cli): panic with `deno coverage` (#23353)Evan
This PR directly addresses the issue raised in #23282 where Deno panics if `deno coverage` is called with `--include` regex that returns no matches. I've opted not to change the return value of `collect_summary` for simplicity and return an empty `HashMap` instead
2024-05-13refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764)Nayeem Rahman
2024-05-12fix(ext/node): process.uptime works without this (#23786)Bartek Iwańczuk
Fixes https://github.com/denoland/deno/issues/23761 Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-05-12fix(npm): handle null fields in npm registry JSON (#23785)David Sherret
* https://github.com/denoland/deno_npm/pull/52 Closes https://github.com/denoland/deno/issues/23776
2024-05-10chore: forward v1.43.3 release commit to main (#23771)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-10fix: bump deno_core to fix unsoundness (#23768)Matt Mastracci
Includes a Rust 1.78.0 fix: https://github.com/denoland/deno_core/pull/735 Fixes deno homebrew crashes: #23767 #23766 #23763 and https://github.com/Homebrew/homebrew-core/issues/171317
2024-05-10fix(runtime): Allow opening /dev/fd/XXX for unix (#23743)Matt Mastracci
`deno run script.ts <(some command)` is a valid use case -- let's allow this to work without `--allow-all`. Fixes #23703
2024-05-10fix(node): better cjs re-export handling (#23760)David Sherret
Closes #23458
2024-05-10fix(ext/webgpu): invalidate GPUAdapter when a device is created (#23752)Leo Kettmeir
This removes the need for using `Deno.resources` to close the gpuadapter resource, while being more spec compliant.
2024-05-09refactor(lsp): Have JS drive TSC event loop in LSP (#23565)Nathan Whitaker
2024-05-09refactor(lsp): unify caching into LspCache (#23746)Nayeem Rahman
2024-05-09fix(lsp): completions for using decl identifiers (#23748)David Sherret
Closes #23688
2024-05-09refactor(ext/tls): Implement required functionality for later SNI support ↵Matt Mastracci
(#23686) Precursor to #23236 This implements the SNI features, but uses private symbols to avoid exposing the functionality at this time. Note that to properly test this feature, we need to add a way for `connectTls` to specify a hostname. This is something that should be pushed into that API at a later time as well. ```ts Deno.test( { permissions: { net: true, read: true } }, async function listenResolver() { let sniRequests = []; const listener = Deno.listenTls({ hostname: "localhost", port: 0, [resolverSymbol]: (sni: string) => { sniRequests.push(sni); return { cert, key, }; }, }); { const conn = await Deno.connectTls({ hostname: "localhost", [serverNameSymbol]: "server-1", port: listener.addr.port, }); const [_handshake, serverConn] = await Promise.all([ conn.handshake(), listener.accept(), ]); conn.close(); serverConn.close(); } { const conn = await Deno.connectTls({ hostname: "localhost", [serverNameSymbol]: "server-2", port: listener.addr.port, }); const [_handshake, serverConn] = await Promise.all([ conn.handshake(), listener.accept(), ]); conn.close(); serverConn.close(); } assertEquals(sniRequests, ["server-1", "server-2"]); listener.close(); }, ); ``` --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-05-09fix(lsp): move sloppy import resolution from loader to resolver (#23751)Nathan Whitaker
Moves sloppy import resolution from the loader to the resolver. Also adds some test helper functions to make the lsp tests less verbose --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-09fix(task): regression where `npx <command>` sometimes couldn't find command ↵David Sherret
(#23730) Closes https://github.com/denoland/deno/issues/23724
2024-05-08chore: enable clippy::print_stdout and clippy::print_stderr (#23732)David Sherret
1. Generally we should prefer to use the `log` crate. 2. I very often accidentally commit `eprintln`s. When we should use `println` or `eprintln`, it's not too bad to be a bit more verbose and ignore the lint rule.