1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
Commit graph

10736 commits

Author SHA1 Message Date
Divy Srivastava
9f7586a206
fix(ext/node): implement os.machine (#21751) 2024-01-02 14:57:54 +01:00
Divy Srivastava
8e4feacd25
fix(ext/http): use arraybuffer binaryType for server websocket (#21741)
Ref
https://github.com/denoland/deno/issues/15340#issuecomment-1872353134
2024-01-02 10:30:09 +05:30
Divy Srivastava
642c4a44a5
fix(ext/node): querystring stringify without encode callback (#21740)
Fixes https://github.com/denoland/deno/issues/21734

Changes:
- Use default encode when options do not provide a encode callback.
- Remove internal TS for `node:querystring`. Its not helping catching
bugs like this because of invalid type assumptions and use of `any`,
more of a maintenance burden.
2024-01-02 04:54:11 +00:00
Divy Srivastava
b21462355a
Revert "fix(runtime): Make native modal keyboard interaction consistent with browsers" (#21739)
Reverts denoland/deno#18453

Fixes https://github.com/denoland/deno/issues/21602
https://github.com/denoland/deno/issues/21631
https://github.com/denoland/deno/issues/21641

Reasons for revert:
- alert() and confirm() swallowed ^C with raw mode.
- prompt() did not re-raise the interrupt signal from rustyline. 
- Default 'Y' on confirm() is a bad default and breaking change.

cc @lionel-rowe
2024-01-02 09:36:05 +05:30
林炳权
96b581bdd2
chore: update to Rust 1.75 (#21731) 2024-01-01 23:22:48 +01:00
David Sherret
7e72f3af61
chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
Raashid Anwar
8ba828b41e
fix(http_client): Fix Deno.createHttpClient to accept poolIdleTimeout parameter (#21603)
Fixed the bug `Deno.createHttpClient` to accept `poolIdleTimeout` parameter.

Fixes https://github.com/denoland/deno/issues/21546
2023-12-31 12:45:12 +00:00
Jovi De Croock
4339a6c55d
fix(node/zlib): consistently return buffer (#21747)
This fixes point 3 of https://github.com/denoland/deno/issues/20516

This PR creates consistency between the sync and async versions of the
brotli compress where we will always return a buffer like Node.
2023-12-31 17:23:09 +05:30
Jovi De Croock
08fc8d50e3
fix(node/zlib): cast Dataview and Buffer to uint8 (#21746)
This fixes point 2 of #20516 

This adds a conversion from Dataview/Buffer by returning `obj.buffer`
which can be converted to a `UInt8Array`.

Question: Regarding point 4 of the mentioned issue would it be
appropriate to copy the toU8 helper to the `zlib.mjs` methods?
2023-12-31 17:20:37 +05:30
Divy Srivastava
3db9c8742d
fix(ext/node): add process.abort() (#21742) 2023-12-30 20:30:55 +05:30
Divy Srivastava
a7b21760fc
chore(runtime): internalize pipe fd for ext/node (#21570)
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-12-30 05:32:30 +00:00
Leo Kettmeir
4de9ddcf21
chore: update deno_doc to 0.85.0 (#21678) 2023-12-30 00:04:50 +00:00
Joel Walker
4740929950
fix: Object.groupBy return type should be a partial (#21680)
Signed-off-by: Joel Walker <joelwalker1995@gmail.com>
2023-12-30 00:41:40 +01:00
Bartek Iwańczuk
fa3a12a805
chore: disable PTR_HOST dns test for Node compat (#21735)
These tests started failing on CI on Dec 28th, 2023 returning
ENOTFOUND. It's unclear what's going on, since `dig -x
8.8.8.8.in-addr.arpa`.

It needs a deeper investigation, but I want to unblock main branch
in the meantime.
2023-12-29 21:15:22 +00:00
Bartek Iwańczuk
1dd1aba244
fix(node): support nested tests in "node:test" (#21717)
Closes https://github.com/denoland/deno/issues/21679
2023-12-29 16:18:08 +01:00
Bartek Iwańczuk
576b20aa00
fix: allow npm: specifiers in import.meta.resolve (#21716)
Closes https://github.com/denoland/deno/issues/21298.

"npm:" specifiers are matched against import map entries
and if no match is found they are passed through.
2023-12-28 20:37:10 +01:00
Bartek Iwańczuk
f85d65e066
chore: update deno_core to 0.240.0 (#21726) 2023-12-28 19:30:07 +00:00
Divy Srivastava
c08319262a
fix(node): Implement os.cpus() (#21697)
Fixes https://github.com/denoland/deno/issues/21666

Zero added dependency and tries to match the libuv implementation
2023-12-28 09:08:50 +05:30
Nayeem Rahman
48dae2441c
perf(lsp): use LanguageServiceHost::getProjectVersion() (#21719) 2023-12-28 00:13:57 +00:00
Bartek Iwańczuk
c2414db1f6
refactor: simplify hyper, http, h2 deps (#21715)
Main change is that:
- "hyper" has been renamed to "hyper_v014" to signal that it's legacy
- "hyper1" has been renamed to "hyper" and should be the default
2023-12-27 11:59:57 -05:00
Bartek Iwańczuk
33acd437f5
refactor: finish test_util server cleanup, simplify dependencies (#21714)
Closes https://github.com/denoland/deno/issues/21578
2023-12-27 14:38:44 +01:00
Lino Le Van
d5f6e271ff
fix(ext/node): Implement aes-192-ecb and aes-256-ecb (#21710) 2023-12-27 17:24:52 +05:30
Bartek Iwańczuk
4f4dcf5291
refactor: rewrite remaining test server to Hyper 1.1 (#21708)
Ref https://github.com/denoland/deno/issues/21578
2023-12-27 11:45:12 +01:00
Matt Mastracci
0efe438f7c
perf: remove opAsync (#21690)
`opAsync` requires a lookup by name on each async call. This is a
mechanical translation of all opAsync calls to ensureFastOps.

The `opAsync` API on Deno.core will be removed at a later time.
2023-12-27 02:30:26 +01:00
Bartek Iwańczuk
e33c5eb704
refactor: fastwebsockets renames (#21707)
We now use only a single version of "fastwebsockets" crate, so we no
longer need to have an alias.
2023-12-26 21:53:28 +01:00
Bartek Iwańczuk
8fbac67395
refactor: change cli/ to use hyper 1.1 (#21705) 2023-12-26 14:32:21 +01:00
Bartek Iwańczuk
753777b4af
refactor: migrate ext/websocket to hyper 1.1 (#21699) 2023-12-26 11:20:49 +01:00
Bartek Iwańczuk
d1f4d81dcf
refactor: use hyper 1.0 in WS test server (#21698) 2023-12-25 17:38:48 +01:00
Divy Srivastava
60da9d493c
fix(ext/node): add ClientRequest#setNoDelay (#21694)
Fixes https://github.com/denoland/deno/issues/18316
2023-12-25 08:58:51 +05:30
Matt Mastracci
8702894feb
chore: bump deno_core (#21675) 2023-12-24 14:44:40 +01:00
Bartek Iwańczuk
e1bfb29868
refactor: use hyper 1.0 in grpc test server (#21584)
Ref https://github.com/denoland/deno/issues/21578
2023-12-24 14:14:29 +01:00
Matt Mastracci
92b2e28c64
chore: ensure that each op provided to ensureFastOps is only used once (#21689)
When we migrate to op-import-per-extension, we will want to ensure that
ops have one and only one place where they are imported. This tackles
the ops that are imported via `ensureFastOps`, but does not yet tackle
direct `ops` imports.

Landing ahead of https://github.com/denoland/deno_core/pull/393
2023-12-24 13:04:32 +00:00
Matt Mastracci
1297c9a8f3
chore(ext/node): use BufView natively in http2 (#21688)
Node HTTP/2 was using the default h2 `Bytes` datatype when we can be
making using of `BufView` like we do in `Deno.serve`.

`fetch` and `Deno.serverHttp` can't make use of `BufView` because they
are using `reqwest` which is stuck on hyper 0.x at this time.
2023-12-23 08:58:20 -07:00
Bartek Iwańczuk
36536c784c
refactor: upgrade inspector server to Hyper 1.1 (#21599)
This commit rewrites "runtime/inspector_server.rs" to use Hyper 1.1.

Now "deno_runtime" crate depends on both Hyper 1.x and 0.y versions.
2023-12-23 15:46:09 +00:00
Heyang Zhou
140e8becd0
feat(unstable): only allow http2 for kv remote backend (#21616) 2023-12-23 01:19:17 +08:00
Bartek Iwańczuk
cdbf902499
feat(lsp): allow to connect V8 inspector (#21482)
This commit adds a way to connect to the TS compiler host that is run
as part of the "deno lsp" subcommand. This can be done by specifying 
"DENO_LSP_INSPECTOR" variable.

---------

Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-12-22 02:04:02 +01:00
Bartek Iwańczuk
f86456fc26
chore: update ext/http to hyper 1.0.1 and http 1.0 (#21588)
Closes https://github.com/denoland/deno/issues/21583.
2023-12-22 01:54:28 +01:00
Heyang Zhou
3fb4f3fe5a
fix(unstable): kv watch should stop when db is closed (#21665)
Fixes #21634.
2023-12-22 05:04:17 +08:00
Bartek Iwańczuk
760af934d9
chore: forward v1.39.1 commit to main (#21667) (#21671)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2023-12-21 18:43:52 +00:00
Divy Srivastava
26cf06ed9f
fix(node): child_process kill cancel pending IPC reads (#21647) 2023-12-20 07:55:09 +05:30
Divy Srivastava
5aa27c45f1
fix(node): add crypto.pseudoRandomBytes (#21649) 2023-12-20 07:54:55 +05:30
Divy Srivastava
55fac9f5ea
fix(node): child_process IPC on Windows (#21597)
This PR implements the child_process IPC pipe between parent and child.
The implementation uses Windows named pipes created by parent and passes
the inheritable file handle to the child.

I've also replace parts of the initial implementation which passed the
raw parent fd to JS with resource ids instead. This way no file handle
is exposed to the JS land (both parent and child).

`IpcJsonStreamResource` can stream upto 800MB/s of JSON data on Win 11
AMD Ryzen 7 16GB (without `memchr` vectorization)
2023-12-19 13:37:22 +01:00
Julien Cayzac
aefa205f63
fix(devcontainer): moved settings to customizations/vscode (#21512)
The current configuration use the deprecated top-level `settings` and
`extensions` keys. Those are now under `customizations/vscode`.
2023-12-19 13:29:39 +01:00
Kenta Moriuchi
68241234fa
fix(console): inspect for {Set,Map}Iterator and Weak{Set,Map} (#21554) 2023-12-19 15:05:49 +09:00
Bartek Iwańczuk
476f5d3deb
fix(repl): remove stray debug log (#21635)
Left behind in #21623 by mistake.
2023-12-18 18:52:43 -07:00
Matt Mastracci
d51fda9e14
fix(ext/napi): don't close handle scopes in NAPI as the pointers are invalid (#21629)
`napi_open_handle_scope` was returning a bogus handle_scope and we were
trying to close it in `napi_close_handle_scope`.

This is a bit of a challenge to test, but the following testcase comes
from #21601 and appears to be fixed by this.

```
import { decode } from "https://deno.land/std@0.209.0/encoding/base64.ts";
import sharp from "npm:sharp";

const img = 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEWq09/P7Lz1AAAAH0lEQVRoge3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABmmDh1QAAAABJRU5ErkJggg==';
Deno.test("async", async () => {
  const id = setTimeout(() => Deno.exit(1), 1000);
  await sharp(decode(img)).toBuffer();
  await sharp(decode(img)).toBuffer();
  clearTimeout(id);
});
```
2023-12-18 08:48:52 -07:00
Yoshiya Hinosawa
6b482d7392
feat(coverage): add default coverage include dir (#21625) 2023-12-18 19:48:45 +09:00
Bartek Iwańczuk
5b2caed7fd
fix(coverage): error if no files found (#21615)
This commit fixes a panic in `deno coverage` command if the file
to be covered doesn't produce any coverage data.

Fixes https://github.com/denoland/deno/issues/21580
2023-12-18 11:43:27 +01:00
Bartek Iwańczuk
a44a5de430
refactor: factor out cdp::ExceptionThrown notification (#21623)
Just removing some duplicated code.
2023-12-18 11:43:02 +01:00
Raashid Anwar
9ede8d7b69
fix(bench): added group banner to bench output. (#21551)
Added group banner to bench output.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-17 22:57:14 +00:00