Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 6c26e32

Browse files
committed
Bump versions to 2.4.0, update CHANGELOG.md and docs
1 parent bce7ecf commit 6c26e32

File tree

29 files changed

+443
-366
lines changed

29 files changed

+443
-366
lines changed

docs/CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# 🚧 Changelog
22

3+
## 2.4.0
4+
5+
### Features
6+
7+
- Add support for `[text_blobs]`. Closes
8+
[issue #211](https://github.com/cloudflare/miniflare/issues/211), thanks
9+
[@caass](https://github.com/caass) for
10+
[the PR](https://github.com/cloudflare/miniflare/pull/228).
11+
- Add support for `[data_blobs]`. Closes
12+
[issue #231](https://github.com/cloudflare/miniflare/issues/231), thanks
13+
[@threepointone](https://github.com/threepointone) for
14+
[the PR](https://github.com/cloudflare/miniflare/pull/232).
15+
- Do not display the pretty error page when making requests with `curl`. Closes
16+
[issue #198](https://github.com/cloudflare/miniflare/issues/198), thanks
17+
[@GregBrimble](https://github.com/GregBrimble) for
18+
[the PR](https://github.com/cloudflare/miniflare/pull/210).
19+
20+
### Fixes
21+
22+
- Pass correctly-typed value to `webcrypto.getRandomValues()`. Closes
23+
[issue #188](https://github.com/cloudflare/miniflare/issues/188), thanks
24+
[@vlovich](https://github.com/vlovich).
25+
- Fix `fetch` with `Content-Length: 0` header. Closes
26+
[issue #193](https://github.com/cloudflare/miniflare/issues/193), thanks
27+
[@orls](https://github.com/orls) for
28+
[the PR](https://github.com/cloudflare/miniflare/pull/204).
29+
- Bind `this` to `webcrypto` methods, fixing `crypto.getRandomValues()` and
30+
`crypto.subtle.generateKey()`. Thanks [@szkl](https://github.com/szkl) for
31+
[the PR](https://github.com/cloudflare/miniflare/pull/216).
32+
333
## 2.3.0
434

535
### Features

docs/src/content/core/variables-secrets.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,36 @@ const mf = new Miniflare({
7373

7474
</ConfigTabs>
7575

76+
## Text and Data Blobs
77+
78+
Text and data blobs can be loaded from files. File contents will be read and
79+
bound as `string`s and `ArrayBuffer`s respectively.
80+
81+
<ConfigTabs>
82+
83+
```sh
84+
$ miniflare --text-blob text.txt --data-blob data.bin
85+
```
86+
87+
```toml
88+
---
89+
filename: wrangler.toml
90+
---
91+
[text_blobs]
92+
TEXT = "text.txt"
93+
[data_blobs]
94+
DATA = "data.bin"
95+
```
96+
97+
```js
98+
const mf = new Miniflare({
99+
textBlobBindings: { TEXT: "text.txt" },
100+
dataBlobBindings: { DATA: "data.bin" },
101+
});
102+
```
103+
104+
</ConfigTabs>
105+
76106
## Bindings Priority
77107

78108
Higher priority bindings override lower priority bindings with the same name.
@@ -81,7 +111,9 @@ The order (from lowest to highest priority) is:
81111
1. Variables from `wrangler.toml` `[vars]`
82112
2. Variables from `.env` files
83113
3. WASM module bindings (`--wasm`, `[wasm_modules]`)
84-
4. Custom bindings (`--binding`, `bindings`)
114+
4. Text blob bindings (`--text-blob`, `[text_blobs]`)
115+
5. Data blob bindings (`--data-blob`, `[data_blobs]`)
116+
6. Custom bindings (`--binding`, `bindings`)
85117

86118
## Globals
87119

docs/src/content/get-started/api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@ const mf = new Miniflare({
468468
bindings: { SECRET: "sssh" }, // Binds variable/secret to environment
469469
globals: { LOG: () => console.log("magic") }, // Binds variable/secret to global scope
470470
wasmBindings: { ADD_MODULE: "./add.wasm" }, // WASM module to bind
471+
textBlobBindings: { TEXT: "./text.txt" }, // Text blob to bind
472+
dataBlobBindings: { DATA: "./data.bin" }, // Data blob to bind
471473
});
472474

473475
await mf.reload(); // Reload scripts and configuration files

docs/src/content/get-started/cli.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ Bindings Options:
295295
-b, --binding Binds variable/secret to environment [array:KEY=VALUE]
296296
--global Binds variable/secret to global scope [array:KEY=VALUE]
297297
--wasm WASM module to bind [array:NAME=PATH]
298+
--text-blob Text blob to bind [array:NAME=PATH]
299+
--data-blob Data blob to bind [array:NAME=PATH]
300+
-S, --service Mounted service to bind [array:NAME=MOUNT[@ENV]]
298301
```
299302

300303
### Wrangler Configuration
@@ -348,6 +351,10 @@ globs = ["**/*.js"]
348351

349352
[wasm_modules] # --wasm
350353
MODULE = "module.wasm"
354+
[text_blobs] # --text-blob
355+
TEXT = "text.txt"
356+
[data_blobs] # --data-blob
357+
DATA = "data.bin"
351358

352359
[miniflare]
353360
host = "127.0.0.1" # --host

0 commit comments

Comments
 (0)