Commit graph

660 commits

Author SHA1 Message Date
Bartek Iwańczuk
a434ac2a1e
feat(unstable): use Node.js setTimeout and setInterval (#29993)
This commit repurposes `--unstable-node-globals` flag that was
deprecated
in https://github.com/denoland/deno/pull/29887 to switch out timers
implemention that is used.

Ie. using this flag cause `setTimeout`, `setInterval`, `clearTimeout`
and `clearInterval` globals to use functions from `node:timers` 
module instead of the Web version.

This is also enabled using `DENO_COMPAT=1` env var. 

TODO:
<s>make typechecking be conditional depending on this, most likely
requires
changes in our TS fork.</s> This has been deferred until Deno 3

Towards https://github.com/denoland/deno/issues/29703

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2025-09-09 00:48:58 +02:00
Bartek Iwańczuk
928f26db78
feat: V8 14.0.0 (#30629)
This commit updates V8 to version 14.0.0. This update brings
changes to Temporal support too, which is close to being stabilized.

---------

Co-authored-by: snek <snek@deno.com>
2025-09-08 22:12:54 +02:00
Nathan Whitaker
c76c3f7c13
feat(bundle): runtime API for deno bundle (#29949)
Some checks are pending
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 / test release macos-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-09-04 09:47:27 -07:00
Bartek Iwańczuk
9fac6ccb8b
feat(test): Add setup and teardown APIs to Deno.test API (#30504)
Some checks are pending
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
This commit adds `Deno.test.beforeAll`, `Deno.test.beforeEach`,
`Deno.test.afterAll` and `Deno.test.afterEach` APIs. 

These APIs can be used to perform setup and teardown for test cases. 

The API is similar to the Vitest API: https://vitest.dev/api/#setup-and-teardown, 
with the main difference being that that `before*` hooks don't return a cleanup
function.
2025-09-02 16:27:04 +02:00
David Sherret
ff8bdcd987
fix(compile): ensure Deno.build.standalone is set in workers (#30335)
Closes https://github.com/denoland/deno/issues/30318
2025-08-06 16:12:57 +02:00
Bartek Iwańczuk
dcdd1d6139
fix(ext/node): worker_threads handles basic require calls (#30279)
Some checks are pending
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (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 / 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 / publish canary (push) Blocked by required conditions
This is not a full-fledged and fully correct `require`/CJS support
for `node:worker_threads`, but unlocks certain scenarios that
were not working at all previously.
2025-08-02 11:27:06 +00:00
Bartek Iwańczuk
2d6a670af9
fix: global global should be writeable (#30032)
Some checks are pending
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
Closes https://github.com/denoland/deno/issues/30012

Makes `global` global a writeable property.
2025-07-08 13:18:44 +02:00
Leo Kettmeir
b59576cc0f
feat(unstable): tunnelling (#30022)
Co-authored-by: snek <snek@deno.com>
2025-07-08 02:44:50 +02:00
Simon Lecoq
7554b28a04
fix: support Deno.permissions.query({name:"import"}) (#29610)
Closes #27050
2025-06-26 22:13:56 +02:00
Bartek Iwańczuk
d4b02455df
feat: make setImmediate and clearImmediate as globals (#29877)
Some checks are pending
ci / build libs (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 / 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
Follow up to https://github.com/denoland/deno/pull/29323 and
https://github.com/denoland/deno/pull/29416.

This effort is to reduce a number of different globals available to user
code and npm dependencies. Also improves performance when these globals
are used.
This brings the number of "managed globals" down to 6. 

Towards https://github.com/denoland/deno/issues/29703
2025-06-25 15:21:10 +02:00
Bartek Iwańczuk
14f9d77f3d
feat(otel): stabilize OpenTelemetry support (#29822)
Some checks are pending
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
This commit stabilizes support for OpenTelemetry in Deno,
effectively removing the need to use `--unstable-otel` flag
or using `{ "unstable": ["otel"] }` option in the config file.

Supersedes https://github.com/denoland/deno/pull/29500
Closes https://github.com/denoland/deno/issues/29477
2025-06-24 16:49:04 +02:00
Bartek Iwańczuk
ed0c77edb3
feat: make 'Buffer' and 'global' available as globals (#29416)
Follow up to https://github.com/denoland/deno/pull/29323.

This effort is to reduce a number of different globals available to user
code and npm dependencies. Also improves performance when these globals
are used.

Towards https://github.com/denoland/deno/issues/29703
2025-06-24 14:31:06 +02:00
Bartek Iwańczuk
fd352537ce
feat: add DENO_AUTO_SERVE env var (#29852)
This commits adds `DENO_AUTO_SERVE` env var, that when specified
makes `deno run` behave like `deno serve` if the entrypoint satisfies
the `Deno.ServeDefaultExport` interface.
2025-06-24 11:05:59 +02:00
Luca Casonato
8362881c09
fix(ext/node): Module.wrap cleanup for npm:v8-code-cache (#29725)
This removes the additional arguments on the function returned by
`Module.wrap`.

Allow libraries that overwrite this behavior (like `v8-code-cache`) to
work correctly.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-17 02:32:10 +02:00
Bartek Iwańczuk
1f02d34877
fix: remove self from global middleware (#29734)
Follow up to https://github.com/denoland/deno/pull/29543 that does
the same for `self` global. Unfortunately this omission led to a problem
described in https://github.com/denoland/deno/issues/29726 where
packages started thinking that they are being run in a web worker
context (because they are!) but the expected "self" global is not
there.
2025-06-13 12:48:26 +02:00
Bartek Iwańczuk
1a8e5edd0f
fix: remove WorkerGlobalScope from global middleware (#29543)
Some checks are pending
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 wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This commit removes "WorkerGlobalScope" global from the "global
middleware" that we use to provide different set of globals to
user code and npm packages.

This is done, by renaming "WebWorkerType" to "WorkerThreadType"
and introducing a "Node" variant - this variant is used when creating
a worker using "node:worker_threads" module. This worker does
not have a "WorkerGlobalScope" (because it's not a Web Worker)
and the regular Web Worker created using "new Worker" does have
it.
2025-06-11 17:19:15 +02:00
David Sherret
e601df6bfb
fix: allow specifying otel config in --env-file (#29240)
Alternative to https://github.com/denoland/deno/pull/28127 that does cli
flag parsing, then env file loading, then resolves config with env vars.

This also fixes several other issues related to env vars in the
--env-file not being used for certain config.

Closes https://github.com/denoland/deno/issues/27851
Closes https://github.com/denoland/deno/issues/29171
Closes https://github.com/denoland/deno/pull/28127
Closes #29256
2025-05-11 21:09:52 -04: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
snek
bc1ced8260
refactor: allow lazy main module (#28929)
implement lazy(?) mode. an unconfigured jsruntime is created if
DENO_UNSTABLE_CONTROL_SOCK is present, and later passed into deno_runtime to be
configured and used.
2025-04-30 19:59:20 +00:00
Bartek Iwańczuk
189ccffdb9
feat: Codegen feature flags (#28920)
This commit adds "deno_features" crate that contains definitions of all
unstable features in Deno.

Based on these definitions, both Rust and JS code is generated ensuring
that the two are always in sync.

In addition some of flag handling was rewritten to use the generated
definitions, instead of hand rolling these flag definitions.

---------

Co-authored-by: snek <snek@deno.com>
2025-04-25 08:33:45 +00:00
Manish Sahani
252ea8e289
fix: remove unnecessary whitespace in prompt function (#28868) 2025-04-16 17:49:06 +00:00
Leo Kettmeir
066a205d5f
feat(unstable/webgpu): add deviceStartCapture and deviceStopCapture (#28192)
This is achieved by adding a new `Deno.webgpu` namespace which will be
used for non-spec functionality, which for now will be marked as
unstable
2025-04-16 17:26:28 +00:00
David Sherret
ef431b2336
feat(runtime): add Deno.build.standalone for telling if running in self-contained executable (#28750) 2025-04-15 17:44:28 +00:00
snek
e73ed03373
fix: vsock nits (#28851) 2025-04-11 12:11:03 -07:00
Divy Srivastava
8beb90cd65
fix(runtime): fix duplicate unstable ids for no-legacy-abort (#28740) 2025-04-04 06:40:51 +01:00
snek
27363d389d
refactor: internal logging utility (#28567)
`import.meta.log` enables basic log filtering through
`env_logger`/`DENO_LOG`. Log levels are supported, and filenames can
also be used. for example: `DENO_LOG=ext:deno_http::00_serve.ts=warn`
2025-03-21 12:17:50 +01:00
Ryan Dahl
4f738660b9
feat: support FORCE_COLOR (#28490)
fixes https://github.com/denoland/deno/issues/17229
2025-03-14 07:15:29 -07:00
Leo Kettmeir
17a51c401a
feat(jupyter): make GPUTexture and GPUBuffer displayable (#28117) 2025-02-18 00:29:45 -08:00
printfn
70d775c57d
fix(unstable/temporal): implement Temporal.ZonedDateTime.getTimeZoneTransition (#27770)
This patches Temporal to support the `getTimeZoneTransition` method on
`ZonedDateTime`.

See https://github.com/denoland/deno/issues/27731.

Co-authored-by: printfn <printfn@users.noreply.github.com>
2025-02-17 14:02:34 +00:00
Leo Kettmeir
7253820764
refactor: object wrap WebGPU (#27665)
Fixes #25874
Fixes #26760
Fixes #24288
Fixes #24798
Fixes #25627
Fixes #25915
Fixes #26769
2025-02-12 13:45:41 +00:00
Bartek Iwańczuk
d29f9f99dd
fix(lint): Deno.lint.runPlugin throws in deno run (#28063)
This commit changes `Deno.lint.runPlugin` to throw
in non-`deno test` subcommand, instead of returning
`undefined`.
2025-02-12 09:18:55 +00:00
Bartek Iwańczuk
f08ca6414b
feat(lint): add JavaScript plugin support (#27203)
This commit adds an unstable lint plugin API.

Plugins are specified in the `deno.json` file under
`lint.plugins` option like so:

```
{
  "lint": {
    "plugins": [
      "./plugins/my-plugin.ts",
      "jsr:@deno/lint-plugin1",
      "npm:@deno/lint-plugin2"
    ]
  }
}
```

The API is considered unstable and might be subject
to changes in the future.

Plugin API was modelled after ESLint API for the 
most part, but there are no guarantees for compatibility.
The AST format exposed to plugins is closely modelled
after the AST that `typescript-eslint` uses.

Lint plugins use the visitor pattern and can add
diagnostics like so:

```
export default {
  name: "lint-plugin",
  rules: {
    "plugin-rule": {
      create(context) {
        return {
          Identifier(node) {
            if (node.name === "a") {
              context.report({
                node,
                message: "should be b",
                fix(fixer) {
                  return fixer.replaceText(node, "_b");
                },
              });
            }
          },
        };
      },
    },
  },
} satisfies Deno.lint.Plugin;
```

Besides reporting errors (diagnostics) plugins can provide
automatic fixes that use text replacement to apply changes.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-02-05 16:59:24 +01:00
Hajime-san
1eb4142143
feat(ext/canvas): enhance createImageBitmap specification compliance (#25517) 2025-02-05 04:10:11 -08:00
Cyan
e6dda60d5c
feat: implement process.cpuUsage (Deno.cpuUsage) (#27217) 2025-01-30 17:23:05 +05:30
snek
0098fddb10
feat(unstable): WebTransport (#27431)
Initial implementation of WebTransport client and server!

This is very unstable because the interface should eventually shift to
use hyper (h3 is on the [2025
roadmap](https://hyper.rs/contrib/roadmap/)) instead of manually messing
with the the protocol, which will enable integration with
Deno.serveHttp/etc and allow WebTransport over h2. This will also let us
expose multiplexing.

WebTransport stats will be a followup due to their complexity.

Fixes: https://github.com/denoland/deno/issues/9017
2025-01-29 14:39:12 +00:00
Bartek Iwańczuk
0050857f51
refactor: add 'deno_process' crate (#27680)
Untangled the whole `runtime/ops/process.rs` from `ext/node/` and moved
to a separate `ext/process` crate.
2025-01-17 13:30:14 +01:00
Bartek Iwańczuk
974e2f44b2
refactor: add 'deno_os' crate (#27655)
This commit creates "deno_os" extension crate and moves
numerous ops from "runtime/" crate to the new crate.
2025-01-14 17:29:36 +01:00
snek
ccd375802a
refactor(quic): introduce endpoint, 0rtt, cleanup (#27444)
A QUIC endpoint is a UDP socket which multiplexes QUIC sessions, which
may be initiated in either direction. This PR exposes endpoints and
moves things around as needed.

Now that endpoints can be reused between client connections, we have a
way to share tls tickets between them and allow 0rtt. This interface
currently works by conditionally returning a promise.

Also cleaned up the rust op names, fixed some lingering problems in the
data transmission, and switched to explicit error types.
2025-01-06 15:24:59 +01:00
Kenta Moriuchi
8fb073d7b4
chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
Marvin Hagemeister
26425a137b
feat(unstable): add JS linting plugin infrastructure (#27416)
This PR extracts the core part of
https://github.com/denoland/deno/pull/27203 to make it easier to review
and land in parts.

It contains:
-  The JS plugin code the deserializes and walks the buffer
- The Rust portion to serialize SWC to the buffer format (a bunch of
nodes are still todos, but imo these can land anytime later)
- Basic lint plugin types, without the AST node types to make this PR
easier to review
- Added more code comments to explain the format etc.


More fixes and changes will be done in follow-up PRs.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-12-21 00:58:03 +01:00
snek
65b647909d
feat(unstable): Implement QUIC (#21942)
Implements a QUIC interface, loosely based on the WebTransport API (a
future change could add the WebTransport API, built on top of this one).

[quinn](https://docs.rs/quinn/latest/quinn/) is used for the underlying
QUIC implementation, for a few reasons:
- A cloneable "handle" api which fits quite nicely into deno resources.
- Good collaboration with the rust ecosystem, especially rustls.
- I like it.

<!--
Before submitting a PR, please read https://deno.com/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
2024-12-20 13:48:48 +01:00
Yoshiya Hinosawa
350d9dce41
fix(ext/node): do not exit worker thread when there is pending async op (#27378)
This change fixes the premature exit of worker threads when there are still
remaining pending ops.

This change reuses the idea of #22647 (unref'ing `op_worker_recv_message` in
worker threads if closeOnIdle specified) and uses
`web_worker.has_message_event_listener` check in the opposite way as
#22944. (Now we continue the worker when `has_message_event_listener` is
true instead of stopping it when `has_message_event_listener` is false.

closes #23061
closes #26154
2024-12-19 17:39:20 +09:00
ud2
25aed5071f
fix(unstable/temporal): respect locale in Duration.prototype.toLocaleString (#27000)
Adds a temporary polyfill for `Duration.prototype.toLocaleString()`
that will be removed once native support in V8 lands.
2024-12-05 13:55:50 +00:00
snek
e61cf8d7d6
refactor(unstable): move telemetry to own ext (#27067)
Move telemetry to its own ext to clean up some code and resolve circular
deps.
2024-11-26 11:22:18 +00:00
snek
d59bd5e8c9
feat(unstable): Instrument fetch (#27057)
Add basic tracing to `fetch`. Also fix span kinds so that we can
differentiate fetch and serve.
2024-11-25 16:38:07 +01:00
snek
8ea95c34b5
feat: Instrument Deno.serve (#26964)
Add basic trace to Deno.serve. Also updates a bit of the testing infra
to make it easier to deal with.
2024-11-25 10:45:06 +01:00
Bartek Iwańczuk
aa0ba6580e
fix: Buffer global in --unstable-node-globals (#26973) 2024-11-21 16:27:37 +00:00
Luca Casonato
594a99817c
feat(runtime): remove public OTEL trace API (#26854)
This PR removes the public Deno.tracing.Span API.
We are not confident we can ship an API that is
better than the `@opentelemetry/api` API, because
V8 CPED does not support us using `using` to
manage span context. If this changes, we can
revisit this decision. For now, users wanting
custom spans can instrument their code using
the `@opentelemetry/api` API and `@deno/otel`.

This PR also speeds up the OTEL trace generation
by a 30% by using Uint8Array instead of
strings for the trace ID and span ID.
2024-11-18 23:55:22 +00:00
Bartek Iwańczuk
a1bcdf17a5
feat(jupyter): Add Deno.jupyter.image API (#26284)
This commit adds `Deno.jupyter.image` API to display PNG and JPG images:

```
const data = Deno.readFileSync("./my-image.jpg");
Deno.jupyter.image(data);

Deno.jupyter.image("./my-image.jpg");
```
2024-11-16 15:13:50 +00:00
Marvin Hagemeister
de34c7ed29
feat(cli): add --unstable-node-globals flag (#26617)
This PR adds a new `--unstable-node-globals` flag to expose Node globals
by default.

Fixes https://github.com/denoland/deno/issues/26611

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-14 13:11:29 +00:00