fix(miniflare): README incorrectly lists simulated email sending as unsupported
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 85/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, markdown, typescript
- Ambito
- documentation
Direzione di ricerca
Inizia da packages/miniflare/README.md, alla voce Sending Email nel riferimento di configurazione per worker, che la indica come non supportata, e leggi packages/miniflare/test/plugins/email/index.spec.ts per confermare la forma di configurazione funzionante per un binding send_email. Aggiorna la voce del README per descrivere la simulazione locale come supportata e mostra la configurazione per l'API diretta new Miniflare(), precisando che la consegna esterna richiede ancora un servizio remoto. È completato quando un lettore riesce a seguire la configurazione del README e ottenere un HTTP 200 con un ID messaggio da un send() in testo semplice.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The Miniflare API reference lists Sending Email as unsupported and points direct API consumers to a mock binding. The native local email plugin successfully handles a plain-text send() call in both the current stable and beta packages. Readers following the README can miss a working first-party simulator and write an unnecessary test double.
Steps to reproduce
- In separate scratch directories, install the respective stable and beta Miniflare releases listed below. Save the script as
reproduce-send-email.mjsin each directory. - Run the matching command in each directory. The script uses the direct Node API, starts a local simulator with a
send_emailbinding, dispatches one request to an attachment-free fixture, and checks that the result is HTTP 200 with a message ID. It exits nonzero if the result differs. - In each package's
node_modules/miniflare/README.md, read the Sending Email entry underWorkerOptions. Compare the stated support with the result of the direct API call.
node reproduce-send-email.mjs
node reproduce-send-email.mjs --beta
Reproduction script: reproduce-send-email.mjs
import { Miniflare } from "miniflare";
const script = `
export default {
async fetch(request, env) {
return Response.json(await env.EMAIL.send({
from: "[email protected]",
to: "[email protected]",
subject: "Local simulation",
text: "Control body",
}));
},
};
`;
const mf = new Miniflare(process.argv.includes("--beta") ? {
workers: [{ config: {
name: "email-test",
compatibilityDate: "2026-11-19",
manifest: {
mainModule: "worker.mjs",
modules: { "worker.mjs": { type: "esm", contents: script } },
},
env: { EMAIL: { type: "send-email" } },
} }],
} : {
modules: true,
script,
compatibilityDate: "2026-07-30",
email: { send_email: [{ name: "EMAIL" }] },
});
try {
const response = await mf.dispatchFetch("http://localhost/");
const result = await response.json();
if (response.status !== 200 || typeof result.messageId !== "string") {
throw new Error(`Expected a simulated send, received ${response.status}`);
}
console.log(response.status, "messageId returned");
} finally {
await mf.dispose();
}
Expected behavior
The Miniflare README's binding reference should identify feature support accurately and give direct API consumers a working configuration to simulate email sending. Simulation should be described as local execution, with externally delivered mail requiring a remote service.
Actual behavior
Both installed package READMEs and the repository's current Miniflare README list Sending Email as unsupported in the worker binding reference. The direct Node API returned 200 messageId returned in both tested releases using the respective local email configurations. Neither fixture has a remote binding or starts a Wrangler CLI session.
Evidence
- Expected source: Miniflare email plugin tests show direct
new Miniflare()coverage for an unrestricted Email Sending binding and verify that asend()call returns a synthesized message ID. - Failure source: The Miniflare README places Sending Email in the unsupported list in the per-worker configuration reference. The same wording appears in both published READMEs, while the standalone Node script above succeeded with each package.
- Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Restoration check
The per-worker Miniflare API documentation should describe local sending as supported and show the email configuration applicable to that version of the direct API. Following that configuration should reproduce the attachment-free simulated send with HTTP 200 and a message ID.
Runtime or environment
Miniflare 4.20260730.0 under the npm latest tag with workerd 1.20260730.1 and Miniflare 5.20261119.0-beta under the beta tag with workerd 1.20261119.1. Both direct probes ran on Node.js 26.13.1, macOS 27.2.1 on arm64. Current repository README checked at b00799168dc2580013ea3c9b7d4f4505e120afa2.
Triage assessment
- Impact level: P2
- Assessment status: supported
- Impact basis: The package API reference directs tool authors to mock a supported local email binding, adding avoidable work and making it harder to exercise the native simulator from Node.
- Workaround status: available
- Workaround basis: Configure the native local binding in the direct API as demonstrated for both package releases.
- Lingua principale
- TypeScript
- Stelle
- 4.7k
- Fork
- 1.7k
- Merge medio
- 1g 22h
- PR unite (30g)
- 287
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/workers-sdk
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
cloudflare/workers-sdk#17159 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/workers-sdk#17158 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
cloudflare/workers-sdk#17139 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
cloudflare/workers-sdk#17112 ·
I maintainer di solito rispondono entro 1 giorno
-
D1 Time Travel restore help advertises 30 days without a plan qualifierForse di nuovo libera @akhil9tiet l’ha presa 7 giorni fa e non c’è nessuna pull request aperta. Apertabug package:wrangler product:d1
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
cloudflare/workers-sdk#17000 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/workers-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GetStream/stream-chat-react#3467 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vercel-labs/ui#1139 ·
I maintainer di solito rispondono entro 1 giorno
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Forse già presa @goranai l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bot:ai-assisted component:platform-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
midnightntwrk/platform-js#93 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100