Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .changeset/c3-frameworks-update-11865.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"create-cloudflare": patch
---

chore: update dependencies of "create-cloudflare"

The following dependency versions have been updated:

| Dependency | From | To |
| ------------------- | ------ | ------ |
| create-react-router | 7.11.0 | 7.12.0 |
7 changes: 7 additions & 0 deletions .changeset/cli-macos-user-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@cloudflare/cli": patch
---

Mark macOS version compatibility errors as user errors

When checking macOS version compatibility, the CLI now throws `UserError` instead of generic `Error`. This ensures that version incompatibility issues are properly classified as user-facing errors that shouldn't be reported to Sentry.
12 changes: 12 additions & 0 deletions .changeset/dependabot-update-11949.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"miniflare": patch
"wrangler": patch
---

chore: update dependencies of "miniflare", "wrangler"

The following dependency versions have been updated:

| Dependency | From | To |
| ---------- | ------------ | ------------ |
| workerd | 1.20260115.0 | 1.20260116.0 |
7 changes: 7 additions & 0 deletions .changeset/file-not-found-errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Show helpful messages for file not found errors (`ENOENT`)

When users encounter file not found errors, Wrangler now displays a helpful message with the missing file path and common causes, instead of reporting to Sentry.
7 changes: 7 additions & 0 deletions .changeset/fix-version-tracking-command-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

fix: include version components in command event metrics

Adds `wranglerMajorVersion`, `wranglerMinorVersion`, and `wranglerPatchVersion` to command events (`wrangler command started`, `wrangler command completed`, `wrangler command errored`). These properties were previously only included in adhoc events.
7 changes: 7 additions & 0 deletions .changeset/friendly-kv-namespace-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Improve error message when creating duplicate KV namespace

When attempting to create a KV namespace with a title that already exists, Wrangler now provides a clear, user-friendly error message instead of the generic API error. The new message explains that the namespace already exists and suggests running `wrangler kv namespace list` to see existing namespaces with their IDs, or choosing a different namespace name.
7 changes: 7 additions & 0 deletions .changeset/green-bears-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Make `name` the positional argument for `wrangler delete` instead of `script`

The `script` argument was meaningless for the delete command since it deletes by worker name, not by entry point path. The `name` argument is now accepted as a positional argument, allowing users to run `wrangler delete my-worker` instead of `wrangler delete --name my-worker`. The `script` argument is now hidden but still accepted for backwards compatibility.
29 changes: 29 additions & 0 deletions .changeset/miniflare-email-messagebuilder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"miniflare": minor
---

Add support for Email Sending API's MessageBuilder interface in local mode

Miniflare now supports the simplified MessageBuilder interface for sending emails, alongside the existing `EmailMessage` support.

Example usage:

```javascript
await env.EMAIL.send({
from: { name: "Alice", email: "alice@example.com" },
to: ["bob@example.com"],
subject: "Hello",
text: "Plain text version",
html: "<h1>HTML version</h1>",
attachments: [
{
disposition: "attachment",
filename: "report.pdf",
type: "application/pdf",
content: pdfData,
},
],
});
```

In local mode, email content (text, HTML, attachments) is stored to temporary files that you can open in your editor or browser for inspection. File paths are logged to the console when emails are sent.
7 changes: 7 additions & 0 deletions .changeset/vite-config-error-handling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Improve error handling for Vite config transformations

Replace assertions with proper error handling when transforming Vite configs. When Wrangler encounters a Vite config that uses a function or lacks a plugins array, it now provides clear, actionable error messages instead of crashing with assertion failures. The check function gracefully skips incompatible configs with debug logging.
119 changes: 119 additions & 0 deletions fixtures/email-worker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Email Worker Fixture

This fixture demonstrates both the **EmailMessage API** (raw MIME) and the **MessageBuilder API** for sending emails in Cloudflare Workers.

## Running Locally

Start the development server:

```bash
pnpm start
# or
wrangler dev
```

## Available Routes

### EmailMessage API (Raw MIME)

**`GET /send`** - Original API using manual MIME construction

- Uses the `mimetext` library to build MIME messages
- Sends via `LIST_SEND` binding

### MessageBuilder API

**`GET /send-simple`** - Simple text-only email

- Basic MessageBuilder example with plain text
- Demonstrates named sender: `{ name: "Alice", email: "..." }`

**`GET /send-html`** - Email with text and HTML versions

- Shows how to include both `text` and `html` content
- HTML includes inline CSS styling

**`GET /send-attachment`** - Email with single text attachment

- Demonstrates attaching a text file
- Uses `TextEncoder` to create content

**`GET /send-multi-attachment`** - Email with multiple attachments

- Includes three different attachment types:
- Text file (`.txt`)
- JSON file (`.json`)
- Binary file (simulated `.pdf`)
- Shows both text and HTML content

**`GET /send-complex`** - Complex email with multiple recipients

- Multiple TO recipients (with and without names)
- CC recipient with name
- BCC recipient (array)
- Both text and HTML content

### Testing Bindings

**`GET /test-bindings`** - Test all three email binding types

- `UNBOUND_SEND` - No restrictions on recipients
- `SPECIFIC_SEND` - Only allows `something@example.com`
- `LIST_SEND` - Allows `something@example.com` and `else@example.com`

## What to Expect

When you send emails using these routes:

1. **Console Output**: Miniflare logs details about the email being sent
2. **File Paths**: For MessageBuilder emails, you'll see temp file paths:
- Text content → `.txt` files
- HTML content → `.html` files
- Attachments → Files with their original extensions

### Example Console Output

```
send_email binding called with MessageBuilder:
From: "Alice" <sender@penalosa.cloud>
To: else@example.com
Subject: Simple MessageBuilder Test
Text: /var/folders/.../email-text/abc-123.txt
```

You can open these files in your editor or browser to inspect the email content.

## Email Bindings Configuration

This fixture has three email bindings configured in `wrangler.jsonc`:

```jsonc
{
"send_email": [
{
"name": "UNBOUND_SEND",
// No restrictions
},
{
"name": "SPECIFIC_SEND",
"destination_address": "something@example.com",
// Only allows sending to this specific address
},
{
"name": "LIST_SEND",
"allowed_destination_addresses": [
"something@example.com",
"else@example.com",
],
// Only allows sending to addresses in this list
},
],
}
```

## Notes

- Type assertions (`as any`) are used because `@cloudflare/workers-types` doesn't yet include MessageBuilder types
- At runtime in Miniflare, the MessageBuilder API works correctly
- The `allowed_sender_addresses` configuration is not included in this fixture, so any sender address is accepted
Loading
Loading