Skip to content

[vitest-pool-workers] Restore typed inject() keys - #15150

Merged
petebacondarwin merged 4 commits into
cloudflare:mainfrom
kkkhs:agent/vitest-pool-inject-types
Aug 14, 2026
Merged

petebacondarwin merged 4 commits into
cloudflare:mainfrom
kkkhs:agent/vitest-pool-inject-types

Conversation

@kkkhs

@kkkhs kkkhs commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #15137.

cloudflareTest no longer inferred or checked known inject() keys.

Fix: Add WorkerPoolOptionsContextInject so declared ProvidedContext keys keep inference and typo checks, while runtime-only keys can still use an explicit generic fallback.

Test: Added type coverage for inject() key inference, explicit generic fallback, and misspelled key rejection.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: type-only Vitest pool helper behavior.

@changeset-bot

changeset-bot Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 06aafa9

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

This PR includes changesets to release 1 package
Name Type
@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

@kkkhs
kkkhs force-pushed the agent/vitest-pool-inject-types branch from 5ebc34f to 16db8b6 Compare August 12, 2026 13:10
@kkkhs
kkkhs marked this pull request as ready for review August 12, 2026 13:12
@kkkhs
kkkhs requested a review from workers-devprod as a code owner August 12, 2026 13:12
Copilot AI lite review requested due to automatic review settings August 12, 2026 13:12
@workers-devprod
workers-devprod requested review from a team and jamesopstad and removed request for a team August 12, 2026 13:12
@workers-devprod

workers-devprod commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@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

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Aug 14, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15150

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15150

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15150

create-cloudflare

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

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15150

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15150

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15150

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 06aafa9

@petebacondarwin
petebacondarwin force-pushed the agent/vitest-pool-inject-types branch from 20fbe36 to 06aafa9 Compare August 14, 2026 12:31
@petebacondarwin
petebacondarwin merged commit 2cf3143 into cloudflare:main Aug 14, 2026
54 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[vitest-pool-workers] inject() in pool options no longer infers types or checks keys

4 participants