workers-sdk
workers-sdk copied to clipboard
Feature: `dispatch-namespace` option in `wrangler deploy`
What this PR solves / how to test: Ability to deploy workers to dispatch namespaces (Workers for Platforms product).
Usage: wrangler deploy --dispatch-namespace <namespace>
This is an improvement to PR #2746 because:
- Correct terminology of 'dispatch namespace' used instead of 'platform namespace'.
- Excludes tasks related to routes. custom domains. cron/schedules, and queue consumers when
dispatch-namespaceoption used (these features aren't supported in Workers for Platforms) - Allows for any name to be used for the script when
dispatch-namespaceoption used, because Workers for Platforms doesn't check script names
🦋 Changeset detected
Latest commit: 97210b97eba0d874554b0f6b5c9ff63c00101b1d
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 2 packages
| Name | Type |
|---|---|
| wrangler | Minor |
| @cloudflare/vitest-pool-workers | 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
A wrangler prerelease is available for testing. You can install this latest build in your project with:
npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-wrangler-5093
You can reference the automatically updated head of this PR with:
npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5093/npm-package-wrangler-5093
Or you can use npx with this latest build directly:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-wrangler-5093 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-create-cloudflare-5093 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-cloudflare-kv-asset-handler-5093
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-miniflare-5093
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-cloudflare-pages-shared-5093
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-cloudflare-vitest-pool-workers-5093
Note that these links will no longer work once the GitHub Actions artifact expires.
[email protected] includes the following runtime dependencies:
| Package | Constraint | Resolved |
|---|---|---|
miniflare |
workspace:* | 3.20240304.2 |
workerd |
1.20240304.0 | 1.20240304.0 |
workerd --version |
1.20240304.0 | 2024-03-04 |
Please ensure constraints are pinned, and miniflare/workerd minor versions match.
Codecov Report
Attention: Patch coverage is 95.23810% with 1 lines in your changes are missing coverage. Please review.
Project coverage is 71.50%. Comparing base (
cab7e1c) to head (97210b9). Report is 84 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5093 +/- ##
==========================================
+ Coverage 70.33% 71.50% +1.16%
==========================================
Files 298 309 +11
Lines 15515 16097 +582
Branches 3987 4111 +124
==========================================
+ Hits 10913 11510 +597
+ Misses 4602 4587 -15
| Files | Coverage Δ | |
|---|---|---|
| ...angler/src/__tests__/helpers/mock-upload-worker.ts | 100.00% <100.00%> (ø) |
|
| packages/wrangler/src/config/validation.ts | 89.73% <100.00%> (+0.03%) |
:arrow_up: |
| packages/wrangler/src/deploy/deploy.ts | 89.95% <100.00%> (+0.20%) |
:arrow_up: |
| packages/wrangler/src/deploy/index.ts | 95.74% <50.00%> (-1.03%) |
:arrow_down: |
Thanks for the PR @benycodes I've pushed some changes to simplify along with adding a changeset and tests. From my side, this is good to go now :)
Appreciate it!
thank you so much to both of you for taking this PR across the finish line <3