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/[email protected]
Minor Changes
#858
eae3490
Thanks @michenly! - Upgrade default Storefront API to version '2022-04'. Some components have been updated to use the 2022-04 features and types as well.One important change is that the
2022-04
Storefront API no longer encodes object IDs: see more details here. Because of this, Hydrogen will no longer decode IDs, either, which will cause issues if you are using a previous version of the Storefront API with Hydrogen components.[email protected]
Minor Changes
#858
eae3490
Thanks @michenly! - Upgrade default Storefront API to version '2022-04'. Some components have been updated to use the 2022-04 features and types as well.One important change is that the
2022-04
Storefront API no longer encodes object IDs: see more details here. Because of this, Hydrogen will no longer decode IDs, either, which will cause issues if you are using a previous version of the Storefront API with Hydrogen components.#858
eae3490
Thanks @michenly! - AddsqueryShop
helper to API routes. This makes it easy to query the Storefront API, similar to howuseShopQuery
is available in server components:queryShop
accepts a single argument object with the following properties:query
string | ASTNode
variables
Record<string, any>
locale
string
(defaults todefaultLocale
)Important: In order to use
queryShop
, you should passshopifyConfig
torenderHydrogen
insideApp.server.jsx
:#858
eae3490
Thanks @michenly! - Routing in Hydrogen has been updated according to Custom Routes proposal. Specifically, a newRouter
component has been added, andDefaultRoutes
has been renamed toFileRoutes
, along with other minor changes. Custom route components are not implemented yet.Follow these steps to upgrade your
App.server.jsx
file:pages
toroutes
when callingrenderHydrogen
.DefaultRoutes
component toFileRoutes
.Router
component as a parent ofFileRoutes
and passfallback
andserverProps
props (previously inDefaultRoutes
).src/pages
directory tosrc/routes
and update the glob import inApp.server.jsx
toimport.meta.globEager('./routes/**/*.server.[jt](s|sx)')
.Full example of
App.server.jsx
Patch Changes
#858
eae3490
Thanks @michenly! - Export Seo components Fragement and use them in the starter template.#852
6015edf
Thanks @frandiox! - Update @headlessui/react version to fix Cart dialog not opening.@shopify/[email protected]
Minor Changes
#858
eae3490
Thanks @michenly! - Export Seo components Fragement and use them in the starter template.#858
eae3490
Thanks @michenly! - Move any staticFragment
properties on components to the entry point@shopify/hydrogen/fragments
.The migration diff are as follows:
#858
eae3490
Thanks @michenly! - Updated the ExternalVideo component to use the newembedUrl
Storefront API (introduced in 2022-04) on ExternalVideo.#858
eae3490
Thanks @michenly! - Upgrade default Storefront API to version '2022-04'. Some components have been updated to use the 2022-04 features and types as well.One important change is that the
2022-04
Storefront API no longer encodes object IDs: see more details here. Because of this, Hydrogen will no longer decode IDs, either, which will cause issues if you are using a previous version of the Storefront API with Hydrogen components.#858
eae3490
Thanks @michenly! - AddsqueryShop
helper to API routes. This makes it easy to query the Storefront API, similar to howuseShopQuery
is available in server components:queryShop
accepts a single argument object with the following properties:query
string | ASTNode
variables
Record<string, any>
locale
string
(defaults todefaultLocale
)Important: In order to use
queryShop
, you should passshopifyConfig
torenderHydrogen
insideApp.server.jsx
:#858
eae3490
Thanks @michenly! - Routing in Hydrogen has been updated according to Custom Routes proposal. Specifically, a newRouter
component has been added, andDefaultRoutes
has been renamed toFileRoutes
, along with other minor changes. Custom route components are not implemented yet.Follow these steps to upgrade your
App.server.jsx
file:pages
toroutes
when callingrenderHydrogen
.DefaultRoutes
component toFileRoutes
.Router
component as a parent ofFileRoutes
and passfallback
andserverProps
props (previously inDefaultRoutes
).src/pages
directory tosrc/routes
and update the glob import inApp.server.jsx
toimport.meta.globEager('./routes/**/*.server.[jt](s|sx)')
.Full example of
App.server.jsx
Patch Changes
#858
eae3490
Thanks @michenly! - UpdatelinesAdd
to create cart if cart does not exist.#858
eae3490
Thanks @michenly! - Hydrogen docs: Static assets and component props#858
eae3490
Thanks @michenly! - Do not scroll to top if the URL pathname has not changed.#858
eae3490
Thanks @michenly! - Add null check for ShopifyProvider#858
eae3490
Thanks @michenly! - Ignore when boomerang doesn't load. This often happens when a adblocker is present on the client.There is no longer an uncaught promise exception in the console.
#858
eae3490
Thanks @michenly! - Avoid accessing undefined global __flight as a side effect of another unknown error.#858
eae3490
Thanks @michenly! - Disable worker streaming until it is properly supported.#858
eae3490
Thanks @michenly! - Minify server build output#858
eae3490
Thanks @michenly! - Improve logging for useShopQuery errors#858
eae3490
Thanks @michenly! -@shopify/hydrogen
will no longer export the following typesAny Component props type should be typed instead with
React.ComponentProps<typeof MyComponent>
.#858
eae3490
Thanks @michenly! - Attributes from<html>
and<body>
elements inindex.html
are now included in the SSR response.#858
eae3490
Thanks @michenly! - Support non-PascalCase filenames for client components.#858
eae3490
Thanks @michenly! - Updated graphql-codegen, which updates the Typescript types available for each Storefront API object#858
eae3490
Thanks @michenly! - Fix server the server to only log once for the full time it takes to stream render a page#858
eae3490
Thanks @michenly! - Respond with 404 if the route has no matches.#858
eae3490
Thanks @michenly! - Update MediaFile's options prop type to included Image options.#858
eae3490
Thanks @michenly! - Hydrogen docs: Strict mode#858
eae3490
Thanks @michenly! - Remove Router client-only logic from server bundle and avoid extra waterfall requests during Hydration.Extract part of the client bundle into separate modules that can be loaded in parallel.