Luca Bruno
69af418487
fix(ext/http): unify default gzip compression level ( #20050 )
...
This tweaks the HTTP response-writer in order to align the two possible
execution flows into using the same gzip default compression level, that
is `1` (otherwise the implicit default level is `6`).
2023-08-15 09:15:40 -04:00
denobot
89ba3f820c
1.35.3 ( #19947 )
...
Bumped versions for 1.35.3
Co-authored-by: mmastrac <mmastrac@users.noreply.github.com>
2023-07-26 10:18:02 -04:00
Matt Mastracci
7616ffe167
fix(ext/http): Quietly ignore invalid status codes ( #19936 )
2023-07-25 18:12:19 -04:00
Bartek Iwańczuk
06209f824c
perf: cache node resolution when accesing a global ( #19930 )
...
Reclaims some of the performance hit introduced by
https://github.com/denoland/deno/pull/19307 .
2023-07-25 23:43:00 +02:00
Bartek Iwańczuk
bd79baea5e
fix(node): add writable and readable fields to FakeSocket ( #19931 )
...
Closes https://github.com/denoland/deno/issues/19927
2023-07-25 07:17:53 +00:00
Yoshiya Hinosawa
3d35900639
fix(ext/net): fix string port number handling in listen ( #19921 )
...
While string `port` is not allowed in typing, it seems we used to
support that and now it's broken. ref:
https://github.com/denoland/deno/issues/10064#issuecomment-1637427260
This PR restores the support of string port number in `listen` and
`listenTls`
2023-07-25 06:26:18 +00:00
David Sherret
40008c73bb
refactor(ext/node): CjsCodeAnalyzer - analyze_cjs optionally pass source text ( #19896 )
2023-07-24 15:35:13 -04:00
Vedant Pandey
d7a9ed9714
fix(node_compat): Wrap require resolve exports in try catch block ( #19592 )
...
Potentially closes #19499
2023-07-24 11:30:03 +03:00
Luca Casonato
15290499b5
fix(ext/node): inspector with seggregated globals ( #19917 )
...
V8 doesn't like having internal slots on the "real" globalThis object.
This commit works around this limitation by storing the inner globalThis
objects for segregated globals in a context slot.
2023-07-24 00:39:37 +02:00
sigmaSd
5a3dbe1a62
chore: update commonjs loading docs ( #19904 )
2023-07-22 05:48:06 +02:00
Leo Kettmeir
da709729e3
fix(node/http): add encrypted field to FakeSocket ( #19886 )
...
Fixes #19557
2023-07-21 02:18:07 +02:00
Matt Mastracci
bf775e3306
refactor(ext/http): Use const thread-local initializer for slightly better perf ( #19881 )
...
Benchmarking shows numbers are pretty close, however this is recommended
for the best possible thread-local performance and may improve in future
Rust compiler revisions.
2023-07-20 07:30:17 -06:00
denobot
0c3bbf7acd
chore: forward v1.35.2 release commit to main ( #19887 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-20 05:11:50 +02:00
Matt Mastracci
aa95a3a6e0
fix(ext/http): Error on deprecated/unavailable features ( #19880 )
...
Throws an error when user code attempts to use unsupported options (may
help reduce confusion when migrating to Deno.serve)
2023-07-19 12:43:49 -06:00
Luca Casonato
e511022c74
feat(ext/node): properly segregate node globals ( #19307 )
...
Code run within Deno-mode and Node-mode should have access to a
slightly different set of globals. Previously this was done through a
compile time code-transform for Node-mode, but this is not ideal and has
many edge cases, for example Node's globalThis having a different
identity than Deno's globalThis.
This commit makes the `globalThis` of the entire runtime a semi-proxy.
This proxy returns a different set of globals depending on the caller's
mode. This is not a full proxy, because it is shadowed by "real"
properties on globalThis. This is done to avoid the overhead of a full
proxy for all globalThis operations.
The globals between Deno-mode and Node-mode are now properly segregated.
This means that code running in Deno-mode will not have access to Node's
globals, and vice versa. Deleting a managed global in Deno-mode will
NOT delete the corresponding global in Node-mode, and vice versa.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-07-19 10:30:04 +02:00
Leo Kettmeir
bf4e99cbd7
fix(node/http): call callback after request is sent ( #19871 )
...
Fixes #19762
2023-07-19 01:30:19 +02:00
Leo Kettmeir
bab0294db6
fix(node/net): Server connection callback include socket value ( #19779 )
2023-07-19 00:33:43 +02:00
Divy Srivastava
51b3534b3d
fix(ext/node): check if resource can be used with write_vectored ( #19868 )
...
Fixes https://github.com/denoland/deno/issues/19766
Fixes https://github.com/denoland/deno/issues/19846
2023-07-18 23:34:26 +02:00
Bartek Iwańczuk
7e1218cd8f
fix(node): add process.dlopen API ( #19860 )
...
Fixes https://github.com/denoland/deno/issues/19830
2023-07-18 15:13:17 +02:00
David Sherret
b09af6a424
fix(npm): support dynamic import of Deno TS from npm package ( #19858 )
...
Closes #19843
2023-07-17 17:17:58 -04:00
David Sherret
4ebe3bdb06
fix(node): improve error message requiring non-npm es module ( #19856 )
...
Closes #19842
Closes #16913
2023-07-17 16:19:00 -04:00
David Sherret
7a9f7f3419
fix(node): improve require esm error messages ( #19853 )
...
Part of #19842 .
Closes #19583
Closes #16913
2023-07-17 14:00:44 -04:00
await-ovo
37241e9b1e
fix(ext/node): fix stream/promises export ( #19820 )
2023-07-17 22:10:34 +09:00
Matt Mastracci
8465bd0037
chore: update to Rust 1.71 ( #19822 )
2023-07-13 15:16:24 -06:00
David Sherret
2f4b73410a
chore: forward 1.35.1 back to main ( #19814 )
2023-07-12 21:36:42 -04:00
Leo Kettmeir
9d5f6f67d6
fix(node/http): add destroy to FakeSocket ( #19796 )
...
Closes #19782
2023-07-11 15:08:35 +02:00
Leo Kettmeir
4cfc54931d
fix(node/http): allow callback in first argument of end call ( #19778 )
...
Closes #19762
2023-07-11 14:49:19 +02:00
Leo Kettmeir
5cda141f2d
fix(node/http): server use FakeSocket and add end method ( #19660 )
...
Fixes #19324
2023-07-10 13:48:35 +02:00
Bartek Iwańczuk
1edc8693bf
chore: upgrade deno_core and rusty_v8 ( #19773 )
2023-07-09 22:48:47 +00:00
David Sherret
f3095b8d31
chore: upgrade to dprint 0.39 ( #19768 )
2023-07-08 18:34:08 +00:00
Divy Srivastava
e4870d84be
perf(ext/node): native vectored write for server streams ( #19752 )
...
```
# main
$ ./load_test 10 0.0.0.0 8080 0 0
Using message size of 20 bytes
Running benchmark now...
Msg/sec: 106182.250000
Msg/sec: 110279.750000
^C
# this PR
$ ./load_test 10 0.0.0.0 8080 0 0
Using message size of 20 bytes
Running benchmark now...
Msg/sec: 131632.250000
Msg/sec: 134754.250000
^C
```
2023-07-07 22:17:08 +05:30
Matt Mastracci
7d022ad11a
fix(ext/http): Use brotli compression params ( #19758 )
...
Fixes #19737 by adding brotli compression parameters.
Time after:
`Accept-Encoding: gzip`:
```
real 0m0.214s
user 0m0.005s
sys 0m0.013s
```
`Accept-Encoding: br`:
Before:
```
real 0m10.303s
user 0m0.005s
sys 0m0.010s
```
After:
```
real 0m0.127s
user 0m0.006s
sys 0m0.014s
```
2023-07-07 10:46:56 -06:00
Divy Srivastava
75d2c045f7
perf(ext/websocket): optimize server websocket js ( #19719 )
...
Split from https://github.com/denoland/deno/pull/19686
- timestamp set to 0 for server websocket events.
- take fast call path with op_ws_send_binary.
2023-07-07 09:09:25 +05:30
Bartek Iwańczuk
106e1bd90e
fix: remove unstable check for Deno.listenTls#alpnProtocols ( #19732 )
2023-07-06 13:45:15 +00:00
Bartek Iwańczuk
de630b9b78
perf(node/async_hooks): optimize AsyncLocalStorage ( #19729 )
...
This makes the implementation of "AsyncLocalStorage" from
"node:async_hooks" 3.5x faster than before for noop benchmark
(measuring baseline overhead). It's still 3.5x slower than not
using `AsyncLocalStorage` and 1.64x slower than using
noop promise hooks.
2023-07-06 13:05:10 +02:00
Divy Srivastava
57fae55d82
perf(ext/node): optimize net streams ( #19678 )
...
~4.5x improvement in `npm:ws` echo benchmark:
```
$ ./load_test 10 0.0.0.0 8080 0 0
Using message size of 20 bytes
Running benchmark now...
Msg/sec: 101083.750000
Msg/sec: 103606.000000
^C
$ ./load_test 10 0.0.0.0 8080 0 0
Using message size of 20 bytes
Running benchmark now...
Msg/sec: 24906.750000
Msg/sec: 28478.000000
^C
```
2023-07-05 22:45:10 +05:30
denobot
1ac5fddf54
1.35.0 ( #19717 )
...
Bumped versions for 1.35.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-05 01:58:01 +02:00
await-ovo
686ec85f52
fix(ext/node): Define performance.timeOrigin as getter property ( #19714 )
2023-07-04 20:19:18 +03:00
Bartek Iwańczuk
39872646eb
feat: stabilize 'alpnProtocols' setting ( #19704 )
...
Ref https://github.com/denoland/deno/issues/19685
2023-07-04 15:28:50 +02:00
Bartek Iwańczuk
3c8bbc434d
feat: Stabilize Deno.serve() API ( #19141 )
...
This commit stabilizes "Deno.serve()", which becomes the
preferred way to create HTTP servers in Deno.
Documentation was adjusted for each overload of "Deno.serve()"
API and the API always binds to "127.0.0.1:8000" by default.
2023-07-04 01:46:32 +02:00
await-ovo
208e65d33a
fix(npm): escape export identifier in double quoted string ( #19694 )
2023-07-03 18:41:09 +00:00
ud2
d632cce129
fix(dts): make globals available on globalThis ( #19438 )
...
This PR changes Web IDL interfaces to be declared with `var` instead of
`class`, so that accessing them via `globalThis` does not raise type
errors.
Closes #13390 .
2023-07-03 14:36:55 -04:00
Matt Mastracci
2c2e6adae8
fix(ext/http): Catch errors in eager stream timeout to avoid uncaught promise rejections ( #19691 )
...
Fixes #19687 by adding a rejection handler to the write inside the
setTimeout. There is a small window where the promise is actually not
awaited and may reject without a handler.
2023-07-03 15:30:02 +00:00
await-ovo
0f4051a37a
fix(ext/node): ignore cancelled timer when node timer refresh ( #19637 )
...
For timers that have already executed clearTimeout, there is no need to recreate a new timer when refresh is executed again.
2023-07-02 19:11:34 +00:00
Bartek Iwańczuk
01f0d03ae8
refactor: rename built-in node modules from ext:deno_node/ to node: ( #19680 )
...
Closes https://github.com/denoland/deno/issues/19510
2023-07-02 20:19:30 +02:00
Leo Kettmeir
805497a9a5
feat: ReadableStream.from ( #19446 )
...
Closes #19417
2023-07-02 19:30:05 +02:00
Lino Le Van
17ddf2f97c
feat(ext/url): URLSearchParams two-argument delete() and has() ( #19654 )
2023-07-02 17:26:48 +02:00
Luca Casonato
d8e8e60f9f
feat(ext/fetch): add Headers#getSetCookie ( #13542 )
...
Spec change: https://github.com/whatwg/fetch/pull/1346
Tests: https://github.com/web-platform-tests/wpt/pull/31442 (ran against
this PR and they all pass)
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-02 13:20:56 +02:00
David Sherret
3b9845d891
fix(npm): handle more reserved words as cjs exports ( #19672 )
...
Closes #19665
2023-07-01 21:43:17 -04:00
Nayeem Rahman
b9c0e7cd55
Reland "fix(cli): don't store blob and data urls in the module cache" ( #18581 )
...
Relands #18261 now that
https://github.com/lucacasonato/esbuild_deno_loader/pull/54 is landed
and used by fresh.
Fixes #18260 .
2023-07-02 00:52:30 +02:00