Skip to content

Conversation

Greenheart
Copy link

@Greenheart Greenheart commented Sep 9, 2025

Back when the getSetCookie workaround code was added in 2023, Astro used undici 5.x. Since Astro now uses undici v6.x, it seems like we can remove the workaround for getSetCookies.

Astro package.json (with undici 5) from the time the workaround was added to @keystatic/astro https://github.com/withastro/astro/blob/71743aeca723e215c0107ecf2e111fdcc8ec7e45/packages/astro/package.json

Astro package.json from today, using undici 6.x:
https://github.com/withastro/astro/blob/main/packages/astro/package.json

And even Astro v4 (legacy) uses undici v6:
https://github.com/withastro/astro/blob/32b14f24cdd3cf2c963c97bca6099ef996f7aadf/packages/astro/package.json

Because undici 6 is now widely used across all Astro versions, it should be safe to make this change. Of course assuming people have somewhat updated Astro versions.

There is a small risk for a breaking change if someone were to update @keystatic/astro but not astro, so this might be worth treating as a major version bump of @keystatic/astro just to be sure.


Note: I didn't add a changeset yet, until we decide how to version this change.

Back when this code was added in 2023, Astro used undici 5.x. Since Astro now uses undici v6.x, it seems like we can remove the

Astro package.json from the time the workaround was added to @keystatic/astro
https://github.com/withastro/astro/blob/71743aeca723e215c0107ecf2e111fdcc8ec7e45/packages/astro/package.json

Astro package.json from today, using undici 6.x:
https://github.com/withastro/astro/blob/main/packages/astro/package.json

And even Astro v4 (legacy) uses undici v6:
https://github.com/withastro/astro/blob/32b14f24cdd3cf2c963c97bca6099ef996f7aadf/packages/astro/package.json

Because undici 6 is now widely used across all Astro versions, it should be safe to make this change. Of course assuming people have somewhat updated Astro versions.

There is a small risk for a breaking change if someone were to update `@keystatic/astro` but not `astro`, so this might be worth treating as a major version bump of `@keystatic/astro` just to be sure.
@Greenheart Greenheart requested a review from emmatown as a code owner September 9, 2025 01:40
Copy link

changeset-bot bot commented Sep 9, 2025

⚠️ No Changeset found

Latest commit: 15c5a35

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant