Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a16a3d2
docs: document Geometry Interfaces (DOMMatrix, etc.) (2.8) (#3095)
lunadogbot May 5, 2026
6d0dd37
docs: document `compile.include` / `compile.exclude` config (#3088)
lunadogbot May 5, 2026
4b8d485
docs: document `OffscreenCanvas` (2.8) (#3084)
lunadogbot May 5, 2026
33148ac
docs: document framework detection in `deno compile` (2.8) (#3080)
lunadogbot May 5, 2026
635fc98
docs: document `deno doc npm:` / `deno doc jsr:` (2.8) (#3092)
lunadogbot May 20, 2026
23fe2be
docs: document Deno.test() timeout option (#3102)
bartlomieju May 20, 2026
63c5240
docs: add structured clone and transferable API reference (#3101)
bartlomieju May 20, 2026
1aae87a
docs: document `catalog:` protocol for workspace dependencies (2.8) (…
lunadogbot May 20, 2026
d4612e9
docs: document delta updates for `deno upgrade` (2.8) (#3064)
lunadogbot May 20, 2026
0060d79
docs: mark `no-process-global` and `no-node-globals` as opt-in (2.8) …
lunadogbot May 20, 2026
901978f
docs: document additional Windows signals (#3094)
lunadogbot May 20, 2026
b87334e
docs: document `deno eval` CJS/ESM auto-detection (#3091)
lunadogbot May 20, 2026
1e58be1
docs: document `DENO_AUDIT_PERMISSIONS=otel` (#3090)
lunadogbot May 20, 2026
83b1792
docs: document OTLP gRPC exporter (#3083)
lunadogbot May 20, 2026
78ce3a8
docs: add `deno bump-version` reference page (2.8) (#3066)
lunadogbot May 20, 2026
e5e2836
docs: document `deno x --package` flag (2.8) (#3082)
lunadogbot May 20, 2026
6aee98e
docs: document hoisted node_modules linker mode (2.8) (#3097)
lunadogbot May 20, 2026
c8e1475
docs: document function coverage in `deno coverage` (#3093)
lunadogbot May 20, 2026
9754999
docs: document `import defer` syntax (2.8) (#3067)
lunadogbot May 20, 2026
d975f0a
docs: resource/op sanitizers off by default in `deno test` (2.8) (#3072)
lunadogbot May 20, 2026
299f61b
docs: add `deno why` reference page (2.8) (#3069)
lunadogbot May 20, 2026
5840545
docs: add `deno pack` reference page (2.8) (#3070)
lunadogbot May 20, 2026
78ed3c3
docs: document `NODE_EXTRA_CA_CERTS` (2.8) (#3081)
lunadogbot May 20, 2026
67e0190
docs: document `deno audit --fix` (#3078)
lunadogbot May 20, 2026
0c203ec
docs: document `deno upgrade pr` (2.8) (#3087)
lunadogbot May 20, 2026
2a39828
docs: add deno ci reference page (#3141)
bartlomieju May 20, 2026
72f624e
docs: document `--package-json` flag (2.8) (#3075)
lunadogbot May 20, 2026
04b7e27
docs: add `deno transpile` reference page (2.8) (#3071)
lunadogbot May 20, 2026
d966847
docs: note Node.js `Timeout` return for global timers (2.8) (#3068)
lunadogbot May 20, 2026
e9d51e6
docs: document `deno install --os` and `--arch` (2.8) (#3076)
lunadogbot May 20, 2026
9530f1d
docs: add module customization hooks reference page (#3099)
bartlomieju May 20, 2026
0793852
docs: expand CPU profiling documentation (#3013)
bartlomieju May 20, 2026
d877d44
docs: document --prod and --skip-types flags for deno install (#3021)
bartlomieju May 20, 2026
45ed008
docs: update first-project guide for new `deno init` template (2.8) (…
lunadogbot May 20, 2026
a474b34
docs: npm prefix optional, .npmrc additions, file:/link: skip (2.8) (…
bartlomieju May 20, 2026
f6b3245
docs: text imports are stable in 2.8 (bytes still require flag) (#3144)
bartlomieju May 20, 2026
c214c42
docs: misc 2.8 gaps (lib.node, task prefixes, watch, Cache keys, comp…
bartlomieju May 20, 2026
582ce7e
docs: document Network tab debugging for fetch/WebSocket (2.8) (#3143)
bartlomieju May 20, 2026
93dc2ba
Merge main into 2.8
bartlomieju May 20, 2026
ae15fe4
docs: deno fmt
bartlomieju May 20, 2026
df496d0
docs: cross-link 2.8 new features with related pages
bartlomieju May 20, 2026
3f9f8c0
docs: link bare Deno.* API references to /api/deno/
bartlomieju May 20, 2026
0ce1375
docs: regenerate _commands_reference.json from Deno 2.8 canary
bartlomieju May 20, 2026
b6bd0e2
docs: flesh out deno ci, pack, transpile, why reference pages
bartlomieju May 20, 2026
097d6ed
docs: remove manual flag tables (auto-rendered from _commands_referen…
bartlomieju May 20, 2026
2673b76
docs(docker): split dependency install for better layer caching (#3030)
bartlomieju May 21, 2026
0d6c7a8
Merge remote-tracking branch 'origin/main' into 2.8
bartlomieju May 21, 2026
dad089b
docs: document set -e/errexit and : null command in deno task shell (…
bartlomieju May 22, 2026
06eba79
docs: document deno bump-version workspace and Conventional Commits m…
bartlomieju May 22, 2026
6d98c97
Merge remote-tracking branch 'origin/main' into 2.8
bartlomieju May 22, 2026
397a75d
fmt
bartlomieju May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions api/web/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,55 @@ Deno supports a comprehensive set of web standard APIs:
- **[Timers](/api/web/~/setTimeout)** - setTimeout, setInterval, and
setImmediate

### Structured Clone & Transferable Objects

Deno supports [`structuredClone()`](/api/web/~/structuredClone) and
[`postMessage()`](/api/web/~/Worker) for cloning and transferring objects across
contexts (e.g. between the main thread and Web Workers).

#### Serializable types

These types can be cloned with `structuredClone()` and sent via `postMessage()`:

| Type | Notes |
| ----------------------------------------- | -------------------------------------------------------------------------------------------- |
| Primitives | `string`, `number`, `boolean`, `null`, `undefined`, `bigint` |
| `Array`, `Object`, `Map`, `Set` | Including nested structures and circular references |
| `Date`, `RegExp` | |
| `ArrayBuffer`, `TypedArray`, `DataView` | Copied by default, or transferred (see below) |
| `Error` types | `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, `URIError` |
| [`Blob`](/api/web/~/Blob) | Requires Deno 2.8+ |
| [`File`](/api/web/~/File) | Requires Deno 2.8+ |
| [`DOMException`](/api/web/~/DOMException) | |
| [`CryptoKey`](/api/web/~/CryptoKey) | |

#### Transferable types

These types can be _transferred_ (not copied) via the `transfer` option in
`structuredClone()` or the `transfer` list in `postMessage()`. After transfer,
the original object becomes unusable:

| Type | Notes |
| ----------------------------------------------- | ---------------------------------------- |
| [`ArrayBuffer`](/api/web/~/ArrayBuffer) | Moves the backing memory to the receiver |
| [`MessagePort`](/api/web/~/MessagePort) | Transfers the port to another context |
| [`ReadableStream`](/api/web/~/ReadableStream) | Transfers the stream to another context |
| [`WritableStream`](/api/web/~/WritableStream) | Transfers the stream to another context |
| [`TransformStream`](/api/web/~/TransformStream) | Transfers the stream to another context |

```ts
// Clone a Blob
const blob = new Blob(["hello"], { type: "text/plain" });
const cloned = structuredClone(blob);
console.log(await cloned.text()); // "hello"

// Transfer an ArrayBuffer through a MessageChannel
const buffer = new ArrayBuffer(1024);
const ch = new MessageChannel();
ch.port1.postMessage(buffer, [buffer]);
// buffer.byteLength is now 0 (transferred)
```

## Key Benefits

- **Standards Compliance**: APIs follow WHATWG and W3C specifications
Expand Down
7 changes: 4 additions & 3 deletions examples/scripts/importing_text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
* @title Importing text files
* @difficulty beginner
* @tags cli
* @run --unstable-raw-imports https://docs.deno.com/examples/scripts/importing_text.ts
* @run <url>
* @resource {https://github.com/whatwg/html/issues/9444} HTML specification proposal
* @group Unstable APIs
* @group Basics
*
* Text files can be imported in JS and TS files using the `import` keyword.
* This makes including static data in a library much easier.
*
* Using this feature requires `--unstable-raw-imports` CLI flag.
* Stable as of Deno 2.8 — no flag required. (Binary `bytes` imports are still
* experimental and require `--unstable-raw-imports`.)
*/

// File: ./main.ts
Expand Down
21 changes: 19 additions & 2 deletions examples/tutorials/os_signals.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified: 2025-03-10
last_modified: 2026-05-20
title: "Handle OS signals"
description: "Tutorial on handling operating system signals in Deno. Learn how to capture SIGINT and SIGBREAK events, manage signal listeners, and implement graceful shutdown handlers in your applications."
url: /examples/os_signals_tutorial/
Expand All @@ -8,7 +8,9 @@ oldUrl:
- /runtime/tutorials/os_signals/
---

> ⚠️ Windows only supports listening for SIGINT and SIGBREAK as of Deno v1.23.
> ⚠️ Windows supports listening for `SIGINT`, `SIGBREAK`, `SIGTERM`, `SIGQUIT`,
> `SIGHUP`, and `SIGWINCH` (all except `SIGINT`/`SIGBREAK` go through libuv's
> Windows signal emulation).

## Concepts

Expand Down Expand Up @@ -75,3 +77,18 @@ Run with:
```shell
deno run signal_listeners.ts
```

## Windows support

The supported signal set differs between platforms. The Windows-specific
behavior is:

| Use case | Supported signals on Windows |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `Deno.addSignalListener(sig, …)` | `SIGINT`, `SIGBREAK`, `SIGTERM`, `SIGQUIT`, `SIGHUP`, `SIGWINCH` |
| `Deno.kill(pid, sig)` | `SIGINT`, `SIGBREAK`, `SIGTERM`, `SIGQUIT`, `SIGHUP`, `SIGWINCH`, `SIGKILL`, `SIGABRT`, plus signal `0` for a process-health check |

`SIGKILL` and `SIGABRT` are deliberately **not** registerable via
`addSignalListener` — they're uncatchable / fatal, matching Unix semantics. On
Windows the catchable signals all forward to libuv's emulation layer; signals
sent via `Deno.kill` ultimately invoke `TerminateProcess`.
15 changes: 14 additions & 1 deletion lint/rules/no-node-globals.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
tags: [recommended]
tags: []
---

Disallows the use of NodeJS global objects.
Expand All @@ -8,6 +8,19 @@ NodeJS exposes a set of global objects that differs from deno (and the web), so
code should not assume they are available. Instead, import the objects from
their defining modules as needed.

This rule is **off by default** as of Deno 2.8. To opt in, add it to your
`deno.json`:

```json
{
"lint": {
"rules": {
"include": ["no-node-globals"]
}
}
}
```

**Invalid:**

```typescript
Expand Down
15 changes: 14 additions & 1 deletion lint/rules/no-process-global.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
tags: [recommended]
tags: []
---

Disallows the use of NodeJS `process` global.
Expand All @@ -8,6 +8,19 @@ NodeJS and Deno expose `process` global but they are hard to statically analyze
by tools, so code should not assume they are available. Instead,
`import process from "node:process"`.

This rule is **off by default** as of Deno 2.8. To opt in, add it to your
`deno.json`:

```json
{
"lint": {
"rules": {
"include": ["no-process-global"]
}
}
}
```

**Invalid:**

```typescript
Expand Down
24 changes: 24 additions & 0 deletions runtime/_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export const sidebar = [
title: "deno bench",
href: "/runtime/reference/cli/bench/",
},
{
title: "deno bump-version",
href: "/runtime/reference/cli/bump_version/",
},
{
title: "deno bundle",
href: "/runtime/reference/cli/bundle/",
Expand All @@ -124,6 +128,10 @@ export const sidebar = [
title: "deno check",
href: "/runtime/reference/cli/check/",
},
{
title: "deno ci",
href: "/runtime/reference/cli/ci/",
},
{
title: "deno clean",
href: "/runtime/reference/cli/clean/",
Expand Down Expand Up @@ -184,6 +192,10 @@ export const sidebar = [
title: "deno outdated",
href: "/runtime/reference/cli/outdated/",
},
{
title: "deno pack",
href: "/runtime/reference/cli/pack/",
},
{
title: "deno publish",
href: "/runtime/reference/cli/publish/",
Expand Down Expand Up @@ -220,6 +232,10 @@ export const sidebar = [
title: "deno test",
href: "/runtime/reference/cli/test/",
},
{
title: "deno transpile",
href: "/runtime/reference/cli/transpile/",
},
{
title: "deno types",
href: "/runtime/reference/cli/types/",
Expand All @@ -240,6 +256,10 @@ export const sidebar = [
title: "deno unstable flags",
href: "/runtime/reference/cli/unstable_flags/",
},
{
title: "deno why",
href: "/runtime/reference/cli/why/",
},
{
title: "deno x",
href: "/runtime/reference/cli/x/",
Expand Down Expand Up @@ -330,6 +350,10 @@ export const sidebar = [
title: "Lint plugins",
href: "/runtime/reference/lint_plugins/",
},
{
title: "Module customization hooks",
href: "/runtime/reference/module_hooks/",
},
{
title: "WebAssembly",
href: "/runtime/reference/wasm/",
Expand Down
21 changes: 21 additions & 0 deletions runtime/fundamentals/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,27 @@ this requires an explicit opt-in with `-P` and is not loaded by default.

If you're ok with this risk, then this feature will be useful for you.

## Compile config

The `"compile"` block configures
[`deno compile`](/runtime/reference/cli/compile/) without requiring you to
repeat flags on every invocation. You can declare which extra files or
directories to bundle into the executable, and which paths to exclude:

```jsonc title="deno.json"
{
"compile": {
"include": ["names.csv", "data", "worker.ts"],
"exclude": ["data/secrets", "**/*.test.ts"]
}
}
```

`--include` and `--exclude` flags on the command line are merged with these
lists rather than replacing them. The `"compile"` block can also carry
`permissions` (see
[Test, bench, and compile permissions](#test-bench-and-compile-permissions)).

## An example `deno.json` file

```json
Expand Down
Loading
Loading