Two behavioural differences surfaced while migrating: - `throwOnError` only covers non-zero exit codes, so a process killed by a signal resolved successfully where execa rejected. For custom builds this silently turned an aborted build into a successful one. Guard all three call sites on a missing exit code. - `NonZeroExitError.message` does not name the command the way execa's `shortMessage` did. Embedding C3's captured stdout/stderr to compensate printed the output twice (it is already streamed live) and gave every failure a unique message, defeating Sentry grouping. Name the command and exit code instead, and let the output travel on the cause. Also narrows the C3 error with `instanceof` rather than an unchecked cast, trims the custom build command before handing it to the shell (`cmd.exe` is not whitespace tolerant, and `execaCommand` used to normalise this), and adds coverage for the abort, signal and C3 failure paths.
Cloudflare Workers SDK
Cloudflare Workers let you deploy serverless code instantly across the globe for exceptional performance, reliability, and scale.
Contribute
·
Submit an Issue
·
Join Discord
Quick Start
To get started quickly with a new project, run the command below:
npm create cloudflare@latest
# or
pnpm create cloudflare@latest
# or
yarn create cloudflare@latest
For more info, visit our Getting Started guide.
Documentation
Visit the official Workers documentation here.
Directory
| Package | Description | Links |
|---|---|---|
wrangler |
A command line tool for building Cloudflare Workers. | Docs |
create-cloudflare (C3) |
A CLI for creating and deploying new applications to Cloudflare. | Docs |
miniflare |
A simulator for developing and testing Cloudflare Workers, powered by workerd | Docs |
chrome-devtools-patches |
Cloudflare's fork of Chrome DevTools for inspecting your local or remote Workers | |
pages-shared |
Used internally to power Wrangler and Cloudflare Pages. It contains all the code that is shared between these clients. |
Beta releases
Beta releases are generated by the pkg.pr.new tool and are updated on every commit pushed to the main branch.
Warning
These beta releases get updated over time, so they are ill suited to be used as stable versions for a project (and the proper npm released should be used instead). These should be used only for quick testing of not yet released features/fixes.
Available beta releases are listed below.
create-cloudflare
npm i https://pkg.pr.new/create-cloudflare@main
@cloudflare/kv-asset-handler
npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@main
miniflare
npm i https://pkg.pr.new/miniflare@main
@cloudflare/pages-shared
npm i https://pkg.pr.new/@cloudflare/pages-shared@main
@cloudflare/unenv-preset
npm i https://pkg.pr.new/@cloudflare/unenv-preset@main
@cloudflare/vite-plugin
npm i https://pkg.pr.new/@cloudflare/vite-plugin@main
@cloudflare/vitest-pool-workers
npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@main
@cloudflare/workers-editor-shared
npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@main
wrangler
npm i https://pkg.pr.new/wrangler@main
Contributing
We welcome new contributors! Refer to the CONTRIBUTING.md guide for details.
Community
Join us in the official Cloudflare Discord to meet other developers, ask questions, or learn more in general.