Skip to content

Conversation

@ematipico
Copy link
Member

Changes

The package @types/cookie is deprecated, and cookie now ships its own types.

This PR removes the deprecated package @types/cookie, updates cookie and ensures the new types are used. The types are slightly different, so to avoid possible breaking changes I made sure that we create AstroCookies only when we have a value.

No changeset needed because no logic should change.

Testing

CI should work

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2025

⚠️ No Changeset found

Latest commit: 632e7f0

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.

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 18, 2025
Comment on lines +123 to +125
if (value) {
return new AstroCookie(value);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

The new type returns Record<string, string | undefined>, so to avoid possible breakages in AstroCookie, I create the type only when the value isn't undefined

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 18, 2025

CodSpeed Performance Report

Merging #13455 will not alter performance

Comparing chore/remove-types (632e7f0) with main (9a7dcde)

Summary

✅ 6 untouched benchmarks

@ematipico ematipico merged commit c69bf18 into main Mar 18, 2025
16 checks passed
@ematipico ematipico deleted the chore/remove-types branch March 18, 2025 15:31
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.

2 participants