Daniel Osvaldo Rahmanto
328d5ef2a0
fix(ext/node): accept ArrayBuffer on crypto.timingSafeEqual ( #30773 )
...
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes #30759
The buffer validation is based on Node.js implementation:
591ba692bf/src/crypto/crypto_util.h (L467-L472)
2025-09-18 16:51:56 +02:00
Divy
36e9eb2023
fix(ext/node): support JS underlying stream in TLS ( #30465 )
...
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes https://github.com/denoland/deno/issues/20594
This implements `JSStreamSocket` which drives the TLS underlying stream
in `rustls_tokio_stream` using 2 sets of channels. One for piping the
encrypted protocol transport and the other for plaintext application
data.
This fixes connecting to `npm:mssql`:
```js
import sql from "npm:mssql";
const sqlConfig = {
server: "localhost",
user: "divy",
password: "123",
database: "master",
options: {
trustServerCertificate: true,
},
};
const pool = await sql.connect(sqlConfig);
const result = await pool.request().query(`SELECT * FROM sys.databases`);
```
2025-08-28 17:56:17 +05:30
Divy
044b62f702
fix(ext/node): tls upgrades for used sockets ( #30418 )
...
Fixes `npm:postgres` support
Fixes https://github.com/denoland/deno/issues/30417
Fixes https://github.com/denoland/deno/issues/28551
Fixes https://github.com/denoland/deno/issues/28526
```
$ target/debug/deno -A repro.mjs
Result(1) [
{
current_database: "testdb",
version: "PostgreSQL 14.17 (Homebrew) on aarch64-apple-darwin24.2.0, compiled by Apple clang version 16.0.0 (clang-1600.0.26.6), 64-bit"
}
]
```
2025-08-16 16:04:52 +05:30
James Bronder
9a1ab9849c
fix(ext/node): use primordials in ext/node/polyfills/internal_binding/buffer.ts
( #30287 )
...
Towards #24236 . Replaces JS builtins with equivalent primordials.
2025-08-05 13:10:45 +00:00
Daniel Osvaldo R
6ae4eda86a
fix(ext/node): define fs constants correctly across platforms ( #30113 )
2025-07-31 17:11:01 -04:00
Daniel Osvaldo R
8680d97b38
fix(ext/node): fs.open
and fs.openSync
compatibility ( #30191 )
...
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
Notable changes:
- Introduces a separate op between `Deno.open` and `node:fs.open`.
- Removes redundant `existenceCheckRequired` and `Deno.lstatSync` calls,
as the op layer already handles that when `options.create_new` is true
and uses synchronous I/O when `O_SYNC` is passed.
- Allows passing custom flags to the op (e.g. `O_SYNC`).
- Addresses `prefer-primordials` lint rule.
- Allows
[parallel/test-fs-open.js](https://github.com/nodejs/node/blob/v23.9.0/test/parallel/test-fs-open.js )
test to pass. There are also several tests that have passed before that
I added to the config.toml.
2025-07-31 15:10:10 +00:00
James Bronder
c66fea5606
fix(ext/node): use primordials in ext/node/polyfills/internal_binding/node_file.ts
( #30066 )
2025-07-31 10:28:58 -04:00
James Bronder
d9b14f8765
fix(ext/node): use primordials in ext/node/polyfills/internal_binding/pipe_wrap.ts
( #30241 )
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-07-30 09:44:29 -04:00
Divy
5cfe47abc3
fix(ext/node): use Zlib base for brotli handles ( #30112 )
...
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes #28507
Closes https://github.com/denoland/deno/issues/28836
```
$ ../deno/target/debug/deno run -A npm:pnpm i --save yargs
Packages: +297
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 381, reused 257, downloaded 41, added 297, done
dependencies:
+ @deno/astro-adapter 0.2.1 (0.3.1 is available)
+ astro 5.12.0
+ yargs 18.0.0
```
2025-07-28 10:11:59 +05:30
James Bronder
470592a54e
fix(ext/node): use primordials in ext/node/polyfills/internal_binding/_listen.ts
( #30100 )
...
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Towards #24236 . Replaces JS builtin `Math.clz32` with the primordial
`MathClz32`.
2025-07-21 13:35:42 +02:00
Yoshiya Hinosawa
65e1aaefba
fix(ext/node): add type check to LibuvStreamWrap.writeBuffer ( #29879 )
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-06-27 08:48:57 +09:00
Yoshiya Hinosawa
507e103ad3
test(ext/node): expose TTY class from tty_wrap for testing ( #29862 )
2025-06-25 12:54:35 +09:00
Yoshiya Hinosawa
96ab2d3b68
fix(ext/node): crypto.timingSafeEqual ( #29758 )
2025-06-16 21:33:49 +09:00
James Bronder
6367a54b61
fix(ext/node): use primordials in ext/node/polyfills/internal_binding/stream_wrap.ts
( #29542 )
2025-06-11 15:40:09 +09:00
Divy Srivastava
5039ce8e32
fix(ext/node): fix Buffer.inspect
compatiblity ( #29617 )
...
Enables `parallel/test-buffer-inspect.js`
Towards #29589
2025-06-05 14:44:06 +05:30
Divy Srivastava
426e3e7228
fix(ext/node): Buffer.fill compatibility fixes ( #29525 )
...
Enables `parallel/test-buffer-fill.js`
Towards https://github.com/denoland/deno/issues/29589
2025-06-05 13:29:44 +05:30
Divy Srivastava
104084876c
fix(ext/node): mark pool ArrayBuffer
as untransferable ( #29612 )
...
Enables `parallel/test-buffer-pool-untransferable.js`
Towards https://github.com/denoland/deno/issues/29589
2025-06-05 11:44:48 +05:30
Yoshiya Hinosawa
d39343373c
fix(ext/node): fix buffer.indexOf for ucs2 encoding ( #29593 )
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
2025-06-04 21:34:10 +09:00
Yoshiya Hinosawa
0f6d515c91
fix(ext/node): fix buffer.includes edge cases ( #29591 )
2025-06-04 14:39:27 +09:00
Yoshiya Hinosawa
ff8160b594
fix(ext/node): support DEP0005 deprecation warning ( #29530 )
...
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This commit adds support of `DEP0005` warning which is emitted when the user
calls `Buffer` as constructor.
2025-06-04 12:25:32 +09:00
Yoshiya Hinosawa
01a6379505
fix(ext/node): print warnings to stderr ( #29527 )
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-06-02 11:36:47 +09:00
Yoshiya Hinosawa
0a5bf5efd0
fix(ext/node): improve getaddrinfo compatibility ( #29501 )
...
This commit improves the compatibility of `cares_wrap` internal binding and
`getaddrinfo` function.
`cares_wrap.getaddrinfo` needs to be mocked in test case. This commit
enables it, and also fixes the 5th argument of `getaddrinfo`.
2025-06-02 11:34:36 +09:00
Divy Srivastava
342ea09135
fix(ext/node): stub getFipsCrypto
to false
( #29485 )
...
This makes Deno act as a non-FIPS compliant build of Node.js to node
modules.
2025-05-30 15:15:03 +09:00
Divy Srivastava
69eafe4814
fix(ext/node): prevent stdin double read ( #29353 )
...
Accidental debug code from
28cb8f7011
2025-05-17 17:17:39 +00:00
Divy Srivastava
28cb8f7011
fix: process.stdin.pause()
( #29330 )
2025-05-17 18:46:26 +05:30
Divy Srivastava
9cb72064d3
fix(ext/node): implement dgram setMulticastLoopback ( #29241 )
...
`npm:multicast-dns` works in Deno now.
Ref https://github.com/denoland/deno/issues/18324
2025-05-12 08:53:15 +05:30
Divy Srivastava
c27aaf9f26
fix(ext/node): implement dgram socket setMulticastTTL ( #29232 )
...
Ref https://github.com/ipfs/helia/issues/73#issuecomment-2864091259
2025-05-10 09:22:02 +05:30
Divy Srivastava
e2047941f7
fix(ext/node): dgram multicast group membership ( #29207 )
...
Closes https://github.com/denoland/deno/issues/28421
Ref https://github.com/denoland/deno/issues/18324
2025-05-08 22:07:40 +05:30
Divy Srivastava
f334f903ef
fix(ext/node): arrayBufferViewHasBuffer
internal util ( #28827 )
2025-05-08 09:58:08 +05:30
Divy Srivastava
802826e54e
fix(ext/node): implement dgram setBroadcast ( #29195 )
2025-05-08 09:03:43 +05:30
siaeyy
1a171f10df
fix(ext/node): handle "ttl" option in "dns" module ( #27676 )
...
Closes #27669
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-04-29 22:49:10 +00:00
Jim Buzbee
1feb2b6421
fix(ext/node): honor flags with respect to reuseAddress when binding to a UDP socket ( #28156 )
...
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2025-04-22 17:49:14 +09:00
Divy Srivastava
1e50c7981b
refactor(ext/node): rewrite HandleWrap in Rust ( #28765 )
...
Ports `HandleWrap` and `AsyncWrap` to Rust.
2025-04-10 17:20:25 +05:30
Yoshiya Hinosawa
f2d73abdd7
fix(ext/node): better dns.lookup compatibility ( #27936 )
2025-04-02 11:38:07 +09:00
Muthuraj Ramalingakumar
1a30b7450b
fix(ext/node): node compatibility issue missing fd in createServer callback socket object ( #27789 )
2025-02-26 14:52:18 +09:00
Kenta Moriuchi
8fb073d7b4
chore: Happy New Year 2025 ( #27509 )
2024-12-31 19:12:39 +00:00
Divy Srivastava
6061f22abd
fix(ext/node): RangeError timingSafeEqual with different byteLength ( #27470 )
...
Fixes https://github.com/denoland/deno/issues/27214
2024-12-27 11:20:49 +05:30
Satya Rohith
960776cd32
fix(ext/node): support createConnection option in node:http.request() ( #25470 )
...
This commit changes "node:http" module to add support
for the "createConnection" option when the "request()"
API is called.
Closes https://github.com/denoland/deno/issues/19507
---------
Signed-off-by: Yoshiya Hinosawa <stibium121@gmail.com>
Signed-off-by: Satya Rohith <me@satyarohith.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-12-13 01:44:42 +01:00
Divy Srivastava
1af2d2474e
fix(ext/node): tls.connect
socket upgrades ( #27125 )
...
Fixes https://github.com/denoland/deno/issues/27087
Fixes https://github.com/denoland/deno/issues/26685
Fixes https://github.com/denoland/deno/issues/26660
2024-11-28 17:59:20 +05:30
Yoshiya Hinosawa
c3c2b37966
fix(ext/node): add autoSelectFamily option to net.createConnection ( #26661 )
2024-11-12 19:54:47 +09:00
Kenta Moriuchi
fb1d33a711
chore: update dlint to v0.68.0 for internal ( #26711 )
2024-11-04 12:17:11 -05: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
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
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
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
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
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
Yoshiya Hinosawa
200145a09a
fix(ext/node): avoid showing UNKNOWN
error from TCP handle ( #25550 )
2024-09-11 19:19:02 +09:00
Luca Casonato
7bfcb4dd10
feat(cli): use NotCapable error for permission errors ( #25431 )
...
Closes #7394
---------
Co-authored-by: snek <snek@deno.com>
2024-09-10 11:12:24 -07:00