Repository navigation
[ci] release 2026.10.4 - #4355
Open
shopify-github-actions-access[bot] wants to merge 1 commit into
Open
shopify-github-actions-access[bot] wants to merge 1 commit into
shopify-github-actions-access[bot] wants to merge 1 commit into
Conversation
shopify-github-actions-access
Bot
requested a review
from a team
as a code owner
November 10, 2026 21:18
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
shopify-github-actions-access
Bot
force-pushed
the
changeset-release/main
branch
21 times, most recently
from
November 16, 2026 17:28
46268e4 to
301800b
Compare
shopify-github-actions-access
Bot
force-pushed
the
changeset-release/main
branch
from
November 17, 2026 06:33
301800b to
83c11c7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@shopify/hydrogen@2026.10.4
Minor Changes
96a5529: Add
getHtmlLang, which converts a Shopify language code into the BCP 47 tag for the<html lang>attribute. Shopify's regional codes no longer produce invalid tags such aspt_br.It takes the language only:
<html lang>names the language the page is written in, not the market country.6bcd256: Serve a Hydrogen manifest at
/__shopify/hydrogen/manifest.jsonfromhandleShopifyRoutes, so Shopify services can build URLs for a headless storefront. The route is always on and needs no new options: it reads therouteTemplatesyou already pass and thedefineShopifyI18ndefinition in the request context.{ "version": 1, "routes": { "product": "/p/:productHandle", "cart": "/basket", "...": "..." }, "i18n": { "type": "pathname", "defaultLocale": { "language": "EN", "country": "US" }, "locales": [ { "language": "EN", "country": "US", "pathPrefix": "" }, { "language": "FR", "country": "CA", "pathPrefix": "/fr-ca" } ] } }routeslists every standard route, filling in Shopify's default path for each one you don't override, and isnullwhenhandleShopifyRoutesreceives norouteTemplates.i18nlists every supported locale, default first, with itspathPrefixunder pathname routing or itshostnameunder domain routing, and isnullwhen the request context uses the deprecated fixed-localei18ninput. Only those fields are published: extra keys on route templates or locale entries stay private. Every hostname in a domain-routed definition is published, so keep staging or unreleased hostnames out of it. The route answersGETandHEADwith a short public cache, and other methods with405.ec8d17d: Fix carts and predictive search using the default locale on storefronts that serve locales under a path prefix. The browser sent cart and predictive search requests to
/api/cartand/api/predictive-searchfrom every page, so a cart created from/fr-cawas created and priced in the default market.Add
LocaleProvideranduseLocaleto@shopify/hydrogen/reactand@shopify/hydrogen/vue. Pass the request's locale through your loader data and wrap your app inLocaleProvider, above the cart and predictive search providers:LocaleProvider, the cart provider sends its requests to/fr-ca/api/cart, and cart and product forms post there.PredictiveSearchProviderrequests/fr-ca/api/predictive-search, and its form submits to/fr-ca/search. A custom cart endpoint,predictiveSearchEndpoint, orsearchActionthat starts with/gets the prefix too. Absolute URLs are used as they are.useLocale()returns the request's{language, country, pathPrefix}for your own links and requests.handleShopifyRoutesalready do. Path-based rules for/api/cartand/api/predictive-search, such as rate limits, need the prefixed paths too.getLocalizedHref. In development, Hydrogen logs a warning when a page under a locale prefix has noLocaleProvider, whenLocaleProviderandShopifyScriptsreceive different locales, and when a client-side navigation leaves the page's locale prefix.configureCartEndpointnow works with the React and Vue cart providers, which used to reset the endpoint to/api/cartwhen they mounted. Call it at module scope in code that runs on the server and in the browser, and pass the path without a locale prefix.configureCartEndpointran on the server and the cart streamed in throughinitialData.configureCartEndpoint(`${locale.pathPrefix}/api/cart`)andcreatePredictiveSearchStore({ predictiveSearchEndpoint: `${locale.pathPrefix}/api/predictive-search` }).752bf4d: Add optional
rateLimitHandling: "response"tocreateCartServerHandlers,createPredictiveSearchServerHandlers, andhandleShopifyRoutes. Each API keeps its previous rate-limit handling when the option is absent. With the option, a Storefront API HTTP429produces a caller429, a constant message,Cache-Control: no-store, and a validatedRetry-Afterheader. Each mapped failure is logged once through Hydrogen's logger.Cart mutations keep the existing
cart_mutation_failedcode. Predictive search keepsinvalid_predictive_search_request. Neither error-code union changes, so exhaustive switches andRecordmappings remain valid. A rate-limited native cart form receives a plain-text429page. The router option maps thrown registered-handler errors, including cart reads, to a JSON error with generic coderate_limited. Set the option on the cart handlers as well to keepcart_mutation_failedand the plain-text form response; otherwise a rate-limited native cart form gets a JSON page. A directcartHandlers.get()still throws. A route handler that throws synchronously now rejects the returned promise, ashandleShopifyRoutesalready documents.This change doesn't change any default: without the option, every API keeps its previous behavior.
A route error result accepts optional
format: "text"to send only its message as plain text. Results without it stay JSON. Predictive search logs failed Storefront API queries and no longer exposes their upstream diagnostic body in error messages.752bf4d:
StorefrontApiErrornow exposesretryAfter, the rawretry-afterheader value from a Storefront API error response, mirroringCustomerAccountApiError. Read it on a429response to schedule a retry. The value is unvalidated: validate it before you send it as a header.withStorefrontRateLimitdoes this for React Router loaders. Responses without the header, redirect responses, and network failures leaveretryAfterundefined.752bf4d: Add
withStorefrontRateLimit. Wrap a React Router loader or action with it to return HTTP429instead of500when the Storefront API rate limits the request. The429response has a fixed body,Cache-Control: no-store, and the Storefront API'sRetry-Aftervalue when the value is valid. Other errors pass through unchanged. React Router doesn't report thrown responses tohandleError, so the wrapper logs the originalStorefrontApiErroraterrorlevel through Hydrogen's logger. Loaders that you don't wrap still return500.requestContext.applyResponseHeaders()accepts the response status as an optional second argument. React Router drops the headers of a thrown response, so passresponse.statusfrom your root middleware, and call the method on the request context of the Storefront API client that your loaders use. For a429after a Storefront API rate limit, the method then restoresCache-Control: no-storeandRetry-After; see the method's documentation for the exact rules. If you omit the status after a rate limit, the method logs one warning. Without a rate limit, and for other statuses, the method works as before.Patch Changes
3e72ac9:
parseCollectionParamsnow readsfilter.v.price.gteandfilter.v.price.ltethe same way on the server and in the browser. Before, a locale-formatted value such as12,50was read throughwindow.Shopify.localein the browser and as English on the server, so under a German shop locale the loader queried a minimum of 1250 while the collection store showed 12.5, and the page failed to hydrate. Shop locales such aspt_brthrew insideIntl.NumberFormatand fell back to stripping every non-digit, so1.234,50became 1.2345. A price bound must now be a non-negative number as<input type="number">submits it, such as12.5or1e3; any other value, including12,50, negatives, andInfinity, sets no bound. Values thatserializeCollectionParamswrites, including exponent forms such as1e21, still read back unchanged. Thehydrogen-collection-browserskill now explains why price inputs staytype="number", and says that a customtype="text"price input must parse the shopper's text in the customer's market locale and submit a plain number.96867ee: A
Shopify.actions.updateCartcall that changes several lines now keeps each line at its new quantity when the response returns the lines under different IDs, unless the response reports an error or warning for that line. Before, the lines kept their old quantities next to the new cart totals until the follow-up refresh, and lost the update if that refresh failed. The store also stops waiting for a cart request it doesn't own afterSTANDARD_ACTION_TIMEOUT_IN_MS, so a request that never settles can't block cart revalidation after a reconnect.e290fd0: The cart GET handler now resets a cart's buyer country to the request's country when the two differ. Checkout changes the cart's country when the buyer enters a shipping address, and the Storefront API keeps pricing the cart in that country's currency on every later read because a cart is priced from its persisted buyer identity, not from
@inContext. A buyer who entered a Canadian address at checkout and returned to the US storefront kept seeing CAD. The handler now runscartBuyerIdentityUpdatewith the request's country and echoes the cart's email and phone, which the mutation clears when they're omitted. The customer attached to the cart stays attached. B2B carts, which are priced by their company location, are left unchanged.The default cart fragment now selects
buyerIdentity { countryCode email phone purchasingCompany { location { id } } },CartDatagains an optionalbuyerIdentityfield typed as the newCartBuyerIdentity, andcartQueriesincludes acartBuyerIdentityUpdatedocument. With a customfragment, the handlers'cartBuyerIdentityUpdatereturns the cart with yourCartFragment.8aeb372:
getCartId()now reads the cart ID only from thecartcookie and no longer reads acartIdsearch parameter. To load a specific cart, pass its ID togetCart().9e358a2: Cart
setsubmissions no longer clamp against a non-positivequantityAvailable. When the cart fragment selectsProductVariant.quantityAvailableand the Storefront API returns0(untracked inventory) or a negative number (oversold under the CONTINUE policy), the store used that as the upper bound, so typing a positive quantity removed the line or sent a negative quantity. Those values now set no cap and the requested quantity goes to Shopify, which validates stock and returns the line error.sanitizeQuantitynow also returnsmininstead ofInfinityfor non-finite input such as"1e400"when there's nomax, andminwins whenmaxis below it.2b4d9a7:
gql()now deduplicates shared fragments across Storefront and Customer Account documents, preventing duplicate-fragment errors. Conflicting definitions with the same name throw when the module that composes them loads.07abf40: The Customer Account authorize route now redirects to the failed-login path when the OAuth token request times out, can't reach Shopify, or gets a response body that isn't JSON. These failures used to reject
handleShopifyRoutes(), so the customer saw the app's error page instead. The authorize route now also logs asign-in failedwarning with the error code whenever it redirects to the failed-login path.customerSession.handleOAuthCallback()now throwsCustomerAccountOAuthErrorfor these failures, with the original error ascause. The code istoken_exchange_failedwhen the token request fails or times out, andinvalid_token_responsewhen the response body isn't JSON. If you callhandleOAuthCallback()directly and catchCustomerAccountApiErrorto handle token request timeouts, catchCustomerAccountOAuthErrorinstead.a179cbd: Product option values now resolve
existsandavailablefromencodedVariantExistenceandencodedVariantAvailabilityeven when no loaded variant carries the value. Before, a value with nofirstSelectableVariant, or any value on a query that omittedfirstSelectableVariantandadjacentVariants, was reported as existing and in stock whenever the other selected options matched a variant.af55496: Storefront responses now include a
Link: </.well-known/ucp>; rel="ucp"header, so AI agents can discover your store's Universal Commerce Protocol (UCP) profile from any URL, as they already can on Online Store themes.requestContext.applyResponseHeaders()adds it to every response. Any existingLinkheader is kept, and the UCP link isn't added again if the response already has arel="ucp"link. The header is left off Oxygen deployment URLs onmyshopify.dev, because the profile isn't served there. The<link rel="ucp">tag rendered byShopifyScripts(#4154) still renders on those preview domains, because its descriptors are often built without request context.On Oxygen custom domains, Shopify serves
/.well-known/ucpbefore the request reaches your app. Everywhere else,handleShopifyRoutesserves it, starting with #3976. This header ships together with or after that change.Behavior change for Next.js apps: if your
proxy.ts(ormiddleware.ts) callsapplyResponseHeaders()directly on theNextResponse.next()response, your route handlers'Linkheaders will be dropped after upgrading. Next.js copies the proxy's headers onto the final response first, then drops any route handler header with the same name. To fix it, adopt the save-and-restore pattern in the updatedexamples/nextjsproxy helper,applyProxyResponseHeaders(): save theLinkheader of theNextResponse.next()response before callingapplyResponseHeaders(), then restore it afterwards. AnyLinkyour proxy sets itself is kept. Next.js pages then don't send the UCP header. Instead, they advertise UCP through the<link rel="ucp">tag rendered byShopifyScripts(#4154).@shopify/mini-oxygen@4.4.0
Minor Changes
6127d88: The Oxygen Vite plugin now uses the newest compatibility date its bundled Workers runtime supports, in both local development and the
oxygen.jsonwritten for deployments, so local development and production run the same Workers behaviour.Previously the date came from your installed Hydrogen version, for example
2026-10-01for Hydrogen 2026.10. The date now changes when you update@shopify/mini-oxygen, not when you update Hydrogen. This release uses2026-07-30.If you're on Hydrogen 2026.10 and don't set
compatibilityDate, your production date moves back from2026-10-01to2026-07-30. To keep a specific date, setcompatibilityDateexplicitly. It still takes precedence inoxygen.json. Local development runs it too, or warns and runs the runtime's date if the runtime doesn't support it yet.