Skip to content

[workers-utils] Share D1 migration reading and applying with the Vitest plugin - #16879

Merged
edmundhung merged 13 commits into
mainfrom
edmundhung/share-d1-migrations
Nov 23, 2026
Merged

edmundhung merged 13 commits into
mainfrom
edmundhung/share-d1-migrations

Conversation

@edmundhung

@edmundhung edmundhung commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Part of RM-31812.

Moves readD1Migrations() and applyD1Migrations() from the Vitest plugin into @cloudflare/workers-utils, so the test harness applies migrations the same way and a later fix reaches both. The shared readD1Migrations() takes options only and throws when the migrations directory is missing or unreadable; the Vitest plugin keeps its legacy directory-path form. Wrangler's d1 migrations apply keeps its own flow (remote databases, backups, confirmations) and could adopt the shared table query later.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal package; the Vitest plugin's API is unchanged

@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2b0ac55

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@cloudflare/workers-utils Minor
@cloudflare/vitest-plugin Patch
@cloudflare/autoconfig Patch
@cloudflare/cli-shared-helpers Patch
@cloudflare/containers-shared Patch
@cloudflare/deploy-helpers Patch
@cloudflare/dev-helpers Patch
@cloudflare/remote-bindings Patch
@cloudflare/workers-auth Patch
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ask-bonk

ask-bonk Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@pkg-pr-new

pkg-pr-new Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@16879

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@16879

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@16879

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@16879

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@16879

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@16879

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@16879

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@16879

miniflare

npm i https://pkg.pr.new/miniflare@16879

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@16879

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@16879

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@16879

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@16879

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@16879

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@16879

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@16879

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@16879

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@16879

wrangler

npm i https://pkg.pr.new/wrangler@16879

commit: 2b0ac55

@edmundhung
edmundhung marked this pull request as ready for review November 17, 2026 17:13
@workers-devprod
workers-devprod requested review from a team and petebacondarwin and removed request for a team November 17, 2026 17:14
@workers-devprod

workers-devprod commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/share-d1-migrations.md: [@cloudflare/wrangler]
  • .changeset/vitest-d1-missing-migrations-dir.md: [@cloudflare/wrangler]
  • packages/vitest-plugin/src/pool/d1.ts: [@cloudflare/wrangler]
  • packages/vitest-plugin/src/worker/lib/cloudflare/test-internal.ts: [@cloudflare/wrangler]
  • packages/vitest-plugin/test/d1.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/AGENTS.md: [@cloudflare/wrangler]
  • packages/workers-utils/package.json: [@cloudflare/wrangler]
  • packages/workers-utils/src/apply-d1-migrations.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/d1-migrations.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/index.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/d1-migrations.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tsdown.config.ts: [@cloudflare/wrangler]

devin-ai-integration[bot]

This comment was marked as resolved.

clanky-the-clanker[bot]

This comment was marked as resolved.

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of a57faee7.

This review, of 4e87a5f0

💬 Approved with comments — No correctness, security or release problems found. One INFO note remains: the relaxed D1 binding check has no test.

Findings: 1 info

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


📋 Code Quality: 💬 1 info

The refactor is sound. One note is still open: the relaxed isD1Database check has no test.

Recommendation: 💬 Optional Nits

  • [INFO] The relaxed isD1Database check, which accepts Miniflare's getD1Database() proxy, has no test. (packages/workers-utils/src/apply-d1-migrations.ts:41)
View full review

isD1Database no longer checks constructor.name, so it now also accepts Miniflare's Node-side D1 proxy. The comment in the code says this is deliberate, but nothing tests it. The new migrationsDir normalization is correct and has a test, and the new package exports match the build entries.


✅ All other checks passed

🚀 Release: ✅ LGTM

The changesets cover both packages: a minor bump for the new workers-utils API, and a patch bump for the Vitest plugin's new error when the migrations directory is missing.


🔒 Security: ✅ LGTM

No security concerns. Table names are still escaped by escapeId before they go into SQL.


📖 AGENTS.md: ✅ LGTM

The packages/workers-utils/AGENTS.md update is consistent with the change.


⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

The JSDoc on the new exports is accurate.


Reviewed commit: 4e87a5f0

@edmundhung
edmundhung force-pushed the edmundhung/share-d1-migrations branch from 4e87a5f to a57faee Compare November 17, 2026 17:24

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of bcde7e26.

This review, of a57faee7

✅ Approved — No correctness, security, performance, documentation or release problems found. The only change since the last review is a lockfile entry that matches the catalog.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

There are two changesets: a minor bump for the new workers-utils API, and a patch bump for the Vitest plugin's new error when the migrations directory is missing.


🔒 Security: ✅ LGTM

No security concerns.


📖 AGENTS.md: ✅ LGTM

The packages/workers-utils/AGENTS.md update matches the change.


📋 Code Quality: ✅ LGTM

The new @cloudflare/workers-types lockfile entry for packages/workers-utils uses catalog:default and resolves to 5.20261117.1. That matches the workspace catalog. One earlier note is still open and its code is unchanged: the relaxed isD1Database check has no test.


⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

No documentation concerns.


Reviewed commit: a57faee7

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of d9e98467.

This review, of bcde7e26

✅ Approved — No correctness, security, performance, documentation or release problems found. The missing-directory and unreadable-directory fixes are correct and have tests.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

There are two changesets: a minor bump for the new workers-utils API, and a patch bump for the Vitest plugin's new error when the migrations directory is missing.


🔒 Security: ✅ LGTM

No security concerns.


📖 AGENTS.md: ✅ LGTM

The packages/workers-utils/AGENTS.md update matches the change.


📋 Code Quality: ✅ LGTM

The missing-directory check normalizes migrationsDir the same way getD1MigrationFiles() does. The readdirSync() call before listing makes EACCES surface again. Both have tests. The Vitest plugin still accepts its legacy directory-path form.


⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

No documentation concerns.


Reviewed commit: bcde7e26

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of a3d12bf1.

This review, of d9e98467

✅ Approved — I found no correctness, security, performance, documentation or release problems. The missing-directory and unreadable-directory handling is correct and has tests.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

There are two changesets: a minor bump for the new workers-utils migration APIs, and a patch bump for the Vitest plugin's new error when the migrations directory is missing or can't be read.


🔒 Security: ✅ LGTM

No security concerns.


📖 AGENTS.md: ✅ LGTM

The packages/workers-utils/AGENTS.md update matches the change.


📋 Code Quality: ✅ LGTM

The missing-directory check normalizes migrationsDir the same way getD1MigrationFiles() does, and a directory that can't be read now throws. Both have tests. The Vitest plugin still accepts its old directory-path argument and still throws a TypeError for other argument types. The worker code imports applyD1Migrations from a module with no Node.js imports.


⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

No documentation concerns.


Reviewed commit: d9e98467

@edmundhung
edmundhung marked this pull request as draft November 17, 2026 19:12
@edmundhung
edmundhung force-pushed the edmundhung/share-d1-migrations branch 2 times, most recently from e17bea4 to 5264b68 Compare November 19, 2026 16:48
@edmundhung
edmundhung changed the base branch from main to edmundhung/miniflare-introspect-exported-workflows November 19, 2026 16:49
@edmundhung
edmundhung added this pull request to stack #17058 November 19, 2026 16:49
Base automatically changed from edmundhung/miniflare-introspect-exported-workflows to main November 19, 2026 17:07
@edmundhung
edmundhung force-pushed the edmundhung/share-d1-migrations branch from 5264b68 to 3539ba7 Compare November 19, 2026 17:07
…nline, as in the Vitest plugin

Nothing else used the exported query or default table name.
@edmundhung
edmundhung marked this pull request as ready for review November 19, 2026 17:59

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 2b0ac558.

This review, of a3d12bf1

✅ Approved — No correctness, security, performance, documentation or release problems. The structurally typed applyD1Migrations() database, the inline table query and the new tsdown entry are consistent with the plugin's previous behaviour.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

There are two changesets:

  • a minor bump for the new shared D1 migration APIs in workers-utils;
  • a patch bump for the Vitest plugin's new error when the migrations directory is missing or can't be read.

Wrangler's d1 migrations apply flow is unchanged.


🔒 Security: ✅ LGTM

No security concerns.

  • Migration files: they are read only from the migrationsDir the developer configures.
  • Relaxed database check: it only affects which objects the caller can pass in. It does not affect authorization.

📖 AGENTS.md: ✅ LGTM

The packages/workers-utils/AGENTS.md update matches the change.


📋 Code Quality: ✅ LGTM

  • apply-d1-migrations.ts: the structural D1Database type and the inline table query and defaults match the original Vitest plugin code. The module has no Node.js imports, so it is safe to load in workerd.
  • Relaxed isD1Database check: this now accepts Miniflare's getD1Database() proxy. As the author explained, that path will be tested in the harness pull request, because workers-utils tests can't depend on Miniflare.
  • Build and exports: tsdown.config.ts adds the entry to the group that has no Node.js shims. The ./apply-d1-migrations export in package.json points at the built .mjs and .d.mts files.
  • Vitest plugin: it keeps its legacy directory-path form and its TypeError for other argument types. test-internal.ts still exports applyD1Migrations.
  • Tests:
    • The workers-utils tests cover a backslash migrationsDir, an empty directory, a missing directory and an unreadable directory.
    • The plugin's tests cover the legacy path form and the error for a missing directory.

⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

No documentation concerns.


Reviewed commit: a3d12bf1

…y what's new for an unreadable one

The directory-path form already threw for a directory it couldn't read; only the options form newly throws.

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved — No correctness, security, performance, documentation or release problems. The changes since the last review (the vitest-plugin test assertion, the changeset wording and the workers-utils package.json) are consistent with the shared readD1Migrations() behaviour.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

There are two changesets:

  • a minor bump for the new shared D1 migration APIs in workers-utils;
  • a patch bump for the Vitest plugin's new error when the migrations directory is missing or can't be read.

Wrangler's d1 migrations apply flow is unchanged.


🔒 Security: ✅ LGTM

No security concerns. Migration files are read only from the migrationsDir the developer configures.


📖 AGENTS.md: ✅ LGTM

The packages/workers-utils/AGENTS.md update matches the change.


📋 Code Quality: ✅ LGTM

  • Error message: the vitest-plugin test now checks for No migrations present at <resolved path>. in the directory-path form. That is the text the shared readD1Migrations() produces, and the changeset describes the behaviour accurately.
  • Moved test: the nested-pattern test moved out of the plugin's tests. An equivalent test is now in packages/workers-utils/tests/d1-migrations.test.ts.
  • Package export: the ./apply-d1-migrations export points at the .mjs and .d.mts files that the new tsdown entry builds. apply-d1-migrations.ts has no Node.js imports, so it is safe to load in workerd.
  • isD1Database check: the relaxed check now accepts Miniflare's getD1Database() proxy. As the author explained in the discussion, workers-utils tests can't depend on Miniflare, so that path will be covered by the harness pull request's tests.

⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

No documentation concerns.


Reviewed commit: 2b0ac558

@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@edmundhung
edmundhung merged commit 5970e6a into main Nov 23, 2026
115 of 117 checks passed
@edmundhung
edmundhung deleted the edmundhung/share-d1-migrations branch November 23, 2026 14:23
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Nov 23, 2026
brandhaug added a commit to brandhaug/b2b-saas-starter that referenced this pull request Nov 27, 2026
## pnpm-workspace.yaml (default)

## Dependency Updates

| Package | From | To | Type |
| --- | --- | --- | --- |
| `@cloudflare/vitest-plugin` | 1.9.0 | 1.9.2 | patch |
| `@cloudflare/workers-types` | 5.20261123.1 | 5.20261124.1 | minor |
| `miniflare` | 5.20261119.0-beta | 5.20261123.1-beta | minor |
| `wrangler` | 4.166.0 | 4.168.0 | minor |

## Release Notes

<details>
<summary><b>@<!---->cloudflare/vitest-plugin</b> (1.9.0 → 1.9.2) — 2
releases</summary>

<details>
<summary><b>1.9.2</b></summary>

### Patch Changes

- Updated dependencies
[[`3d228ba`](cloudflare/workers-sdk@3d228ba)]:
  - miniflare@5.20261123.1-beta

</details>

<details>
<summary><b>1.9.1</b></summary>

### Patch Changes

- [#17070](cloudflare/workers-sdk#17070)
[`657179d`](cloudflare/workers-sdk@657179d)
Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! -
Update `DEFAULT_COMPAT_DATE` to 2026-11-23

Use the bundled workerd release's compatibility date by default when
scaffolding new projects or when no compatibility date is configured.

- [#16879](cloudflare/workers-sdk#16879)
[`5970e6a`](cloudflare/workers-sdk@5970e6a)
Thanks [@<!---->edmundhung](https://github.com/edmundhung)! - Throw from
`readD1Migrations()` when the migrations directory doesn't exist

Passing options with a missing `migrationsDir` used to return no
migrations, so a typo silently applied nothing. It now throws "No
migrations present at …", as Wrangler does. Passing a directory path
that doesn't exist throws the same error. A migrations directory that
can't be read now also throws when you pass options, and both forms name
the directory in the error.

- [#17108](cloudflare/workers-sdk#17108)
[`65f6f33`](cloudflare/workers-sdk@65f6f33)
Thanks [@<!---->Hebilicious](https://github.com/Hebilicious)! - Resolve
the runner's `vitest/worker` import from the plugin, not from the
project root

The runner is a virtual module, `/index.mjs`, so Vite resolved its
`vitest/worker` import from the project root. When the root could not
resolve `vitest`, as in a pnpm workspace whose root package does not
depend on it, no test file ran and Workers threw `No such module
"vitest/worker"`. When a parent directory had another `vitest` version,
the runner loaded that version and Vitest failed to find the runner. The
plugin now resolves `vitest/worker` from its own package, so the runner
uses the same Vitest as the pool.

- Updated dependencies [[`657179d`](https://github.com/

…[full
notes](https://github.com/cloudflare/workers-sdk/releases/tag/%40cloudflare/vitest-plugin%401.9.1)

</details>

</details>

<details>
<summary><b>miniflare</b> (5.20261119.0-beta → 5.20261123.1-beta) — 2
releases</summary>

<details>
<summary><b>5.20261123.1-beta</b></summary>

### Minor Changes

- [#17133](cloudflare/workers-sdk#17133)
[`3d228ba`](cloudflare/workers-sdk@3d228ba)
Thanks [@<!---->edmundhung](https://github.com/edmundhung)! - List
Durable Object IDs by the class the Worker exports

`listDurableObjectIds()` now takes the Durable Object class and the
Worker that exports it, as in `mf.listDurableObjectIds("Counter",
"my-worker")`. This is a breaking change in v5 beta: a binding name now
throws `No Durable Object class named …`, unless the Worker also exports
a class with that name, in which case that class's IDs are listed.

</details>

<details>
<summary><b>5.20261123.0-beta</b></summary>

### Minor Changes

- [#17129](cloudflare/workers-sdk#17129)
[`5b45f32`](cloudflare/workers-sdk@5b45f32)
Thanks [@<!---->edmundhung](https://github.com/edmundhung)! - Support
`captions.get()` and `customerCode` in the local Stream binding

The local Stream binding now implements the Stream fields added in
`@cloudflare/workers-types`. `captions.get(language)` returns the stored
WebVTT file for an uploaded caption. Generated captions have no content
in local mode, so they return an empty WebVTT file, and a missing
caption throws `NotFoundError` as the API does. Videos also include
`customerCode`, set to `"placeholder"` to match the placeholder
subdomain in local playback URLs.

- [#17024](cloudflare/workers-sdk#17024)
[`00413bb`](cloudflare/workers-sdk@00413bb)
Thanks [@<!---->edmundhung](https://github.com/edmundhung)! - Start even
when a binding refers to a Worker that isn't running

A service, Durable Object or Workflow binding to a Worker that isn't
running now always fails only when it's used, and events sent to a tail
consumer that isn't running are dropped. Before, Miniflare failed to
start when the dev registry was disabled, as it is in the Vitest plugin.

### Patch Changes

- [#17070](cloudflare/workers-sdk#17070)
[`657179d`](cloudflare/workers-sdk@657179d)
Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! -
Update `DEFAULT_COMPAT_DATE` to 2026-11-23

Use the bundled workerd release's compatibility date by default when
scaffolding new projects or when no compatibility date is configured.

- [#17070](cloudflare/workers-sdk#17070)
[`657179d`](cloudflare/workers-sdk@657179d)
Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Upd

…[full
notes](https://github.com/cloudflare/workers-sdk/releases/tag/miniflare%405.20261123.0-beta)

</details>

</details>

<details>
<summary><b>wrangler</b> (4.166.0 → 4.168.0) — 2 releases</summary>

<details>
<summary><b>4.168.0</b></summary>

### Minor Changes

- [#16680](cloudflare/workers-sdk#16680)
[`96e936c`](cloudflare/workers-sdk@96e936c)
Thanks [@<!---->mglewis](https://github.com/mglewis)! - Apply
`images.url_transformations` when deploying a Worker

`wrangler deploy` and `wrangler versions deploy` now apply the
`images.url_transformations` setting to the deployed Worker. The setting
is applied after the Worker and its triggers have been deployed. If it
can't be applied, the command fails with the reason from the API.
Removing `url_transformations` from the configuration leaves the
Worker's existing setting in place.

The setting isn't applied for `--dry-run`, `wrangler versions upload`,
or Workers deployed to a dispatch namespace.

### Patch Changes

- [#17063](cloudflare/workers-sdk#17063)
[`6c45ad7`](cloudflare/workers-sdk@6c45ad7)
Thanks
[@<!---->sidharthachatterjee](https://github.com/sidharthachatterjee)! -
Request the billing scopes when logging in with cf and Wrangler

Include `billing:write` in the default OAuth scopes of cf and Wrangler
so they can create account subscriptions, which is how products such as
R2 are enabled on an account. cf also requests `billing:read`. Existing
OAuth sessions need a new login to request the scopes.

- [#16947](cloudflare/workers-sdk#16947)
[`de6b171`](cloudflare/workers-sdk@de6b171)
Thanks [@<!---->umeraamir69](https://github.com/umeraamir69)! - Fix
`WRANGLER_LOG_PATH` being ignored when set in `vite.config.ts` after a
static import of `@cloudflare/vite-plugin`

The debug log filepath is now resolved lazily on first write (memoized),
matching how `WRANGLER_WRITE_LOGS` is read. Setting
`process.env.WRANGLER_LOG_PATH` in the Vite config body after importing
the plugin now writes logs to the configured path instead of the gl

…[full
notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.168.0)

</details>

<details>
<summary><b>4.167.0</b></summary>

### Minor Changes

- [#17060](cloudflare/workers-sdk#17060)
[`fa50aba`](cloudflare/workers-sdk@fa50aba)
Thanks [@<!---->petebacondarwin](https://github.com/petebacondarwin)! -
Support `--env-file` in the experimental `cf-wrangler dev` delegate

Wrangler-bundled projects can now use `cf dev -- --env-file ../../.env`
to load a shared development file outside the project directory without
enabling `CLOUDFLARE_INCLUDE_PROCESS_ENV`. Repeat `--env-file` to load
multiple files, with later files overriding earlier values.

- [#17093](cloudflare/workers-sdk#17093)
[`310633d`](cloudflare/workers-sdk@310633d)
Thanks [@<!---->for-the-kidz](https://github.com/for-the-kidz)! - Remove
the `wrangler dispatch-namespace rename` command

Renaming a Workers for Platforms dispatch namespace left the namespace
name stored in dispatcher bindings out of date, which could make Workers
in the namespace impossible to read or delete by name. The Cloudflare
API now rejects requests that change a dispatch namespace's name, so the
command has been removed. To use a different name, create a new dispatch
namespace and redeploy your Workers to it.

### Patch Changes

- [#17102](cloudflare/workers-sdk#17102)
[`1e65920`](cloudflare/workers-sdk@1e65920)
Thanks [@<!---->samarthyadavv](https://github.com/samarthyadavv)! - Exit
with a nonzero status when the Basin SQL service rejects a query

`wrangler basin sql query` reports the service error and exits with
status 1 so shell scripts and CI can detect a rejected query.

- [#17099](cloudflare/workers-sdk#17099)
[`fc3d770`](cloudflare/workers-sdk@fc3d770)
Thanks [@<!---->mayanthacreates](https://github.com/mayanthacreates)! -
Show that `--local` is the

…[full
notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.167.0)

</details>

</details>

---
*This PR was auto-generated by
[catalog-update-action](https://github.com/brandhaug/catalog-update-action).*

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants