0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-12 16:59:32 -05:00
Commit graph

11428 commits

Author SHA1 Message Date
Marvin Hagemeister
8d4eb2144f
fix(node): patch MessagePort in worker_thread message (#23871)
Our `MessagePort` to Node's `MessagePort` conversion logic was missing
the case where a `MessagePort` is sent _inside_ the message. This broke
`tinypool` which is used by `vitest` as it relies on some node specific
methods on `MessagePort`.

Fixes https://github.com/denoland/deno/issues/23854 , Fixes
https://github.com/denoland/deno/pull/23871
2024-05-21 23:50:43 +02:00
Bedis Nbiba
ac418ba229
fix: handle signal 0 in process.kill (#23473)
the last commit had a regression, where it removed this branch, I
haven't tested the code but I think it should work

---------

Signed-off-by: Bedis Nbiba <bedisnbiba@gmail.com>
2024-05-21 23:50:43 +02:00
Kenta Moriuchi
55c8c855b1
fix: add missing URL.parse types (#23893) 2024-05-21 23:50:43 +02:00
David Sherret
6cc8b7c3db
perf: analyze cjs exports and emit typescript in parallel (#23856) 2024-05-21 23:50:43 +02:00
Satya Rohith
27f0418978
chore: bump deno_http version (#23866) 2024-05-21 23:50:31 +02:00
Marvin Hagemeister
3d3b9a7566
fix(node): instantiating process class without new (#23865)
Popular test runners like Jest instantiate a new `Process` object
themselves and expect the class constructor to be callable without the
`new` keyword. This PR refactors our `Process` class implementation from
a proper ES2015 class to an ES5-style class which can be invoked both
with and without the `new` keyword like in Node.

Fixes https://github.com/denoland/deno/issues/23863
2024-05-21 23:50:31 +02:00
Marvin Hagemeister
eec8800513
fix: serve handler error with 0 arguments (#23652)
Fixes https://github.com/denoland/deno/issues/23651

Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-05-21 23:50:27 +02:00
denobot
a13c4531fd
1.43.5 (#23876)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-17 20:22:18 -04:00
David Sherret
c1c2f856b4 fix(npm): regression deserializing JSON for some npm packages (#23868)
* https://github.com/denoland/deno_npm/pull/53

Closes https://github.com/denoland/deno/issues/23862
2024-05-17 20:01:49 -04:00
denobot
d64921c190
1.43.4 (#23853)
Bumped versions for 1.43.4

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-05-17 01:28:38 +02:00
Nayeem Rahman
f15ad5d993
fix(lsp): respect types dependencies for tsc roots (#23825) 2024-05-17 00:41:23 +02:00
Satya Rohith
e857039990
fix(ext/node): fix grpc error_handling example (#23755)
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-17 00:41:23 +02:00
Marvin Hagemeister
10ce4b11d3
fix(node): error when throwing FS_EISDIR (#23829)
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-17 00:41:23 +02:00
Divy Srivastava
4137a083e8
fix(node): seperate worker module cache (#23634)
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-17 00:41:23 +02:00
Divy Srivastava
925be251d8
fix(ext/node): homedir() getpwuid/SHGetKnownFolderPath fallback (#23841)
**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-17 00:41:23 +02:00
Divy Srivastava
b46e81b335
fix(ext/node): export geteuid from node:process (#23840)
Fixes https://github.com/denoland/deno/issues/23827
2024-05-17 00:41:23 +02:00
Arnau Orriols
042376f6eb
perf(compile): Do not checksum eszip content (#23839)
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-17 00:41:23 +02:00
David Sherret
b84eacf375
perf(jsr): download metadata files as soon as possible and in parallel (#23836)
* https://github.com/denoland/deno_graph/pull/471
* https://github.com/denoland/deno_graph/pull/473
2024-05-17 00:41:22 +02:00
David Sherret
125b420f7f
fix(doc): --lint - private ref diagnostic was displaying incorrect information (#23834)
* https://github.com/denoland/deno_doc/pull/576

Closes #23303
2024-05-17 00:41:22 +02:00
Nathan Whitaker
03c7bafb45
chore: Fix flaky semantic tokens caching test (#23831)
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-17 00:41:22 +02:00
Matt Mastracci
126091a652
chore: bump sysroot (#23830)
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-17 00:41:22 +02:00
Matt Mastracci
62fcce258b
fix: widen aarch64 linux minimum GLIBC version by improving sysroot build (#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-17 00:41:22 +02:00
Marvin Hagemeister
5a3ad02427
fix(node): wrong worker_threads.terminate() return value (#23803)
<!--
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-17 00:41:22 +02:00
David Sherret
af47c06541
chore: fix flaky '[node/http] send request with non-chunked body' test (#23818)
https://github.com/denoland/deno/actions/runs/9086887959/job/24973565321
2024-05-17 00:41:22 +02:00
Nathan Whitaker
17ed6007d8
perf(lsp): Cache semantic tokens for open documents (#23799)
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-17 00:41:21 +02:00
David Sherret
b68e0cd5d4
chore: fix flaky rejection_handled_web_process (#23817)
Closes https://github.com/denoland/deno/issues/23712
2024-05-17 00:41:21 +02:00
Marvin Hagemeister
f06fe7342b
fix(node): stub AsyncResource.emitDestroy() (#23802)
<!--
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-17 00:41:21 +02:00
David Sherret
bf30a43091
fix: update swc_ecma_parser to 0.114.1 (#23816)
Has some explicit resource management fixes.
2024-05-17 00:41:21 +02:00
David Sherret
fd484c37f8
fix(emit): regression - keep comments in emit (#23815)
Closes https://github.com/denoland/deno/discussions/23814
2024-05-17 00:41:21 +02:00
Nayeem Rahman
8ce9aa53fe
fix(lsp): show reference code lens on methods (#23804) 2024-05-17 00:41:21 +02:00
David Sherret
0684ab3a2e
fix(runtime): output to stderr with colors if a tty and stdout is piped (#23813)
This also fixes a bug where Deno would output to stderr with colours
when piped and stdout was not piped.
2024-05-17 00:41:21 +02:00
David Sherret
44cfb4f4b0
chore(tests): increase repl timeout on ci (#23812)
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-17 00:41:20 +02:00
David Sherret
bce69074b7
fix(npm): make tarball extraction more reliable (#23759)
1. Extracts to a directory beside the destination.
2. Renames to the destination with retries.
2024-05-17 00:41:20 +02:00
David Sherret
470dd8be12
fix(publish): always include config file when publishing (#23797)
Closes https://github.com/denoland/deno/issues/23796
2024-05-17 00:41:20 +02:00
David Sherret
d4270e286a
chore: 045_proxy output stdout & stderr on failure (#23810)
Part of https://github.com/denoland/deno/issues/23624
2024-05-17 00:41:20 +02:00
David Sherret
5a766b10ec
fix(publish): error for missing version constraints on dry-publish instead of just publish (#23798)
Closes https://github.com/denoland/deno/issues/22835
2024-05-17 00:41:20 +02:00
futsuuu
798fd09c37
fix: Add missing "junction" type for SymlinkOptions.types (#23756)
Junction symlink support is added in #22762, but `SymlinkOptions` and
its documents are not updated.
2024-05-17 00:41:20 +02:00
David Sherret
ad01a39f1d
fix(doc/publish): support expando properties (#23795)
* 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-17 00:41:19 +02:00
Mattias Buelens
03488cab74
fix(ext/web): update ongoing promise in async iterator return() method (#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-17 00:41:19 +02:00
David Sherret
420023cd0e
chore(task): various small refactorings (#23793) 2024-05-17 00:41:19 +02:00
Leo Kettmeir
faf08969f9
chore: cleanup unused dependencies (#23787) 2024-05-17 00:41:19 +02:00
Evan
ac32c0bc64
fix(cli): panic with deno coverage (#23353)
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-17 00:41:19 +02:00
Nayeem Rahman
9e25512e48
refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764) 2024-05-17 00:41:19 +02:00
Bartek Iwańczuk
eca12e0eb8
fix(ext/node): process.uptime works without this (#23786)
Fixes https://github.com/denoland/deno/issues/23761

Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-05-17 00:41:19 +02:00
David Sherret
99babe580f
fix(npm): handle null fields in npm registry JSON (#23785)
* https://github.com/denoland/deno_npm/pull/52

Closes https://github.com/denoland/deno/issues/23776
2024-05-17 00:41:18 +02:00
David Sherret
d6ad253882 chore: fix publish by pinning rustls to 0.21.11 2024-05-10 16:37:52 -04:00
denobot
855adf2146
1.43.3 (#23770)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-05-10 15:53:21 -04:00
Matt Mastracci
7ec94dbc91 fix: bump deno_core to fix unsoundness (#23768)
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-10 15:00:09 -04:00
Matt Mastracci
95ae9ea79f fix(runtime): Allow opening /dev/fd/XXX for unix (#23743)
`deno run script.ts <(some command)` is a valid use case -- let's allow
this to work without `--allow-all`.

Fixes #23703
2024-05-10 15:00:09 -04:00
David Sherret
15affcb443 fix(node): better cjs re-export handling (#23760)
Closes #23458
2024-05-10 15:00:09 -04:00