1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
Commit graph

10213 commits

Author SHA1 Message Date
Matt Mastracci
9b07557bfb
chore(cli): unflake signal test (#21185)
If these tests do eventually break, they'll time out.
2023-11-17 11:29:37 +09:00
Leo Kettmeir
0235f4b589
chore: update wpt (#21178)
For #20849
2023-11-17 11:29:33 +09:00
Matt Mastracci
83fa25653a
chore(ext/web): use a non-resource stream for textDecoderStreamCleansUpOnCancel (#21181)
Follow-up fix to #21074
2023-11-17 11:29:30 +09:00
Laurence Rowe
2980cb5e5b
perf(ext/http): Object pooling for HttpRecord and HeaderMap (#20809)
Reuse existing existing allocations for HttpRecord and response
HeaderMap where possible.

At request end used allocations are returned to the pool and the pool
and the pool sized to 1/8th the current number of inflight requests.

For http1 hyper will reuse the response HeaderMap for the following
request on the connection.

Builds upon https://github.com/denoland/deno/pull/20770

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-17 11:29:26 +09:00
David Sherret
60c6052060
fix(install): should work with non-existent relative root (#21161)
Closes #21160
2023-11-17 11:29:15 +09:00
Laurence Rowe
ebc9b2bfb8
refactor(ext/http): refer to HttpRecord directly using v8::External (#20770)
Makes the JavaScript Request use a v8:External opaque pointer to
directly refer to the Rust HttpRecord.

The HttpRecord is now reference counted. To avoid leaks the strong count
is checked at request completion.

Performance seems unchanged on the minimal benchmark. 118614 req/s this
branch vs 118564 req/s on main, but variance between runs on my laptop
is pretty high.

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-17 11:29:10 +09:00
Divy Srivastava
b0fe699680
perf: lazy bootstrap options - first pass (#21164)
Move most runtime options to be lazily loaded. Constant options will be
covered in a different PR.

Towards https://github.com/denoland/deno/issues/21133
2023-11-17 11:29:07 +09:00
Kenta Moriuchi
c72f5fced0
feat(ext/web): add AbortSignal.any() (#21087)
Fixes #18944
2023-11-17 11:29:02 +09:00
Nayeem Rahman
bfe9c9e1ba
fix(lsp): update tsconfig after refreshing settings on init (#21170) 2023-11-17 11:28:56 +09:00
Florian Schwalm
7dc8c4e2a3
fix(ext/web): Prevent TextDecoderStream resource leak on stream cancellation (#21074)
This PR uses the new `cancel` method of `TransformStream` to properly
clean up the internal `TextDecoder` used in `TextDecoderStream` if the
stream is cancelled.

Fixes #13142

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-17 11:28:50 +09:00
Divy Srivastava
bd91d05b5a
perf: snapshot runtime ops (#21127)
Closes https://github.com/denoland/deno/issues/21135

~1ms startup time improvement

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-11-17 11:28:44 +09:00
Matt Mastracci
fbe26f1091
chore(ext/node): use libz-sys w/zlib-ng feature in node (#21158)
We only want one zlib dependency.

Zlib dependencies are reorganized so they use a hidden
`__vendored_zlib_ng` flag in cli that enables zlib-ng for both libz-sys
(used by ext/node) and flate2 (used by deno_web).
2023-11-17 11:28:39 +09:00
Kenta Moriuchi
4f8d2f3a37
fix(ext/node): Re-enable alloc max size test (#21059)
Ref #21036
2023-11-17 11:28:33 +09:00
Jacob Hummer
f155ca7a62
fix(node/http): export globalAgent (#21081)
Fixes #21080 
Fixes #18312

---------

Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-17 11:28:27 +09:00
Tareque Md Hanif
407230fec3
chore(cli): Migrate some unit tests to "Promise.withResolvers()" (#21128)
Migrate to use `Promise.withResolvers()` instead of `deferred` in some
of the tests in `cli/tests/unit/`.
Issue: #21041
2023-11-17 11:28:22 +09:00
Divy Srivastava
6e4aa70335
fix(ext/node): implement process.geteuid (#21151)
Fixes #21097
2023-11-17 11:27:54 +09:00
David Sherret
f2d94b6ef0
fix: improve deno doc --lint error messages (#21156)
This also updates deno_graph, which has the JSR change to use "exports".
It's not yet useful atm, so I've made this PR a fix about the deno doc
--lint error message improvements. I'll do a follow-up PR that adds
exports to the deno.json
2023-11-17 11:27:51 +09:00
Matt Mastracci
a6e5bdd968
chore: disable default features for denokv_sqlite (#21155)
Fix for https://github.com/Homebrew/homebrew-core/pull/153128
2023-11-17 11:27:45 +09:00
Matt Mastracci
276e4125fc
perf(cli): strace mode for ops (undocumented) (#21131)
Example usage:

```
# Trace every op except op_*tick*
cargo run -- run --unstable -A --strace-ops=-tick '/Users/matt/Documents/github/deno/deno/ext/websocket/autobahn/autobahn_server.js

# Trace any op matching op_*http*
cargo run -- run --unstable -A --strace-ops=http ...
```

Example output:

```
[    11.478] op_ws_get_buffer                        : Dispatched Slow
[    11.478] op_ws_get_buffer                        : Completed Slow
[    11.478] op_ws_send_binary                       : Dispatched Fast
[    11.478] op_ws_send_binary                       : Completed Fast
[    11.478] op_ws_next_event                        : Dispatched Async
[    11.478] op_try_close                            : Dispatched Fast
[    11.478] op_try_close                            : Completed Fast
[    11.478] op_timer_handle                         : Dispatched Fast
[    11.478] op_timer_handle                         : Completed Fast
[    11.478] op_sleep                                : Dispatched Asyn
```
2023-11-17 11:27:40 +09:00
Divy Srivastava
59b1e7d235
chore: use pure rust secp256k1 crate (#21154)
Saves ~40s in fresh debug build
2023-11-17 11:27:35 +09:00
Divy Srivastava
862edad5ae
chore: use internal namespace in 40_testing.js (#21141)
Towards #21136 

- [x] assign serializePermissions, setTimeout and setExitHandler APIs to
internal namespace
- [x] remove usage of assert
2023-11-17 11:27:30 +09:00
Divy Srivastava
6e962ee0c4
chore: give suggestion on PR open failure (#21145) 2023-11-17 11:27:22 +09:00
Divy Srivastava
c38f84387a
chore: remove primordial usage from 40_testing.js (#21140)
Towards #21136
2023-11-17 11:27:16 +09:00
Divy Srivastava
0e7ad0388b
1.38.1 (#21143)
Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-11-10 17:16:23 +05:30
Igor Zinkovsky
f4305433dc
fix(test) reduce queue persistence test time from 60 secs to 6 secs (#21142)
This PR reduces the time to run `queue persistence with inflight
messages` test from 60 seconds down to about 6 seconds.

The test simulates a crash to ensure that inflight messages are cleaned
up and re-queued when the new process starts. Since messages are
considered dead after 5 seconds of being queued, reopening the db within
5 seconds does not re-queue the messages on startup (they do get
re-queued after 60 seconds, which is the cleanup frequency). By waiting
for 5 seconds before reopening the db, the test ensures that the cleanup
happens quickly when the db is opened.
2023-11-10 11:28:38 +01:00
Bartek Iwańczuk
612b7dfcc7
fix(node/child_process): properly normalize stdio for 'spawnSync' (#21103)
Closes https://github.com/denoland/deno/issues/20782
2023-11-10 05:59:39 +00:00
Matt Mastracci
9010b8df53
perf: remove knowledge of promise IDs from deno (#21132)
We can move all promise ID knowledge to deno_core, allowing us to better
experiment with promise implementation in deno_core.

`{un,}refOpPromise(promise)` is equivalent to
`{un,}refOp(promise[promiseIdSymbol])`
2023-11-09 13:57:26 -07:00
Divy Srivastava
c4029f6af2
fix(node): implement createPrivateKey (#20981)
Towards #18455
2023-11-09 23:26:59 +05:30
Divy Srivastava
ee7fd0a212
chore(ext/crypto): bump signature to 2.1 (#21125) 2023-11-09 16:15:46 +01:00
btoo
09dc5f36d9
fix small Deno.createHttpClient typo in lib.deno.unstable.d.ts (#21115) 2023-11-08 19:34:57 -07:00
Matt Mastracci
02c5f49a7a
chore: refactor test_server and move to rustls-tokio-stream (#21117)
Remove tokio-rustls as a direct dependency of Deno and refactor
test_server to reduce code duplication.

All tcp and tls listener paths go through the same streams now, with the
exception of the simpler Hyper http-only handlers (those can be done in
a later follow-up).

Minor bugs fixed:
 - gRPC server should only serve h2
 - WebSocket over http/2 had a port overlap
- Restored missing eye-catchers for some servers (still missing on Hyper
ones)
2023-11-08 13:00:29 -07:00
Matt Mastracci
5e82fce0a0
chore: remove op_baseline and flamebench (#21120)
ops are better tested in deno_core, and flamebench has rotted quite a
bit.
2023-11-08 13:00:13 -07:00
Matt Mastracci
f8d1d84c5a
chore(ext/web): migrate to deno_core typed externals (#21114)
Use our safer typed externals for the external required for resource
streams.
2023-11-08 20:46:13 +01:00
Aravind
e4593873a9
fix(ext/http): Throwing Error if the return value of Deno.serve handler is not a Response class (#21099)
---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-07 15:52:44 -07:00
David Sherret
7978bc5d1b
fix(node): cjs export analysis should probe for json files (#21113)
Closes #21064
2023-11-07 16:38:55 -05:00
David Sherret
9201198efd
fix(node): inspect ancestor directories when resolving cjs re-exports during analysis (#21104)
If a CJS re-export can't be resolved, it will check the ancestor
directories, which is more similar to what `require` does at runtime.
2023-11-07 09:56:06 -05:00
Matt Mastracci
50e4806a2d
chore: bump deno_core (#21102) 2023-11-07 01:03:48 +00:00
Luca Casonato
777c142d39
docs: improve some JSDoc (#20841)
Minor improvements to the documentation for https://deno.com/api
2023-11-07 00:35:22 +00:00
Gasman
837c870ff4
fix(node/http): socket.setTimeout (#20930)
Fixes #20923
2023-11-07 00:51:14 +01:00
Kenta Moriuchi
90189dd997
fix(ext): use String#toWellFormed in ext/webidl and ext/node (#21054)
Fixes #18802 

This PR adds `util.toUSVString` to node:util:

```js
import util from "node:util";
util.toUSVString("string\ud801"); // => "string\ufffd"
```
2023-11-06 22:18:28 +01:00
David Sherret
7eb34c7a36
fix(byonm): correct resolution for scoped packages (#21083) 2023-11-06 08:35:26 -05:00
Luca Bruno
56a4c981f5
fix(ext/fetch): re-align return type in op_fetch docstring (#21098)
This adds a missing `cancelHandleRid` field in `op_fetch` return type,
see Rust side:

fdb4953ea4/ext/fetch/lib.rs (L183-L189)
2023-11-06 14:15:02 +01:00
Jérôme Benoit
65a4b44b75
docs: add missing cmake build dependency installation (#20788)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
2023-11-06 13:31:26 +01:00
Bartek Iwańczuk
fdb4953ea4
refactor: unify CDP types in a single module (#21094)
This commit moves all Chrome Devtools Protocol messages to `cli/cdp.rs`
and refactors all places using these types to pull them from a common
place.

No functional changes.
2023-11-05 22:58:59 +00:00
Jesse Jackson
68a964346d
fix(core/types): Promise.withResolvers: Unmark callback param as optional (#21085)
See discussion on merged commit:
1d19b1011b (r131604700)

Signed-off-by: Jesse Jackson <jsejcksn@users.noreply.github.com>
2023-11-05 23:40:56 +01:00
Matt Mastracci
485fade0b6
chore: migrate to new deno_core and metrics (#21057)
- Uses the new OpMetrics system for sync and async calls
- Partial revert of #21048 as we moved Array.fromAsync upstream to
deno_core
2023-11-05 14:27:36 -07:00
Divy Srivastava
4530cd5f0d fix 2023-11-05 06:40:35 -08:00
Divy Srivastava
cbdc649975 fix lint 2023-11-05 06:40:35 -08:00
Divy Srivastava
5202f5460d chore(ext/crypto): upgrade ec crates 2023-11-05 06:40:35 -08:00
Divy Srivastava
46faf37ec0
chore(ext/ffi): use dlopen2 crate (#21093)
Closes #21046
2023-11-05 09:29:26 +00:00