Releases: Shopify/hydrogen
@shopify/mini-oxygen@3.0.4
Patch Changes
- Security updates (#2263) by @dependabot
@shopify/hydrogen@2024.7.1
Patch Changes
-
Breaking change by @michenly
customerAccount
no longer commit session automatically. -
Breaking change by @blittle
Previously the
VariantSelector
component would filter out options that only had one value. This is undesireable for some apps. We've removed that filter, if you'd like to retain the existing functionality, simply filter the options prop before it is passed to theVariantSelector
component:<VariantSelector handle={product.handle} + options={product.options.filter((option) => option.values.length > 1)} - options={product.options} variants={variants}> </VariantSelector>
Fixes #1198
-
Improve the types for
useOptimisticCart()
(#2269) by @blittle -
Fix a small rounding issue when checking stale-while-revalidate timing. (#2220) by @frandiox
-
Update virtual route to use Layout component in the root file. (#2292) by @michenly
-
Add
sellingPlanId
support toBuyNowButton
. (#2254) by @dvisockas -
Fix customData from Analytics.Provider not being passed to page view events (#2224) by @wizardlyhel
-
Auto cookie domain detection for customer privacy api and better error message for missing analytics fields (#2256) by @wizardlyhel
-
New Features by @blittle
Add a
useOptimisticVariant
hook for optimistically rendering product variant changes. This makes switching product variants instantaneous. Example usage:function Product() { const {product, variants} = useLoaderData<typeof loader>(); // The selectedVariant optimistically changes during page // transitions with one of the preloaded product variants const selectedVariant = useOptimisticVariant( product.selectedVariant, variants, ); return <ProductMain selectedVariant={selectedVariant} />; }
This also introduces a small breaking change to the
VariantSelector
component, which now immediately updates which variant is active. If you'd like to retain the current functionality, and have theVariantSelector
wait for the page navigation to complete before updating, use thewaitForNavigation
prop:<VariantSelector handle={product.handle} options={product.options} waitForNavigation > ... </VariantSelector>
-
Return
null
instead of empty object fromcart.get()
when the cart id is invalid. (#2258) by @frandiox -
Updated dependencies [
54c2f7ad
]:- @shopify/hydrogen-react@2024.7.1
@shopify/hydrogen-react@2024.7.1
Patch Changes
- Add
sellingPlanId
support toBuyNowButton
. (#2254) by @dvisockas
@shopify/create-hydrogen@5.0.0
@shopify/cli-hydrogen@8.2.0
Minor Changes
-
Support Vite projects in
h2 setup css
command to setup Tailwind and vanilla-extract. Drop CSS setup support for classic Remix projects. (#2245) by @frandiox -
The build process in Vite projects now generates a bundle analysis tool for the server files. (#2138) by @frandiox
Patch Changes
-
Fix Codegen config resolution when project directory contains dots. (#2293) by @frandiox
-
[Bug fix] Allow env-branch to be passed when running
h2 deploy
in CI (#2281) by @aswamy -
Fix CLI upgrade notification when running from a global process. (#2184) by @frandiox
-
skeleton template was updated to do session commit in server call instead of routes (#2137) by @michenly
-
Remove
PUBLIC_STORE_DOMAIN
environment variable from.env
when creating new projects with mock.shop. (#2221) by @frandiox -
Added an
--auth-bypass-token-duration
flag to thedeploy
command to allow for specified token duration between 1 to 12 hours. (#2182) by @NelsonLee-Code -
Updated dependencies [
0924410f
]:- @shopify/mini-oxygen@3.0.4
skeleton@2024.4.9
Patch Changes
- Updated dependencies [
9957968b
]:- @Shopify/hydrogen@2024.4.7
@shopify/hydrogen@2024.4.7
Patch Changes
- Auto cookie domain detection for customer privacy api and better error message for missing analytics fields (#2262) by @wizardlyhel
@shopify/create-hydrogen@4.3.14
Patch Changes
- Auto cookie domain detection for customer privacy api and better error message for missing analytics fields (#2262) by @wizardlyhel
skeleton@2024.4.8
Patch Changes
- Updated dependencies [
593dd30e
]:- @Shopify/hydrogen@2024.4.6
@shopify/hydrogen@2024.4.6
Patch Changes
-
Fix shopify cookie creation and add auto top-level domain detection (#2249) by @wizardlyhel
-
Updated dependencies [
593dd30e
]:- @shopify/hydrogen-react@2024.4.4