Skip to content

move fetchResult, fetchListResult and dependents into workers-utils#14063

Merged
emily-shen merged 10 commits into
mainfrom
emily/cfetch-workers-utils
Jun 1, 2026
Merged

move fetchResult, fetchListResult and dependents into workers-utils#14063
emily-shen merged 10 commits into
mainfrom
emily/cfetch-workers-utils

Conversation

@emily-shen

@emily-shen emily-shen commented May 27, 2026

Copy link
Copy Markdown
Contributor

Moves fetchResult and fetchListResult and dependents into workers-utils, minus auth and logging.

Wrangler (and cf) now wraps 'fetchResultBase' and co from workers-utils, validates auth in the wrapper, and then passes in logger and user agent to workers-utils’ fetchResultBase.

cf will then be able to do its own auth, and pass in an api token and logger.

deploy-helpers will require cf and wrangler to pass in a fetcher (e.g. fetchResult) and logger - so deploy() will get a context object of type DeployHelpersContext and we can do ctx.fetchResult() etc. inside.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: should just pass existing
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: refactor

A picture of a cute animal (not mandatory, but encouraged)


Open in Devin Review

@changeset-bot

changeset-bot Bot commented May 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7d1b2aa

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

This PR includes changesets to release 7 packages
Name Type
@cloudflare/workers-utils Patch
@cloudflare/deploy-helpers Patch
wrangler Patch
@cloudflare/cli-shared-helpers Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
@cloudflare/wrangler-bundler 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

@workers-devprod workers-devprod requested review from a team and jamesopstad and removed request for a team May 27, 2026 15:19
@workers-devprod

workers-devprod commented May 27, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/cloudchamber/common.ts: [@cloudflare/cloudchamber]

@emily-shen emily-shen force-pushed the emily/cfetch-workers-utils branch from a2c51ce to 8338a2d Compare May 27, 2026 15:20
@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk May 27, 2026
@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented May 27, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/create-cloudflare@14063

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/deploy-helpers@14063

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/kv-asset-handler@14063

miniflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/miniflare@14063

@cloudflare/pages-shared

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/pages-shared@14063

@cloudflare/unenv-preset

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/unenv-preset@14063

@cloudflare/vite-plugin

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/vite-plugin@14063

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/workers-utils@14063

wrangler

npm i https://pkg.pr.new/cloudflare/workers-sdk/wrangler@14063

@cloudflare/wrangler-bundler

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/wrangler-bundler@14063

commit: 7d1b2aa

@emily-shen emily-shen force-pushed the emily/cfetch-workers-utils branch from 1f7c1fd to dc80446 Compare May 27, 2026 16:42
Comment thread packages/workers-utils/src/cfetch/index.ts Outdated
@emily-shen emily-shen requested a review from penalosa May 27, 2026 16:47
@penalosa penalosa force-pushed the emily/cfetch-workers-utils branch from dc80446 to 584e6cb Compare May 29, 2026 16:00
…utils

# Conflicts:
#	packages/wrangler/src/__tests__/cfetch-internal.test.ts
#	packages/wrangler/src/cfetch/internal.ts
@penalosa penalosa force-pushed the emily/cfetch-workers-utils branch from 584e6cb to dc99f13 Compare May 29, 2026 16:22
@penalosa penalosa removed their request for review June 1, 2026 10:45
@emily-shen emily-shen enabled auto-merge (squash) June 1, 2026 10:46
Comment thread packages/workers-utils/src/cfetch/index.ts Outdated
@emily-shen emily-shen added ci:run-remote-tests Run remote/E2E tests that require Cloudflare API credentials run-c3-frameworks-tests Run all the C3 frameworks tests on this PR labels Jun 1, 2026
@emily-shen emily-shen disabled auto-merge June 1, 2026 13:27
@emily-shen emily-shen enabled auto-merge (squash) June 1, 2026 13:28
@emily-shen emily-shen disabled auto-merge June 1, 2026 15:07
@emily-shen emily-shen enabled auto-merge (squash) June 1, 2026 15:08
@emily-shen

Copy link
Copy Markdown
Contributor Author

Codeowner bypass Codeowners bypass one of these surely

@emily-shen

Copy link
Copy Markdown
Contributor Author

Codeowners Bypass

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Codeowners Bypass

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@emily-shen emily-shen merged commit 65b5f9e into main Jun 1, 2026
74 of 78 checks passed
@emily-shen emily-shen deleted the emily/cfetch-workers-utils branch June 1, 2026 15:17
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-remote-tests Run remote/E2E tests that require Cloudflare API credentials run-c3-frameworks-tests Run all the C3 frameworks tests on this PR

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants