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 v1.x-2022-07, this PR will be updated.
Releases
@shopify/[email protected]
Minor Changes
#1570
36f26e54
Thanks @frehner! -<Image/>
now takes into account a specific order for determining the width and height.loaderOptions
's width/heightdata
's width/heightgetShopifyImageDimensions()
was also updated to handle this logic.#1506
58d6ef55
Thanks @wizardlyhel! - Hydrogen now supports full-page caching out of the box. Previously, Hydrogen relied on the network edge to provide full-page caching for dynamic responses (HTML).#1346
01814369
Thanks @lordofthecactus! - AddonClick
andbuttonRef
props toAddToCartButton
,BuyNowButton
andCartLineQuantityAdjustButton
#1523
4ef2e5b9
Thanks @blittle! - We've simplified the built-in Hydrogen caching strategies. Instead ofCacheSeconds
,CacheMinutes
,CacheHours
,CacheDays
,CacheMonths
, andNoStore
, there is no simplyCacheLong
,CacheShort
, andCacheNone
. Please remember that you can build your own caching strategies.#1513
8d67b559
Thanks @frandiox! - Breaking change: We are starting to useexports
property inpackage.json
to list all the entry points in this package.This might incur breaking changes in some rare cases when importing private properties from Hydrogen
dist
files. Notice that we discourage doing so for anything that is not publicly documented but, if your app was relying on some private properties, then this might help:Aside from that, it is recommended that TypeScript projects update the
tsconfig.json
file to usecompilerOptions.moduleResolution: "node16"
to make sure Hydrogen types are loaded in your editor.For JavaScript projects, create or edit
<root>/jsconfig.json
file with the following information to improve typings:#1528
72d21b87
Thanks @frehner! - Metafields have changed in Storefront API2022-07
. We updated our code to work with that update, which means that the following changes will only work if you're using2022-07
or newer.Metafields changes
Storefront API
2022-07
Metafields have changed how you access them in the Storefront API. See the release notes for more details. In order to support the new way of querying metafields, Hydrogen has made the following updates:
<Metafield/>
Previously, the
<Metafield/>
component expected you to useuseParseMetafields()
before passing a metafield to it.Now,
<Metafield/>
will useparseMetafield()
itself so that you don't have to. However, this does mean that if you useparseMetafield()
and then pass it to<Metafield/>
, it will likely break because it will try to parse your metafield's value a second time.useParsedMetafields()
andparseMetafield()
Deprecated
useParsedMetafields()
in favor ofparseMetafield()
.parseMetafield()
takes in a single metafield and returns a new object, and importantly it can be used on both the client and the server.If you need to memoize the value on the client, then you can do so using
React.memo
:#1517
68b8185e
Thanks @frandiox! - Breaking change: The utilities used inhydrogen.config.js
file are now exported from@shopiy/hydrogen/config
instead of@shopify/hydrogen
:Patch Changes
#1494
3b549439
Thanks @jplhomer! - UpdateflattenConnection
to acceptnodes
andedges
payloads#1579
2f75247c
Thanks @frandiox! - Support renaming client component exports in intermediate/facade files.#1562
d38f6413
Thanks @wizardlyhel! - Add storefront id to useShopQuery calls when available#1593
ae35b70b
Thanks @juanpprieto! - Ensure the effect that updates thecart.buyerIdenity.countryCode
is run whencountyCode
prop changes#1504
cc453242
Thanks @jplhomer! - Fix read-only request.status in worker environments.#1548
923cb140
Thanks @cartogram! - Add new devTools interface for performance, settings and graphQL tracking#1375
217b5f23
Thanks @blittle! - Add a built-in healthcheck route available at/__health
. It responds with a 200 and no body. Also suppresses server logs for built-in routes like healthcheck and analytics.#1541
4fde81f9
Thanks @frandiox! - Fix support for latest React@experimental version.#1497
3364225f
Thanks @blittle! - Improve waterfall detection#1519
d54b1072
Thanks @frandiox! - Improve CPU performance of theuseMoney
hook.#1518
f0b69477
Thanks @frandiox! - Compile code to latest supported ES version in workers and Node.#1571
accdc78a
Thanks @jplhomer! - Upgrade Hydrogen to React v18.2. To update your app, runyarn add @shopify/hydrogen@latest react@latest react-dom@latest
.#1578
f5290393
Thanks @frandiox! - Fix an issue where newly imported client components were not found in the browser.#1556
06f3d174
Thanks @blittle! - Add support forRequest.formData()
within API Routes for Node 16-17. Example:[email protected]
Patch Changes
689aa68f
Thanks @cartogram! - Deprecate create-hydrogen-app in favor of @shopify/create-hydrogen