Repository navigation
Apply declared dependency patches in server builds - #238
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 366daa8 | Nov 20 2026, 01:54 PM |
tnkuehne
force-pushed
the
feat/builder-patches
branch
from
November 20, 2026 11:38
889e855 to
b9c149c
Compare
tnkuehne
force-pushed
the
feat/builder-patches
branch
2 times, most recently
from
November 20, 2026 12:36
6f0d22a to
b9b7424
Compare
tnkuehne
force-pushed
the
feat/builder-patches
branch
from
November 20, 2026 12:56
b9b7424 to
8228232
Compare
The app builder applies the patchedDependencies a project declares in pnpm-workspace.yaml, as pnpm install does before widefleet deploy, so a template can ship patches for its dependencies. Patches apply exactly and before the installer drops files a phase does not read. Unknown top-level Wrangler keys now fail the build, as they fail widefleet deploy.
tnkuehne
force-pushed
the
feat/builder-patches
branch
from
November 20, 2026 13:53
8228232 to
366daa8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
patchedDependenciesfrom a project'spnpm-workspace.yaml, as pnpm 12 does, and applies each patch to the installed package, both for the bundle and for the declarations service documentation reads.patchPackage) in the patched@cloudflare/worker-bundlerinstaller; parsing and applying patches lives inpackages/app-builder/src/patches.ts.wrangler.jsoncnow fail the build, as they failwidefleet deploy(deny_unknown_fields). Before, the builder ignored them.Why
A template that depends on a patched package must install the same contents on the server as
pnpm installdoes locally. pnpm 12 reads patches only frompnpm-workspace.yaml;pnpm.patchedDependenciesinpackage.jsonis ignored.Tests
packages/app-builder/src/patches.test.ts: changed, added and deleted files, final newlines, differing context, version matching.packages/app-builder/src/builder.test.ts: a patched dependency in the bundle, a patched declaration in the documentation, failing patches and an unknown Wrangler key.

Confidence Score: 5/5
The PR appears safe to merge; the previous type-source issue is fixed and no new blocking issues were found.Summary
The builder now applies patches declared in
pnpm-workspace.yamlbefore bundling code or reading declarations.The previous type-source finding is fixed. No new actionable issues were found.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Project files] --> B[Read declared patches] B --> C[Install package files] C --> D[Keep files needed by patches] D --> E[Apply patches] E --> F[Filter patched package files] F --> G[Check patch results] G --> H[Bundle code] G --> I[Read declarations]Reviews (6) · Last reviewed commit: "Apply declared dependency patches in ser..." · Reviewed by Greptile