hydrogen
hydrogen copied to clipboard
[2025-04 back-fix] 🍪 Hydrogen Cookie Migration for New Shopify Cookie Architecture
WHY are these changes introduced? + WHAT is this pull request doing?
Applies the same changes as https://github.com/Shopify/hydrogen/pull/3309, but back-fixed to the 2025-04 branch.
- Notably, 2025-04 is using Remix, whereas that PR ^ is using React Router 7
We are doing this because the old cookies will stop working on May 1, 2026. This will break Shopify analytics for any merchants who haven't yet upgraded to a new Hydrogen version that works with the new cookies (while also being backwards compatible with the old cookies). Because May 1st is <365 days away, we are back-fixing past versions of Hydrogen so that all merchants using a Hydrogen version released in the last year will only have to do a minor version bump!
HOW to test your changes?
Run the e2e tests locally!
Post-merge steps
- Once this has merged into
2025-04, we should get a PR automatically opened up on this branch by the back-fix workflow - Before merging that PR, we need to fix the issue with our npm release tokens
- Once that's fixed, we can merge that PR into this branch and it should do the npm release!
- Update
docs/changelog.jsonwith upgrade instructions!
Checklist
- [x] I've read the Contributing Guidelines
- [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
- [x] I've added a changeset if this PR contains user-facing or noteworthy changes
- [x] I've added tests to cover my changes
- [x] I've added or updated the documentation