snek
aa546189be
feat: OpenTelemetry Tracing API and Exporting ( #26710 )
...
Initial import of OTEL code supporting tracing. Metrics soon to come.
Implements APIs for https://jsr.io/@deno/otel so that code using
OpenTelemetry.js just works tm.
There is still a lot of work to do with configuration and adding
built-in tracing to core APIs, which will come in followup PRs.
---------
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-11-13 10:38:46 +00:00
Łukasz Czerniawski
7becd83a38
feat(ext/fs): add ctime to Deno.stats and use it in node compat layer ( #24801 )
...
This PR fixes #24453 , by introducing a ctime (using ctime for UNIX and
ChangeTime for Windows) to Deno.stats.
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-11-13 13:35:04 +09:00
Divy Srivastava
43812ee8ff
fix(ext/node): process.getBuiltinModule ( #26833 )
...
Closes https://github.com/denoland/deno/issues/26832
2024-11-13 08:02:09 +05:30
Richard Carson
01f3451869
chore: make fields public on PermissionDeniedError
and deno_kv::KvConfig
( #26798 )
...
A few small changes to avoid needing unsafe mem transmutes to
instantiate the extensions
---------
Signed-off-by: Richard Carson <Rscarson@rogers.com>
2024-11-12 17:49:49 +00:00
Divy Srivastava
3b99f6833c
fix(ext/websocket): initialize error
attribute of WebSocket ErrorEvent ( #26796 )
...
Fixes https://github.com/denoland/deno/issues/26216
Not required by the spec but Discord.js depends on it, see
https://github.com/denoland/deno/issues/26216#issuecomment-2466060306
2024-11-12 17:10:07 +05:30
Yoshiya Hinosawa
c3c2b37966
fix(ext/node): add autoSelectFamily option to net.createConnection ( #26661 )
2024-11-12 19:54:47 +09:00
Satya Rohith
90236d67c5
fix(ext/http): prefer brotli for accept-encoding: gzip, deflate, br, zstd
( #26814 )
...
Closes https://github.com/denoland/deno/issues/26813
2024-11-12 12:10:41 +05:30
denobot
e1b40a69c0
chore: forward v2.0.6 release commit to main ( #26804 )
...
This is the release commit being forwarded back to main for 2.0.6
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-11-10 13:12:18 +05:30
snek
73fbd61bd0
fix: performance.timeOrigin ( #26787 )
...
`performance.timeOrigin` was being set from when JS started executing,
but `op_now` measures from an `std::time::Instant` stored in `OpState`,
which is created at a completely different time. This caused
`performance.timeOrigin` to be very incorrect. This PR corrects the
origin and also cleans up some of the timer code.
Compared to `Date.now()`, `performance`'s time origin is now
consistently within 5us (0.005ms) of system time.
![image](https://github.com/user-attachments/assets/0a7be04a-4f6d-4816-bd25-38a2e6136926 )
2024-11-08 23:20:24 +01:00
Divy Srivastava
b482a50299
feat(ext/http): abort event when request is cancelled ( #26781 )
...
```js
Deno.serve(async (req) => {
const { promise, resolve } = Promise.withResolvers<void>();
req.signal.addEventListener("abort", () => {
resolve();
});
await promise;
return new Response("Ok");
});
```
2024-11-08 18:46:11 +05:30
Divy Srivastava
637b1d5508
fix(ext/cache): don't panic when creating cache ( #26780 )
2024-11-08 12:27:29 +05:30
Divy Srivastava
b9262130fe
feat(ext/http): abort signal when request is cancelled ( #26761 )
...
Closes https://github.com/denoland/deno/issues/21653
2024-11-07 17:12:13 +05:30
Leo Kettmeir
1cab4f07a3
refactor: use concrete error type for remaining ops ( #26746 )
2024-11-06 16:57:57 -08:00
Kaveh
db53ec230d
refactor(ext/net): Use hickory dns instead of unmaintained trust-dns ( #26741 )
...
This PR replaces the unmaintained and rebranded `trust-dns` to `hickory`
for resolver in `deno_net`.
2024-11-06 15:49:32 -08:00
Satya Rohith
b3a3d84ce2
fix(node:zlib): gzip & gzipSync should accept ArrayBuffer ( #26762 )
...
Closes https://github.com/denoland/deno/issues/26638
2024-11-06 15:12:24 +01:00
snek
700f54a13c
fix(ext/node): better inspector support ( #26471 )
...
implement local inspector
future changes:
- wire up InspectorServer to enable open/close/url
- wire up connectToMainThread
Fixes https://github.com/denoland/deno/issues/25004
2024-11-06 14:08:26 +00:00
denobot
ef7432c03f
chore: forward v2.0.5 release commit to main ( #26755 )
...
This is the release commit being forwarded back to main for 2.0.5
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-11-06 02:27:14 +01:00
Nathan Whitaker
84aee0be9a
fix(ext/node): add findSourceMap
to the default export of node:module
( #26720 )
...
Next.js 15.0.2 tries to use this and errors out
2024-11-04 21:08:29 +00:00
Leo Kettmeir
fe9f0ee593
refactor(runtime/permissions): use concrete error types ( #26464 )
2024-11-04 09:17:21 -08:00
Kenta Moriuchi
fb1d33a711
chore: update dlint to v0.68.0 for internal ( #26711 )
2024-11-04 12:17:11 -05:00
David Sherret
826e42a5b5
fix: improved support for cjs and cts modules ( #26558 )
...
* cts support
* better cjs/cts type checking
* deno compile cjs/cts support
* More efficient detect cjs (going towards stabilization)
* Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only
done after loading
* Support `import x = require(...);`
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-01 12:27:00 -04:00
Divy Srivastava
4774eab64d
chore: upgrade to rust 1.82 and LLVM 19 ( #26615 )
...
Upgrade to rust 1.82 and LLVM 19 . Removes one webusb test because
`requestAdapter` not working on new ubuntu 24 runners
2024-11-01 16:13:02 +05:30
Nathan Whitaker
6c6bbeb974
fix(node): Implement os.userInfo
properly, add missing toPrimitive
( #24702 )
...
Fixes the implementation of `os.userInfo`, and adds a missing
`toPrimitive` for `tmpdir`. This allows us to enable the corresponding
node_compat test.
2024-10-31 22:18:33 -07:00
Nathan Whitaker
6d44952d4d
fix(ext/node): resolve exports even if parent module filename isn't present ( #26553 )
...
Fixes https://github.com/denoland/deno/issues/26505
I'm not exactly sure how this case comes about (I tried to write tests
for it but couldn't manage to reproduce it), but what happens is the
parent filename ends up null, and we bail out of resolving the specifier
in package exports.
I've checked, and in node the parent filename is also null (so that's
not a bug on our part), but node continues to resolve even in that case.
So this PR should match node's behavior more closely than we currently
do.
2024-10-31 10:02:31 -07:00
Nathan Whitaker
951103fc8d
fix(ext/node): convert errors from fs.readFile/fs.readFileSync
to node format ( #26632 )
...
Fixes the original issue reported in #26404 . storybook runs into other
errors after this PR (the new errors will be fixed in other PRs).
Some code used by a dependency of storybook does a [string comparison on
the error
message](ce30b2be34/node-src/lib/getConfiguration.ts (L88-L92)
)
thrown here to check for a file not found error.
2024-10-31 10:02:17 -07:00
Divy Srivastava
8bfd134da6
fix: clamp smi in fast calls by default ( #26506 )
...
Fixes https://github.com/denoland/deno/issues/26480
Ref
d2945fb65b
2024-10-31 10:10:07 +05:30
David Sherret
a8846eb70f
fix: remove permission check in op_require_node_module_paths ( #26645 )
2024-10-30 20:43:22 +00:00
Nathan Whitaker
a346071dd2
fix(ext/node): return this
from http.Server.ref/unref()
( #26647 )
...
Fixes https://github.com/denoland/deno/issues/26642
2024-10-30 20:13:32 +00:00
denobot
a1473d82c5
chore: forward v2.0.4 release commit to main ( #26636 )
...
This is the release commit being forwarded back to main for 2.0.4
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-30 13:46:31 +01:00
Yoshiya Hinosawa
a69224ea5b
Revert "fix(ext/node): fix dns.lookup result ordering ( #26264 )" ( #26621 )
...
This reverts commit d59599fc18
.
Closes #26588
2024-10-29 18:41:16 +01:00
Volker Schlecht
51978a7654
fix(ext/napi): export dynamic symbols list for {Free,Open}BSD ( #26605 )
...
The two BSD ports are reusing the Linux code here.
2024-10-29 19:41:49 +05:30
Volker Schlecht
efb5e912e5
fix(ext/node): compatibility with {Free,Open}BSD ( #26604 )
...
Ports for both BSDs contain patches to the same effect.
See
https://github.com/freebsd/freebsd-ports/blob/main/www/deno/files/patch-ext_node_ops_fs.rs
and
8644910cae/lang/deno/patches/patch-ext_node_ops_fs_rs
2024-10-29 19:40:32 +05:30
Bartek Iwańczuk
46e5ed1a64
Revert "fix(ext/node): use primordials in ext/node/polyfills/https.ts
( #26323 )" ( #26613 )
...
…s` (#26323 )"
This reverts commit afb33b3c25
.
Reverting because it caused a regression -
https://github.com/denoland/deno/issues/26612 .
Closes https://github.com/denoland/deno/issues/26612 .
2024-10-29 00:41:02 +00:00
snek
4e38fbd0a3
fix: report exceptions from nextTick ( #26579 )
...
Fixes: https://github.com/denoland/deno/issues/24713
Fixes: https://github.com/denoland/deno/issues/25855
2024-10-28 18:16:43 +01:00
familyboat
c314b2d857
fix(ext/node): add path to fs.stat
and fs.statSync
error ( #26037 )
2024-10-27 08:34:35 +05:30
Mayank Kumar
793b155cd3
fix(ext/node): use primordials in ext\node\polyfills\internal\crypto\_randomInt.ts ( #26534 )
...
Towards #24236
2024-10-26 19:42:14 +02:00
Bartek Iwańczuk
730331622e
chore: forward v2.0.3 commit to main ( #26535 )
...
Forwarding v2.0.3 commit to `main`
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-25 09:57:40 -04:00
Bartek Iwańczuk
cead8af104
build: use 'fs' feature of 'nix' crate in ext/fs ( #26533 )
...
Hot-fix to unblock `v2.0.3` release
2024-10-25 12:53:34 +02:00
Nicola Bovolato
8dd6177c62
fix(ext/node): refactor http.ServerResponse into function class ( #26210 )
...
While testing, I found out that light-my-request relies on
`ServerResponse.connection`, which is deprecated, so I added that and
`socket`, the non deprecated property.
It also relies on an undocumented `_header` property, apparently for
[raw header
processing](https://github.com/fastify/light-my-request/blob/v6.1.0/lib/response.js#L180-L186 ).
I added it as an empty string, feel free to provide other approaches.
Fixes #19901
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-25 00:02:26 +02:00
Leo Kettmeir
c71e020668
refactor(ext/node): use concrete error types ( #26419 )
2024-10-24 10:45:17 -07:00
Marvin Hagemeister
ef53ce3ac4
fix(node/util): support array formats in styleText
( #26507 )
...
We missed adding support for an array of formats being passed to
`util.styleText`.
Fixes https://github.com/denoland/deno/issues/26496
2024-10-24 11:46:51 +02:00
snek
79a3ad2b95
feat: support node-api in denort ( #26389 )
...
exposes node-api symbols in denort so that `deno compile` can run native
addons.
2024-10-24 09:13:54 +02:00
Nathan Whitaker
27df42f659
fix(ext/node): cancel pending ipc writes on channel close ( #26504 )
...
Fixes the issue described in
https://github.com/denoland/deno/issues/23882#issuecomment-2423316362 .
The parent was starting to send a message right before the process would
exit, and the channel closed in the middle of the write. Unlike with
reads, we weren't cancelling the pending writes, which resulted in a
`Broken pipe` error surfacing to the user.
2024-10-24 04:50:35 +00:00
Nathan Whitaker
7c57105cc4
fix(ext/node): only set our end of child process pipe to nonblocking mode ( #26495 )
...
Fixes playwright on linux, as reported in
https://github.com/denoland/deno/issues/16899#issuecomment-2378268454 .
The issue was that we were opening the socket in nonblocking mode, which
meant that subprocesses trying to use it would get a `EWOULDBLOCK` error
(unexpectedly). The fix here is to only set nonblocking mode on our end
(which we need to use asynchronously)
2024-10-23 21:13:30 -07:00
Divy Srivastava
fa49fd404b
fix(ext/ffi): return u64/i64 as bigints from nonblocking ffi calls ( #26486 )
...
Fixes https://github.com/denoland/deno/issues/25194
2024-10-24 09:41:38 +05:30
Satya Rohith
92ed4d38db
fix(node:tls): set TLSSocket.alpnProtocol for client connections ( #26476 )
...
Towards https://github.com/denoland/deno/issues/26127
2024-10-23 07:47:43 +00:00
Yoshiya Hinosawa
285635daa6
fix(ext/node): map ERROR_INVALID_NAME
to ENOENT
on windows ( #26475 )
...
In libuv on windows, `ERROR_INVALID_NAME` is mapped to `ENOENT`, but it
is mapped to `EINVAL` in our compat implementation, which causes the
issue #24899 .
ref:
d4ab6fbba4/src/win/error.c (L138)
closes #24899
closes #26411
closes #23635
closes #21165
closes #19067
2024-10-23 11:28:04 +09:00
Leo Kettmeir
9696e0b378
fix(ext/console): ignore casing for named colors in css parsing ( #26466 )
2024-10-22 10:57:58 +02:00
jiang1997
afb33b3c25
fix(ext/node): use primordials in ext/node/polyfills/https.ts
( #26323 )
...
Towards https://github.com/denoland/deno/issues/24236
2024-10-21 09:50:53 +02:00
Leo Kettmeir
473e3069de
chore: update nix crate ( #26422 )
...
Dedupes nix dependency, since `rustyline` depends on a newer version
that what we currently use
2024-10-19 21:59:39 +00:00
Divy Srivastava
0710af034f
perf: avoid multiple calls to runMicrotask ( #26378 )
...
Improves HTTP throughput by 8-9k rps on Linux:
this patch
```
Requests/sec: 145001.69
Transfer/sec: 20.74MB
```
main
```
Requests/sec: 137866.61
Transfer/sec: 19.72MB
```
The improvements comes from the reduced number of calls to
`op_run_microtask` per request. Returning `true` from a macrotask
callback already calls `op_run_microtask` so the extra call was
redundant.
Here's `--strace-ops` output for a single request:
main
```
[ 4.667] op_http_wait : CompletedAsync Async
[ 4.667] op_run_microtasks : Dispatched Slow
[ 4.668] op_http_try_wait : Dispatched Slow
[ 4.668] op_http_try_wait : Completed Slow
[ 4.668] op_http_wait : Dispatched Async
[ 4.668] op_http_set_response_header : Dispatched Slow
[ 4.668] op_http_set_response_header : Completed Slow
[ 4.669] op_http_set_response_body_text : Dispatched Slow
[ 4.669] op_http_set_response_body_text : Completed Slow
[ 4.669] op_run_microtasks : Completed Slow
[ 4.669] op_has_tick_scheduled : Dispatched Slow
[ 4.669] op_has_tick_scheduled : Completed Slow
[ 4.669] op_run_microtasks : Dispatched Slow
[ 4.669] op_run_microtasks : Completed Slow
[ 4.669] op_run_microtasks : Dispatched Slow
[ 4.669] op_run_microtasks : Completed Slow
```
this pr
```
[ 3.726] op_http_wait : CompletedAsync Async
[ 3.727] op_run_microtasks : Dispatched Slow
[ 3.727] op_http_try_wait : Dispatched Slow
[ 3.727] op_http_try_wait : Completed Slow
[ 3.727] op_http_wait : Dispatched Async
[ 3.727] op_http_set_response_header : Dispatched Slow
[ 3.728] op_http_set_response_header : Completed Slow
[ 3.728] op_http_set_response_body_text : Dispatched Slow
[ 3.728] op_http_set_response_body_text : Completed Slow
[ 3.728] op_run_microtasks : Completed Slow
[ 3.728] op_run_microtasks : Dispatched Slow
[ 3.728] op_run_microtasks : Completed Slow
```
2024-10-19 08:42:59 +05:30
Leo Kettmeir
615e6b7cc2
refactor(ext/webgpu): use concrete error type ( #26198 )
2024-10-18 18:53:04 -07:00
Leo Kettmeir
6c4ef11f04
refactor(ext/fetch): use concrete error types ( #26220 )
2024-10-19 01:20:58 +00:00
Leo Kettmeir
2c3900370a
refactor(ext/http): use concrete error types ( #26377 )
2024-10-18 15:57:12 -07:00
Leo Kettmeir
8ca8174c81
refactor(ext/crypto): use concrete error types ( #26167 )
2024-10-18 15:23:20 -07:00
Nathan Whitaker
d48434e91f
fix(ext/node): stub HTTPParser internal binding ( #26401 )
...
Fixes https://github.com/denoland/deno/issues/26394 .
2024-10-18 21:39:32 +00:00
Leo Kettmeir
d047cab14b
refactor(ext/websocket): use concrete error type ( #26226 )
2024-10-18 19:30:46 +00:00
Nathan Whitaker
1bccf45ecb
fix(ext/node): properly map reparse point error in readlink ( #26375 )
2024-10-18 10:11:06 -07:00
Leo Kettmeir
85a99eb405
refactor(ext/fs): use concrete error types ( #26317 )
2024-10-18 06:38:17 -07:00
denobot
3ae10a01e0
chore: forward v2.0.2 release commit to main ( #26376 )
...
This is the release commit being forwarded back to main for 2.0.2
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-18 03:12:49 +02:00
Bartek Iwańczuk
8f3eb9d0e7
fix(ext/node): add null check for kStreamBaseField ( #26368 )
...
It's not guaranteed that `kStreamBaseField` is not undefined, so
added a check for it.
Closes https://github.com/denoland/deno/issues/26363
2024-10-17 22:57:05 +00:00
Leo Kettmeir
8cfd9968fa
refactor(ext/napi): use concrete error types ( #26186 )
2024-10-17 19:51:33 +00:00
Nathan Whitaker
9fde5cb5e0
fix(node/fs): copyFile with COPYFILE_EXCL
should not throw if the destination doesn't exist ( #26360 )
...
Fixes #26313 .
We were checking for the NotFound error, but still calling the callback
with the error / throwing.
2024-10-17 19:51:15 +00:00
Leo Kettmeir
eca83fc9b4
refactor(ext/web): use concrete error types ( #26185 )
2024-10-17 19:05:38 +00:00
Leo Kettmeir
7c790da826
refactor(ext/kv): use concrete error type ( #26239 )
2024-10-17 17:59:02 +00:00
Leo Kettmeir
ed13efc4ac
refactor(ext/net): use concrete error type ( #26227 )
2024-10-17 09:43:04 -07:00
Nathan Whitaker
a61ba3c699
fix(net): don't try to set nodelay on upgrade streams ( #26342 )
...
Fixes https://github.com/denoland/deno/issues/26341 .
We try to call `op_set_nodelay` on an `UpgradeStream`, which doesn't
support that operation.
2024-10-17 03:56:57 +00:00
Nathan Whitaker
167f674c7c
fix: don't warn on ignored signals on windows ( #26332 )
...
Closes #26183 .
The warnings are super noisy and not actionable for the user
2024-10-16 19:58:11 -07:00
Nathan Whitaker
458d6278d2
fix(node/http): normalize header names in ServerResponse
( #26339 )
...
Fixes https://github.com/denoland/deno/issues/26115 .
We weren't normalizing the headers to lower case, so code that attempted
to delete the `Content-Length` header (but used a different case) wasn't
actually removing the header.
2024-10-17 00:42:15 +00:00
denobot
3385d1252e
chore: forward v2.0.1 release commit to main ( #26338 )
...
This is the release commit being forwarded back to main for 2.0.1
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-16 23:48:42 +00:00
Nathan Whitaker
f7dba52133
fix(child_process): map node --no-warnings
flag to --quiet
( #26288 )
...
Closes https://github.com/denoland/deno/issues/25899
2024-10-16 18:25:25 +00:00
Yoshiya Hinosawa
d59599fc18
fix(ext/node): fix dns.lookup result ordering ( #26264 )
...
partially unblocks #25470
This PR aligns the resolution of `localhost` hostname to Node.js
behavior.
In Node.js `dns.lookup("localhost", (_, addr) => console.log(addr))`
prints ipv6 address `::1`, but it prints ipv4 address `127.0.0.1` in
Deno. That difference causes some errors in the work of enabling
`createConnection` option in `http.request` (#25470 ). This PR fixes the
issue by aligning `dns.lookup` behavior to Node.js.
This PR also changes the following behaviors (resolving TODOs):
- `http.createServer` now listens on ipv6 address `[::]` by default on
linux/mac
- `net.createServer` now listens on ipv6 address `[::]` by default on
linux/mac
These changes are also alignments to Node.js behaviors.
2024-10-16 20:58:44 +09:00
Divy Srivastava
21fa953f32
fix(ext/node): timingSafeEqual account for AB byteOffset ( #26292 )
...
Fixes https://github.com/denoland/deno/issues/26276
2024-10-16 14:27:28 +05:30
David Sherret
661882f10d
perf(http): make heap allocation for path conditional ( #26289 )
...
Code:
```js
Deno.serve({ port: 8085 }, request => {
return new Response(request.url);
});
```
Before:
```
% wrk -d60s http://localhost:8085/path/testing\?testing=5
Running 1m test @ http://localhost:8085/path/testing?testing=5
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 56.01us 18.34us 3.28ms 93.84%
Req/Sec 81.80k 3.13k 88.26k 90.77%
9783713 requests in 1.00m, 1.67GB read
Requests/sec: 162789.89
Transfer/sec: 28.41MB
```
After:
```
% wrk -d60s http://localhost:8085/path/testing\?testing=5
Running 1m test @ http://localhost:8085/path/testing?testing=5
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 55.44us 15.20us 2.42ms 90.41%
Req/Sec 82.71k 2.92k 88.10k 89.93%
9892916 requests in 1.00m, 1.69GB read
Requests/sec: 164607.06
Transfer/sec: 28.73MB
```
2024-10-16 00:43:20 -04:00
Leo Kettmeir
82d13fd45b
refactor(ext/io): use concrete error types ( #26187 )
2024-10-15 15:36:11 -07:00
Leo Kettmeir
3065dadea3
fix(ext/console): apply coloring for console.table ( #26280 )
...
Fixes #26159
2024-10-15 21:36:45 +00:00
Kenta Moriuchi
7211028f1e
fix(ext/node): use primordials in ext/node/polyfills/internal/buffer.mjs
( #24993 )
...
Towards #24236
2024-10-15 20:32:27 +02:00
Toby Ealden
c5a7f98d82
fix(ext/node): handle http2 server ending stream ( #26235 )
...
Closes #24845
2024-10-15 23:35:10 +05:30
Divy Srivastava
c7153838ec
fix(ext/node): implement TCP.setNoDelay ( #26263 )
...
Fixes https://github.com/denoland/deno/issues/26177
The significant delay was caused by Nagel's algorithm + delayed ACKs in
Linux kernels. Here's the [kernel
patch](https://lwn.net/Articles/502585/ ) which added 40ms
`tcp_default_delack_min`
```
$ deno run -A pg-bench.mjs # main
Tue Oct 15 2024 12:27:22 GMT+0530 (India Standard Time): 42ms
$ target/release/deno run -A pg-bench.mjs # this patch
Tue Oct 15 2024 12:28:02 GMT+0530 (India Standard Time): 1ms
```
```js
import { Buffer } from "node:buffer";
import pg from 'pg'
const { Client } = pg
const client = new Client({
connectionString: 'postgresql://postgres:postgres@127.0.0.1:5432/postgres'
})
await client.connect()
async function fetch() {
const startPerf = performance.now();
const res = await client.query(`select
$1::int as int,
$2 as string,
$3::timestamp with time zone as timestamp,
$4 as null,
$5::bool as boolean,
$6::bytea as bytea,
$7::jsonb as json
`, [
1337,
'wat',
new Date().toISOString(),
null,
false,
Buffer.from('awesome'),
JSON.stringify([{ some: 'json' }, { array: 'object' }])
])
console.log(`${new Date()}: ${Math.round(performance.now() - startPerf)}ms`)
}
for(;;) await fetch();
```
2024-10-15 14:47:12 +05:30
David Sherret
7f3747f2ef
perf(http): avoid clone getting request method and url ( #26250 )
2024-10-14 23:25:47 -04:00
David Sherret
4c9eee3ebe
perf(http): cache webidl.converters lookups in ext/fetch/23_response.js ( #26256 )
2024-10-14 23:25:18 -04:00
Leo Kettmeir
ee7d450143
refactor(ext/ffi): use concrete error types ( #26170 )
2024-10-14 15:05:49 -07:00
Mohammad Sulaiman
8dbe77dd29
fix(console/ext/repl): support using parseFloat() ( #25900 )
...
Fixes #21428
Co-authored-by: tannal <tannal2409@gmail.com>
2024-10-14 15:04:18 -07:00
Leo Kettmeir
48cbf85add
refactor(ext/url): use concrete error types ( #26172 )
2024-10-14 14:15:31 -07:00
Leo Kettmeir
cb385d9e4a
refactor(ext/webstorage): use concrete error types ( #26173 )
2024-10-14 13:53:17 -07:00
Divy Srivastava
dfbf03eee7
perf: use fast calls for microtask ops ( #26236 )
...
Updates deno_core to 0.312.0
2024-10-14 12:31:51 +00:00
Divy Srivastava
bbad7c5922
fix(ext/node): compute pem length (upper bound) for key exports ( #26231 )
...
Fixes https://github.com/denoland/deno/issues/26188
2024-10-14 14:24:26 +05:30
Divy Srivastava
68b388a93a
fix(ext/node): allow writing to tty columns ( #26201 )
...
Behave similar to Node.js where modifying `stdout.columns` doesn't
really resize the terminal. Ref
https://github.com/nodejs/node/issues/17529
Fixes https://github.com/denoland/deno/issues/26196
2024-10-14 14:00:02 +05:30
Divy Srivastava
7c3da2ec1c
fix(ext/webgpu): allow GL backend on Windows ( #26206 )
...
It should be supported according to
[this](https://github.com/gfx-rs/wgpu?tab=readme-ov-file#supported-platforms ).
Fixes https://github.com/denoland/deno/issues/26144
2024-10-14 11:10:27 +05:30
Leo Kettmeir
64c304a452
refactor(ext/tls): use concrete error types ( #26174 )
2024-10-12 16:53:38 -07:00
Leo Kettmeir
2ac699fe6e
refactor(ext/cron): use concrete error type ( #26135 )
2024-10-12 14:23:49 -07:00
Nathan Whitaker
4f89225f76
fix(node/util): export styleText
from node:util
( #26194 )
...
Fixes #26184 .
It was added but not publicly exported.
2024-10-12 19:36:23 +00:00
Leo Kettmeir
8b2c6fc2d2
refactor(ext/canvas): use concrete error type ( #26111 )
2024-10-12 10:00:35 -07:00
Leo Kettmeir
938a8ebe34
refactor(ext/cache): use concrete error type ( #26109 )
2024-10-12 09:15:10 -07:00
Leo Kettmeir
3df8f16500
refactor(ext/broadcastchannel): use concrete error type ( #26105 )
2024-10-12 08:20:17 -07:00
Marvin Hagemeister
9117a9a43c
fix(node): make process.stdout.isTTY
writable ( #26130 )
...
Fixes https://github.com/denoland/deno/issues/26123
2024-10-11 19:14:10 +02:00
denobot
a62c7e036a
2.0.0 ( #26063 )
...
Bumped versions for 2.0.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-08 07:37:28 -07:00
Satya Rohith
ff4e682ff9
fix(ext/node): internal buffer length in readSync ( #26064 )
...
Closes https://github.com/denoland/deno/issues/26054
2024-10-08 10:41:32 +00:00
Marvin Hagemeister
2d488e4bfb
fix(console): missing cause property on non-error objects ( #26061 )
...
Fixes https://github.com/denoland/deno/issues/26047
2024-10-08 12:10:19 +02:00
Leo Kettmeir
9a92603a14
fix(ext/webstorage): make getOwnPropertyDescriptor
with symbol return undefined
( #13348 )
...
Closes #13347
2024-10-07 07:59:27 -07:00