Conversation
The packages reference workers-types globals such as DurableObjectState and Fetcher from their published declaration files, so a consumer has to supply the types for those declarations to resolve. That relationship is a peer dependency, not a development dependency, and declaring it as the latter understated it. Declare it as an optional peer accepting either major. Optional because the consumers we know about do not install the package at all: the examples here, and other Workers projects, generate their ambient types with wrangler types instead, and demanding a package nobody installs would fail every install for no benefit. Widening to v5 is what unblocks wrangler 4.136, which declares a v5 peer of its own. It also makes the container startup options visible: the instance, image and hardTimeout fields a durable-object-scheduled container must pass to start() exist only in v5, so the range, rather than the pin, is what lets that code typecheck.
A container the durable object schedules itself has to name its image and instance size on every start() call, because the wrangler containers block rejects those keys under that policy. This backend cannot express either: it builds the start options from enableInternet and env alone, and drops anything else the caller passes. Rather than teach one backend both policies, which would make every option conditional on a deployment property no test can see, the implementation is renamed and left alone. A second backend follows, serving the durable-object policy only, and the two stay separate. The vacated export path belongs to that backend rather than to a compatibility alias, so callers of the old name get a build error that names the replacement. Pointing it at a backend that drives a different scheduling policy would turn a build failure into a container that never starts. Only the four exported names change. Internal names stay as they are, since the new backend gets its own copies.
The example had no .gitignore, so a cf.json that `wrangler dev` writes under .wrangler/cache was committed along with real changes. Every other example ignores that directory. The file is a snapshot of one contributor's request.cf object, carrying their ISP, city, coordinates and colo. None of it is useful to anyone else, and it is regenerated on the next local run. It was also the only thing failing `biome check`, which reformatted the minified JSON and then reported the difference on every run, so the repo shipped a check that could not pass from a clean checkout. The ignore rule matches the one examples/artifacts uses, keeping the negation for .dev.vars.example so the committed env template stays tracked.
Use the current Wrangler release across the packages and examples. Refresh the lockfile so the renamed `container-legacy` workspace has its own resolved dependency graph.
馃 Changeset detectedLatest commit: cfb2626 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
There was a problem hiding this comment.
馃攳 Example commands retain the old workspace name
The README and Wrangler comment still select @example/computer-container. Contributors cannot run the renamed @example/computer-container-legacy workspace with those commands.
(Refers to this code)
Was this helpful? React with 馃憤 or 馃憥 to provide feedback.
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "name": "@example/computer-container", | |||
| "name": "@example/computer-container-legacy", | |||
There was a problem hiding this comment.
馃煛 Renamed example breaks its CI job
@example/computer-container-legacy replaces the workspace still referenced by the example matrix. The job fails before validating the example and blocks CI.
Learn more
The example was renamed both as a directory and as an npm workspace. The CI matrix still passes the old workspace name to npm run build:types, npm run typecheck, and npm test, and passes the deleted directory to Biome. npm cannot resolve @example/computer-container, so the matrix job exits before those checks run.
Example: The example/container job executes npm run build:types --workspace @example/computer-container. Only @example/computer-container-legacy exists, so npm reports no matching workspace instead of generating types.
Recommended fix: Update the container entry in the example matrix to use workspace: "@example/computer-container-legacy", path: examples/container-legacy, and a matching display name.
Was this helpful? React with 馃憤 or 馃憥 to provide feedback.
| "@cloudflare/workers-types": "^4.20260616.1 || ^5.20260921.1", | ||
| "@platformatic/vfs": "*", | ||
| "ai": "^6.0.196 || ^7.0.0", | ||
| "zod": "^4.4.3" | ||
| }, | ||
| "peerDependenciesMeta": { | ||
| "@cloudflare/workers-types": { | ||
| "optional": true |
There was a problem hiding this comment.
This will be replaced by the new instance based container runtime in a follow-up PR. For now this just moves the code but we'll remove it entirely in a future release.