1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-02 17:01:14 -05:00
Commit graph

9306 commits

Author SHA1 Message Date
Levente Kurusa
b25c716fab
fix(deno/upgrade): allow --version vX.Y.Z (#19139)
Instead of just supporting X.Y.Z, support vX.Y.Z. Otherwise we'll try to
download something like vvX.Y.Z
2023-05-18 17:05:02 +02:00
Luca Casonato
17b4e0627c
refactor(ext/http): simpler ws server in http_next (#19133)
Merges `op_http_upgrade_next` and `op_ws_server_create`, significantly
simplifying websocket construction in ext/http (next), and removing one
JS -> Rust call. Also WS server now doesn't bypass
`HttpPropertyExtractor`.
2023-05-18 17:05:02 +02:00
Levente Kurusa
4df46b7056
feat(node/crypto): Builtin Diffie-Hellman Groups (#19137)
Towards #18455
2023-05-18 17:05:02 +02:00
Levente Kurusa
b15cc76aba
feat(node/crypto): Diffie Hellman Support (#18943)
Support crypto.DiffieHellman class in ext/node/crypto
2023-05-18 17:05:02 +02:00
Luca Casonato
f7ef08b6ef
refactor(ext/http): generic abstract listeners (#19132)
Improve abstractions around listeners to support listener + connection
network stream combinations not previously possible (for example a
listener exposed as a Tcp, creating Unix network streams).
2023-05-18 17:05:01 +02:00
Yoshiya Hinosawa
6e9c95785d
chore: check node_compat config diff in CI (#19119) 2023-05-18 17:05:01 +02:00
Matt Mastracci
3392a8e530
refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056)
Partially supersedes #19016.

This migrates `spawn` and `spawn_blocking` to `deno_core`, and removes
the requirement for `spawn` tasks to be `Send` given our single-threaded
executor.

While we don't need to technically do anything w/`spawn_blocking`, this
allows us to have a single `JoinHandle` type that works for both cases,
and allows us to more easily experiment with alternative
`spawn_blocking` implementations that do not require tokio (ie: rayon).

Async ops (+~35%):

Before: 

```
time 1310 ms rate 763358
time 1267 ms rate 789265
time 1259 ms rate 794281
time 1266 ms rate 789889
```

After:

```
time 956 ms rate 1046025
time 954 ms rate 1048218
time 924 ms rate 1082251
time 920 ms rate 1086956
```

HTTP serve (+~4.4%):

Before:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    68.78us   19.77us   1.43ms   86.84%
    Req/Sec    68.78k     5.00k   73.84k    91.58%
  1381833 requests in 10.10s, 167.36MB read
Requests/sec: 136823.29
Transfer/sec:     16.57MB
```

After:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    63.12us   17.43us   1.11ms   85.13%
    Req/Sec    71.82k     3.71k   77.02k    79.21%
  1443195 requests in 10.10s, 174.79MB read
Requests/sec: 142921.99
Transfer/sec:     17.31MB
```

Suggested-By: alice@ryhl.io
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-18 17:05:01 +02:00
yzy-1
e61ee44d69
fix(runtime): Example hello_runtime panic (#19125)
After commit f34fcd, running example will panic because esm_entry_point
is not set.

Closes https://github.com/denoland/deno/issues/19127
2023-05-18 17:05:01 +02:00
Yoshiya Hinosawa
e0b4ccab78
fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108) 2023-05-18 17:05:01 +02:00
Bartek Iwańczuk
6e655522cd
fix(lsp): increase default max heap size to 3Gb (#19115) 2023-05-18 17:05:01 +02:00
Bartek Iwańczuk
91f3dba709
chore: upgrade rusty_v8 to 0.71.2 (#19116)
Closes https://github.com/denoland/deno/issues/19021
2023-05-18 17:05:01 +02:00
Yoshiya Hinosawa
070a100fa5
chore(ext/node): removed skipped compat test cases (#19109) 2023-05-18 17:05:01 +02:00
Yoshiya Hinosawa
7095e449cd
chore: fix & update node compat config (#19106) 2023-05-18 17:05:01 +02:00
David Sherret
995b1e683f
refactor(lsp): make RequestMethod private (#19114) 2023-05-18 17:04:49 +02:00
denobot
12ba2d311b
1.33.3 (#19110)
Bumped versions for 1.33.3

Please ensure:
- [x] Target branch is correct (`vX.XX` if a patch release, `main` if
minor)
- [x] Crate versions are bumped correctly
- [x] deno_std version is incremented in the code (see
`cli/deno_std.rs`)
- [x] Releases.md is updated correctly (think relevancy and remove
reverts)

To make edits to this PR:
```shell
git fetch upstream release_1_33.3 && git checkout -b release_1_33.3 upstream/release_1_33.3
```

cc @levex

---------

Co-authored-by: levex <levex@users.noreply.github.com>
Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-12 13:06:53 +02:00
Bartek Iwańczuk
f9cc0c7149
chore: upgrade rusty_v8 to 0.71.1 (#19104)
Fixes https://github.com/denoland/deno/issues/19021
2023-05-12 04:12:41 +02:00
David Sherret
8ca92f5ca2 fix(lsp): preload documents when deno.documentPreloadLimit changes (#19103) 2023-05-11 21:53:36 -04:00
David Sherret
3f8bbc60e1 fix(ext/fs): add more context_path (#19101) 2023-05-11 19:46:20 -04:00
David Sherret
a193794eab feat(lsp): ability to configure document pre-load limit (#19097)
Adds a `deno.preloadLimit` option (ex. `"deno.preloadLimit": 2000`)
which specifies how many file entries to traverse on the file system
when the lsp loads or its configuration changes.

Closes #18955
2023-05-11 17:26:32 -04:00
Bartek Iwańczuk
ddf59b5345 fix(npm): make http2 module available, make 'nodeGlobalThisName' writable (#19092) 2023-05-11 17:26:32 -04:00
David Sherret
90ed487965 fix(lsp): hard to soft error when unable to get completion info (#19091) 2023-05-11 17:26:31 -04:00
Miroslav Bajtoš
b11c322b89 chore: upgrade thiserror and deno_lockfile (#19073)
Upgrade `thiserror` to `1.40.0`.

Remove version pinning so that consumers of deno crates can install
newer versions of `thiserrors` without waiting for us to upgrade our
Cargo.toml.

Upgrade `deno_lockfile` to `0.14.0` to bring in `thiserror` upgrade, see
https://github.com/denoland/deno_lockfile/pull/1.
2023-05-11 17:26:31 -04:00
David Sherret
ba7fd57616 fix(cli): upgrade to Typescript 5.0.4 (#19090) 2023-05-11 17:26:31 -04:00
Nayeem Rahman
14bf8dc506 fix(console): handle error when inspecting promise-like (#19083)
Fixes
https://discord.com/channels/684898665143206084/684911491035430919/1105900195406958672.

This was caused by: 
- A `TypeError` from `core.getPromiseDetails()` for promise-likes which
also lead to that code path.
- Swallowing internal formatting errors by returning `undefined`. I've
made it so that a special message is formatted in that case instead
(note that this case is fixed now):
![image](https://github.com/denoland/deno/assets/29990554/65bb9612-60b2-4e31-bf5e-e20976601593)
2023-05-11 17:26:30 -04:00
Nayeem Rahman
89d0f0c4e3 fix(runtime): ChildProcess::kill() doesn't require additional perms (#15339)
Fixes #15217.
2023-05-11 17:26:30 -04:00
Yarden Shoham
3a0b2075f7 chore(deps): bump tokio version to 1.28.1 (#19069) 2023-05-11 17:26:30 -04:00
Marvin Hagemeister
ff1403c0a1 fix(node): expose channels in worker_threads (#19086)
This PR ensures that node's `worker_threads` module exports
`MessageChannel`, `MessagePort` and the `BroadcastChannel` API. Fixing
these won't make `esbuild` work, but brings us one step closer 🎉

Fixes #19028 .
2023-05-11 17:26:30 -04:00
David Sherret
75735fbf7f feat(compile): unstable npm and node specifier support (#19005)
This is the initial support for npm and node specifiers in `deno
compile`. The npm packages are included in the binary and read from it via
a virtual file system. This also supports the `--node-modules-dir` flag,
dependencies specified in a package.json, and npm binary commands (ex.
`deno compile --unstable npm:cowsay`)

Closes #16632
2023-05-11 17:26:30 -04:00
Marvin Hagemeister
56a9a2a990 feat(node): add Module.runMain() (#19080)
This PR adds the missing `Module.runMain()` function which is required
for tools like `ts-node`.

Fixes #19033
2023-05-11 17:26:29 -04:00
Bartek Iwańczuk
610936f5b2 fix(node): conditional exports edge case (#19082)
Fixes https://github.com/denoland/deno/issues/18743
2023-05-11 17:26:29 -04:00
David Sherret
72512c95c1 fix(dts): align seekSync position arg with seek (#19077)
Closes #19060
2023-05-11 17:26:29 -04:00
Matt Mastracci
5907d959af chore(core): Parallelize all WPT tests and reduce timeouts for expected failures (#19061)
This speeds up WPT tests in two ways:

1. The `WebCryptoAPI` tests are slow, so create a parallel bucket for
each individual test instead of one for all the `WebCryptoAPI` tests.
2. If a test is expected to fail, use a shorter timeout (1 minute rather
than 4).
2023-05-11 17:26:29 -04:00
Matt Mastracci
c2faca2584 refactor(ext/http): HTTP trait structs need to be public (#19075) 2023-05-11 17:26:29 -04:00
Bartek Iwańczuk
84dc93529e chore(core): fix a warning (#19072) 2023-05-11 17:26:29 -04:00
Matt Mastracci
e6e0fa752d refactor(core): http_next generic over request extractor (#19071) 2023-05-11 17:26:28 -04:00
Matt Mastracci
a650318c0c feat(ext/http): Automatic compression for Deno.serve (#19031)
`Content-Encoding: gzip` support for `Deno.serve`. This doesn't support
Brotli (`br`) yet, however it should not be difficult to add. Heuristics
for compression are modelled after those in `Deno.serveHttp`.

Tests are provided to ensure that the gzip compression is correct. We
chunk a number of different streams (zeros, hard-to-compress data,
already-gzipped data) in a number of different ways (regular, random,
large/small, small/large).
2023-05-11 17:26:28 -04:00
Levente Kurusa
8278df52e4 chore(node/stream): unbundle/unminify readable-streams (#19045) 2023-05-11 17:26:28 -04:00
David Sherret
69aea93d54 fix(vendor): better handling of redirects (#19063)
Closes #17582
Closes #19057
2023-05-11 17:26:28 -04:00
Bartek Iwańczuk
cec988bfc5 bench: fix benchmarks with extensions (#19059)
They broke in f34fcd16ea
2023-05-11 17:26:28 -04:00
Satya Rohith
62a386d663 chore: upgrade tokio to 1.28 (#19053) 2023-05-11 17:26:28 -04:00
Luca Casonato
575150b463 fix(core): let V8 drive extension ESM loads (#18997)
This now allows circular imports across extensions.

Instead of load + eval of all ESM files in declaration order, all files
are only loaded. Eval is done recursively by V8, only evaluating
files that are listed in `Extension::esm_entry_point` fields.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-11 17:26:27 -04:00
David Sherret
65e5d884d8 perf(fmt): faster formatting for minified object literals (#19050)
Has fix for
https://github.com/dprint/dprint-plugin-typescript/issues/520
2023-05-11 17:26:27 -04:00
Luca Casonato
162a0f0dcf refactor: prefix ops w/ crate they are defined in (#19044)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-11 17:26:27 -04:00
Bartek Iwańczuk
4e1a15090f refactor(core): make sure to always set embedder wrapper offset (#19048) 2023-05-11 17:26:27 -04:00
Bartek Iwańczuk
386fa09920 refactor(core): verify there are no ops with duplicate names (#19047)
This commit adds a "debug build" only check that verifies on startup
that there are no duplicate ops (ie. the op names are unique).
2023-05-11 17:26:27 -04:00
Bartek Iwańczuk
4c07550d46 Revert "perf(core): use jemalloc for V8 array buffer allocator (#18875)" (#19046)
This reverts commit 022aae9854.
2023-05-11 17:26:27 -04:00
David Sherret
4a8ca480ae refactor(ext/fs): deno_fs::FileSystem - conditional Send + Sync (#18993)
This allows for having a conditional `Send + Sync` on the file system trait for Deploy.
2023-05-11 17:26:26 -04:00
Aapo Alasuutari
5826ea5682 perf(ext/ffi): Use Box<[NativeType]> in CallbackInfo parameters (#19032) 2023-05-11 17:26:26 -04:00
Matt Mastracci
5e848f0d1b fix(ext/http): Ensure Deno.serve works across --watch restarts (#18998)
Fixes #16699 and #18960 by ensuring that we release our HTTP
`spawn_local` tasks when the HTTP resource is dropped.

Because our cancel handle was being projected from the resource via
`RcMap`, the resource was never `Drop`ped. By splitting the handle out
into its own `Rc`, we can avoid keeping the resource alive and let it
drop to cancel everything.
2023-05-11 17:26:26 -04:00
ud2
0dbbb34fcc fix(core): always report the first error on unhandled rejection (#18992)
The root cause of denoland/deno_std#3320, I believe, is that
`pending_promise_rejections` is a `HashMap` whose entries are in
arbitrary order, and as a result either of the two errors (`AddrInUse`
and `TypeError`) may be selected when determining which one to report. I
changed the field to a `VecDeque` so that the first error (`AddrInUse`
in this case) is always selected.
2023-05-11 17:26:26 -04:00