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

Commit 4aca7e6

Browse files
authored
[Miniflare 3] Minor assorted doc fixups (#743)
* Remove reference to `createServer()` in WebSocket docs * Remove HTML rewriter docs, this is provided by `workerd` now * Remove supported compatibility flags, we support them all now * Remove supported web standards, we support the same as `workerd` now * Update WebStorm debug configuration screenshots * Fix typo in and format debugger docs * Remove reference to "Wrangler" DevTools
1 parent 4725ccd commit 4aca7e6

File tree

7 files changed

+22
-79
lines changed

7 files changed

+22
-79
lines changed

docs/src/content/core/compatibility.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ order: 8
88

99
## Compatibility Dates
1010

11-
Like the Workers runtime, Miniflare uses compatibility dates to opt-into
12-
backwards-incompatible changes from a specific date. If one isn't set, it will
13-
default to some time far in the past.
11+
Miniflare uses compatibility dates to opt-into backwards-incompatible changes
12+
from a specific date. If one isn't set, it will default to some time far in the
13+
past.
1414

1515
import ConfigTabs from "../components/mdx/config-tabs";
1616

@@ -33,17 +33,3 @@ const mf = new Miniflare({
3333
],
3434
});
3535
```
36-
37-
Specifically Miniflare supports the following flags:
38-
39-
- `nodejs_compat` (specifically the `node:assert`, `node:async_hooks`,
40-
`node:buffer`, `node:events`, `node:util` modules)
41-
- [`transformstream_enable_standard_constructor`/`transformstream_disable_standard_constructor`](https://developers.cloudflare.com/workers/platform/compatibility-dates#compliant-transformstream-constructor)
42-
- [`streams_enable_constructors`/`streams_disable_constructors`](https://developers.cloudflare.com/workers/platform/compatibility-dates#streams-constructors)
43-
- [`export_commonjs_default`/`export_commonjs_namespace`](https://developers.cloudflare.com/workers/platform/compatibility-dates#commonjs-modules-do-not-export-a-module-namespace)
44-
- [`r2_list_honor_include`](https://developers.cloudflare.com/workers/platform/compatibility-dates#r2-bucket-list-respects-the-include-option)
45-
- [`global_navigator`/`no_global_navigator`](https://developers.cloudflare.com/workers/platform/compatibility-dates#global-navigator)
46-
- [`durable_object_fetch_requires_full_url`/`durable_object_fetch_allows_relative_url`](https://developers.cloudflare.com/workers/platform/compatibility-dates#durable-object-stubfetch-requires-a-full-url)
47-
- [`fetch_refuses_unknown_protocols`/`fetch_treats_unknown_protocols_as_http`](https://developers.cloudflare.com/workers/platform/compatibility-dates#fetch-improperly-interprets-unknown-protocols-as-http)
48-
- [`formdata_parser_supports_files`/`formdata_parser_converts_files_to_strings`](https://developers.cloudflare.com/workers/platform/compatibility-dates#formdata-parsing-supports-file)
49-
- [`html_rewriter_treats_esi_include_as_void_tag`](https://developers.cloudflare.com/workers/platform/compatibility-dates#htmlrewriter-handling-of-esiinclude)

docs/src/content/core/html-rewriter.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/src/content/core/standards.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,6 @@ order: 6
1313
- [Using Streams](https://developers.cloudflare.com/workers/learning/using-streams)
1414
- [Web Crypto Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto)
1515

16-
Miniflare supports the following Web Standards in its sandbox:
17-
18-
- **Console:** `console.*`
19-
- **Timers:** `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`,
20-
`queueMicrotask`, `AbortSignal.timeout`, `scheduler.wait`
21-
- **Base64:** `atob`, `btoa`
22-
- **Web Crypto**: `crypto.getRandomValues`, `crypto.randomUUID`,
23-
`crypto.subtle.*` (with support for `MD5` digests and `NODE-ED25519`
24-
signatures), `crypto.DigestStream`
25-
- **Encoding:** `TextEncoder`, `TextDecoder`
26-
- **Fetch:** `fetch`, `Headers` (including
27-
[non-standard `getAll` method](https://developers.cloudflare.com/workers/runtime-apis/headers#differences)),
28-
`Request`, `Response`, `FormData`, `Blob`, `File`, `URL`, `URLPattern`,
29-
`URLSearchParams` (powered by [`undici`](https://github.com/nodejs/undici/))
30-
- **Streams:** `ByteLengthQueuingStrategy`, `CountQueuingStrategy`,
31-
`ReadableByteStreamController`, `ReadableStream`, `ReadableStreamBYOBReader`
32-
(including non-standard `readAtLeast` method), `ReadableStreamBYOBRequest`,
33-
`ReadableStreamDefaultController`, `ReadableStreamDefaultReader`,
34-
`TransformStream`, `TransformStreamDefaultController`, `WritableStream`,
35-
`WritableStreamDefaultController`, `WritableStreamDefaultWriter`,
36-
`IdentityTransformStream`, `FixedLengthStream`, `CompressionStream`,
37-
`DecompressionStream`, `TextEncoderStream`, `TextDecoderStream`
38-
- **Events:** `Event`, `EventTarget`, `AbortController`, `AbortSignal`
39-
- **Event Types:** `fetch`, `scheduled`, `unhandledrejection`,
40-
`rejectionhandled`
41-
- **Misc:** `structuredClone`, `navigator`
42-
4316
## Mocking Outbound `fetch` Requests
4417

4518
When using the API, Miniflare allows you to substitute custom `Response`s for
@@ -91,7 +64,10 @@ console.log(await res.text()); // "response:Mocked response!"
9164

9265
## Subrequests
9366

94-
Miniflare does not support limiting the amount of [subrequests](https://developers.cloudflare.com/workers/platform/limits#account-plan-limits). Please keep this in mind if you make a large amount of subrequests from your Worker.
67+
Miniflare does not support limiting the amount of
68+
[subrequests](https://developers.cloudflare.com/workers/platform/limits#account-plan-limits).
69+
Please keep this in mind if you make a large amount of subrequests from your
70+
Worker.
9571

9672
## Global Functionality Limits
9773

docs/src/content/core/web-sockets.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ order: 4
99

1010
## Server
1111

12-
When using the `createServer` method, Miniflare will always upgrade
13-
Web Socket connections. The worker must then respond with a status
14-
`101 Switching Protocols` response including a `webSocket`. For example, the
15-
worker below implements an echo WebSocket server:
12+
Miniflare will always upgrade Web Socket connections. The worker must respond
13+
with a status `101 Switching Protocols` response including a `webSocket`. For
14+
example, the worker below implements an echo WebSocket server:
1615

1716
```js
1817
export default {
595 Bytes
Loading
-183 KB
Loading

docs/src/content/developing/debugger.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ order: 4
44

55
# 🐛 Attaching a Debugger
66

7-
You can use regular Node.js tools
8-
to debug your workers. Setting breakpoints, watching values and inspecting the
9-
call stack are all examples of things you can do with a debugger.
7+
You can use regular Node.js tools to debug your workers. Setting breakpoints,
8+
watching values and inspecting the call stack are all examples of things you can
9+
do with a debugger.
1010

1111
If you're building your worker beforehand (e.g. with esbuild, Webpack, Rollup),
1212
make sure you're outputting
@@ -19,7 +19,8 @@ proceeding.
1919

2020
The easiest way to debug a Worker in VSCode is to create a new configuration.
2121

22-
Open the **Run and Debug** menu in the VSCode activity bar and create a `.vscode/launch.json` file that contains the following:
22+
Open the **Run and Debug** menu in the VSCode activity bar and create a
23+
`.vscode/launch.json` file that contains the following:
2324

2425
```json
2526
---
@@ -41,9 +42,8 @@ filename: .vscode/launch.json
4142
}
4243
```
4344

44-
From the **Run and Debug** menu in the activity bar, select the
45-
`Miniflare` configuration, and click the green play button to start
46-
debugging.
45+
From the **Run and Debug** menu in the activity bar, select the `Miniflare`
46+
configuration, and click the green play button to start debugging.
4747

4848
## WebStorm
4949

@@ -52,8 +52,8 @@ Create a new configuration, by clicking **Add Configuration** in the top right.
5252
![WebStorm add configuration button](./debugger-webstorm-node-add.png)
5353

5454
Click the **plus** button in the top left of the popup and create a new
55-
**Node.js/Chrome** configuration. Set the **Host** field to
56-
`localhost` and the **Port** field to `9229`. Then click **OK**.
55+
**Node.js/Chrome** configuration. Set the **Host** field to `localhost` and the
56+
**Port** field to `9229`. Then click **OK**.
5757

5858
![WebStorm Node.js debug configuration](./debugger-webstorm-settings.png)
5959

@@ -64,4 +64,6 @@ debugging.
6464

6565
## DevTools
6666

67-
Breakpoints can also be added via the Wranger DevTools. For more information, [read the guide](https://developers.cloudflare.com/workers/observability/local-development-and-testing/#devtools) in the Cloudflare Workers docs.
67+
Breakpoints can also be added via the Workers DevTools. For more information,
68+
[read the guide](https://developers.cloudflare.com/workers/observability/local-development-and-testing/#devtools)
69+
in the Cloudflare Workers docs.

0 commit comments

Comments
 (0)