Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
21 changes: 21 additions & 0 deletions runtime/fundamentals/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,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
51 changes: 51 additions & 0 deletions runtime/reference/cli/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@ deno compile --allow-read --allow-net jsr:@std/http/file-server -p 8080
./file_server --help
```

## Framework detection

Starting in Deno 2.8, `deno compile .` (or `deno compile <directory>`) detects
common web frameworks and produces an entrypoint that knows how to start them.
The detected build script is run first, so the compiled binary always contains a
fresh build.

Supported frameworks:

- Next.js
- Astro
- Fresh (1.x and 2.x)
- Remix
- SvelteKit
- Nuxt
- SolidStart
- TanStack Start
- Vite (SSR mode)

```sh
# In a Next.js / Astro / Fresh / etc. project
deno compile .

# Or pointing at a specific app directory
deno compile ./apps/web
```

Generated entrypoints use `import.meta.dirname` so framework asset paths resolve
correctly against the [virtual filesystem](#including-data-files-or-directories)
inside the compiled binary.

If the project doesn't match any supported framework, `deno compile` will error
out.

## Cross Compilation

You can cross-compile binaries for other platforms by using the `--target` flag.
Expand Down Expand Up @@ -114,6 +148,23 @@ const dataFiles = Deno.readDirSync(import.meta.dirname + "/data");
Note this currently only works for files on the file system and not remote
files.

### Configuring `include` / `exclude` in `deno.json`

The `--include` and `--exclude` paths can be set declaratively in `deno.json` so
you don't have to repeat them on every `deno compile` invocation:

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

CLI flags are merged with the config: `--include` and `--exclude` add to the
lists in `deno.json` rather than replacing them.

## Workers

Similarly to non-statically analyzable dynamic imports, code for
Expand Down
77 changes: 77 additions & 0 deletions runtime/reference/web_platform_apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,83 @@ const worker = new Worker(import.meta.resolve("./worker.js"), {
});
```

## OffscreenCanvas

Starting in Deno 2.8, the
[`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas)
API is available. `OffscreenCanvas` is a canvas that lives outside any DOM and
can be used anywhere (including Web Workers) for off-thread rendering and image
generation.

### Supported rendering contexts

`OffscreenCanvas#getContext` accepts two of the spec-defined context ids:

- `"bitmaprenderer"`: returns an
[`ImageBitmapRenderingContext`](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapRenderingContext)
for displaying an `ImageBitmap` produced via `createImageBitmap`.
- `"webgpu"`: returns a
[`GPUCanvasContext`](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext)
for rendering with WebGPU.

Calling `getContext` with `"2d"`, `"webgl"`, or `"webgl2"` returns `null`; these
contexts are not implemented in Deno.

### Example: encoding an image to PNG

Decode an image into an `ImageBitmap`, place it on an `OffscreenCanvas` via the
`bitmaprenderer` context, and write the result to disk:

```ts
const data = await Deno.readFile("./input.jpg");
const bitmap = await createImageBitmap(new Blob([data]));

const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);
const ctx = canvas.getContext("bitmaprenderer")!;
ctx.transferFromImageBitmap(bitmap);

const blob = await canvas.convertToBlob({ type: "image/png" });
await Deno.writeFile(
"./output.png",
new Uint8Array(await blob.arrayBuffer()),
);
```

Typical uses:

- producing thumbnails, format conversions, or social-card images at request
time without spinning up a headless browser,
- running off-thread image work inside a Web Worker,
- driving WebGPU rendering targets that don't need a window.

## Geometry Interfaces

Starting in Deno 2.8, the
[Geometry Interfaces Module Level 1](https://drafts.fxtf.org/geometry/) types
are available as globals. These are the same types you'd find in a browser:

- [`DOMMatrix`](https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix) /
[`DOMMatrixReadOnly`](https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrixReadOnly):
4×4 transform matrices for 2D and 3D operations.
- [`DOMPoint`](https://developer.mozilla.org/en-US/docs/Web/API/DOMPoint) /
[`DOMPointReadOnly`](https://developer.mozilla.org/en-US/docs/Web/API/DOMPointReadOnly):
points in 2D / 3D space.
- [`DOMRect`](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect) /
[`DOMRectReadOnly`](https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly):
axis-aligned rectangles.
- [`DOMQuad`](https://developer.mozilla.org/en-US/docs/Web/API/DOMQuad): a
quadrilateral defined by four points.

```ts
const m = new DOMMatrix().translateSelf(10, 20).scaleSelf(2);
const p = new DOMPoint(1, 1).matrixTransform(m);
console.log(p.x, p.y); // 12 22
```

These types are useful for graphics work; applying transforms to canvas
drawings, computing layout math, or porting browser code that depends on
geometry types.

## Deviations of other APIs from spec

### Cache API
Expand Down
Loading