-
Notifications
You must be signed in to change notification settings - Fork 382
[2025.7.0] Add changelog entry for Hydrogen 2025.7.0 release #3227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
1494f29 to
b43e2f4
Compare
… steps Major improvements to the React Router 7.9.x migration feature: - Added react-router.config.ts creation step with hydrogenPreset - Added vite.config.ts update step with reactRouter plugin - Added tsconfig.json update step for type generation support - Fixed dev script step with proper base64 encoded code Enhanced context infrastructure feature: - Renamed to "Adopt new React Router context infrastructure" (removed "and preset") - Added app/lib/context.ts creation step with createHydrogenRouterContext - Expanded server.ts step to show full context setup and session handling - Updated entry.server.tsx to show context type changes - Added entry.client.tsx step with NonceProvider and HydratedRouter - Removed duplicate NonceProvider feature (merged into context feature) - Removed duplicate react-router.config.ts step All steps now match skeleton template as source of truth and provide complete migration guidance from 2025.4.1 to 2025.7.0.
- Added step for countryCode parameter on Customer Account API methods - Added 3 steps for gift card removal: cart action, RemoveGiftCardForm, and UI display - Updated feature titles and info for clarity
- Order filtering: 4 steps (orderFilters.ts, loader, OrderSearchForm, EmptyOrders) - @incontext directive: pattern for all Customer Account API operations - @defer directive: Storefront API example with performance benefits - fulfillmentStatus: Order fragment field addition - All steps validated against skeleton template
- Customer Account API flag: Remove __unstable suffix - ESLint promise handling: Add no-floating-promises and no-misused-promises rules Complete 2025.7.0 changelog entry now includes comprehensive migration guidance for all user-facing changes from 2025.4.1 to 2025.7.0.
Added link to complete skeleton template for developers who need additional reference during the migration process.
Improved all titles and info fields to be: - More direct and active voice - User-focused with 'you/your' - Clearer and more conversational - Free of marketing fluff - Simpler and more scannable Changes include better feature/fix titles and clearer step instructions.
570799e to
b6a7234
Compare
The validateDependencyRemoval function now correctly skips validation for packages that are being reinstalled. This mirrors the actual upgrade logic in upgrade.ts:upgradeNodeModules which removes packages first (to avoid peer dependency conflicts) then reinstalls new versions. This pattern is intentional for major migrations like Remix → React Router 7 where old and new packages have conflicting peer dependencies. Fixes CI test failure for 2025.7.0 upgrade validation.
|
We detected some changes in |
WHY are these changes introduced?
The Hydrogen 2025.7.0 release introduces major breaking changes including the migration from Remix to React Router 7.8.x and updates to Storefront API version 2025-07. The changelog.json file needs to be updated to enable the
h2 upgradecommand for developers migrating to this version.Without this changelog entry, developers cannot use the CLI upgrade command to migrate their projects from 2025.4.x to 2025.7.0, leaving them to manually update dependencies and apply migration steps.
WHAT is this pull request doing?
This PR adds a comprehensive changelog entry for the Hydrogen 2025.7.0 release to
docs/changelog.json. The entry documents all changes from the CI release PR #3166.Key Dependency Changes
Upgrading hydrogen-demo-store
WIP Generated
upgrade-2025.4.1-to-2025.7.0.mdDetails
Hydrogen upgrade guide: 2025.4.1 to 2025.7.0
Breaking changes
Migrate to React Router 7.9.x #3141
Step: 1. Run the automated migration codemod #3141
Step: 2. Create react-router.config.ts with hydrogenPreset #3141
Step: 3. Update vite.config.ts to use React Router plugin #3141
// vite.config.ts import {defineConfig} from 'vite'; - import {vitePlugin as remix} from '@remix-run/dev'; + import {reactRouter} from '@react-router/dev/vite'; import {hydrogen} from '@shopify/hydrogen/vite'; import {oxygen} from '@shopify/mini-oxygen/vite'; + import tsconfigPaths from 'vite-tsconfig-paths'; export default defineConfig({ plugins: [ + hydrogen(), + oxygen(), + reactRouter(), + tsconfigPaths() - remix({ - presets: [hydrogen.preset()], - }), ], });Step: 4. Update tsconfig.json for React Router type generation #3141
// tsconfig.json { "include": [ "env.d.ts", "app/**/*.ts", "app/**/*.tsx", + "app/**/*.d.ts", + "*.ts", + "*.tsx", + "*.d.ts", + ".graphqlrc.ts", + ".react-router/types/**/*" - "**/*.ts", - "**/*.tsx" ], "compilerOptions": { "types": [ "@shopify/oxygen-workers-types", + "react-router", + "@shopify/hydrogen/react-router-types", + "vite/client" - "@remix-run/node", - "vite/client" ], + "rootDirs": [".", "./.react-router/types"], "baseUrl": ".", "paths": { "~/*": ["app/*"] } } }Step: 5. Create app/lib/context.ts with createHydrogenRouterContext #3141
Step: 6. Update server.ts to use createHydrogenRouterContext #3141
Step: 7. Update entry.server.tsx with new context types #3141
Step: 8. Update entry.client.tsx with NonceProvider and HydratedRouter #3141
Step: 9. Update @shopify/remix-oxygen imports in route files #3141
Step: 10. Update @remix-run/react imports in route files #3141
Step: 11. Add React Router 7 route type imports #3141
+ import type {Route} from "./+types/route-name";Step: 12. Add .react-router to .gitignore #3141
Step: 13. Update package.json scripts to use react-router typegen #3141
Step: 14. Verify your app starts and builds correctly #3141
Features
Added countryCode parameter to Customer Account API methods #3148
Add countryCode parameter to Customer Account API method calls
// app/routes/account_.login.tsx (example) export async function loader({request, context}: Route.LoaderArgs) { return context.customerAccount.login({ + countryCode: context.customerAccount.i18n.country, }); } // The countryCode parameter is now available on all Customer Account API methods // and can be passed from context.customerAccount.i18n.countryAdd support for removing individual gift cards from cart #3128
Step: 1. Add GiftCardCodesRemove case to cart action handler #3128
// app/routes/cart.tsx export async function action({request, context}: Route.ActionArgs) { const {cart} = context; const formData = await request.formData(); const {action, inputs} = CartForm.getFormInput(formData); switch (action) { // ... existing cases ... + case CartForm.ACTIONS.GiftCardCodesRemove: { + const appliedGiftCardIds = inputs.giftCardCodes as string[]; + result = await cart.removeGiftCardCodes(appliedGiftCardIds); + break; + } } }Step: 2. Add RemoveGiftCardForm component #3128
Step: 3. Update CartGiftCard to display gift cards with remove buttons #3128
// app/components/CartSummary.tsx function CartGiftCard({giftCardCodes}: {...}) { return ( <div> + {giftCardCodes && giftCardCodes.length > 0 && ( + <dl> + <dt>Applied Gift Card(s)</dt> + {giftCardCodes.map((giftCard) => ( + <RemoveGiftCardForm key={giftCard.id} giftCardId={giftCard.id}> + <div className="cart-discount"> + <code>***{giftCard.lastCharacters}</code> + <Money data={giftCard.amountUsed} /> + <button type="submit">Remove</button> + </div> + </RemoveGiftCardForm> + ))} + </dl> + )} </div> ); }Add order filtering support to Customer Account API orders route #3125
Step: 1. Create app/lib/orderFilters.ts utility #3125
Step: 2. Update loader to parse filters and build search query #3125
Step: 3. Add OrderSearchForm component #3125
Step: 4. Update Orders component to use filters and add EmptyOrders #3125
// app/routes/account.orders._index.tsx export default function Orders() { - const {customer} = useLoaderData<OrdersLoaderData>(); + const {customer, filters} = useLoaderData<OrdersLoaderData>(); const {orders} = customer; return ( <div className="orders"> + <OrderSearchForm currentFilters={filters} /> - <OrdersTable orders={orders} /> + <OrdersTable orders={orders} filters={filters} /> </div> ); } -function OrdersTable({orders}: {orders: CustomerOrdersFragment['orders']}) { +function OrdersTable({orders, filters}: {orders: CustomerOrdersFragment['orders']; filters: OrderFilterParams}) { + const hasFilters = !!(filters.name || filters.confirmationNumber); + return ( <div> {orders?.nodes.length ? ( <PaginatedResourceSection connection={orders}> {({node: order}) => <OrderItem key={order.id} order={order} />} </PaginatedResourceSection> ) : ( - <p>You haven't placed any orders yet.</p> + <EmptyOrders hasFilters={hasFilters} /> )} </div> ); } +function EmptyOrders({hasFilters}: {hasFilters?: boolean}) { + return hasFilters ? ( + <p>No orders found matching your search. <Link to="/account/orders">Clear filters</Link></p> + ) : ( + <p>You haven't placed any orders yet.</p> + ); +}Add fulfillmentStatus to Customer Account API order query #3039-fulfillment
Add fulfillmentStatus field to Order fragment
// app/graphql/customer-account/CustomerOrderQuery.ts fragment Order on Order { id name confirmationNumber statusPageUrl + fulfillmentStatus processedAt fulfillments(first: 1) { nodes { status } } }Add @incontext language support to Customer Account API mutations #3039-incontext
Add @incontext directive to all Customer Account API operations
Add GraphQL @defer directive support to storefront client #2993
Use @defer directive in Storefront API queries
Fixes
Stabilize Customer Account API development flag #3082-flag
Update command to use stable flag
Add TypeScript ESLint rules for promise handling #3146
Add promise handling rules to ESLint config
// eslint.config.js export default tseslint.config( { rules: { // ... existing rules ... + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-misused-promises': 'error', }, }, ); // These rules prevent unhandled promises and promise misuse // Helps avoid 'The script will never generate a response' errors on Oxygen/Cloudflare WorkersPost-merge steps
After merging:
h2 upgradeto migrate to 2025.7.0Checklist