Commit graph

13629 commits

Author SHA1 Message Date
Bartek Iwańczuk
6bbba3c348
fix(ext/node): add assert.CallTracker (#29226) 2025-05-09 14:55:28 +00:00
Bartek Iwańczuk
784be1511b
test: Capture output of failing node compat tests (#29227)
Will actually show test error instead of "error: Test failed"
2025-05-09 16:16:25 +02:00
Bartek Iwańczuk
9538acb68d
ci: fix uploading canary, again (#29234) 2025-05-09 16:14:13 +02:00
Cyan
5cd03feb0d
chore: optimize op_runtime_cpu_usage and op_runtime_memory_usage (#29179)
Ref https://github.com/denoland/deno/pull/27217

> `op_runtime_cpu_usage` can be optimized by accepting a `&mut [u32]`
instead of returning a serde tuple but it can be done as a follow up.

Accept a `&mut [u32]` instead of serde tuple for `op_runtime_cpu_usage`
and `op_runtime_memory_usage`

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-09 16:00:35 +05:30
Bartek Iwańczuk
67c7f1ba17
ci: fix uploading canary (#29223) 2025-05-09 01:57:19 +02:00
David Sherret
cd877fd16f
fix(node/test): basic support for t.skip and t.todo (#29222)
Adds basic support for `t.skip` and `t.todo`
2025-05-09 01:40:16 +02:00
Elias Rhouzlane
9188c79ab4
fix(cli/hmr): print compile error with exception details (#27597)
Fix https://github.com/denoland/deno/issues/27577

---------

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-05-08 23:39:31 +00:00
David Sherret
a834d6ad96
fix(npm): add some context to errors on tarball extraction failure (#29145)
Noticed this while working on a different PR.
2025-05-08 22:06:19 +00:00
Jonh Alexis
f8615e404c
fix(fmt): indent width should be ignored when formatting with use tabs set to true (#29205) 2025-05-08 22:00:13 +00:00
Nayeem Rahman
ef315b56c2
fix: handling of contradictory global permission flags (#29213) 2025-05-08 23:24:35 +02:00
ud2
2211bb4e67
fix(dts): add Atomics.pause, Promise.try and RegExp.escape (#29186) 2025-05-08 23:16:35 +02:00
snek
c28cb56357
fix: inspector rewrite resource name to url (#29216)
Fixes: https://github.com/denoland/deno/issues/27003
2025-05-08 21:12:54 +00:00
Marvin Hagemeister
c015b8affd
feat(unstable): support comments in lint plugin (#29189)
This PR adds support for comments in the AST for lint plugins.

- The `Program` node has a `comments` field pointing to an array of all
comments.
- `SourceCode.getAllComments()`: Returns all comments (same as
`program.comments`)
- `SourceCode.getCommentsBefore(node)`: Get all comments before this
Node
- `SourceCode.getCommentsAfter(node)`: Get all comments after this Node
- `SourceCode.getCommentsInside(node)`: Get all comments inside this
Node

ESLint docs:
-
https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code
- https://eslint.org/docs/latest/extend/custom-rules#accessing-comments
2025-05-08 21:59:36 +02:00
Yoshiya Hinosawa
e1e67a703c
chore: specify python versions in node_compat_test workflow (#29214) 2025-05-09 04:55:27 +09:00
Bartek Iwańczuk
90274065ff
ci: make uploading canary less racy, take 2 (#25751)
Another try at https://github.com/denoland/deno/issues/25464
using a Deno script.
2025-05-08 21:04:24 +02:00
Divy Srivastava
9d0a833e7b
fix: bump default @types/node version range to 22.15.14 (#28407)
Fixes https://github.com/denoland/deno/pull/28168#discussion_r1982740706

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-05-08 17:44:22 +00:00
Marvin Hagemeister
ed55e915a2
fix(node:http): ServerResponse.req not set (#29211)
This PR sets `ServerRsposne.req` properly. See
e38ce27f3c/lib/_http_server.js (L201)

Fixes https://github.com/denoland/deno/issues/29209
2025-05-08 18:42:04 +02:00
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
Satya Rohith
5f139910a1
fix(ext/node): support http over unix sockets (#29182)
Closes https://github.com/denoland/deno/issues/20255

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-08 22:07:28 +05:30
Nayeem Rahman
59ffc1987c
fix(lsp): discard quick fixes importing /node_modules/ paths (#29194) 2025-05-08 17:08:10 +01:00
Nayeem Rahman
fc74cfe885
fix(lsp): use correct resolution kind when checking for no-export-npm (#29180) 2025-05-08 16:30:15 +01:00
James Bronder
ac42843157
fix(ext/node): use primordials in ext/node/polyfills/internal/dgram.ts (#29204)
Towards #24236. Replaces `Symbol` as well as as `Function` and `Map`
instance methods with the primordial equivalents. A "prefer-primordial"
ignore comment was added to the `handle.bind` method call within the
`_createSocketHandle` function since this is a method call on a `UDP`
instance instead of a `bind` call on a `Function` object.

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-08 16:03:55 +02:00
Hajime-san
53b51113f5
fix(ext/canvas): createImageBitmap must ignore the Blob.type value (#28741)
fixes https://github.com/denoland/deno/issues/28723

I might misunderstood the spec. We should always sniff the MIME type
from the byte sequence when the input is `Blob`.
2025-05-08 15:57:28 +02:00
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
zino
d67da9d4e7
feat(ext/fetch): support custom DNS resolver (#27740)
- Declare a new trait `Resolve` whose only method resolves a `Name` into
`Result<SocketAddrs, io::Error>` asynchronously.
- Add a new variant to `Resolver` encapsulating a custom DNS resolver,
and modify `Resolver`'s implementation of `Service<Name>` accordingly.
- This new feature is tested in ext/fetch/dns.rs

Fix #27739.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-05-07 17:21:42 +00:00
David Sherret
d372c0d607
refactor: move more code into ResolverFactory (#29202)
1. Renames `DenoResolver` to `RawDenoResolver`
2. Renames `DenoGraphResolver` to `DenoResolver`
3. Shifts down creation of `DenoGraphResolver` and
`HasPackageJsonDepFlag` to `ResolverFactory`
2025-05-07 16:07:51 +00:00
Lino Le Van
49d19d718e
fix(types): Change ffi native type from Uint8Array -> Uint8Array<ArrayBuffer> (#29127)
This was missed in the TypeScript 5.7 migration PR
(https://github.com/denoland/deno/pull/27857).
2025-05-07 17:53:27 +02:00
Nayeem Rahman
4c8b208c6c
perf(lsp): don't diff 10,000+ line files for formatting (#29162) 2025-05-07 16:51:04 +01:00
Marvin Hagemeister
9c5122ef58
fix(precompile): escape string literal jsx children (#29200)
Fixes https://github.com/denoland/deno_ast/pull/304 .

This only affects actual string literals in the source code inside a JSX
expression.
2025-05-07 15:42:15 +00:00
Nayeem Rahman
be294f3319
perf(lsp): truncate json files larger than 10mb (#29192) 2025-05-07 15:05:06 +01:00
James Bronder
f3943bf6e3
fix(ext/node): use primordials in ext/node/polyfills/internal/idna.ts (#29085)
Towards #24236. This PR replaces JS built-ins, `String` and `Array`,
with the primordial versions.
2025-05-07 16:01:03 +02:00
Efe
cf8b9778d9
fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_mkdtemp.ts (#29072)
Towards #24236
2025-05-07 16:00:26 +02:00
James Bronder
e498e7d7e6
fix(ext/node): use primordials in ext/node/polyfills/internal/async_hooks.ts (#29191)
Towards #24236. Replaces `Symbol` as well as `Array` and `Function`
methods with their primordial equivalents.
2025-05-07 14:19:26 +02:00
MikaelUrankar
5bd03ccc46
fix(ext/os): Fix duplicate 'openbsd' cfg attribute (#28607)
Use FreeBSD instead as it needs the same fix.

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-05-07 14:12:06 +02:00
Satya Rohith
19c5cca65e
fix(ext/process): suppress child process kill errors in onAbort handler (#29193)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-07 05:26:58 +00:00
dependabot[bot]
8e9db221ed
chore(deps): bump crossbeam-channel from 0.5.12 to 0.5.15 (#28835) 2025-05-06 23:12:46 +00:00
David Sherret
3a13653a21
refactor: move CjsTracker to ResolverFactory (#29188) 2025-05-06 22:07:46 +00:00
Divy Srivastava
5b037f1bed
fix(ext/node): getColorDepth for writable stdio streams (#29176)
Fixes https://github.com/denoland/deno/issues/28605
Fixes https://github.com/denoland/deno/issues/29175

` ../deno/target/debug/deno run -A npm:create-vue@latest DIR` works now
2025-05-06 21:42:14 +05:30
snek
842a07710f
fix: terminate control sock event with newline (#29184)
these should be newline terminated
2025-05-06 14:51:40 +00:00
nana4gonta
730f48b170
fix(ext/node): Support mTLS connections node compatibility (#28937)
Support for running Node.js code that requires mTLS connections on Deno.

Ref #21497 

Closes https://github.com/denoland/deno/issues/26472
Closes https://github.com/denoland/deno/issues/29148

---------

Co-authored-by: Satya Rohith <me@satyarohith.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-06 14:25:18 +05:30
Divy Srivastava
2edc70e679
fix(ext/node): Fix dns.lookup when promisified with options.all (#29167)
Fixes https://github.com/denoland/deno/issues/29074

Co-authored-by: Satya Rohith <me@satyarohith.com>
2025-05-06 09:16:00 +05:30
Bartek Iwańczuk
d8857b9aee
fix(fmt): upgrade markup_fmt and malva (#29168)
Closes https://github.com/denoland/deno/issues/29034
2025-05-05 15:39:22 -05:00
snek
5c6c52d132
fix: update deno_core (#29166)
for https://github.com/denoland/deno_core/pull/1111
2025-05-05 13:58:34 -05:00
snek
f47c4ea5e7
feat(unstable): notify control sock on serving (#29173)
send an event over the control socket when deno.serve is listening.
2025-05-05 17:27:17 +00:00
snek
b6d1d5931a
feat: support unconfigured runtime in serve subcommand (#29172)
Support the unconfigured runtime when using `deno serve`.
2025-05-05 16:08:10 +00:00
Timothy J. Aveni
9f363c0b96
docs: remove quotes around undefined in Deno.env.get example (#29159)
`Deno.env.get` returns undefined when the environment variable is not
present. I initially interpreted this doc string to indicate that it
would return the string literal `"undefined"`, which isn't right.

Could use backticks here as above, but a little confusing in a JS
context where this also indicates a (template) string literal.
2025-05-04 21:20:41 +02:00
David Sherret
9102d4f26d
chore: try reverting tarball unpack change (#29156)
Seems https://github.com/denoland/deno/pull/29138 broke
https://github.com/dsherret/ts-ast-viewer/pull/167

I don't see anything else in that PR that could have caused this strange
error, so going to try this change. I'm also not able to reproduce
locally.
2025-05-04 09:26:02 -05:00
David Sherret
7ae0f14a90
refactor(deno_resolver): extract out CLI's deno_graph::source::Resolver (#29143) 2025-05-03 15:44:08 -04:00
David Sherret
f42cb0816e
refactor: ability for deno_npm_cache to compile to Wasm (#29138)
More work towards getting Deno's crates working from JavaScript.
2025-05-02 16:52:40 -04:00