Remove getSetCookie
workaround from @keystatic/astro
#1453
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.
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 forgetSetCookies
.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 notastro
, 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.