Skip to content

Conversation

@penalosa
Copy link
Contributor

@penalosa penalosa commented Sep 22, 2025

Move the worker loader binding from unsafe to a proper binding.

https://jira.cfdata.org/browse/CR-1306677

Previously config looked like:

"unsafe": {
    "bindings": [
      {
        "name": "LOADER",
        "type": "worker-loader"
      }
    ]
  }

and after this PR it will look like:

"worker_loaders": [{
    "binding": "LOADER"
  }]

@penalosa penalosa requested a review from a team as a code owner September 22, 2025 11:06
@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2025

🦋 Changeset detected

Latest commit: 6503ea9

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

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Major
@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

- Add missing inspector_port and container_engine properties to DevConfig in configuration test
- Remove invalid schema property from logfwdr configuration
- Add missing worker_loaders property to type generation test mock
- Add missing Environment properties: keep_names, assets, observability, compliance_region, images

Co-Authored-By: [email protected] <[email protected]>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 22, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10721

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 6503ea9

- Add missing worker_loaders property to configToDTS object
- Add test case with worker loader bindings to verify type generation
- Update test snapshots to include expected WorkerLoader type output

Follows the same pattern as rate limit bindings for consistent implementation.

Co-Authored-By: [email protected] <[email protected]>
Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

LGTM 🙂

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Sep 22, 2025
@penalosa penalosa merged commit 55a10a3 into main Sep 22, 2025
45 of 47 checks passed
@penalosa penalosa deleted the penalosa/stable-worker-loader branch September 22, 2025 21:23
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Sep 22, 2025
petebacondarwin added a commit that referenced this pull request Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants