Expose getFetchState() from astro/hono by matthewp · Pull Request #16998 · withastro/astro · GitHub
Skip to content

Expose getFetchState() from astro/hono#16998

Merged
matthewp merged 1 commit into
nextfrom
feat/expose-get-fetch-state
Jun 8, 2026
Merged

Expose getFetchState() from astro/hono#16998
matthewp merged 1 commit into
nextfrom
feat/expose-get-fetch-state

Conversation

@matthewp

@matthewp matthewp commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Changes

Exports the existing getFetchState() function from astro/hono so third-party packages and custom Hono middleware can access the per-request FetchState.

Testing

Added 3 unit tests in test/units/hono/index.test.ts:

  • Creates a new FetchState from Hono context
  • Returns the same instance on subsequent calls
  • Custom middleware can set locals via getFetchState

Docs

withastro/docs#14021

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot added semver: minor Change triggers a `minor` release pkg: astro Related to the core `astro` package (scope) and removed semver: minor Change triggers a `minor` release labels Jun 8, 2026

@github-actions github-actions Bot 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.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@matthewp matthewp marked this pull request as ready for review June 8, 2026 17:04
@matthewp matthewp merged commit 57dcc31 into next Jun 8, 2026
23 of 24 checks passed
@matthewp matthewp deleted the feat/expose-get-fetch-state branch June 8, 2026 20:35
@astrobot-houston astrobot-houston mentioned this pull request Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants