* rename getLocalExplorerFromEnv() to getLocalExplorerEnabledFromEnv()
* Add resource ID to binding name map
Uses a JSON binding in the Local Explorer worker that maps binding names to namespace IDs
* Add script to filter openapi spec down
* add implementation for KV API
* changeset
* PR feedback, mroe tests and other fixups
* fix pnpm lock
* fixup
* pr feedback
* chore: use native stripVTControlCharacters
Since Node 16.x, there is a built-in function,
`stripVTControlCharacters`. This does the same job as the `strip-ansi`
package and makes it redundant going forward.
The minimum node version in these projects is at least 16, so we should
be good to switch.
* chore: remove unnecessary package-lock.json from import-npm fixture
* chore: remove private package from changeset
* chore: fix formatting
---------
Co-authored-by: Edmund Hung <edmund@cloudflare.com>
* create fixture with many bindings
* Add resource api worker to miniflare
* gate behind experimental flag
* add tests
* changeset
* fixups
* rename to local explorer and more fixups
* [miniflare] Add MessageBuilder support for Email Sending API in local mode
Implements support for the simplified MessageBuilder interface in Miniflare's
Email Sending API binding. This provides a developer-friendly alternative to
manually constructing MIME messages with the EmailMessage API.
Key changes:
- Add TypeScript types for MessageBuilder API (types.ts)
- Implement send() overload accepting MessageBuilder alongside EmailMessage
- Store email content (text, HTML, attachments) to viewable temp files
- Extract common storeTempFile() helper to reduce duplication
- Add comprehensive test coverage (12 new tests)
In local mode, content is saved to files that developers can open in their
editor/browser for inspection, with file paths logged to the console.
* Address PR review comments
- Simplify changeset description
- Shorten example subject to 'Hello'
- Remove trailing newline in changeset
- Remove extra blank line in send_email.worker.ts
* Add MessageBuilder examples to email-worker fixture
Adds comprehensive manual testing examples for the MessageBuilder API:
- /send-simple: Basic text-only email
- /send-html: Email with text and HTML content
- /send-attachment: Single text attachment
- /send-multi-attachment: Multiple attachment types (text, JSON, binary)
- /send-complex: Multiple recipients (to/cc/bcc)
- /test-bindings: Test all three binding types
Also includes:
- README with complete usage instructions
- Documentation of expected console output
- Notes about type assertions (types not yet in @cloudflare/workers-types)
Tested locally - all routes work correctly.
* Fix MessageBuilder validation to extract email from EmailAddress objects
The validateMessageBuilder function was passing EmailAddress objects
(with { name, email } structure) directly to validateRecipients, which
expected strings. This caused the error 'email to [object Object] not allowed'.
Fix: Extract email addresses from EmailAddress objects before validation
using the existing extractEmailAddress helper.
Tested with fixture routes that use EmailAddress objects:
- /send-simple (named sender)
- /send-complex (multiple recipients with names)
All tests pass.
* Fix snapshot test to handle Windows file paths
The MessageBuilder snapshot test was failing on Windows because the regex
only matched Unix-style paths (/...). Updated the regex to also match
Windows paths (C:\...) while still normalizing both to the same format.
Regex now matches:
- Unix: /var/folders/.../email-text/uuid.txt
- Windows: C:\Users\...\email-text\uuid.txt
Both normalize to: /email-text/[FILE].txt
* Add MessageBuilder support for remote mode email bindings
The proxy server previously only handled EmailMessage objects by
reconstructing them from the serialized 'EmailMessage::raw' property.
This fix adds detection for MessageBuilder objects and passes them
through directly since they're already plain serializable objects.
Changes:
- Check if the argument has 'EmailMessage::raw' property to distinguish
EmailMessage from MessageBuilder
- EmailMessage: Reconstruct with EmailMessage constructor (existing behavior)
- MessageBuilder: Pass through directly as plain object (new behavior)
Both APIs now work correctly in remote mode via wrangler dev --remote.
* chore(deps): bump the workerd-and-workers-types group with 2 updates
Bumps the workerd-and-workers-types group with 2 updates: [workerd](https://github.com/cloudflare/workerd) and [@cloudflare/workers-types](https://github.com/cloudflare/workerd).
Updates `workerd` from 1.20260115.0 to 1.20260116.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/RELEASE.md)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20260115.0...v1.20260116.0)
Updates `@cloudflare/workers-types` from 4.20260115.0 to 4.20260116.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/RELEASE.md)
- [Commits](https://github.com/cloudflare/workerd/commits)
---
updated-dependencies:
- dependency-name: workerd
dependency-version: 1.20260116.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: workerd-and-workers-types
- dependency-name: "@cloudflare/workers-types"
dependency-version: 4.20260116.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: workerd-and-workers-types
...
Signed-off-by: dependabot[bot] <support@github.com>
* chore: update dependencies of "miniflare", "wrangler"
The following dependency versions have been updated:
| Dependency | From | To |
| ---------- | ------------ | ------------ |
| workerd | 1.20260115.0 | 1.20260116.0 |
* Add dummy message ID
* add comments
* Update packages/miniflare/src/workers/email/send_email.worker.ts
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
* [Workflows/vitest-pool-workers] Add Workflows result testing utils
* [Workflows/vitest-pool-workers] Add a test handler to get the result of a workflow instance
* fix comment - we also export non-DOs now
* decrease the teardown timeout since the Pages vitest examples fixture will never teardown and always times out
* support ctx.exports in vitest
* Add JSDOC comments
* Improve warning text
* Rename `RunnerObject` class to `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` in order to reduce chance of collision with user code.
This is the approach used in the Vite plugin and reduces the complexity of our code since we can stop "prefixing" user exports.
* improve changeset
* update containers fixture to use ctx.exports
* support containers with DOs using ctx.exports
* changeset
* print containers
* Fix capitalisation in snapshots
* PR feedback
* fix windows ci
* don't rely on migrations only for validation
* Fix: ensure that when a remote proxy session (for remote bindings) cannot be established an appropriate error is surfaced to the user
* Ensure that also the vite plugin crashes
* Apply suggestions from code review
Co-authored-by: Victor Berchet <victor@suumit.com>
* update changesets
* remote unnecessary R2 in test
* update tests and functionality
* update `get-platform-proxy-remote-bindings` fixture tests
* Update .changeset/proud-socks-slide.md
Co-authored-by: Victor Berchet <victor@suumit.com>
* fix snapshot not working on Windows
* update comment
* remove duplicated changeset line
---------
Co-authored-by: Victor Berchet <victor@suumit.com>
* Add type parameter to `listDurableObjectIds()`
This add support for when the DurableObject namespace has been typed.
* add tests for vitest-pool-workers context exports
* test with isolated storage and non-single worker setups
* add durable object test cases
* Update fixtures/vitest-pool-workers-examples/context-exports/src/worker-configuration.d.ts
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
---------
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
* Make BundleController tests able to run on non-unix OSs
* ignore generated files from eslint
* fix home directory mocking
* Improve isolation of containers push tests
* use logger.loggerLevel rather than recomputing it in Wrangler
The startup-profiling test was leaking the logger level between tests,
so that got fixed in here too.
* move environment variable handling from `wrangler` to `@cloudflare/workers-utils`
* Support `CLOUDFLARE_ENV` environment variable for selecting the active environment
This change enables users to select the environment for commands such as `CLOUDFLARE_ENV=prod wrangler versions upload`.
The `--env` command line argument takes precedence.
The `CLOUDFLARE_ENV` enviroment variable is mostly used with the `@cloudflare/vite-plugin` to select the environment for building
the Worker to be deployed. This build also generates a "redirected deploy config" that is flattened to only contain the active environment.
To avoid accidentally deploying a version that is built for one environment to a different environment, there is an additional
check to ensure that if the user specifies an environment in Wrangler it matches the original selected environment from the build.
* fix error message when both CLOUDFLARE_ENV and --env are provided
* fix "via" part of the validation error
* fixups after James' review
* send the errors to Sentry so we can ascertain how often this occurs
* fixups from Dario
* modernize kv-asset-handler so that we can test is in Node 22+
* suggestion from Vic
* fix exports on the kv-asset-handler package.json
* move kv-asset-handler tests back into main test run
* only test on Node 22
Node 20 has been in Maintenance for over a year and will become end of life in April 2026.
Node 22 entered Maintenance in October and is arguably the most stable and supported version right now.
* also test packages on Node 20 and 24
* really don't run interactive-dev tests on Windows
* remove redundant service-worker-mock
* wait for the old port to be closed
* Add resilience to reading and writing the dev registry files
* give prisma tests a bit longer to run
allow for wrangler dev hyperdrive bindings to connect to external
databases that require TLS.
- Supports upgrading TLS connection to database by setting
sslmode=prefer or sslmode=require or sslmode=disable in
localConnectionString
- Default sslmode is disable
- Adds integration tests to miniflare test suite
Co-authored-by: Adrian Gracia <agracia@cloudflare.com>