ref(cloudflare): Ensure wrapRequestHandler stays free of node specifcs - #22894
Open
JPeer264 wants to merge 1 commit into
Open
ref(cloudflare): Ensure wrapRequestHandler stays free of node specifcs#22894JPeer264 wants to merge 1 commit into
JPeer264 wants to merge 1 commit into
Conversation
Contributor
size-limit report 📦
|
JPeer264
force-pushed
the
jp/pure-request
branch
2 times, most recently
from
July 31, 2026 08:12
ca0a1dc to
13a8f82
Compare
JPeer264
force-pushed
the
jp/pure-request
branch
from
July 31, 2026 08:16
13a8f82 to
9096bd7
Compare
JPeer264
marked this pull request as ready for review
July 31, 2026 08:17
JPeer264
requested review from
isaacs,
mydea,
nicohrubec and
s1gr1d
and removed request for
a team
July 31, 2026 08:17
JPeer264
force-pushed
the
jp/pure-request
branch
from
July 31, 2026 10:16
9096bd7 to
658304b
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.
This prepares for the next PRs, where we extend the default integrations with integrations that include node specific imports, such as the diagnostics channels e.g.
vercelAIIntegration.The main refactors were
wrapRequestHandlerWithInit, that holds only default integrations and imports, which are "pure" and don't have any node libraries, in order to support the Oxygen runtime (a new test has awrangler.jsoncwithout any compatibility flags, that mirrors what Oxygen does in their environment). So this new function only adds a third parameter with theinit../baseSdk, which is just a refactor from the previous./sdk, but without the extra imports./sdkcan now be extended with diagnostics channels, such asvercelAIIntegrationor otherserver-utilsimports./requestentrypoint stays "pure", there are 2 tests to ensure thatnode:importswrangler dev, which doesn't have tree-shaking baked in. Perfect for testing if there is anode:import