Skip to content

Conversation

kdaviduik
Copy link
Contributor

@kdaviduik kdaviduik commented Aug 27, 2025

WHY are these changes introduced?

Closes https://github.com/Shopify/hydrogen-internal/issues/227. TLDR: Hydrogen has moved from Remix onto React Router 7. We want to remove/replace all Remix-related dependencies

WHAT is this pull request doing?

I recommend reviewing commit by commit to be able to review the changes more easily

  • Removes Hydrogen's dependency on @shopify/remix-oxygen package
  • Delete @shopify/remix-oxygen package

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

shopify bot commented Aug 27, 2025

Oxygen deployed a preview of your kd-remove-remix-oxygen branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment August 27, 2025 9:16 PM
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment August 27, 2025 9:16 PM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment August 27, 2025 9:16 PM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment August 27, 2025 9:16 PM

Learn more about Hydrogen's GitHub integration.

@kdaviduik kdaviduik marked this pull request as ready for review August 27, 2025 22:53
@Shopify Shopify deleted a comment from github-actions bot Aug 27, 2025
@kdaviduik kdaviduik self-assigned this Aug 27, 2025
@kdaviduik kdaviduik force-pushed the kd-remove-remix-oxygen branch from fdcfcfe to ae46e1d Compare August 27, 2025 23:07
Creates new oxygen export with:
- createRequestHandler: Oxygen-specific wrapper around React Router's handler
  - Request validation (GET/HEAD with body check)
  - URL normalization (double slash handling)
  - Powered-by header injection
- getStorefrontHeaders: Extract Oxygen headers from requests

This replaces the functionality from @shopify/remix-oxygen
@kdaviduik kdaviduik force-pushed the kd-remove-remix-oxygen branch from ae46e1d to d10d372 Compare August 28, 2025 16:46
@kdaviduik kdaviduik changed the base branch from 2025-07-sfapi-caapi-update to hydrogen-react-router-7.8.2-clean August 28, 2025 16:47
Adds Error.prototype.toString override to Vite's crossBoundarySetup
so it's automatically injected into Oxygen worker environments.
This replaces the runtime override that was in remix-oxygen.
Updates /// <reference types> directives in env.d.ts files to use
@shopify/oxygen-workers-types instead of @shopify/remix-oxygen
All types and functions that were re-exported from remix-oxygen are
now imported directly from react-router since they are available in
React Router 7.6.0
Removes the entire @shopify/remix-oxygen package as all functionality has been:
- Moved to @Shopify/hydrogen/oxygen (createRequestHandler, getStorefrontHeaders)
- Available from react-router 7.6.0 (all type re-exports)
- Handled by Vite (stack traces, H2O_LOG_EVENT)
- Deprecated (event-logger.ts - only for classic Remix compiler)
- Remove remix-oxygen from main README.md package list
- Update CONTRIBUTING.md to remove remix-oxygen package description
- Update all cookbook recipe READMEs to use react-router imports
- Update all cookbook LLM prompts to use react-router imports
- Update example READMEs to use react-router module declarations
- Update RFC documentation to use react-router and @Shopify/hydrogen/oxygen imports
@kdaviduik kdaviduik force-pushed the kd-remove-remix-oxygen branch from d10d372 to e818e76 Compare September 4, 2025 20:48
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